Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • 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

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