From 39de5d58c82f8ac048c634a1ffecb1e1a40d8ed2 Mon Sep 17 00:00:00 2001 From: admin <2833154405@qq.com> Date: Fri, 18 Mar 2022 17:41:06 +0800 Subject: [PATCH] Only prompt when interface cannot be found --- config/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index f57f90ec..43d10b94 100644 --- a/config/config.go +++ b/config/config.go @@ -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