make it build unmanaged plugins so that you can run a reseed server from a desktop I2P installation. Defaults to hosting both an .onion and .i2p service for now, even though the .i2p service is arguably useless, because it's much easier to test. In the future I will either need to disable .onion or embed libtor so that there is a Tor SOCKSPort and Control Port to connect to
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -7,3 +7,6 @@ i2pseeds.su3
|
||||
onion.key
|
||||
tmp/
|
||||
i2p-tools-*
|
||||
*.crl
|
||||
*.crt
|
||||
*.pem
|
||||
|
51
Makefile
51
Makefile
@ -1,6 +1,6 @@
|
||||
|
||||
VERSION=0.0.6
|
||||
APP=i2p-tools-1
|
||||
VERSION=0.0.8
|
||||
APP=reseed-tools
|
||||
USER_GH=eyedeekay
|
||||
|
||||
GOOS?=$(shell uname -s | tr A-Z a-z)
|
||||
@ -26,13 +26,13 @@ edit:
|
||||
cat README.md | gothub edit -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -d -
|
||||
|
||||
upload: binary tar
|
||||
gothub upload -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -f ../i2p-tools.tar.xz -n "i2p-tools.tar.xz"
|
||||
gothub upload -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -f ../reseed-tools.tar.xz -n "reseed-tools.tar.xz"
|
||||
|
||||
build: gofmt
|
||||
/usr/lib/go-$(MIN_GO_VERSION)/bin/go build $(ARG) -o i2p-tools-$(GOOS)-$(GOARCH)
|
||||
/usr/lib/go-$(MIN_GO_VERSION)/bin/go build $(ARG) -o reseed-tools-$(GOOS)-$(GOARCH)
|
||||
|
||||
clean:
|
||||
rm i2p-tools-* *.key *.i2pKeys *.crt *.crl *.pem tmp -rf
|
||||
rm reseed-tools-* *.key *.i2pKeys *.crt *.crl *.pem tmp -rfv
|
||||
|
||||
binary:
|
||||
GOOS=darwin GOARCH=amd64 make build
|
||||
@ -45,10 +45,10 @@ binary:
|
||||
GOOS=freebsd GOARCH=amd64 make build
|
||||
|
||||
tar:
|
||||
tar --exclude="./.git" --exclude="./tmp" -cvf ../i2p-tools.tar.xz .
|
||||
tar --exclude="./.git" --exclude="./tmp" -cvf ../reseed-tools.tar.xz .
|
||||
|
||||
install:
|
||||
install -m755 i2p-tools-$(GOOS)-$(GOARCH) /usr/local/bin/i2p-tools
|
||||
install -m755 reseed-tools-$(GOOS)-$(GOARCH) /usr/local/bin/reseed-tools
|
||||
install -m755 etc/init.d/reseed /etc/init.d/reseed
|
||||
|
||||
### You shouldn't need to use these now that the go mod require rule is fixed,
|
||||
@ -56,10 +56,10 @@ install:
|
||||
## versions behaved the same way. -idk
|
||||
|
||||
build-fork:
|
||||
/usr/lib/go-$(MIN_GO_VERSION)/bin/go build -o i2p-tools-idk
|
||||
/usr/lib/go-$(MIN_GO_VERSION)/bin/go build -o reseed-tools-idk
|
||||
|
||||
build-unfork:
|
||||
/usr/lib/go-$(MIN_GO_VERSION)/bin/go build -o i2p-tools-md
|
||||
/usr/lib/go-$(MIN_GO_VERSION)/bin/go build -o reseed-tools-md
|
||||
|
||||
fork:
|
||||
sed -i 's|idk/reseed-tools|idk/reseed-tools|g' main.go cmd/*.go reseed/*.go su3/*.go
|
||||
@ -67,7 +67,7 @@ fork:
|
||||
|
||||
unfork:
|
||||
sed -i 's|idk/reseed-tools|idk/reseed-tools|g' main.go cmd/*.go reseed/*.go su3/*.go
|
||||
sed -i 's|RTradeLtd/i2p-tools-1|idk/reseed-tools|g' main.go cmd/*.go reseed/*.go su3/*.go
|
||||
sed -i 's|RTradeLtd/reseed-tools|idk/reseed-tools|g' main.go cmd/*.go reseed/*.go su3/*.go
|
||||
make gofmt build-unfork
|
||||
|
||||
gofmt:
|
||||
@ -76,12 +76,12 @@ gofmt:
|
||||
try:
|
||||
mkdir -p tmp && \
|
||||
cd tmp && \
|
||||
../i2p-tools-$(GOOS)-$(GOARCH) reseed --signer=you@mail.i2p --netdb=/home/idk/.i2p/netDb --tlsHost=your-domain.tld --onion --p2p --i2p --littleboss=start
|
||||
../reseed-tools-$(GOOS)-$(GOARCH) reseed --signer=you@mail.i2p --netdb=/home/idk/.i2p/netDb --tlsHost=your-domain.tld --onion --p2p --i2p --littleboss=start
|
||||
|
||||
stop:
|
||||
mkdir -p tmp && \
|
||||
cd tmp && \
|
||||
../i2p-tools-$(GOOS)-$(GOARCH) reseed --signer=you@mail.i2p --netdb=/home/idk/.i2p/netDb --tlsHost=your-domain.tld --onion --p2p --i2p --littleboss=stop
|
||||
../reseed-tools-$(GOOS)-$(GOARCH) reseed --signer=you@mail.i2p --netdb=/home/idk/.i2p/netDb --tlsHost=your-domain.tld --onion --p2p --i2p --littleboss=stop
|
||||
|
||||
docker:
|
||||
docker build -t eyedeekay/reseed .
|
||||
@ -147,3 +147,30 @@ jar: gojava
|
||||
echo $(JAVA_HOME)
|
||||
./gojava -v -o reseed.jar -s . build ./reseed
|
||||
|
||||
plugins: binary
|
||||
GOOS=darwin GOARCH=amd64 make su3s
|
||||
GOOS=linux GOARCH=386 make su3s
|
||||
GOOS=linux GOARCH=amd64 make su3s
|
||||
GOOS=linux GOARCH=arm make su3s
|
||||
GOOS=linux GOARCH=arm64 make su3s
|
||||
GOOS=openbsd GOARCH=amd64 make su3s
|
||||
GOOS=freebsd GOARCH=386 make su3s
|
||||
GOOS=freebsd GOARCH=amd64 make su3s
|
||||
|
||||
su3s:
|
||||
i2p.plugin.native -name=reseed-tools-$(GOOS)-$(GOARCH) \
|
||||
-signer=hankhill19580@gmail.com \
|
||||
-version "$(VERSION)" \
|
||||
-author=hankhill19580@gmail.com \
|
||||
-autostart=true \
|
||||
-clientname=reseed-tools-$(GOOS)-$(GOARCH) \
|
||||
-command="\$$PLUGIN/lib/reseed-tools-$(GOOS)-$(GOARCH)s -dir=\$$PLUGIN/lib reseed --signer=you@mail.i2p --netdb=\$$CONFIG/.i2p/netDb --onion --i2p" \
|
||||
-consolename="Reseed Tools" \
|
||||
-delaystart="200" \
|
||||
-desc="Reseed Tools Plugin" \
|
||||
-exename=reseed-tools-$(GOOS)-$(GOARCH) \
|
||||
-license=MIT
|
||||
unzip -o reseed-tools-$(GOOS)-$(GOARCH).zip -d reseed-tools-$(GOOS)-$(GOARCH)-zip
|
||||
|
||||
#export sumbblinux=`sha256sum "../reseed-tools-linux.su3"`
|
||||
#export sumbbwindows=`sha256sum "../reseed-tools-windows.su3"`
|
Reference in New Issue
Block a user