Skip to content

Commit fc03bd2

Browse files
committed
chore: Modify the default value to avoid outputting Deprecated
1 parent 0e22876 commit fc03bd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) {
504504
},
505505
Sniffer: RawSniffer{
506506
Enable: false,
507-
Sniffing: []string{},
507+
Sniff: map[string]RawSniffingConfig{},
508508
ForceDomain: []string{},
509509
SkipDomain: []string{},
510510
Ports: []string{},
@@ -1566,7 +1566,7 @@ func parseSniffer(snifferRaw RawSniffer) (*Sniffer, error) {
15661566
}
15671567
}
15681568
} else {
1569-
if sniffer.Enable {
1569+
if sniffer.Enable && len(snifferRaw.Sniffing) != 0 {
15701570
// Deprecated: Use Sniff instead
15711571
log.Warnln("Deprecated: Use Sniff instead")
15721572
}

0 commit comments

Comments
 (0)