15 Commits

Author SHA1 Message Date
eyedeekay
6e7b711a65 re-add deb uploads 2024-09-17 22:45:02 -04:00
eyedeekay
03a40a7905 use git archive 2024-09-17 22:44:21 -04:00
eyedeekay
468184528a fix target for testing locally 2024-09-17 22:11:15 -04:00
eyedeekay
caa8356f96 fix target for testing locally 2024-09-17 22:10:19 -04:00
eyedeekay
55cecee87c fix the checkinstall target 2024-09-17 22:07:24 -04:00
eyedeekay
9452295b69 update libraries 2024-09-17 20:38:19 -04:00
eyedeekay
3eaa3e545c upgrade checki2cp library to fix missing i2pd bug 2024-09-16 14:53:17 -04:00
eyedeekay
d94e6db309 Change rsync option to --update in REMOTE-SSH.md guide 2024-07-04 13:34:50 -04:00
eyedeekay
03c7ee8301 Fix caps 2024-07-04 00:35:59 -04:00
eyedeekay
bb1c2263ab Add ssh-focused reseed docs 2024-07-01 22:43:16 -04:00
eyedeekay
d5c3013861 Only try to fetch a remote netDB when we actually have one 2024-06-30 01:40:32 -04:00
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
9 changed files with 235 additions and 39 deletions

View File

