parent
c39d66661b
commit
4fe5929720
|
@ -30,7 +30,7 @@ type PatternMatcher struct {
|
|||
indirectVals map[string]interface{}
|
||||
}
|
||||
|
||||
func NewPatternPatcher() *PatternMatcher {
|
||||
func NewPatternMatcher() *PatternMatcher {
|
||||
patternMatcher := PatternMatcher{
|
||||
blockedPrefixes: critbitgo.NewTrie(),
|
||||
blockedSuffixes: critbitgo.NewTrie(),
|
||||
|
|
|
@ -91,7 +91,7 @@ func (plugin *PluginBlockName) Init(proxy *Proxy) error {
|
|||
}
|
||||
xBlockedNames := BlockedNames{
|
||||
allWeeklyRanges: proxy.allWeeklyRanges,
|
||||
patternMatcher: NewPatternPatcher(),
|
||||
patternMatcher: NewPatternMatcher(),
|
||||
}
|
||||
for lineNo, line := range strings.Split(string(bin), "\n") {
|
||||
line = TrimAndStripInlineComments(line)
|
||||
|
|
|
@ -42,7 +42,7 @@ func (plugin *PluginCloak) Init(proxy *Proxy) error {
|
|||
return err
|
||||
}
|
||||
plugin.ttl = proxy.cloakTTL
|
||||
plugin.patternMatcher = NewPatternPatcher()
|
||||
plugin.patternMatcher = NewPatternMatcher()
|
||||
cloakedNames := make(map[string]*CloakedName)
|
||||
for lineNo, line := range strings.Split(string(bin), "\n") {
|
||||
line = TrimAndStripInlineComments(line)
|
||||
|
|
|
@ -35,7 +35,7 @@ func (plugin *PluginWhitelistName) Init(proxy *Proxy) error {
|
|||
return err
|
||||
}
|
||||
plugin.allWeeklyRanges = proxy.allWeeklyRanges
|
||||
plugin.patternMatcher = NewPatternPatcher()
|
||||
plugin.patternMatcher = NewPatternMatcher()
|
||||
for lineNo, line := range strings.Split(string(bin), "\n") {
|
||||
line = TrimAndStripInlineComments(line)
|
||||
if len(line) == 0 {
|
||||
|
|
Loading…
Reference in New Issue