Update Whitelist after the connection is closed
This commit is contained in:
parent
2e17c3616f
commit
ffaf2781f5
@ -68,6 +68,13 @@ func gateway_handler(c net.Conn) {
|
||||
fmt.Println("[OK ] Whitelisted host ", host, " connected")
|
||||
update_whitelist_time(host)
|
||||
proxy(c)
|
||||
update_whitelist_time(host)
|
||||
// yes, we're updating this before and after.
|
||||
// why? Consider long TCP connections, e.g. in games
|
||||
// Then the specified Timeout may be reached before the connection is even closed
|
||||
// This won't affect this connection (it'll stay open even if the timeout is reached)
|
||||
// but another connection won't be possible, even if it's right after the closing of
|
||||
// the first connection. ¯\_(ツ)_/¯
|
||||
} else {
|
||||
fmt.Println("[BLK] Blocking host ", host)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user