ssl - How to make Socks request over http proxy? -


i have built application called tun2socks gui. it's program make socks proxy o transparent.

usually use ssh port forward or tor socks service, want can use http proxy too. build socks5 proxy self connect http proxy. it's working capturing http request client sent http proxy.

the problem when client send ssl request, cannot capture request forwarded. how best method make ssl request socks proxy through http proxy?

schema of request transportation here : client ssl request > socks proxy > http proxy > internet

thanks

when client intentionally wants establish ssl session target server through proxy, not establish ssl session proxy itself. client first tells proxy establish connection target server, , client initiates ssl session target server. in situation, not possible proxy sniff traffic encrypted, nor should trying to. proxy pass-through, exchanges raw data , forth between client , server needed. proxy should not care kind of requests client sending, since client tells proxy connect.

if have injected proxy in between client , server in such way client has no knowledge proxy exists, client not know needs adjust requests make them proxy-friendly. client connected proxy think connected target server, , initiate ssl handshake proxy have respond to. proxy have access client's request data (provided handshake successful, such if client not verify peer certificates), , can tunnel unencrypted data next proxy needed.

update: thought of scenario should work both cleartext , ssl connections. regardless of whether transparently redirecting client's outbound connection socks proxy without client knowing it, or client intentionally connects socks proxy , tells go, socks proxy knows client's target host/ip:port. socks proxy can either connect directly target, or can connect http proxy , ask create tunnel target via http connect method. if successful, client has viable connection target, , data client sends, ssl or otherwise, flow as-is target, , vice versa. neither socks proxy nor http proxy needs know client's request other target host/ip:port. in initial socks request, either captured intercepted tcp header, or explicit client.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -