Map Local (like Charles Proxy) using Open Source

6

3

Is there a way to use Wireshark or some other freeware to get an outcome like one gets when using Charles' Map Local capability?

The way it works in Charles is that you can specify a set of files/folders which are replaced with files from your local disk, anytime your browser requests the specified file(s).

This is super handy for working on complex websites with barriers to getting your changes into source-control, or where you are not allowed to push files onto a staging server during development.

Randy L

Posted 2011-07-18T21:38:46.303

Reputation: 187

Answers

6

If you are looking for an open-source solution, then Privoxy might be a solution.

Privoxy can do redirect actions and much more.
These examples were taken from the manual :

# Replace example.com's style sheet with another one
{ +redirect{http://localhost/example.com.css} }
example.com/stylesheet\.css$

# Redirect remote requests for this manual
# to the local version delivered by Privoxy
{+redirect{s@^http://www@http://config@}}
www.privoxy.org/user-manual/

harrymc

Posted 2011-07-18T21:38:46.303

Reputation: 306 093

I tried using Privoxy, but it seemed to have issues with https. There's also https://dutzi.github.io/tamper/ Tamper based on mitmproxy but it didn't work for me.

– Ben Creasy – 2016-12-13T18:32:20.917

@BenCreasy: The Privoxy FAQ says: " Since secure HTTP connections are encrypted ... there is little that Privoxy can do but hand the raw gibberish data though from one end to the other unprocessed. The only exception to this is blocking by host patterns". Nevertheless, someone has managed it here using ProxHTTPSProxy.

– harrymc – 2016-12-13T20:30:01.927

1

I would look at tamper which uses the popular Python library mitmproxy.

It did not work for me, but the code is open source so you can probably get it working if you put in the time.

Ben Creasy

Posted 2011-07-18T21:38:46.303

Reputation: 304

0

Since asking this question, I have found out that you can do this with Fiddler. This is not strictly an answer, I was asking for something Open Source, and AFAIK Fiddler is not open source.

I'm still holding out for some other easy way to do this, but for now this seems to be the answser. No.

Randy L

Posted 2011-07-18T21:38:46.303

Reputation: 187