|
|
@@ -110,6 +110,8 @@ func makeIPBlocklist(conf config.ListConfig, logger mtglib.Logger, ntw mtglib.Ne
|
|
110
|
110
|
return nil, fmt.Errorf("incorrect parameters for firehol: %w", err)
|
|
111
|
111
|
}
|
|
112
|
112
|
|
|
|
113
|
+ go firehol.Run(conf.UpdateEach.Get(ipblocklist.DefaultFireholUpdateEach))
|
|
|
114
|
+
|
|
113
|
115
|
return firehol, nil
|
|
114
|
116
|
}
|
|
115
|
117
|
|
|
|
@@ -162,7 +164,7 @@ func runProxy(conf *config.Config, version string) error { // nolint: funlen
|
|
162
|
164
|
return fmt.Errorf("cannot build network: %w", err)
|
|
163
|
165
|
}
|
|
164
|
166
|
|
|
165
|
|
- blocklist, err := makeIPBlocklist(conf.Defense.Blocklist, logger, ntw)
|
|
|
167
|
+ blocklist, err := makeIPBlocklist(conf.Defense.Blocklist, logger.Named("blocklist"), ntw)
|
|
166
|
168
|
if err != nil {
|
|
167
|
169
|
return fmt.Errorf("cannot build ip blocklist: %w", err)
|
|
168
|
170
|
}
|
|
|
@@ -170,9 +172,9 @@ func runProxy(conf *config.Config, version string) error { // nolint: funlen
|
|
170
|
172
|
var whitelist mtglib.IPBlocklist
|
|
171
|
173
|
|
|
172
|
174
|
if conf.Defense.Allowlist.Enabled.Get(false) {
|
|
173
|
|
- whlist, err := makeIPBlocklist(conf.Defense.Allowlist, logger, ntw)
|
|
|
175
|
+ whlist, err := makeIPBlocklist(conf.Defense.Allowlist, logger.Named("allowlist"), ntw)
|
|
174
|
176
|
if err != nil {
|
|
175
|
|
- return fmt.Errorf("cannot build ip blocklist: %w", err)
|
|
|
177
|
+ return fmt.Errorf("cannot build ip allowlist: %w", err)
|
|
176
|
178
|
}
|
|
177
|
179
|
|
|
178
|
180
|
whitelist = whlist
|