walk back i2pd support for the time being until I find a cross-compilation process I can deal with. Probably replace it with a jpackage and make it self update too.
This commit is contained in:
16
Makefile
16
Makefile
@ -1,14 +1,15 @@
|
||||
VERSION=0.0.4
|
||||
#CGO_ENABLED=0
|
||||
#export CGO_ENABLED=0
|
||||
CGO_ENABLED=0
|
||||
export CGO_ENABLED=0
|
||||
|
||||
GOOS?=$(shell uname -s | tr A-Z a-z)
|
||||
GOARCH?="amd64"
|
||||
|
||||
#ARG=-v -tags netgo -ldflags '-w -extldflags "-static"'
|
||||
FLAGS=/usr/lib/x86_64-linux-gnu/libboost_system.a /usr/lib/x86_64-linux-gnu/libboost_date_time.a /usr/lib/x86_64-linux-gnu/libboost_filesystem.a /usr/lib/x86_64-linux-gnu/libboost_program_options.a /usr/lib/x86_64-linux-gnu/libssl.a /usr/lib/x86_64-linux-gnu/libcrypto.a /usr/lib/x86_64-linux-gnu/libz.a
|
||||
#FLAGS=/usr/lib/x86_64-linux-gnu/libboost_system.a /usr/lib/x86_64-linux-gnu/libboost_date_time.a /usr/lib/x86_64-linux-gnu/libboost_filesystem.a /usr/lib/x86_64-linux-gnu/libboost_program_options.a /usr/lib/x86_64-linux-gnu/libssl.a /usr/lib/x86_64-linux-gnu/libcrypto.a /usr/lib/x86_64-linux-gnu/libz.a
|
||||
ARG=-ldflags '-w -linkmode=external -extldflags "-static -ldl $(FLAGS)"'
|
||||
NOSTATIC=-v -tags netgo -ldflags '-w -extldflags "-ldl $(FLAGS)"'
|
||||
WINGUI=-v -tags netgo -ldflags '-H=windowsgui -w -extldflags "-static -ldl $(FLAGS)"'
|
||||
|
||||
BINARY=i2p.plugins.tor-manager
|
||||
SIGNER=hankhill19580@gmail.com
|
||||
@ -21,6 +22,9 @@ PREFIX?=/usr/local
|
||||
binary:
|
||||
go build $(ARG) -tags=netgo,nosystray -o $(BINARY)-$(GOOS)-$(GOARCH) .
|
||||
|
||||
winbinary:
|
||||
go build $(WINGUI) -tags=netgo,nosystray -o $(BINARY)-$(GOOS)-$(GOARCH) .
|
||||
|
||||
systray:
|
||||
go build $(NOSTATIC) -tags=netgo -o $(BINARY)-$(GOOS)-$(GOARCH) .
|
||||
|
||||
@ -43,6 +47,8 @@ install:
|
||||
install onion.png /var/lib/i2pbrowser/icons/onion.png
|
||||
|
||||
build: dep binary
|
||||
|
||||
winbuild: dep winbinary
|
||||
|
||||
p: dep binary su3
|
||||
|
||||
@ -54,8 +60,8 @@ clean:
|
||||
all: windows linux osx bsd
|
||||
|
||||
windows:
|
||||
GOOS=windows GOARCH=amd64 make build su3
|
||||
GOOS=windows GOARCH=386 make build su3
|
||||
GOOS=windows GOARCH=amd64 make winbuild su3
|
||||
GOOS=windows GOARCH=386 make winbuild su3
|
||||
|
||||
linux:
|
||||
GOOS=linux GOARCH=amd64 make build su3
|
||||
|
3
go.mod
3
go.mod
@ -4,7 +4,6 @@ go 1.17
|
||||
|
||||
require (
|
||||
github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21
|
||||
github.com/eyedeekay/go-i2pd v0.0.0-20220213070306-9807541b2dfc
|
||||
github.com/getlantern/systray v1.1.0
|
||||
github.com/go-ole/go-ole v1.2.6
|
||||
github.com/jchavannes/go-pgp v0.0.0-20200131171414-e5978e6d02b4
|
||||
@ -53,6 +52,4 @@ require (
|
||||
howett.net/plist v1.0.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/eyedeekay/go-i2pd v0.0.0-20220213070306-9807541b2dfc => ./go-i2pd
|
||||
|
||||
replace github.com/getlantern/systray v1.1.0 => github.com/eyedeekay/systray v1.1.1-0.20220213191004-800d7458fdfd
|
||||
|
1
go.sum
1
go.sum
@ -37,7 +37,6 @@ github.com/eyedeekay/httptunnel v0.0.0-20190831065052-9eab288b8a82/go.mod h1:VeX
|
||||
github.com/eyedeekay/httptunnel v0.0.0-20190831071439-0ff3d5f798fb/go.mod h1:SnCAM9CskhwSFkzDfh+H5yNTbvhcTeKekkuX0ejCcSk=
|
||||
github.com/eyedeekay/httptunnel v0.0.0-20210508193128-6e9606d6eb24 h1:Xkifu/edD0lcNzS7vMf6sS05Hk6Umv21aosiKwULpCk=
|
||||
github.com/eyedeekay/httptunnel v0.0.0-20210508193128-6e9606d6eb24/go.mod h1:EASp//e3tfDMsChn4Xkwq9BdZBMHOR4QeMV6eEW64vY=
|
||||
github.com/eyedeekay/i2pd v0.3.0-1stbinrelease.0.20210702172028-5d01ee95810a/go.mod h1:4qJhWn+yNrWRbqFHhU8kl7JgbcW1hm3PMgvlPlxO3gg=
|
||||
github.com/eyedeekay/outproxy v0.0.0-20190908174238-22bd71d43733/go.mod h1:jUBr6XRbiuUBe/sSbVdO5upU4mp8842bdpXDsQY54Rc=
|
||||
github.com/eyedeekay/portcheck v0.0.0-20190218044454-bb8718669680/go.mod h1:8VVIH19/CU2VFJB8P6e58Mo9nvDqqKgllS0oQY3F83U=
|
||||
github.com/eyedeekay/ramp v0.0.0-20190429201811-305b382042ab/go.mod h1:h7mvUAMgZ/rtRDUOkvKTK+8LnDMeUhJSoa5EPdB51fc=
|
||||
|
20
i2pd.go
20
i2pd.go
@ -1,20 +0,0 @@
|
||||
//go:build !noi2pd
|
||||
// +build !noi2pd
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
i2pd "github.com/eyedeekay/go-i2pd/goi2pd"
|
||||
)
|
||||
|
||||
func InitI2PSAM() func() {
|
||||
return i2pd.InitI2PSAM()
|
||||
}
|
||||
|
||||
func StartI2P() {
|
||||
i2pd.StartI2P()
|
||||
}
|
||||
|
||||
func StopI2P() {
|
||||
defer i2pd.StopI2P()
|
||||
}
|
4
main.go
4
main.go
@ -162,11 +162,7 @@ func main() {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
closer := InitI2PSAM()
|
||||
defer closer()
|
||||
go StartI2P()
|
||||
go runSysTray(true)
|
||||
defer StopI2P()
|
||||
if tbget.TestHTTPDefaultProxy() {
|
||||
log.Println("I2P HTTP proxy OK")
|
||||
} else {
|
||||
|
20
no-i2pd.go
20
no-i2pd.go
@ -1,20 +0,0 @@
|
||||
//go:build noi2pd
|
||||
// +build noi2pd
|
||||
|
||||
package main
|
||||
|
||||
func InitI2PSAM() func() {
|
||||
return nullFunc
|
||||
}
|
||||
|
||||
func nullFunc() {
|
||||
|
||||
}
|
||||
|
||||
func StartI2P() {
|
||||
|
||||
}
|
||||
|
||||
func StopI2P() {
|
||||
|
||||
}
|
Reference in New Issue
Block a user