Skip to content

Commit

Permalink
WireGuard createTun: Add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
RPRX authored Oct 30, 2024
1 parent cf182b0 commit ceb6eac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion proxy/wireguard/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func (c *DeviceConfig) fallbackIP6() bool {

func (c *DeviceConfig) createTun() tunCreator {
if c.NoKernelTun {
errors.LogWarning(context.Background(), "Using gVisor TUN.")
return createGVisorTun
}
kernelTunSupported, err := KernelTunSupported()
Expand All @@ -40,8 +41,9 @@ func (c *DeviceConfig) createTun() tunCreator {
return createGVisorTun
}
if !kernelTunSupported {
errors.LogWarning(context.Background(), "Using gVisor TUN. Kernel TUN is not supported on your OS, or your permission is insufficient.)")
errors.LogWarning(context.Background(), "Using gVisor TUN. Kernel TUN is not supported on your OS, or your permission is insufficient.")
return createGVisorTun
}
errors.LogWarning(context.Background(), "Using kernel TUN.")
return createKernelTun
}

0 comments on commit ceb6eac

Please sign in to comment.