Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Using fiddler as Proxy for NPM, Maven, Gradle
Arjun Shetty
Arjun Shetty

Posted on • Edited on

     

Using fiddler as Proxy for NPM, Maven, Gradle

Usually downloading packages has been pain over corporate networks. One way is to switch to personal network now and then to download packages.
Here is a work around for this, use any proxy server providing your credentials. But thing is everytime I change my password I break my head to finally realize the packages are not downloading because of the old credentials in the proxy settings. This is how I get around this, usingFiddler.

Once you have downloaded fiddler, open fiddler and then under rules menu checkAutomatically Authenticate

Alt Text.

For NPM

Set using following commands

npm configsetproxy http://localhost:8888/npm configsethttps-proxy http://localhost:8888/
Enter fullscreen modeExit fullscreen mode

OR

do this manually, openC:\Users\<user name>\.npmrc and set proxy to the port fiddler is running on like below

proxy=http://localhost:8888/https-proxy=http://localhost:8888/strict-ssl=false
Enter fullscreen modeExit fullscreen mode

strict-ssl is set to false to ignore certificate validation, Use this with caution there are a lot packages that are malicious.
now trynpm -i <packagename>

For MAVEN

OpenC:\Users\<user name>\.m2\settings.xml and add this follwing section insettings node

<proxies><proxy><id>optional</id><active>true</active><protocol>http</protocol><host>localhost</host><port>8888</port><nonProxyHosts></nonProxyHosts></proxy><proxy><id>optional</id><active>true</active><protocol>https</protocol><host>localhost</host><port>8888</port><nonProxyHosts></nonProxyHosts></proxy></proxies>
Enter fullscreen modeExit fullscreen mode

For GRADLE

Add this below properties in root folder ofgradle.properties

systemProp.http.proxyHost=127.0.0.1systemProp.http.proxyPort=8888systemProp.https.proxyHost=127.0.0.1systemProp.https.proxyPort=8888
Enter fullscreen modeExit fullscreen mode

Hope this Helps!

Originally Posted onBitsmonkey
Photo by Jonathan on Unsplash

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Joined

More fromArjun Shetty

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp