Skip to content

Instantly share code, notes, and snippets.

@ExtremeGTX
Last active Jan 25, 2019
Embed
What would you like to do?
Some tips about Proxy in Development Environment

Setting System Wide Proxy for python pip and nodejs npm:

set HTTP_PROXY=http://username:pAssw0rd@100.100.10.10:8080
set HTTPS_PROXY=https://username:pAssw0rd@100.100.10.10:8080

Proxy credentials can be provided in the url as the following:

format: http://username:password@proxy_address:port
example: http://username:pAssw0rd@100.100.10.10:8080

Issues:

  • if proxy_password has special characters like % or '@', then it must be url encoded before use
    Example: AbCdEfG%HiJ
    After Encoding: AbCdEfG%25HiJ

    The following URL Encoder can be used: https://www.urlencoder.org/

  • During Development on local server like nodejs or flask some tools may fail to reach your local dev server because it routes the requests through Proxy

    • solution (Python Requests):
      1. Add your server url to NO_PROXY env. variable
        set NO_PROXY=localhost:5000
      2. OR trust_env = False check 'requests' documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment