4 Commits

Author SHA1 Message Date
eyedeekay
82cead1e3e Only try to fetch a remote netDB when we actually have one 2024-06-30 01:39:35 -04:00
eyedeekay
7f6c6a4cb3 fix release tool 2024-06-30 01:31:52 -04:00
eyedeekay
fb9985e65c fix release tool 2024-06-30 01:31:04 -04:00
eyedeekay
e5f50aa62e Add remote host instructions 2024-06-30 01:22:16 -04:00
5 changed files with 50 additions and 11 deletions

View File

@@ -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
USER_GH=eyedeekay
CGO_ENABLED=0
@@ -23,6 +23,9 @@ WHOAMI=$(shell whoami)
echo:
@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:
edgar

View File

@@ -281,17 +281,19 @@ func reseedAction(c *cli.Context) error {
}
signerID = string(bytes)
}
count := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
for i := range count {
err := downloadRemoteNetDB(c.String("share-peer"), c.String("share-password"), c.String("netdb"), c.String("samaddr"))
if err != nil {
log.Println("Error downloading remote netDb,", err, "retrying in 10 seconds", i, "attempts remaining")
time.Sleep(time.Second * 10)
} else {
break
if c.String("share-peer") != "" {
count := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
for i := range count {
err := downloadRemoteNetDB(c.String("share-peer"), c.String("share-password"), c.String("netdb"), c.String("samaddr"))
if err != nil {
log.Println("Error downloading remote netDb,", err, "retrying in 10 seconds", i, "attempts remaining")
time.Sleep(time.Second * 10)
} 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
tlsHost := c.String("tlsHost")

34
docs/REMOTE.md Normal file
View 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.

View File

@@ -19,7 +19,7 @@ func main() {
app := cli.NewApp()
app.Name = "reseed-tools"
app.Version = "0.3.0"
app.Version = "0.3.1"
app.Usage = "I2P tools and reseed server"
auth := &cli.Author{
Name: "eyedeekay",