Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sniff Packets using Charles Proxy and Visual Code

I need to sniff packets that my node.js app is sending. I'm running Visual Code 1.36.1.

I in a corporate environment with all sorts of SSL proxies. I have Charles setup correctly, it sees Postman request. But requests made from my Visual code node.js app are not intercepted.

I'd be happy with a Charles set up or even a Visual Code menu.

The answers in How to view network traffic in Visual Studio don't seem to apply either because I'm on a Macintosh or because Visual Code has been updated since that question was answered.

like image 760
Paul Cezanne Avatar asked Oct 29 '25 06:10

Paul Cezanne


1 Answers

Adding environment variable

NODE_TLS_REJECT_UNAUTHORIZED=0

fixed it.

Took this answer from here: Ignore invalid self-signed ssl certificate in node.js with https.request?

like image 72
mattsson Avatar answered Nov 01 '25 12:11

mattsson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!