From c3399fd3463c7cb71f3a3a1a3c6fb0f809cc4a2a Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Tue, 10 Feb 2026 01:16:24 +0800 Subject: [PATCH] chore: better logging for removed configurations --- adapter/outboundgroup/parser.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/adapter/outboundgroup/parser.go b/adapter/outboundgroup/parser.go index 46406855..d5ce7288 100644 --- a/adapter/outboundgroup/parser.go +++ b/adapter/outboundgroup/parser.go @@ -42,10 +42,6 @@ type GroupCommonOption struct { IncludeAllProviders bool `group:"include-all-providers,omitempty"` Hidden bool `group:"hidden,omitempty"` Icon string `group:"icon,omitempty"` - - // removed configs, only for error logging - Interface string `group:"interface-name,omitempty"` - RoutingMark int `group:"routing-mark,omitempty"` } func ParseProxyGroup(config map[string]any, proxyMap map[string]C.Proxy, providersMap map[string]P.ProxyProvider, AllProxies []string, AllProviders []string) (C.ProxyAdapter, error) { @@ -62,12 +58,15 @@ func ParseProxyGroup(config map[string]any, proxyMap map[string]C.Proxy, provide return nil, errFormat } - if groupOption.RoutingMark != 0 { + if _, ok := config["routing-mark"]; ok { log.Errorln("The group [%s] with routing-mark configuration was removed, please set it directly on the proxy instead", groupOption.Name) } - if groupOption.Interface != "" { + if _, ok := config["interface-name"]; ok { log.Errorln("The group [%s] with interface-name configuration was removed, please set it directly on the proxy instead", groupOption.Name) } + if _, ok := config["dialer-proxy"]; ok { + log.Errorln("The group [%s] with dialer-proxy configuration is not allowed, please set it directly on the proxy instead", groupOption.Name) + } groupName := groupOption.Name