Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Charles Proxy to route https request to local http server

I have Charles Proxy set up to look at outgoing https requests, and I need to re-route traffic from one server to a local http server.

I have a MacOSX machine that is set up this way: I have an ethernet connection that I hardwire, and share the internet connection via the airport interface. On a second machine, I've installed the Charles cert, and when I connect via the shared interface. I can see the traffic (unencrypted) in Charles, so I know the communications and certs are all working properly.

I need to intercept all the https traffic going to one server (https://www.foo.com) to a local http server (localhost:8001). I've tried using Map Remote, but it doesn't seem to unencrypt the traffic before forwarding it (or possibly it re-encrypts it).

How can I configure Charles to do this? (or, please point me to any other software package, if Charles isn't capable of this)

like image 966
Kylar Avatar asked Mar 07 '12 14:03

Kylar


People also ask

Do you use Charles Proxy tool?

Charles Proxy is a web debugging tool that monitors the network calls and decrypts the web traffic. It helps in understanding the content in your network call. E.g. Requests sent to the server and data fetched from the server etc. This network debugging tool can read the web traffic of Windows, Android and IOS devices.


1 Answers

I figured out what was happening, there were two issues.

I had misconfigured the Map Remote entry, and my two different clients (MyApp and curl) were hitting two different servers - the app was hitting the correct server (locally) but the request was malformed.

Curl from the macOSX box where the proxy was running was NOT looping through the proxy, since I hadn't included the -x localhost:8888 flag.

like image 118
Kylar Avatar answered Nov 05 '22 07:11

Kylar