Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy Server does not work with Username and Password #20

Open
starr749 opened this issue Aug 6, 2015 · 3 comments
Open

Proxy Server does not work with Username and Password #20

starr749 opened this issue Aug 6, 2015 · 3 comments

Comments

@starr749
Copy link

starr749 commented Aug 6, 2015

The Regex used to to parse the process.env.http_proxy only works when the env variable is in the http://proxyurl:port format.

For those of us stuck behind the corporate firewall: http://username:password@proxyurl:port, the regex does not parse the url correctly.

The line in question being:
var proxyVars = proxyServer.match(/^([^:/]*:[/]{2})?([^:/]+)(:([0-9]+))?/i);

This is really unfortunate for those of us on windows, because we have no place like "/usr/share/unicode/ to put the file either.

@behboud
Copy link

behboud commented Sep 8, 2015

+1
any workaround?
EDIT: this regex seems to work:

/^([^:/]*:[/]{2})?(([^:/]+)?:(([^:/]+)@))?([^:/]+)(:([0-9]+))?/i

and change lines 139,140 to

unicodedatafile.host = proxyVars[6];
unicodedatafile.port = proxyVars[8];

@starr749
Copy link
Author

starr749 commented Sep 8, 2015

If you're on Windows, and behind a corporate proxy, the only real workaround that I can think of would be to install something like Cntlm, setup a local proxy (without a username / password) that forwards to your corporate one with the correct credentials.

However, this may violate security rules, so you'd want to consult with your IT, go through proper channels etc.

Definitely not an ideal work around, but it's the only thing that I've found that might work on windows machines.

Even using Cygwin I was not able to download / read the unicode file.

@spacemonkey
Copy link

Solution offered by @behboud works for me as well - can someone do this, or do we need to submit a pull request?

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

No branches or pull requests

3 participants