Add runtime warnings

This commit is contained in:
世界
2022-07-24 22:54:16 +08:00
parent 29c329dc52
commit 32e2730ec6
29 changed files with 677 additions and 16 deletions

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()