Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
acaf528e9b | ||
![]() |
98293c4ded | ||
![]() |
c9c938911d | ||
![]() |
7b27889b3b | ||
![]() |
a8b0285358 | ||
![]() |
a734aef44b | ||
![]() |
3cdda753f2 | ||
![]() |
1bddf97144 | ||
![]() |
e07fffd966 | ||
![]() |
ca652b3ecd | ||
![]() |
2c0f017eb0 | ||
![]() |
78caae5ac0 | ||
![]() |
82252bc50d | ||
![]() |
7ac0b1d9a1 | ||
![]() |
573a2d900c |
@@ -6,3 +6,18 @@
|
|||||||
# CI cache folder storing docker images
|
# CI cache folder storing docker images
|
||||||
ci-exports
|
ci-exports
|
||||||
|
|
||||||
|
/i2p-tools
|
||||||
|
/cert.pem
|
||||||
|
/key.pem
|
||||||
|
/_netdb
|
||||||
|
i2pseeds.su3
|
||||||
|
*.pem
|
||||||
|
onion.key
|
||||||
|
tmp/
|
||||||
|
i2p-tools-*
|
||||||
|
*.crl
|
||||||
|
*.crt
|
||||||
|
*.pem
|
||||||
|
plugin
|
||||||
|
reseed-tools*
|
||||||
|
data-dir*
|
14
Makefile
14
Makefile
@@ -1,7 +1,9 @@
|
|||||||
|
|
||||||
VERSION=0.2.5
|
VERSION=0.2.8
|
||||||
APP=reseed-tools
|
APP=reseed-tools
|
||||||
USER_GH=eyedeekay
|
USER_GH=eyedeekay
|
||||||
|
CGO_ENABLED=0
|
||||||
|
export CGO_ENABLED=0
|
||||||
|
|
||||||
GOOS?=$(shell uname -s | tr A-Z a-z)
|
GOOS?=$(shell uname -s | tr A-Z a-z)
|
||||||
GOARCH?="amd64"
|
GOARCH?="amd64"
|
||||||
@@ -117,7 +119,7 @@ docker:
|
|||||||
docker build -t eyedeekay/reseed .
|
docker build -t eyedeekay/reseed .
|
||||||
|
|
||||||
docker-push: docker
|
docker-push: docker
|
||||||
docker push --disable-content-trust false eyedeekay/reseed:$(VERSION)
|
docker push --disable-content-trust=false eyedeekay/reseed:$(VERSION)
|
||||||
|
|
||||||
users:
|
users:
|
||||||
docker run --rm eyedeekay/reseed cat /etc/passwd
|
docker run --rm eyedeekay/reseed cat /etc/passwd
|
||||||
@@ -180,7 +182,7 @@ jar: gojava
|
|||||||
release: version upload checkinstall upload-single-deb plugins upload-su3s upload-bin
|
release: version upload checkinstall upload-single-deb plugins upload-su3s upload-bin
|
||||||
|
|
||||||
version:
|
version:
|
||||||
cat README.md | gothub release -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -d -
|
cat README.md | gothub release -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -d -; true
|
||||||
|
|
||||||
delete-version:
|
delete-version:
|
||||||
gothub delete -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION)
|
gothub delete -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION)
|
||||||
@@ -233,7 +235,7 @@ upload-bin:
|
|||||||
rm-su3s:
|
rm-su3s:
|
||||||
rm *.su3 -f
|
rm *.su3 -f
|
||||||
|
|
||||||
download-su3s: rm-su3s
|
download-su3s:
|
||||||
GOOS=darwin GOARCH=amd64 make download-single-su3
|
GOOS=darwin GOARCH=amd64 make download-single-su3
|
||||||
GOOS=darwin GOARCH=arm64 make download-single-su3
|
GOOS=darwin GOARCH=arm64 make download-single-su3
|
||||||
GOOS=linux GOARCH=386 make download-single-su3
|
GOOS=linux GOARCH=386 make download-single-su3
|
||||||
@@ -284,11 +286,11 @@ su3s: tmp/content tmp/lib
|
|||||||
-signer=hankhill19580@gmail.com \
|
-signer=hankhill19580@gmail.com \
|
||||||
-version "$(VERSION)" \
|
-version "$(VERSION)" \
|
||||||
-author=hankhill19580@gmail.com \
|
-author=hankhill19580@gmail.com \
|
||||||
-autostart=true \
|
-autostart=false \
|
||||||
-clientname=reseed-tools-$(GOOS)-$(GOARCH) \
|
-clientname=reseed-tools-$(GOOS)-$(GOARCH) \
|
||||||
-command="reseed-tools-$(GOOS)-$(GOARCH) reseed --yes --signer=you@mail.i2p --netdb=\$$CONFIG/netDb" \
|
-command="reseed-tools-$(GOOS)-$(GOARCH) reseed --yes --signer=you@mail.i2p --netdb=\$$CONFIG/netDb" \
|
||||||
-consolename="Reseed Tools" \
|
-consolename="Reseed Tools" \
|
||||||
-consoleurl="http://127.0.0.1:8443" \
|
-consoleurl="https://127.0.0.1:8443" \
|
||||||
-updateurl="http://idk.i2p/reseed-tools/reseed-tools-$(GOOS)-$(GOARCH).su3" \
|
-updateurl="http://idk.i2p/reseed-tools/reseed-tools-$(GOOS)-$(GOARCH).su3" \
|
||||||
-website="http://idk.i2p/reseed-tools/" \
|
-website="http://idk.i2p/reseed-tools/" \
|
||||||
-icondata="content/images/reseed-icon.png" \
|
-icondata="content/images/reseed-icon.png" \
|
||||||
|
@@ -5,6 +5,9 @@ This tool provides a secure and efficient reseed server for the I2P network.
|
|||||||
There are several utility commands to create, sign, and validate SU3 files.
|
There are several utility commands to create, sign, and validate SU3 files.
|
||||||
Please note that this requires at least Go version 1.13, and uses Go Modules.
|
Please note that this requires at least Go version 1.13, and uses Go Modules.
|
||||||
|
|
||||||
|
Standard reseeds are distributed with the I2P packages. To get your reseed
|
||||||
|
included, apply on [zzz.i2p](http://zzz.i2p).
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
`go`, `git`, and optionally `make` are required to build the project.
|
`go`, `git`, and optionally `make` are required to build the project.
|
||||||
@@ -114,4 +117,4 @@ reseed-tools reseed --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --port=84
|
|||||||
```
|
```
|
||||||
|
|
||||||
- **Usage** [More examples can be found here.](EXAMPLES.md)
|
- **Usage** [More examples can be found here.](EXAMPLES.md)
|
||||||
- **Docker** [Eocker examples can be found here](DOCKER.md)
|
- **Docker** [Docker examples can be found here](DOCKER.md)
|
||||||
|
@@ -27,6 +27,7 @@ func NewKeygenCommand() cli.Command {
|
|||||||
func keygenAction(c *cli.Context) {
|
func keygenAction(c *cli.Context) {
|
||||||
signerID := c.String("signer")
|
signerID := c.String("signer")
|
||||||
tlsHost := c.String("tlsHost")
|
tlsHost := c.String("tlsHost")
|
||||||
|
trustProxy := c.Bool("trustProxy")
|
||||||
|
|
||||||
if signerID == "" && tlsHost == "" {
|
if signerID == "" && tlsHost == "" {
|
||||||
fmt.Println("You must specify either --tlsHost or --signer")
|
fmt.Println("You must specify either --tlsHost or --signer")
|
||||||
@@ -40,10 +41,12 @@ func keygenAction(c *cli.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if tlsHost != "" {
|
if trustProxy {
|
||||||
if err := createTLSCertificate(tlsHost); nil != err {
|
if tlsHost != "" {
|
||||||
fmt.Println(err)
|
if err := createTLSCertificate(tlsHost); nil != err {
|
||||||
return
|
fmt.Println(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -256,18 +256,21 @@ func reseedAction(c *cli.Context) {
|
|||||||
|
|
||||||
// prompt to create tls keys if they don't exist?
|
// prompt to create tls keys if they don't exist?
|
||||||
auto := c.Bool("yes")
|
auto := c.Bool("yes")
|
||||||
// use ACME?
|
ignore := c.Bool("ignore")
|
||||||
acme := c.Bool("acme")
|
if !ignore {
|
||||||
if acme {
|
// use ACME?
|
||||||
acmeserver := c.String("acmeserver")
|
acme := c.Bool("acme")
|
||||||
err := checkUseAcmeCert(tlsHost, signerID, acmeserver, &tlsCert, &tlsKey, auto)
|
if acme {
|
||||||
if nil != err {
|
acmeserver := c.String("acmeserver")
|
||||||
log.Fatalln(err)
|
err := checkUseAcmeCert(tlsHost, signerID, acmeserver, &tlsCert, &tlsKey, auto)
|
||||||
}
|
if nil != err {
|
||||||
} else {
|
log.Fatalln(err)
|
||||||
err := checkOrNewTLSCert(tlsHost, &tlsCert, &tlsKey, auto)
|
}
|
||||||
if nil != err {
|
} else {
|
||||||
log.Fatalln(err)
|
err := checkOrNewTLSCert(tlsHost, &tlsCert, &tlsKey, auto)
|
||||||
|
if nil != err {
|
||||||
|
log.Fatalln(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,9 +298,12 @@ func reseedAction(c *cli.Context) {
|
|||||||
|
|
||||||
// prompt to create tls keys if they don't exist?
|
// prompt to create tls keys if they don't exist?
|
||||||
auto := c.Bool("yes")
|
auto := c.Bool("yes")
|
||||||
err := checkOrNewTLSCert(i2pTlsHost, &i2pTlsCert, &i2pTlsKey, auto)
|
ignore := c.Bool("trustProxy")
|
||||||
if nil != err {
|
if !ignore {
|
||||||
log.Fatalln(err)
|
err := checkOrNewTLSCert(i2pTlsHost, &i2pTlsCert, &i2pTlsKey, auto)
|
||||||
|
if nil != err {
|
||||||
|
log.Fatalln(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -337,9 +343,12 @@ func reseedAction(c *cli.Context) {
|
|||||||
|
|
||||||
// prompt to create tls keys if they don't exist?
|
// prompt to create tls keys if they don't exist?
|
||||||
auto := c.Bool("yes")
|
auto := c.Bool("yes")
|
||||||
err := checkOrNewTLSCert(onionTlsHost, &onionTlsCert, &onionTlsKey, auto)
|
ignore := c.Bool("trustProxy")
|
||||||
if nil != err {
|
if !ignore {
|
||||||
log.Fatalln(err)
|
err := checkOrNewTLSCert(onionTlsHost, &onionTlsCert, &onionTlsKey, auto)
|
||||||
|
if nil != err {
|
||||||
|
log.Fatalln(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -401,7 +410,7 @@ func reseedAction(c *cli.Context) {
|
|||||||
reseedP2P(c, reseeder)
|
reseedP2P(c, reseeder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if tlsHost != "" && tlsCert != "" && tlsKey != "" {
|
if !c.Bool("trustProxy") {
|
||||||
log.Printf("HTTPS server starting\n")
|
log.Printf("HTTPS server starting\n")
|
||||||
reseedHTTPS(c, tlsCert, tlsKey, reseeder)
|
reseedHTTPS(c, tlsCert, tlsKey, reseeder)
|
||||||
} else {
|
} else {
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
#! /usr/bin/env sh
|
#! /usr/bin/env sh
|
||||||
|
|
||||||
|
cd /var/lib/i2p/i2p-config/reseed
|
||||||
|
|
||||||
cp -r /var/lib/i2p/go/src/i2pgit.org/idk/reseed-tools/content ./content
|
cp -r /var/lib/i2p/go/src/i2pgit.org/idk/reseed-tools/content ./content
|
||||||
|
|
||||||
/var/lib/i2p/go/src/i2pgit.org/idk/reseed-tools/reseed-tools reseed --yes=true --netdb=/var/lib/i2p/i2p-config/netDb $@
|
/var/lib/i2p/go/src/i2pgit.org/idk/reseed-tools/reseed-tools reseed --yes=true --netdb=/var/lib/i2p/i2p-config/netDb $@
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<h1 id="i2p-reseed-tools">I2P Reseed Tools</h1>
|
<h1 id="i2p-reseed-tools">I2P Reseed Tools</h1>
|
||||||
<p>This tool provides a secure and efficient reseed server for the I2P network. There are several utility commands to create, sign, and validate SU3 files. Please note that this requires at least Go version 1.13, and uses Go Modules.</p>
|
<p>This tool provides a secure and efficient reseed server for the I2P network. There are several utility commands to create, sign, and validate SU3 files. Please note that this requires at least Go version 1.13, and uses Go Modules.</p>
|
||||||
|
<p>Standard reseeds are distributed with the I2P packages. To get your reseed included, apply on <a href="http://zzz.i2p">zzz.i2p</a>.</p>
|
||||||
<h2 id="dependencies">Dependencies</h2>
|
<h2 id="dependencies">Dependencies</h2>
|
||||||
<p><code>go</code>, <code>git</code>, and optionally <code>make</code> are required to build the project. Precompiled binaries for most platforms are available at my github mirror https://github.com/eyedeekay/i2p-tools-1.</p>
|
<p><code>go</code>, <code>git</code>, and optionally <code>make</code> are required to build the project. Precompiled binaries for most platforms are available at my github mirror https://github.com/eyedeekay/i2p-tools-1.</p>
|
||||||
<p>In order to install the build-dependencies on Ubuntu or Debian, you may use:</p>
|
<p>In order to install the build-dependencies on Ubuntu or Debian, you may use:</p>
|
||||||
@@ -61,7 +62,7 @@ sudo make install</code></pre>
|
|||||||
<pre><code>reseed-tools reseed --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --port=8443 --ip=127.0.0.1 --trustProxy</code></pre>
|
<pre><code>reseed-tools reseed --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --port=8443 --ip=127.0.0.1 --trustProxy</code></pre>
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>Usage</strong> <a href="EXAMPLES.md">More examples can be found here.</a></li>
|
<li><strong>Usage</strong> <a href="EXAMPLES.md">More examples can be found here.</a></li>
|
||||||
<li><strong>Docker</strong> <a href="DOCKER.md">Eocker examples can be found here</a></li>
|
<li><strong>Docker</strong> <a href="DOCKER.md">Docker examples can be found here</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
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.1.9"
|
app.Version = "0.2.8"
|
||||||
app.Usage = "I2P tools and reseed server"
|
app.Usage = "I2P tools and reseed server"
|
||||||
app.Author = "eyedeekay"
|
app.Author = "eyedeekay"
|
||||||
app.Email = "hankhill19580@gmail.com"
|
app.Email = "hankhill19580@gmail.com"
|
||||||
|
Reference in New Issue
Block a user