diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-03-18 21:00:32 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-03-18 21:00:32 +0100 |
commit | 9ff81925ffcb1833871a409c4bc004144062ae22 (patch) | |
tree | 2e33fce0c8f4b8ad3dad4663c97c2474b1b886d5 /pkg/tcpip/sample/wg_tunnel/main.go | |
parent | da4e436c2b721d261a51e765aca844c9b85883dd (diff) |
WIP create wireguard link package
Diffstat (limited to 'pkg/tcpip/sample/wg_tunnel/main.go')
-rw-r--r-- | pkg/tcpip/sample/wg_tunnel/main.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/tcpip/sample/wg_tunnel/main.go b/pkg/tcpip/sample/wg_tunnel/main.go index b859dff7a..1c87a09c2 100644 --- a/pkg/tcpip/sample/wg_tunnel/main.go +++ b/pkg/tcpip/sample/wg_tunnel/main.go @@ -44,6 +44,7 @@ import ( "gvisor.dev/gvisor/pkg/tcpip/link/loopback" "gvisor.dev/gvisor/pkg/tcpip/link/rawfile" "gvisor.dev/gvisor/pkg/tcpip/link/tun" + "gvisor.dev/gvisor/pkg/tcpip/link/wireguard" "gvisor.dev/gvisor/pkg/tcpip/network/arp" "gvisor.dev/gvisor/pkg/tcpip/network/ipv4" "gvisor.dev/gvisor/pkg/tcpip/network/ipv6" @@ -295,9 +296,9 @@ func addWgLink(s *stack.Stack, nic tcpip.NICID, interfaceName string, addr tcpip //mtu := 1500 // tun, err := wg_tun.CreateTUN(interfaceName, mtu) - tun, err := CreateGoTun(s, ep) + tun, err := wireguard.CreateWgTun(s, ep) if err != nil { - log.Fatal("CreateGoTun", err) + log.Fatal("CreateWgTun", err) } |