chore: Modify the default value to avoid outputting Deprecated
Some checks failed
Trigger CMFA Update / trigger-CMFA-update (push) Has been cancelled

This commit is contained in:
xishang0128 2024-07-12 02:59:14 +08:00
parent 0e228765fc
commit fc03bd2f0d

View File

@ -504,7 +504,7 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) {
},
Sniffer: RawSniffer{
Enable: false,
Sniffing: []string{},
Sniff: map[string]RawSniffingConfig{},
ForceDomain: []string{},
SkipDomain: []string{},
Ports: []string{},
@ -1566,7 +1566,7 @@ func parseSniffer(snifferRaw RawSniffer) (*Sniffer, error) {
}
}
} else {
if sniffer.Enable {
if sniffer.Enable && len(snifferRaw.Sniffing) != 0 {
// Deprecated: Use Sniff instead
log.Warnln("Deprecated: Use Sniff instead")
}