Giter VIP home page Giter VIP logo

go-v2ray-tun2socks-ios's Introduction

go-tun2socks-mobile

Build Status

Demo for building and using go-tun2socks on iOS and Android.

If you're looking for an easy to use tun2socks implementation for iOS, you might be interested in leaf and ileaf. leaf implements tun2socks and it's written in Rust, with significantly less memory usage and significantly better performance compares to the Go version.

Prerequisites

Build

go get -d ./...

# Build an AAR
make android

# Build a Framework
make ios

# Both
make

go-v2ray-tun2socks-ios's People

Contributors

kiarsy avatar

Stargazers

Harry Fish avatar Faustino Koepp avatar chenkai avatar SunWater avatar  avatar  avatar  avatar iOS还有人要吗? avatar

Watchers

 avatar

go-v2ray-tun2socks-ios's Issues

make iOS failed

gomobile: static framework name "$HOME/Projects/vpn/go-v2ray-tun2socks-ios/build/Tun2socks.framework" missing .xcframework suffix

compile error

mkdir -p /Users//Downloads/go-v2ray-tun2socks-ios-master/build
eval "cd /Users/
/Downloads/go-v2ray-tun2socks-ios-master/build && gomobile bind -a -ldflags '-s -w' -target=ios -o /Users/***/Downloads/go-v2ray-tun2socks-ios-master/build/Tun2socks.framework github.com/kiarsy/go-v2ray-tun2socks-ios"
gomobile: darwin-arm64: go build -tags ios -ldflags -s -w -buildmode=c-archive -o /var/folders/8d/j2pmdy0j6ns23g3xqqqsrxww0000gn/T/gomobile-work-303546293/Tun2socks-arm64.a ./gobind failed: exit status 2
go: downloading golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f
go: found github.com/kiarsy/go-v2ray-tun2socks-ios in github.com/kiarsy/go-v2ray-tun2socks-ios v0.0.0-00010101000000-000000000000
go: downloading github.com/v2ray/v2ray-core v4.15.0+incompatible
go: downloading github.com/kiarsy/go-tun2socks v1.16.13
go: downloading v2ray.com/core v4.19.1+incompatible
go: downloading github.com/golang/protobuf v1.4.1
go: downloading golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
go: downloading golang.org/x/net v0.0.0-20191021144547-ec77196f6094
go: downloading go.starlark.net v0.0.0-20190225160109-1174b2613e82
go: downloading google.golang.org/protobuf v1.25.0
go: downloading golang.org/x/text v0.3.0
go: downloading google.golang.org/grpc v1.27.0
go: downloading google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013

go-tun2socks/core

In file included from /usr/local/go/src/go-tun2socks/core/c_core_6.go:8:
/usr/local/go/src/go-tun2socks/core/c/core/ipv6/ip6.c:1471:21: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
/usr/local/go/src/go-tun2socks/core/c/include/lwip/prot/ip6.h:97:22: note: expanded from macro 'IP6H_V'
/usr/local/go/src/go-tun2socks/core/c/include/lwip/debug.h:150:53: note: expanded from macro 'LWIP_DEBUGF'
/usr/local/go/src/go-tun2socks/core/c/custom/arch/cc_others.h:83:42: note: expanded from macro 'LWIP_PLATFORM_DIAG'
In file included from /usr/local/go/src/go-tun2socks/core/c_core_6.go:8:
/usr/local/go/src/go-tun2socks/core/c/core/ipv6/ip6.c:1472:21: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
/usr/local/go/src/go-tun2socks/core/c/include/lwip/prot/ip6.h:98:22: note: expanded from macro 'IP6H_TC'
/usr/local/go/src/go-tun2socks/core/c/include/lwip/debug.h:150:53: note: expanded from macro 'LWIP_DEBUGF'
/usr/local/go/src/go-tun2socks/core/c/custom/arch/cc_others.h:83:42: note: expanded from macro 'LWIP_PLATFORM_DIAG'

github.com/kiarsy/go-tun2socks/core

