mirror of
https://github.com/go-i2p/reseed-tools.git
synced 2025-09-19 19:09:40 -04:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
82cead1e3e | ||
![]() |
7f6c6a4cb3 | ||
![]() |
fb9985e65c | ||
![]() |
e5f50aa62e |
5
Makefile
5
Makefile
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
VERSION=$(shell go build; ./reseed-tools --version | tr -d 'abcdefghijklmnopqrstuvwxyz\- ')
|
VERSION=`./reseed-tools-host --version | tr -d 'abcdefghijklmnopqrstuvwxyz\- '`
|
||||||
APP=reseed-tools
|
APP=reseed-tools
|
||||||
USER_GH=eyedeekay
|
USER_GH=eyedeekay
|
||||||
CGO_ENABLED=0
|
CGO_ENABLED=0
|
||||||
@@ -23,6 +23,9 @@ WHOAMI=$(shell whoami)
|
|||||||
echo:
|
echo:
|
||||||
@echo "type make version to do release $(APP) $(VERSION) $(GOOS) $(GOARCH) $(MIN_GO_VERSION) $(I2P_UID) $(I2P_GID)"
|
@echo "type make version to do release $(APP) $(VERSION) $(GOOS) $(GOARCH) $(MIN_GO_VERSION) $(I2P_UID) $(I2P_GID)"
|
||||||
|
|
||||||
|
host:
|
||||||
|
/usr/bin/go build -o reseed-tools-host
|
||||||
|
|
||||||
index:
|
index:
|
||||||
edgar
|
edgar
|
||||||
|
|
||||||
|
@@ -281,17 +281,19 @@ func reseedAction(c *cli.Context) error {
|
|||||||
}
|
}
|
||||||
signerID = string(bytes)
|
signerID = string(bytes)
|
||||||
}
|
}
|
||||||
count := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
|
if c.String("share-peer") != "" {
|
||||||
for i := range count {
|
count := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
|
||||||
err := downloadRemoteNetDB(c.String("share-peer"), c.String("share-password"), c.String("netdb"), c.String("samaddr"))
|
for i := range count {
|
||||||
if err != nil {
|
err := downloadRemoteNetDB(c.String("share-peer"), c.String("share-password"), c.String("netdb"), c.String("samaddr"))
|
||||||
log.Println("Error downloading remote netDb,", err, "retrying in 10 seconds", i, "attempts remaining")
|
if err != nil {
|
||||||
time.Sleep(time.Second * 10)
|
log.Println("Error downloading remote netDb,", err, "retrying in 10 seconds", i, "attempts remaining")
|
||||||
} else {
|
time.Sleep(time.Second * 10)
|
||||||
break
|
} else {
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
go getSupplementalNetDb(c.String("share-peer"), c.String("share-password"), c.String("netdb"), c.String("samaddr"))
|
||||||
}
|
}
|
||||||
go getSupplementalNetDb(c.String("share-peer"), c.String("share-password"), c.String("netdb"), c.String("samaddr"))
|
|
||||||
|
|
||||||
var tlsCert, tlsKey string
|
var tlsCert, tlsKey string
|
||||||
tlsHost := c.String("tlsHost")
|
tlsHost := c.String("tlsHost")
|
||||||
|
34
docs/REMOTE.md
Normal file
34
docs/REMOTE.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
Using a remote Network Database
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Beginning in `reseed-tools 2.5.0` it is possible to use reseed-tools to "share" a netDb directory on one host with a reseed server on another hose.
|
||||||
|
This feature is built into the reseed-tools software.
|
||||||
|
It is also possible to do this manually using `sshfs`, `ssh` combined with `cron`, and most available backup utilities like `borg` and `syncthing`.
|
||||||
|
This guide only covers `reseed-tools`.
|
||||||
|
|
||||||
|
Password-Protected Sharing of NetDB content over I2P
|
||||||
|
----------------------------------------------------
|
||||||
|
|
||||||
|
Run this command on a well-integrated I2P router which is **not** hosting a reseed server on the same IP address.
|
||||||
|
To share the whole contents of your netDb directory over I2P, run reseed-tools with the following arguments:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
reseed-tools share --share-password $(use_a_strong_password) --netdb $(path_to_your_netdb)
|
||||||
|
```
|
||||||
|
|
||||||
|
In a few seconds, you will have a new I2P site which will provide your netDb as a `.tar.gz` file to anyone with the password.
|
||||||
|
Make a note of the base32 address of the new site for the next step.
|
||||||
|
|
||||||
|
Password-Protected Retrieval of Shared NetDB content over I2P
|
||||||
|
-------------------------------------------------------------
|
||||||
|
|
||||||
|
Run this command on a router hosting which **is** hosting a reseed server on the same IP address, or add the arguments to your existing command.
|
||||||
|
To retrieve a remote NetDB bundle from a hidden service, run reseed tools with the following arguments:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
reseed-tools reseed --share-peer $(thebase32addressyoumadeanoteofaboveintheotherstepnow.b32.i2p) --share-password $(use_a_strong_password) --netdb $(path_to_your_netdb)
|
||||||
|
```
|
||||||
|
|
||||||
|
Periodically, the remote `netdb.tar.gz` bundle will be fetched from the remote server and extracted to the `--netdb` directory.
|
||||||
|
If the `--netdb` directory is not empty, local RI's are left intact and never overwritten, essentially combining the local and remote netDb.
|
||||||
|
If the directory is empty, the remote netDb will be the only netDb used by the reseed server.
|
2
main.go
2
main.go
@@ -19,7 +19,7 @@ func main() {
|
|||||||
|
|
||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
app.Name = "reseed-tools"
|
app.Name = "reseed-tools"
|
||||||
app.Version = "0.3.0"
|
app.Version = "0.3.1"
|
||||||
app.Usage = "I2P tools and reseed server"
|
app.Usage = "I2P tools and reseed server"
|
||||||
auth := &cli.Author{
|
auth := &cli.Author{
|
||||||
Name: "eyedeekay",
|
Name: "eyedeekay",
|
||||||
|
Reference in New Issue
Block a user