diff --git a/core/src/main/golang/tun/dnsredirect.go b/core/src/main/golang/tun/dnsredirect.go index 3680f02..86f73c1 100644 --- a/core/src/main/golang/tun/dnsredirect.go +++ b/core/src/main/golang/tun/dnsredirect.go @@ -12,8 +12,10 @@ import ( "github.com/google/netstack/waiter" ) -const defaultTimeout = 5 -const defaultDNS = "8.8.8.8" +const ( + defaultTimeout = 5 + defaultDNS = "8.8.8.8" +) type DnsRedirectEndpoint struct { stack *stack.Stack diff --git a/core/src/main/golang/tun/tun.go b/core/src/main/golang/tun/tun.go index 6818abc..e912505 100644 --- a/core/src/main/golang/tun/tun.go +++ b/core/src/main/golang/tun/tun.go @@ -9,6 +9,7 @@ import ( "github.com/google/netstack/tcpip" "github.com/google/netstack/tcpip/network/ipv4" + "github.com/google/netstack/tcpip/network/ipv6" "github.com/google/netstack/tcpip/stack" "github.com/google/netstack/tcpip/transport/udp" ) @@ -46,6 +47,7 @@ func StartTunProxy(fd, mtu int) error { if err := s.RegisterTransportEndpoint(1, []tcpip.NetworkProtocolNumber{ ipv4.ProtocolNumber, + ipv6.ProtocolNumber, }, udp.ProtocolNumber, *id,