Skip to content

Commit

Permalink
Wireguard inbound: Do not use kernel TUN (#3960)
Browse files Browse the repository at this point in the history
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
  • Loading branch information
Fangliding and RPRX committed Nov 2, 2024
1 parent 4ec5c78 commit 539b641
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion proxy/wireguard/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ func (c *DeviceConfig) fallbackIP6() bool {
}

func (c *DeviceConfig) createTun() tunCreator {
if !c.IsClient {
// See tun_linux.go createKernelTun()
errors.LogWarning(context.Background(), "Using gVisor TUN. Inbound doesn't support kernel TUN yet.")
return createGVisorTun
}
if c.NoKernelTun {
errors.LogWarning(context.Background(), "Using gVisor TUN.")
errors.LogWarning(context.Background(), "Using gVisor TUN. NoKernelTun is set to true.")
return createGVisorTun
}
kernelTunSupported, err := KernelTunSupported()
Expand Down

0 comments on commit 539b641

Please sign in to comment.