Merge pull request #19 from Adlyq/Alpha-pr
[skip ci]Only prompt when interface cannot be found
This commit is contained in:
commit
c8b1050c15
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue