Fix: revert to classic TUN creation (#254)

This commit is contained in:
xjasonlyu
2023-05-30 16:29:01 +08:00
parent 46c04db29f
commit 44ad654d72
4 changed files with 32 additions and 14 deletions

View File

@@ -2,7 +2,15 @@
package tun
import (
"golang.zx2c4.com/wireguard/tun"
)
const (
offset = 4 /* 4 bytes TUN_PI */
defaultMTU = 1500
)
func createTUN(name string, mtu int) (tun.Device, error) {
return tun.CreateTUN(name, mtu)
}