mirror of
https://github.com/SagerNet/sing-tun.git
synced 2025-10-24 00:43:13 +08:00
Fix darwin routes
This commit is contained in:
2
tun.go
2
tun.go
@@ -85,7 +85,7 @@ func CalculateInterfaceName(name string) (tunName string) {
|
||||
for _, netInterface := range interfaces {
|
||||
if strings.HasPrefix(netInterface.Name, tunName) {
|
||||
index, parseErr := strconv.ParseInt(netInterface.Name[len(tunName):], 10, 16)
|
||||
if parseErr == nil {
|
||||
if parseErr == nil && int(index) >= tunIndex {
|
||||
tunIndex = int(index) + 1
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user