Resolve the conflict between socks proxy and i2p
by preventing their simultaneous use.
This commit is contained in:
parent
b26cf7322d
commit
7b62a7b14a
|
@ -84,7 +84,8 @@ def parse_arguments(): # pylint: disable=too-many-branches,too-many-statements
|
|||
if args.no_ip:
|
||||
shared.ip_enabled = False
|
||||
if args.trusted_peer:
|
||||
if len(args.trusted_peer) > 50:
|
||||
if len(args.trusted_peer
|
||||
) > 50 and not args.trusted_peer.endswith('onion'):
|
||||
# I2P
|
||||
shared.trusted_peer = (args.trusted_peer.encode(), 'i2p')
|
||||
else:
|
||||
|
@ -259,6 +260,11 @@ def main():
|
|||
shared.data_directory, exc_info=True)
|
||||
|
||||
if shared.socks_proxy:
|
||||
if shared.i2p_enabled:
|
||||
logging.error(
|
||||
'Unfortunately you cannot use both I2P and SOCKS proxy.')
|
||||
return
|
||||
|
||||
# FIXME: the Connection() code would be too complex
|
||||
# without this monkeypatching
|
||||
def create_connection(
|
||||
|
|
Loading…
Reference in New Issue