@@ -1,11 +1,13 @@
VERSION=$(shell go build; ./reseed-tools --version | tr -d 'abcdefghijklmnopqrstuvwxyz\- ')
VERSION=0.3.2
APP=reseed-tools
USER_GH=eyedeekay
SIGNER=hankhill19580@gmail.com
CGO_ENABLED=0
export CGO_ENABLED=0
PLUGIN_PORT=7671
export PLUGIN_PORT=7671
prefix?=/
GOOS?=$(shell uname -s | tr A-Z a-z)
GOARCH?="amd64"
@@ -23,6 +25,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
@@ -36,33 +41,31 @@ clean:
rm reseed-tools-* tmp -rfv *.deb plugin reseed-tools
tar:
tar --exclude="./.git" --exclude="./tmp" --exclude=".vscode" --exclude="./*.pem" --exclude="./*.crl" --exclude="./*.crt" -cvf ../reseed-tools.tar.xz .
git archive --format=tar.gz --output=reseed-tools.tar.gz v$(VERSION)
install:
install -m755 reseed-tools-$(GOOS)-$(GOARCH) ${prefix}/usr/bin/reseed-tools
install -m644 etc/default/reseed ${prefix}/etc/default/reseed
install -m755 etc/init.d/reseed ${prefix}/etc/init.d/reseed
install -g i2psvc -o i2psvc -D -d ${prefix}/var/lib/i2p/i2p-config/reseed/
cp -r reseed/content ${prefix}/var/lib/i2p/i2p-config/reseed/content
chown -R i2psvc:i2psvc ${prefix}/var/lib/i2p/i2p-config/reseed/
install -g i2psvc -o i2psvc -D -d ${prefix}/etc/systemd/system/reseed.service.d/
install -m644 etc/systemd/system/reseed.service.d/override.conf ${prefix}/etc/systemd/system/reseed.service.d/override.conf
install -m644 etc/systemd/system/reseed.service ${prefix}/etc/systemd/system/reseed.service
install -m755 reseed-tools-$(GOOS)-$(GOARCH) ${prefix}usr/bin/reseed-tools
install -m644 etc/default/reseed ${prefix}etc/default/reseed
install -m755 etc/init.d/reseed ${prefix}etc/init.d/reseed
install -g i2psvc -o i2psvc -D -d ${prefix}var/lib/i2p/i2p-config/reseed/
install -g i2psvc -o i2psvc -D -d ${prefix}etc/systemd/system/reseed.service.d/
install -m644 etc/systemd/system/reseed.service.d/override.conf ${prefix}etc/systemd/system/reseed.service.d/override.conf
install -m644 etc/systemd/system/reseed.service ${prefix}etc/systemd/system/reseed.service
uninstall:
rm ${prefix}/usr/bin/reseed-tools
rm ${prefix}/etc/default/reseed
rm ${prefix}/etc/init.d/reseed
rm ${prefix}/etc/systemd/system/reseed.service.d/reseed.conf
rm ${prefix}/etc/systemd/system/reseed.service
rm -rf ${prefix}/var/lib/i2p/i2p-config/reseed/
rm -rf ${prefix}bin/reseed-tools
rm -rf ${prefix}etc/default/reseed
rm -rf ${prefix}etc/init.d/reseed
rm -rf ${prefix}etc/systemd/system/reseed.service.d/reseed.conf
rm -rf ${prefix}etc/systemd/system/reseed.service
rm -rf ${prefix}var/lib/i2p/i2p-config/reseed/
checkinstall: build
checkinstall \
checkinstall:
checkinstall -D \
--arch=$(GOARCH) \
--default \
--install=no \
--fstrans=no \
--fstrans=yes \
--pkgname=reseed-tools \
--pkgversion=$(VERSION) \
--pkggroup=net \
@@ -74,8 +77,7 @@ checkinstall: build
--nodoc \
--deldoc=yes \
--deldesc=yes \
--backup=no \
-D make install
--backup=no
### You shouldn't need to use these now that the go mod require rule is fixed,
## but I'm leaving them in here because it made it easier to test that both
@@ -102,12 +104,12 @@ gofmt:
try:
mkdir -p tmp && \
cd tmp && \
../reseed-tools-$(GOOS)-$(GOARCH) reseed --signer=you@mail.i2p --netdb=/home/idk/.i2p/netDb --tlsHost=your-domain.tld --onion --p2p --i2p
../reseed-tools-$(GOOS)-$(GOARCH) reseed --signer=fake@mail.i2p --netdb=${HOME}/.i2p/netDb --tlsHost=your-domain.tld --i2p
stop:
mkdir -p tmp && \
cd tmp && \
../reseed-tools-$(GOOS)-$(GOARCH) reseed --signer=you@mail.i2p --netdb=/home/idk/.i2p/netDb --tlsHost=your-domain.tld --onion --p2p --i2p
../reseed-tools-$(GOOS)-$(GOARCH) reseed --signer=fake@mail.i2p --netdb=${HOME}/.i2p/netDb --tlsHost=your-domain.tld --i2p
docker:
docker build -t eyedeekay/reseed .
@@ -173,7 +175,7 @@ jar: gojava
echo $(JAVA_HOME)
./gojava -v -o reseed.jar -s . build ./reseed
release: version upload binary upload-bin plugins upload-plugins
release: version upload binary upload-bin plugins upload-plugins debs upload-debs
version:
head -n 5 README.md | github-release release -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -d -; true
@@ -185,7 +187,7 @@ edit:
cat README.md | github-release edit -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -d -
upload: tar
github-release upload -R -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -f ../reseed-tools.tar.xz -n "reseed-tools.tar.xz"
github-release upload -R -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -f ../reseed-tools.tar.gz -n "reseed-tools.tar.gz"
binary:
##export GOOS=darwin; export GOARCH=amd64; make build

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")

94
docs/REMOTE-SSH.md Normal file
View File

@@ -0,0 +1,94 @@
Using a remote Network Database with SSH
========================================
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 host.
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 `rsync+ssh` and `cron` where I2P is running as a user(not as `i2psvc`).
It requires 2 hosts with exposed SSH ports that can reach eachother.
It also pretty much assumes you're using something based on Debian.
Why?
----
In most setups, a reseed service is using a network database which is kept on the same server as the I2P router where it finds it's netDb.
This is convenient, however if reseed servers are targeted for a RouterInfo spam attack, then the reseed server could potentially be overwhelmed with spammy routerInfos.
That impairs a new user's ability to join the network and slows down network integration.
SSH-Protected Retrieval of NetDB content over I2P
-----------------------------------------------
In this guide, the NetDB is retrieved from a remote router by the reseed server.
### On the Remote Router
Install openssh-server and rsync and enable the service:
```sh
sudo apt install openssh-server rsync
sudo systemctl enable ssh
```
### On the Reseed Server
Set up SSH and generate new keys, without passwords:
```sh
ssh-keygen -f ~/.ssh/netdb_sync_ed25519 -N ""
```
Then, copy the keys to the remote router:
```sh
ssh-copy-id -f ~/.ssh/netdb_sync_ed25519 $(UserRunningI2P)@$(RemoteRouter)
```
After, set up the `cron` job to copy the netDB.
```sh
crontab -e
>>
* 30 * * * rsync --update -raz $(UserRunningI2P)@$(RemoteRouter):$(/Path/To/Remote/NetDB) $(Path/To/My/NetDB)
```
SSH-Protected Sharing of NetDB content over I2P
-----------------------------------------------
In this guide, the NetDB is pushed to a reseed server by a remote router.
### On the Reseed Server
Install openssh-server and rsync and enable the service:
```sh
sudo apt install openssh-server rsync
sudo systemctl enable ssh
```
Next, stop your reseed server.
```sh
killall reseed-tools
```
### On the Remote Router
Start by setting up SSH and generating new keys, without passwords:
```sh
ssh-keygen -f ~/.ssh/netdb_sync_ed25519 -N ""
```
Then, copy the keys to the Reseed Server:
```sh
ssh-copy-id -f ~/.ssh/netdb_sync_ed25519 $(UserRunningReseed)@$(ReseedServer)
```
After, set up the `cron` job to copy the netDB.
```sh
crontab -e
>>
* 30 * * * rsync --update -raz $(/Path/To/My/NetDB) $(UserRunningReseed)@$(ReseedServer):/$(Path/To/Reseed/NetDB)
```

47
docs/REMOTE.md Normal file
View File

