Skip to content

Instantly share code, notes, and snippets.

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 lakpahana/5049232d95fa1ca4924c2a85e2354600 to your computer and use it in GitHub Desktop.
Save lakpahana/5049232d95fa1ca4924c2a85e2354600 to your computer and use it in GitHub Desktop.
In case you cannot download node packages using uni wifi.
Open cmd and run following two commands.
npm config set https-proxy http://10.50.225.222:3128
npm config set proxy http://10.50.225.222:3128
When you switch back to your private connection. Run following two commands.
npm config delete proxy
npm config delete https-proxy
In VS Code:
File->Preferences->Settings->Application->Proxy
In following in Proxy field. and close settings tab
http://10.50.225.222:3128
To resolve dependencies via proxy:
1. Go to pom.xml
2. Right click on the file, Maven-> create 'settings.xml'
3. Add following snippet to settings.xml:
<proxies>
        <proxy>
            <id>optional</id>
            <active>true</active>
            <protocol>http</protocol>
            <host>10.50.225.222</host>
            <port>3128</port>
        </proxy>
    </proxies>
4  reload project
5. Then go to file-> settings
6. Search proxy(go to http proxy)
7. Select manual proxy configuration
8.  Enter proxy details
9. Click Apply and ok
10. Reload project
For git bash
set proxy
git config --global http.proxy http://10.50.225.222:3128
unset proxy
git config --global --unset http.proxy
@lakpahana
Copy link
Author

Proxy settings for anaconda3

First goto anaconda powershell prompt and enter

conda config

This will create a .condasrc file in user folder.

open it using a text editor and add following code

channels:

  • defaults

show_channel_urls: True
allow_other_channels: True

proxy_servers:
http: http://10.50.225.222:3128
https: http://10.50.225.222:3128

ssl_verify: False

Then close the terminal and reopen it.

Run following command

conda update -n root conda

Now try to install packages.

conda install -c anaconda pandas

@lakpahana
Copy link
Author

to install electron js

npx cross-env ELECTRON_GET_USE_PROXY=true GLOBAL_AGENT_HTTP_PROXY=http://10.50.225.222:3128 npm install electron

@lakpahana
Copy link
Author

Tired of copy-pasting ?
Try this amazing PowerShell config by @Sathursan-S . 🙌

https://www.powershellgallery.com/packages/UorProxyConfig/1.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment