3

I have a need to redirect mitmproxy to another proxy server. Let say an example.

Browser -> mitmproxy -> fiddler

Browser proxy was set to 8089 mitmproxy is running on 8089 fiddler listening on 8090 now how can i do proxy forward mitmproxy using -F

i tried mitmproxy -p 8089 -F localhost:8090, but the output was unrecognised argument -F

Any help ?

Thanks

user2366330
  • 55
  • 2
  • 6

2 Answers2

3

You can specify an upstream proxy using -U (which was previously called -F).

Maximilian Hils
  • 6,309
  • 3
  • 27
  • 46
  • I try this (-U) to redirect to another proxy, including a Proxy-Authorization header, but I only get error: ERR_TUNNEL_CONNECTION_FAILED , I try to access to HTTPS like a youtube url – José Castro Mar 17 '15 at 20:34
  • For everyone stopping by, I already answered the comment here: https://groups.google.com/forum/#!topic/mitmproxy/32tGPvcLkA0 – Maximilian Hils Mar 17 '15 at 23:19
3

-U is deprecated now. You shall use --mode upstream:SPEC

mitmproxy --mode upstream:http://<target-proxy-ip>:<target-proxy-port> --upstream-auth <target-proxy-user-name>:<target-proxy-password> -p 3128 --set block_global=false

Reference: https://docs.mitmproxy.org/stable/concepts-modes/#upstream-proxy

Example (allows outside connection):

Server-1 (ip: x.x.x.x)

mitmproxy --proxyauth "user1:pass1" -p 3128 --set block_global=false 

Server-2 (ip: y.y.y.y)

mitmproxy --mode upstream:http://x.x.x.x:3128 --upstream-auth user1:pass1 -p 3128 --set block_global=false

Client
Proxy: y.y.y.y:3128

AI Mechanic
  • 631
  • 7
  • 8