Update TUN creation

This commit is contained in:
世界
2023-02-26 19:16:28 +08:00
parent a8f13bd956
commit 842730707c
14 changed files with 64 additions and 62 deletions

View File

@@ -46,7 +46,7 @@ func NewSystemDevice(router adapter.Router, interfaceName string, localPrefixes
if interfaceName == "" {
interfaceName = tun.CalculateInterfaceName("wg")
}
tunInterface, err := tun.Open(tun.Options{
tunInterface, err := tun.New(tun.Options{
Name: interfaceName,
Inet4Address: inet4Addresses,
Inet6Address: inet6Addresses,