shadowsocks / go-shadowsocks2

Modern Shadowsocks in Go
Apache License 2.0
4.45k stars 1.39k forks source link

Won't compile on Linux for ChromeOS #190

Closed FossPrime closed 3 years ago

FossPrime commented 3 years ago

Describe the bug Server won't compile on the default linux VM provided by ChromeOS 85. I reset the VM and had the same issue. Tried 3 days ago, same error.

To Reproduce Steps to reproduce the behavior:

  1. run go get -u -v github.com/shadowsocks/go-shadowsocks2

Expected behavior Compiled binary.

Desktop (please complete the following information):

Additional context

github.com/shadowsocks/go-shadowsocks2 (download)
github.com/riobard/go-bloom (download)
Fetching https://golang.org/x/crypto/chacha20poly1305?go-get=1
Parsing meta tags from https://golang.org/x/crypto/chacha20poly1305?go-get=1 (status code 200)
get "golang.org/x/crypto/chacha20poly1305": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/chacha20poly1305?go-get=1
get "golang.org/x/crypto/chacha20poly1305": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
golang.org/x/crypto (download)
Fetching https://golang.org/x/crypto/chacha20?go-get=1
Parsing meta tags from https://golang.org/x/crypto/chacha20?go-get=1 (status code 200)
get "golang.org/x/crypto/chacha20": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/chacha20?go-get=1
get "golang.org/x/crypto/chacha20": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto/internal/subtle?go-get=1
Parsing meta tags from https://golang.org/x/crypto/internal/subtle?go-get=1 (status code 200)
get "golang.org/x/crypto/internal/subtle": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/internal/subtle?go-get=1
get "golang.org/x/crypto/internal/subtle": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto/poly1305?go-get=1
Parsing meta tags from https://golang.org/x/crypto/poly1305?go-get=1 (status code 200)
get "golang.org/x/crypto/poly1305": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/poly1305?go-get=1
get "golang.org/x/crypto/poly1305": verifying non-authoritative meta tag
Fetching https://golang.org/x/sys/cpu?go-get=1
Parsing meta tags from https://golang.org/x/sys/cpu?go-get=1 (status code 200)
get "golang.org/x/sys/cpu": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys/cpu?go-get=1
get "golang.org/x/sys/cpu": verifying non-authoritative meta tag
Fetching https://golang.org/x/sys?go-get=1
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
golang.org/x/sys (download)
Fetching https://golang.org/x/crypto/hkdf?go-get=1
Parsing meta tags from https://golang.org/x/crypto/hkdf?go-get=1 (status code 200)
get "golang.org/x/crypto/hkdf": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/hkdf?go-get=1
get "golang.org/x/crypto/hkdf": verifying non-authoritative meta tag
github.com/shadowsocks/go-shadowsocks2
# github.com/shadowsocks/go-shadowsocks2
go/src/github.com/shadowsocks/go-shadowsocks2/tcp.go:159:21: undefined: errors.Is
go/src/github.com/shadowsocks/go-shadowsocks2/tcp.go:159:37: undefined: os.ErrDeadlineExceeded
go/src/github.com/shadowsocks/go-shadowsocks2/tcp.go:162:20: undefined: errors.Is
go/src/github.com/shadowsocks/go-shadowsocks2/tcp.go:162:35: undefined: os.ErrDeadlineExceeded
riobard commented 3 years ago

It requires Go 1.15.

FossPrime commented 3 years ago

... didn't expect Debian buster to have outdated packages so soon... should have known.

That said I wanted to setup a transparent client on ChromeOS... but that's not possible with the images Google sign's to run on the VMs... they have a crippled version of IPTables2 with some netfilter features off, particular connection marks/fwmark.

Also, the precompiled linux binary in releases does work out of the box... at least for x86_64 models

riobard commented 3 years ago

TCP redirect should work without fwmark.