withManInTheMiddle feature with ChainedProxyManager for SSL traffic

143 views
Skip to first unread message

Chandrakanth Reddy

unread,
Apr 27, 2015, 12:43:14 AM4/27/15
to littl...@googlegroups.com
Hi All,

I could able to configure chained proxy successfully using https://groups.google.com/forum/#!searchin/littleproxy/chanined$20proxy/littleproxy/6qGX0hUUom8/oEveRxINDfUJ (thanks to Ox for this)

The above is working fine for non-SSL requests by excluding withManInTheMiddle(as ChainedProxyManager and withManInTheMiddle are mutually exclusive) while creating proxy like:

this.proxyServer = DefaultHttpProxyServer.bootstrap()
                .withName("Downstream")
                .withPort(downstreamProxyPort)
                .withChainProxyManager(chainedProxyManager(upstreamProxyHostName, upstreamProxyPort))
                /*.withManInTheMiddle(new SelfSignedMitmManager()) */
.withFiltersSource(new HttpFiltersSourceAdapter() {
                    public HttpFilters filterRequest(HttpRequest originalRequest, ChannelHandlerContext ctx) {
                    customHttpFilter = new CustomHttpFiltersAdapter(originalRequest);
                        if (modifyRequest)
                        customHttpFilter.setModifyRequest(true);
                        else 
                        customHttpFilter.setModifyRequest(false);
                        return customHttpFilter; 
                        }
                    })
                .start();

My use case also involves SSL traffic for chained proxy. Is there any way to achieve this? Any work arounds?

Thanks in Advance
Reply all
Reply to author
Forward
0 new messages