Skip to content

Instantly share code, notes, and snippets.

@gaboratorium
Last active October 17, 2023 14:30
Show Gist options
  • Save gaboratorium/5a8d12b1933c351996f99e1cd0c18299 to your computer and use it in GitHub Desktop.
Save gaboratorium/5a8d12b1933c351996f99e1cd0c18299 to your computer and use it in GitHub Desktop.
How to monitor http/https traffic in JVM #jvm #java #http #https #intellij

How to monitor http/https traffic in JVM

Download Fiddler

Download Fiddler - the Free Web Debugging Proxy

JVM (VM) settings

-DproxySet=true -DproxyHost=127.0.0.1 
-DproxyPort=8888 
-Djavax.net.ssl.trustStore="C:\Windows\System32\FiddlerKeystore" 
-Djavax.net.ssl.trustStorePassword="YourFiddlerKeyStorePassword"

Generate Fiddler certificate

  • Check to Tools > Options > HTTPS > Decrypt HTTPS traffic
  • Go to http://127.0.0.1:8888/ and download FiddlerRoot Certificate

Create a JVM keystore, using the certificate

  • Run `"C:\Program Files\Java\jdk1.8.0_144\bin\keytool.exe" -import -file "C:\Users\YourUserName\Desktop\FiddlerRoot.cer" -keystore FiddlerKeystore -alias Fiddler
  • Provide a password
  • Keystore will be generated in C:\Windows\System32\FiddlerKeystore

Enable JVM proxy and provide keystore using the configuration above

  • In IntelliJ Idea: Run/Debug Configurations > VM options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment