Skip to content

Commit 539b641

Browse files
FanglidingRPRX
andcommitted
Wireguard inbound: Do not use kernel TUN (#3960)
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
1 parent 4ec5c78 commit 539b641

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

proxy/wireguard/config.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@ func (c *DeviceConfig) fallbackIP6() bool {
3131
}
3232

3333
func (c *DeviceConfig) createTun() tunCreator {
34+
if !c.IsClient {
35+
// See tun_linux.go createKernelTun()
36+
errors.LogWarning(context.Background(), "Using gVisor TUN. Inbound doesn't support kernel TUN yet.")
37+
return createGVisorTun
38+
}
3439
if c.NoKernelTun {
35-
errors.LogWarning(context.Background(), "Using gVisor TUN.")
40+
errors.LogWarning(context.Background(), "Using gVisor TUN. NoKernelTun is set to true.")
3641
return createGVisorTun
3742
}
3843
kernelTunSupported, err := KernelTunSupported()

0 commit comments

Comments
 (0)