support location-based rproxy

This commit is contained in:
ed
2022-12-10 23:43:31 +00:00
parent 02ad4bfab2
commit db194ab519
21 changed files with 147 additions and 86 deletions

View File

@@ -178,11 +178,6 @@ class HttpSrv(object):
def listen(self, sck: socket.socket, nlisteners: int) -> None:
if self.args.j != 1:
# lost in the pickle; redefine
try:
sck.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
except:
pass
if not ANYWIN or self.args.reuseaddr:
sck.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)