We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e256d5 commit e08d33eCopy full SHA for e08d33e
1 file changed
src/proxy_server.py
@@ -184,6 +184,13 @@ def __init__(self, config: dict):
184
self.socks_enabled = config.get("socks5_enabled", True)
185
self.socks_host = config.get("socks5_host", self.host)
186
self.socks_port = config.get("socks5_port", 1080)
187
+ if self.socks_enabled and self.socks_host == self.host \
188
+ and int(self.socks_port) == int(self.port):
189
+ raise ValueError(
190
+ f"listen_port and socks5_port must differ on the same host "
191
+ f"(both set to {self.port} on {self.host}). "
192
+ f"Change one of them in config.json."
193
+ )
194
self.fronter = DomainFronter(config)
195
self.mitm = None
196
self._cache = ResponseCache(max_mb=CACHE_MAX_MB)
0 commit comments