mirror of https://github.com/XTLS/Xray-core
Update tun.go
parent
b2c02b0497
commit
8be7b2b400
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue