Skip to content

Instantly share code, notes, and snippets.

@ExtremeGTX
Last active January 25, 2019 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ExtremeGTX/b261952ecb932f23846b0f91e476af5b to your computer and use it in GitHub Desktop.
Save ExtremeGTX/b261952ecb932f23846b0f91e476af5b to your computer and use it in GitHub Desktop.
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