Skip to content

Commit

Permalink
chore: Modify the default value to avoid outputting Deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Jul 11, 2024
1 parent 0e22876 commit fc03bd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit fc03bd2

Please sign in to comment.