mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 18:04:03 +03:00
Fix broken whitelists
This commit is contained in:
@@ -176,6 +176,12 @@ type IPBlocklist interface {
|
||||
// Contains checks if given IP address belongs to this blocklist If.
|
||||
// it is, a connection is terminated .
|
||||
Contains(net.IP) bool
|
||||
|
||||
// Run starts a background update procedure for a blocklist
|
||||
Run(time.Duration)
|
||||
|
||||
// Shutdown stops a blocklist. It is assumed that none will access it after.
|
||||
Shutdown()
|
||||
}
|
||||
|
||||
// Event is a data structure which is populated during mtg request
|
||||
|
||||
@@ -144,6 +144,12 @@ func (p *Proxy) Shutdown() {
|
||||
p.ctxCancel()
|
||||
p.streamWaitGroup.Wait()
|
||||
p.workerPool.Release()
|
||||
|
||||
if p.whitelist != nil {
|
||||
p.whitelist.Shutdown()
|
||||
}
|
||||
|
||||
p.blocklist.Shutdown()
|
||||
}
|
||||
|
||||
func (p *Proxy) doFakeTLSHandshake(ctx *streamContext) bool {
|
||||
|
||||
Reference in New Issue
Block a user