@@ -0,0 +1,47 @@
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 host.
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`.
It requires only `reseed-tools` and an I2P router.
Presumably, if you are reading this document, you are already comfortable running both of these pieces of software.
Why?
----
In most setups, a reseed service is using a network database which is kept on the same server as the I2P router where it finds it's netDb.
This is convenient, however if reseed servers are targeted for a RouterInfo spam attack, then the reseed server could potentially be overwhelmed with spammy RouterInfos.
That impairs a new user's ability to join the network and slows down network integration.
Password-Protected Sharing of NetDB content over I2P
----------------------------------------------------
This method uses SAMv3 via the `onramp` library with `wide` tunnel options(1 hop, 2 tunnels) on both sides.
By using I2P, this method trades some performance for ofuscation.
However, the data is tiny so in-practice it works very well.
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.

22
go.mod
View File

@@ -3,21 +3,37 @@ module i2pgit.org/idk/reseed-tools
go 1.16
require (
github.com/andybalholm/brotli v1.0.0 // indirect
github.com/cretz/bine v0.2.0
github.com/eyedeekay/checki2cp v0.0.21
github.com/eyedeekay/checki2cp v0.33.8
github.com/eyedeekay/go-fpw v0.0.0-20200512022837-c8b4dcdc74d4 // indirect
github.com/eyedeekay/go-i2pd v0.0.0-20220213070306-9807541b2dfc
github.com/eyedeekay/i2pkeys v0.33.7
github.com/eyedeekay/i2pkeys v0.33.8
github.com/eyedeekay/onramp v0.33.7
github.com/eyedeekay/sam3 v0.33.7
github.com/eyedeekay/ramp v0.0.0-20190429201811-305b382042ab // indirect
github.com/eyedeekay/sam3 v0.33.8
github.com/eyedeekay/unembed v0.0.0-20230123014222-9916b121855b
github.com/go-acme/lego/v4 v4.3.1
github.com/go-i2p/go-i2p v0.0.0-20240625160418-ac705dee767b
github.com/golang/gddo v0.0.0-20200324184333-3c2cc9a6329d // indirect
github.com/gorilla/handlers v1.5.1
github.com/jpillora/go-tcp-proxy v1.0.0 // indirect
github.com/justinas/alice v1.2.0
github.com/klauspost/compress v1.10.5 // indirect
github.com/klauspost/pgzip v1.2.3 // indirect
github.com/majestrate/i2p-tools v0.0.0-20170507194519-afc8e46afa95 // indirect
github.com/mholt/archiver v3.1.1+incompatible // indirect
github.com/mholt/archiver/v3 v3.3.0 // indirect
github.com/nwaples/rardecode v1.1.0 // indirect
github.com/otiai10/copy v1.14.0
github.com/pierrec/lz4 v2.5.2+incompatible // indirect
github.com/rglonek/untar v0.0.1
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
github.com/throttled/throttled/v2 v2.7.1
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/urfave/cli/v3 v3.0.0-alpha
github.com/ybbus/jsonrpc v2.1.2+incompatible // indirect
github.com/zserge/lorca v0.1.9 // indirect
gitlab.com/golang-commonmark/markdown v0.0.0-20191127184510-91b5b3c99c19
golang.org/x/text v0.15.0
)

34
go.sum
View File

@@ -107,21 +107,32 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/exoscale/egoscale v0.46.0/go.mod h1:mpEXBpROAa/2i5GC0r33rfxG+TxSEka11g1PIXt9+zc=
github.com/eyedeekay/checki2cp v0.0.21 h1:DVer7H6RffCWS8Bo3+J6EyppUc1y8lvApKdQnAiVj5g=
github.com/eyedeekay/checki2cp v0.0.21/go.mod h1:75sGwBgnacHmxxx8RQ7BIeS0gu5Pw916gFb2c80OUTc=
github.com/eyedeekay/checki2cp v0.0.22 h1:GrgBzQBWGRa2rBLK/9fdRlgRqs2BLt8kqMoo/x5Srvs=
github.com/eyedeekay/checki2cp v0.0.22/go.mod h1:n40YU2DtJI4iW6H8Wdqma062PI6L2ruVpG8QtsOjYRQ=
github.com/eyedeekay/checki2cp v0.33.8 h1:h31UDIuTP7Pv0T332RlRUieTwaNT+LoLPPLOhkwecsk=
github.com/eyedeekay/checki2cp v0.33.8/go.mod h1:n40YU2DtJI4iW6H8Wdqma062PI6L2ruVpG8QtsOjYRQ=
github.com/eyedeekay/go-fpw v0.0.0-20200512022837-c8b4dcdc74d4/go.mod h1:RyCx7KuH+5ryvIpUF7SpxiChLtjeuPbVFCIzf8shIFc=
github.com/eyedeekay/go-i2cp v0.0.0-20190716135428-6d41bed718b0 h1:rnn9OlD/3+tATEZNuiMR1C84O5CX8bZL2qqgttprKrw=
github.com/eyedeekay/go-i2cp v0.0.0-20190716135428-6d41bed718b0/go.mod h1:+P0fIhkqIYjo7exMJRTlSteRMbRyHbiBiKw+YlPWk+c=
github.com/eyedeekay/go-i2pcontrol v0.0.0-20200110011336-510cca77e350/go.mod h1:bhIQsVpbNNXMtcoZ9UF4hLQleOjaCgKGXiRRhNc8TOA=
github.com/eyedeekay/go-i2pcontrol v0.1.6/go.mod h1:976YyzS3THPwlBelkp3t1pMzzsjyn96eLaVdhaaSI78=
github.com/eyedeekay/go-i2pd v0.0.0-20220213070306-9807541b2dfc h1:ozp8Cxn9nsFF+p4tMcE63G0Kx+2lEywlCW0EvtISEZg=
github.com/eyedeekay/go-i2pd v0.0.0-20220213070306-9807541b2dfc/go.mod h1:Yg8xCWRLyq0mezPV+xJygBhJCf7wYsIdXbYGQk5tnW8=
github.com/eyedeekay/goSam v0.32.31-0.20210122211817-f97683379f23/go.mod h1:UgJnih/LpotwKriwVPOEa6yPDM2NDdVrKfLtS5DOLPE=
github.com/eyedeekay/i2pd v0.3.0-1stbinrelease.0.20210702172028-5d01ee95810a/go.mod h1:4qJhWn+yNrWRbqFHhU8kl7JgbcW1hm3PMgvlPlxO3gg=
github.com/eyedeekay/i2pkeys v0.33.7 h1:cxqHSkl6b2lHyPJUtIQZBiipYf7NQVYqM1d3ub0MI4k=
github.com/eyedeekay/i2pkeys v0.33.7/go.mod h1:W9KCm9lqZ+Ozwl3dwcgnpPXAML97+I8Jiht7o5A8YBM=
github.com/eyedeekay/i2pkeys v0.33.8 h1:f3llyruchFqs1QwCacBYbShArKPpMSSOqo/DVZXcfVs=
github.com/eyedeekay/i2pkeys v0.33.8/go.mod h1:W9KCm9lqZ+Ozwl3dwcgnpPXAML97+I8Jiht7o5A8YBM=
github.com/eyedeekay/onramp v0.33.7 h1:LkPklut7Apa6CPGdIoOJpyIpzP9H/Jw7RKvrVxEEYEM=
github.com/eyedeekay/onramp v0.33.7/go.mod h1:+Dutoc91mCHLJlYNE3Ir6kSfmpEcQA6/RNHnmVVznWg=
github.com/eyedeekay/ramp v0.0.0-20190429201811-305b382042ab/go.mod h1:h7mvUAMgZ/rtRDUOkvKTK+8LnDMeUhJSoa5EPdB51fc=
github.com/eyedeekay/sam3 v0.32.2/go.mod h1:Y3igFVzN4ybqkkpfUWULGhw7WRp8lieq0ORXbLBbcZM=
github.com/eyedeekay/sam3 v0.32.32/go.mod h1:qRA9KIIVxbrHlkj+ZB+OoxFGFgdKeGp1vSgPw26eOVU=
github.com/eyedeekay/sam3 v0.33.7 h1:GPYHG4NHxvhqPbGNJ3wKvUQyZSTCmX17f5L5QvyefGs=
github.com/eyedeekay/sam3 v0.33.7/go.mod h1:25cRGEFawSkbiPNSh7vTUIpRtEYLVLg/4J4He6LndAY=
github.com/eyedeekay/sam3 v0.33.8 h1:emuSZ4qSyoqc1EDjIBFbJ3GXNHOXw6hjbNp2OqdOpgI=
github.com/eyedeekay/sam3 v0.33.8/go.mod h1:ytbwLYLJlW6UA92Ffyc6oioWTKnGeeUMr9CLuJbtqSA=
github.com/eyedeekay/unembed v0.0.0-20230123014222-9916b121855b h1:QyCSwbHpkJtKGvIvHsvvlbDkf7/3a8qUlaa4rEr8myQ=
github.com/eyedeekay/unembed v0.0.0-20230123014222-9916b121855b/go.mod h1:A6dZU88muI132XMrmdM0+cc2yIuwmhwgRfyrU54DjPc=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
@@ -136,6 +147,15 @@ github.com/gabriel-vasile/mimetype v1.4.0 h1:Cn9dkdYsMIu56tGho+fqzh7XmvY2YyGU0Fn
github.com/gabriel-vasile/mimetype v1.4.0/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmxRtOJlERCzSmRvr8=
github.com/garyburd/redigo v1.1.1-0.20170914051019-70e1b1943d4f/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
github.com/getkin/kin-openapi v0.13.0/go.mod h1:WGRs2ZMM1Q8LR1QBEwUxC6RJEfaBcD0s+pcEVXFuAjw=
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520/go.mod h1:L+mq6/vvYHKjCX2oez0CgEAJmbq1fbb/oNJIWQkBybY=
github.com/getlantern/errors v1.0.1/go.mod h1:l+xpFBrCtDLpK9qNjxs+cHU6+BAdlBaxHqikB6Lku3A=
github.com/getlantern/go-socks5 v0.0.0-20171114193258-79d4dd3e2db5/go.mod h1:kGHRXch95rnGLHjER/GhhFiHvfnqNz7KqWD9kGfATHY=
github.com/getlantern/golog v0.0.0-20201105130739-9586b8bde3a9/go.mod h1:ZyIjgH/1wTCl+B+7yH1DqrWp6MPJqESmwmEQ89ZfhvA=
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7/go.mod h1:dD3CgOrwlzca8ed61CsZouQS5h5jIzkK9ZWrTcf0s+o=
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55/go.mod h1:6mmzY2kW1TOOrVy+r41Za2MxXM+hhqTtY3oBKd2AgFA=
github.com/getlantern/netx v0.0.0-20190110220209-9912de6f94fd/go.mod h1:wKdY0ikOgzrWSeB9UyBVKPRhjXQ+vTb+BPeJuypUuNE=
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA=
github.com/getlantern/ops v0.0.0-20200403153110-8476b16edcd6/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-acme/lego/v4 v4.3.1 h1:rzmg0Gpy25B/exXjl+KgpG5Xt6wN5rFTLjRf/Uf3pfg=
github.com/go-acme/lego/v4 v4.3.1/go.mod h1:tySA24ifl6bI7kZ0+ocGtTIv4H1yhYVFAgyMHF2DSRg=
@@ -208,6 +228,7 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/renameio v1.0.0/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWUAweKUpk=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
@@ -362,6 +383,7 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
github.com/oracle/oci-go-sdk v24.3.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
@@ -370,6 +392,7 @@ github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks=
github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM=
github.com/ovh/go-ovh v1.1.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/pelletier/go-toml v1.0.1-0.20170904195809-1d6b12b7cb29/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
@@ -410,8 +433,10 @@ github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKc
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rglonek/untar v0.0.1 h1:fI1QmP07eQvOgudrUP/NDUCob56JuAYlLDknxX8485A=
github.com/rglonek/untar v0.0.1/go.mod h1:yq/FZcge2BBdmPQEShskttgtHZG+LOtiHZyXknL54a0=
github.com/riobard/go-x25519 v0.0.0-20190716001027-10cc4d8d0b33/go.mod h1:BjmVxzAnkLeoEbqHEerI4eSw6ua+RaIB0S4jMV21RAs=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/russross/blackfriday v2.0.0+incompatible h1:cBXrhZNUf9C+La9/YpS+UHpUT8YD6Td9ZMSU9APFcsk=
github.com/russross/blackfriday v2.0.0+incompatible/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
@@ -489,6 +514,8 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE=
github.com/ybbus/jsonrpc/v2 v2.1.7/go.mod h1:rIuG1+ORoiqocf9xs/v+ecaAVeo3zcZHQgInyKFMeg0=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/zserge/lorca v0.1.9/go.mod h1:bVmnIbIRlOcoV285KIRSe4bUABKi7R7384Ycuum6e4A=
gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181 h1:K+bMSIx9A7mLES1rtG+qKduLIXq40DAzYHtb0XuCukA=
@@ -600,6 +627,7 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
@@ -671,6 +699,7 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -680,6 +709,7 @@ golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o=
@@ -693,6 +723,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
@@ -740,11 +771,13 @@ golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapK
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200410194907-79a7a3126eef/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.0.0-20170921000349-586095a6e407/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
@@ -835,6 +868,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.6/go.mod h1:pyyisuGw24ruLjrr1ddx39WE0y9OooInRzEYLhQB2YY=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

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",

View File

@@ -273,6 +273,7 @@ func (db *LocalNetDbImpl) RouterInfos() (routerInfos []routerInfo, err error) {
riStruct = nil
continue
}
// skip crappy routerInfos
if riStruct.Reachable() && riStruct.UnCongested() && riStruct.GoodVersion() {
routerInfos = append(routerInfos, routerInfo{