Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Raspberry pi 3 b+] Golang errors #62

Open
0x90asm opened this issue Apr 30, 2019 · 2 comments
Open

[Raspberry pi 3 b+] Golang errors #62

0x90asm opened this issue Apr 30, 2019 · 2 comments

Comments

@0x90asm
Copy link

0x90asm commented Apr 30, 2019

I've installed the latest Golang version:

pi@raspberrypi:~/go/src/github.com/FlowerWrong/tun2socks $ go version
go version go1.12.4 linux/arm

Following the "how to use it" section, got the following errors:

pi@raspberrypi:~/go/src/github.com/FlowerWrong/tun2socks $ go get ./...
# github.com/google/netstack/tcpip/link/rawfile
../../google/netstack/tcpip/link/rawfile/rawfile_unsafe.go:81:4: cannot use uint64(len(b1)) (type uint64) as type uint32 in field value
../../google/netstack/tcpip/link/rawfile/rawfile_unsafe.go:85:4: cannot use uint64(len(b2)) (type uint64) as type uint32 in field value
../../google/netstack/tcpip/link/rawfile/rawfile_unsafe.go:93:16: cannot use uint64(len(b3)) (type uint64) as type uint32 in assignment
# github.com/FlowerWrong/netstack/tcpip/transport/tcp
../netstack/tcpip/transport/tcp/snd.go:186:3: constant 9223372036854775807 overflows int
# github.com/FlowerWrong/tun2socks/util
util/port.go:10:26: cannot use func literal (type func(uint16) (bool, *"github.com/FlowerWrong/netstack/tcpip".Error)) as type func(uint16) (bool, *"github.com/google/netstack/tcpip".Error) in argument to stack.PortManager.PickEphemeralPort
# github.com/FlowerWrong/tun2socks/cmd/surge
cmd/surge/parser.go:22:6: main redeclared in this block
        previous declaration at cmd/surge/jsbox.go:67:6
cmd/surge/parser.go:133:13: too many arguments in call to writeToFile
        have (*os.File, []string, string, string)
        want (*os.File, string)
cmd/surge/parser.go:134:13: too many arguments in call to writeToFile
        have (*os.File, []string, string, string)
        want (*os.File, string)
cmd/surge/parser.go:135:13: too many arguments in call to writeToFile
        have (*os.File, []string, string, string)
        want (*os.File, string)
cmd/surge/parser.go:137:13: too many arguments in call to writeToFile
        have (*os.File, []string, string, string)
        want (*os.File, string)
cmd/surge/parser.go:138:13: too many arguments in call to writeToFile
        have (*os.File, []string, string, string)
        want (*os.File, string)
cmd/surge/parser.go:139:13: too many arguments in call to writeToFile
        have (*os.File, []string, string, string)
        want (*os.File, string)
cmd/surge/parser.go:141:13: too many arguments in call to writeToFile
        have (*os.File, []string, string, string)
        want (*os.File, string)
cmd/surge/parser.go:142:13: too many arguments in call to writeToFile
        have (*os.File, []string, string, string)
        want (*os.File, string)
cmd/surge/parser.go:185:6: writeToFile redeclared in this block
        previous declaration at cmd/surge/jsbox.go:41:38
cmd/surge/parser.go:142:13: too many errors
# github.com/FlowerWrong/tun2socks/cmd/udp
cmd/udp/server.go:8:6: main redeclared in this block
        previous declaration at cmd/udp/client.go:31:6

Would you recommend a solution?

@FlowerWrong
Copy link
Owner

Because of the changes of netstack, there are lots of work to do for support linux arm.
eg vnetHdrToByteSlice, If you are familiar with golang, you can try the master branch of netstack, and you should edit a little file of tun2socks, eg arguments.

@FlowerWrong
Copy link
Owner

Also, you can try https://github.com/FlowerWrong/tun2socks/releases/tag/0.7 this version, but I am not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants