diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-05-14 21:45:30 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-05-15 19:32:15 +0200 |
commit | a8486539f3d28a945643c02718833c6d1aaa7059 (patch) | |
tree | 4e08685675a25ce94d26d76092afa7cff5a805b7 | |
parent | a90ecb5fd417c06617574e00f8105e2f3eae638a (diff) |
WIP add current developmentsgvisor
-rw-r--r-- | tunnel/tools/libwg-go/api-android.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tunnel/tools/libwg-go/api-android.go b/tunnel/tools/libwg-go/api-android.go index 145c3644..9b8ced4d 100644 --- a/tunnel/tools/libwg-go/api-android.go +++ b/tunnel/tools/libwg-go/api-android.go @@ -51,6 +51,8 @@ type TunnelHandle struct { var tunnelHandles map[int32]TunnelHandle +var stk *stack.Stack + func init() { device.RoamingDisabled = true tunnelHandles = make(map[int32]TunnelHandle) @@ -221,7 +223,7 @@ func wgTurnOn(ifnameRef string, tunFd int32, settings string) int32 { } logger.Debug.Println("Start gvisor stack") - s := stack.New(stack.Options{ + stk = stack.New(stack.Options{ NetworkProtocols: []stack.NetworkProtocol{ipv4.NewProtocol(), ipv6.NewProtocol(), arp.NewProtocol()}, TransportProtocols: []stack.TransportProtocol{ tcp.NewProtocol(), @@ -231,10 +233,13 @@ func wgTurnOn(ifnameRef string, tunFd int32, settings string) int32 { //NDPConfigs: stack.DefaultNDPConfigurations(), //NDPDisp: &routes, }) +// s := stk logger.Debug.Println("Stack started") - cfg.Setup(s) + // FIXME +// ipc.UAPISetSocketDir("/data/data/eu.m7n.wireguard.android.debug") +// cfg.Setup(s) logger.Debug.Println("Test gvisor TCP/IP", cfg) |