add ipv6 dnsredirect
This commit is contained in:
2 files changed
+6
-2
No files matched your search
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user