Add runtime warnings

This commit is contained in:
世界
2022-07-25 07:19:15 +08:00
parent 29c329dc52
commit 32e2730ec6
29 changed files with 677 additions and 16 deletions
+2 -4
View File
@@ -6,7 +6,6 @@ import (
"context"
"net"
"net/netip"
"runtime"
"strconv"
"strings"
@@ -140,10 +139,9 @@ func (t *Tun) NewError(ctx context.Context, err error) {
}
func mkInterfaceName() (tunName string) {
switch runtime.GOOS {
case "darwin":
if C.IsDarwin {
tunName = "utun"
default:
} else {
tunName = "tun"
}
interfaces, err := net.Interfaces()