Update tun.go

pull/4926/head
xqzr 2025-07-24 05:31:56 +08:00 committed by GitHub
parent b2c02b0497
commit 8be7b2b400
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -92,12 +92,11 @@ func (t *tunnel) Close() (err error) {
}
func CalculateInterfaceName(name string) (tunName string) {
tunName = "tun"
if runtime.GOOS == "darwin" {
tunName = "utun"
} else if name != "" {
tunName = name
} else {
tunName = "tun"
}
interfaces, err := net.Interfaces()
if err != nil {