mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-14 21:31:16 +08:00
Merge pull request #19 from Adlyq/Alpha-pr
[skip ci]Only prompt when interface cannot be found
This commit is contained in:
commit
c8b1050c15
@ -913,7 +913,9 @@ func parseTun(rawTun RawTun, general *General) (*Tun, error) {
|
||||
if (rawTun.Enable || general.TProxyPort != 0) && general.Interface == "" {
|
||||
autoDetectInterfaceName, err := commons.GetAutoDetectInterface()
|
||||
if err != nil || autoDetectInterfaceName == "" {
|
||||
return nil, fmt.Errorf("can not find auto detect interface: %w. you must be detect `interface-name` if tun set to enable or `tproxy-port` isn't zore", err)
|
||||
log.Warnln("Can not find auto detect interface.[%s]", err)
|
||||
} else {
|
||||
log.Warnln("Auto detect interface: %s", autoDetectInterfaceName)
|
||||
}
|
||||
|
||||
general.Interface = autoDetectInterfaceName
|
||||
|
Loading…
Reference in New Issue
Block a user