In file included from /var/folders/8d/j2pmdy0j6ns23g3xqqqsrxww0000gn/T/gomobile-work-303546293/pkg/mod/github.com/kiarsy/[email protected]/core/c_core_6.go:8:
/var/folders/8d/j2pmdy0j6ns23g3xqqqsrxww0000gn/T/gomobile-work-303546293/pkg/mod/github.com/kiarsy/[email protected]/core/c/core/ipv6/ip6.c:1471:21: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
/var/folders/8d/j2pmdy0j6ns23g3xqqqsrxww0000gn/T/gomobile-work-303546293/pkg/mod/github.com/kiarsy/[email protected]/core/c/include/lwip/prot/ip6.h:97:22: note: expanded from macro 'IP6H_V'
/var/folders/8d/j2pmdy0j6ns23g3xqqqsrxww0000gn/T/gomobile-work-303546293/pkg/mod/github.com/kiarsy/[email protected]/core/c/include/lwip/debug.h:150:53: note: expanded from macro 'LWIP_DEBUGF'
/var/folders/8d/j2pmdy0j6ns23g3xqqqsrxww0000gn/T/gomobile-work-303546293/pkg/mod/github.com/kiarsy/[email protected]/core/c/custom/arch/cc_others.h:83:42: note: expanded from macro 'LWIP_PLATFORM_DIAG'
In file included from /var/folders/8d/j2pmdy0j6ns23g3xqqqsrxww0000gn/T/gomobile-work-303546293/pkg/mod/github.com/kiarsy/[email protected]/core/c_core_6.go:8:
/var/folders/8d/j2pmdy0j6ns23g3xqqqsrxww0000gn/T/gomobile-work-303546293/pkg/mod/github.com/kiarsy/[email protected]/core/c/core/ipv6/ip6.c:1472:21: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
/var/folders/8d/j2pmdy0j6ns23g3xqqqsrxww0000gn/T/gomobile-work-303546293/pkg/mod/github.com/kiarsy/[email protected]/core/c/include/lwip/prot/ip6.h:98:22: note: expanded from macro 'IP6H_TC'
/var/folders/8d/j2pmdy0j6ns23g3xqqqsrxww0000gn/T/gomobile-work-303546293/pkg/mod/github.com/kiarsy/[email protected]/core/c/include/lwip/debug.h:150:53: note: expanded from macro 'LWIP_DEBUGF'
/var/folders/8d/j2pmdy0j6ns23g3xqqqsrxww0000gn/T/gomobile-work-303546293/pkg/mod/github.com/kiarsy/[email protected]/core/c/custom/arch/cc_others.h:83:42: note: expanded from macro 'LWIP_PLATFORM_DIAG'

github.com/kiarsy/go-v2ray-tun2socks-ios

/Users//Downloads/go-v2ray-tun2socks-ios-master/tun2socks.go:32:50: cannot use socks.NewUDPHandler(proxyHost, uint16(proxyPort), 30 * time.Second) (type "github.com/kiarsy/go-tun2socks/core".UDPConnHandler) as type "go-tun2socks/core".UDPConnHandler in argument to "go-tun2socks/core".RegisterUDPConnHandler:
"github.com/kiarsy/go-tun2socks/core".UDPConnHandler does not implement "go-tun2socks/core".UDPConnHandler (wrong type for Connect method)
have Connect("github.com/kiarsy/go-tun2socks/core".UDPConn, "net".UDPAddr) error
want Connect("go-tun2socks/core".UDPConn, "net".UDPAddr) error
/Users/
/Downloads/go-v2ray-tun2socks-ios-master/tun2socks.go:62:14: undefined: v2ray.NewHandler
/Users/
/Downloads/go-v2ray-tun2socks-ios-master/tun2socks.go:63:2: undefined: "go-tun2socks/core".RegisterTCPConnectionHandler
/Users/
/Downloads/go-v2ray-tun2socks-ios-master/tun2socks.go:64:2: undefined: "go-tun2socks/core".RegisterUDPConnectionHandler
/Users/
*/Downloads/go-v2ray-tun2socks-ios-master/tun2socks.go:68:7: undefined: isStopped

make: *** [ios] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.