|
|
@@ -328,7 +328,7 @@ func NewProxy(opts ProxyOpts) (*Proxy, error) { // nolint: cyclop, funlen
|
|
328
|
328
|
ipBlocklist: opts.IPBlocklist,
|
|
329
|
329
|
eventStream: opts.EventStream,
|
|
330
|
330
|
logger: opts.Logger.Named("proxy"),
|
|
331
|
|
- domainFrontingPort: int(domainFrontingPort),
|
|
|
331
|
+ domainFrontingPort: domainFrontingPort,
|
|
332
|
332
|
idleTimeout: idleTimeout,
|
|
333
|
333
|
bufferSize: int(bufferSize),
|
|
334
|
334
|
telegram: tg,
|
|
|
@@ -336,7 +336,9 @@ func NewProxy(opts ProxyOpts) (*Proxy, error) { // nolint: cyclop, funlen
|
|
336
|
336
|
|
|
337
|
337
|
pool, err := ants.NewPoolWithFunc(int(concurrency), func(arg interface{}) {
|
|
338
|
338
|
proxy.ServeConn(arg.(net.Conn))
|
|
339
|
|
- }, ants.WithLogger(opts.Logger.Named("ants")))
|
|
|
339
|
+ },
|
|
|
340
|
+ ants.WithLogger(opts.Logger.Named("ants")),
|
|
|
341
|
+ ants.WithNonblocking(true))
|
|
340
|
342
|
if err != nil {
|
|
341
|
343
|
return nil, fmt.Errorf("cannot initialize a pool: %w", err)
|
|
342
|
344
|
}
|