v-byte-cpu / wirez

redirect all TCP/UDP traffic of any program to SOCKS5 proxy
MIT License
131 stars 10 forks source link

Does not build anymore (gVisor API changes) #18

Open hegdenischay opened 8 months ago

hegdenischay commented 8 months ago

gVisor has changed its API, and the program doesn't build anymore:

ubuntu@server:~/wirez$ go build
package github.com/v-byte-cpu/wirez
        imports github.com/v-byte-cpu/wirez/command
        imports github.com/v-byte-cpu/wirez/pkg/connect
        imports gvisor.dev/gvisor/pkg/tcpip
        imports gvisor.dev/gvisor/pkg/atomicbitops
        imports gvisor.dev/gvisor/pkg/cpuid
        imports gvisor.dev/gvisor/pkg/state
        imports gvisor.dev/gvisor/pkg/state/wire
        imports gvisor.dev/gvisor/pkg/gohacks: build constraints exclude all Go files in /home/ubuntu/go/pkg/mod/gvisor.dev/gvisor@v0.0.0-20220816193615-632fd54acfb3/pkg/gohacks

Used go version: go version go1.22.0 linux/arm64

Attempting to fix it by upgrading gVisor also does not work:

ubuntu@server:~/wirez$ GO111MODULE=on go get gvisor.dev/gvisor@go
go: added gvisor.dev/gvisor v0.0.0-20240301005136-96d748d5c7c5
ubuntu@server:~/wirez$ go build
# github.com/v-byte-cpu/wirez/pkg/connect
pkg/connect/network_stack.go:96:47: cannot convert ipNet.IP (variable of type net.IP) to type tcpip.Address
pkg/connect/network_stack.go:96:76: cannot convert ipNet.Mask (variable of type net.IPMask) to type tcpip.AddressMask
pkg/connect/network_stack.go:148:57: too many arguments in call to gonet.NewUDPConn
        have (*stack.Stack, *waiter.Queue, tcpip.Endpoint)
        want (*waiter.Queue, tcpip.Endpoint)
ghost18881 commented 5 months ago

@hegdenischay build using golang 1.20