diff --git a/lib/network.py b/lib/network.py index 7e7e06bbf..7df6996e8 100644 --- a/lib/network.py +++ b/lib/network.py @@ -105,7 +105,8 @@ proxy_modes = ['socks4', 'socks5', 'http'] def serialize_proxy(p): if not isinstance(p, dict): return None - return ':'.join([p.get('mode'),p.get('host'), p.get('port'), p.get('user'), p.get('password')]) + return ':'.join([p.get('mode'), p.get('host'), p.get('port'), + p.get('user', ''), p.get('password', '')]) def deserialize_proxy(s):