justcoding121 / titanium-web-proxy

A cross-platform asynchronous HTTP(S) proxy server in C#.
MIT License
1.93k stars 618 forks source link

how to double proxy chainning ? #909

Open mcarbonneaux opened 2 years ago

mcarbonneaux commented 2 years ago

i search how to do double proxy chainning (simple proxy chainning work fine!) ?! like that : client browser -> titanium web proxy -> (http proxy via first connect with basic auth) corporate proxy -> external https (with basic auth) internet proxy -> destination web server

client request to the titanium web proxy point of view:

CONNECT www.google.fr HTTP/1.1
Host: www.google.fr

<browser decrypt traffic with google site>

from titanium web proxy point of view :

CONNECT myremoteproxy.com:443 HTTP/1.1
Host: myremoteproxy.com 
Proxy-Authorization: basic <encoded user/pass corporate proxy>

<then decrypt proxy communication in titanium proxy chain, them send client PROXY request>
CONNECT www.google.fr HTTP/1.1
Host: www.google.fr
Proxy-Authorization: basic <encoded user/pass myremoteproxy proxy>

<let the browser decrypt traffic with google site>