Embed an i2pd router, and launch it as a last resort.

This commit is contained in:
idk
2022-02-13 02:13:22 -05:00
parent a081be6a27
commit 9e9e63d215
4 changed files with 71 additions and 20 deletions

View File

@ -16,6 +16,8 @@ import (
"github.com/itchio/headway/state"
tbget "i2pgit.org/idk/i2p.plugins.tor-manager/get"
tbserve "i2pgit.org/idk/i2p.plugins.tor-manager/serve"
i2pd "github.com/eyedeekay/go-i2pd/goi2pd"
)
/*
@ -164,6 +166,11 @@ func main() {
}
} else {
log.Fatal("Failed to run I2P", err)
closer := i2pd.InitI2PSAM()
defer closer()
go i2pd.StartI2P()
//time.Sleep(time.Hour)
defer i2pd.StopI2P()
//TODO: Link libi2pd and start our own router if we cant find one anywhere.
//TODO: loop again until TestHTTPDefaultProxy is up
}