Skip to content
This repository has been archived by the owner on Oct 29, 2018. It is now read-only.

Support encoded characters in http_proxy #577

Closed
nathanpw opened this issue May 29, 2017 · 3 comments
Closed

Support encoded characters in http_proxy #577

nathanpw opened this issue May 29, 2017 · 3 comments

Comments

@nathanpw
Copy link

Hi thanks for this great software. I am using this behind a proxy and have recently had to encode my user name and pass word in the http_proxy environment variable. Unfortunately scudcloud doesn't work when I do this. However, if I use the actual characters and not the url encoded values, it works as expected. I was wondering if you could implement the change at the bottom to support encoded urls in http_proxy?

ScudCloud Version

Paste the output for scudcloud --version below:
ScudCloud 1.58 Python 3.5.2 Qt 5.5.1 PyQt 5.5.1 SIP 4.17

Distro and Desktop info

  • Distribution: Ubuntu
  • Version/Release: 16.04
  • Desktop environment: Matte

Expected behavior

Support encoded characters in the http_proxy environment variable.

Actual behavior

%XX encoded characters are not decoded and not sent to the proxy correctly.

Steps to reproduce

  1. Use a proxy that requires a username and password with url encoded characters
  2. Setup encoded characters in your http_proxy environment variable
  3. Run scudcloud

I was able to hack in the following changes in wrapper.py on line 44 below

def configure_proxy(self):

try: from urllib.parse import unquote except ImportError: from urllib import unquote url = os.environ.get('http_proxy') or os.environ.get('HTTP_PROXY') url_decode = unquote(url) proxy = urlparse(url_decode)

@raelgc
Copy link
Owner

raelgc commented May 30, 2017

Hi @nathanpw and thanks for this improvement.

Do you mind to create a pull request with it?

@nathanpw
Copy link
Author

@raelgc, sure - #578

@raelgc
Copy link
Owner

raelgc commented Jun 2, 2017

Thank you @nathanpw! Packages published for Ubuntu!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants