There are several improvements to imagine for the proxy handling.
First, as the password is of type bytes, trying to dump the proxy settings will crash Drive:
Traceback (most recent call last): File "nxdrive/gui/api.py", line 748, in get_proxy_settings return self._json(result) File "nxdrive/gui/api.py", line 74, in _json return json.dumps(obj, default=self._json_default) File "python3.6/json/__init__.py", line 238, in dumps **kw).encode(obj) File "python3.6/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "python3.6/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) ValueError: Circular reference detected
The fix is simple: decode the password when loading the proxy settings.
Second, when setting a username and password for the manual proxy, credentials are not taken into account.
We could fix those issues by reviewing how the manual proxy is handled. Also the resulting code would be simpler to read and understand.