diff options
Diffstat (limited to 'tunnel')
-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) |