Support for Transparent Proxy
See original GitHub issueI wanted to see if the transparent proxy feature is added to NITM. Basically, in windows firewall driver, the traffic can be directed to a transparent proxy (with intact dest IP and port). To support that, I was thinking of the following changes:
- Add proxy/TransparentProxyHandler which adds tlsFrontendHandler in the pipeline (if TLS is not detected, it auto switches to HTTP1 anyway).
- Modify Http1FrontendHandler to essentially replicate handleHttpProxyConnection. We are duplicating the request anyway.
if (master.config().getProxyMode() == ProxyMode.HTTP && !tunneled) {
if (request.method() == HttpMethod.CONNECT) {
handleTunnelProxyConnection(ctx, request);
} else {
handleHttpProxyConnection(ctx, request);
}
} else if (master.config().getProxyMode() == ProxyMode.TRANSPARENT) {
handleHttpProxyConnection(ctx, request);
} else {
LOGGER.debug("{} : {}", connectionContext, request);
connectionContext.serverChannel().writeAndFlush(ReferenceCountUtil.retain(request));
}
- Add caching of client certificates that are generated for performance.
Please let me know your thoughts on this.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
What is a Transparent Proxy | Client vs. Server Side Use Cases
A transparent proxy, also known as an inline proxy, intercepting proxy or forced proxy, is a server that intercepts the connection between an...
Read more >What is a Transparent Proxy? - StackPath
Transparent proxies act as intermediaries between a user and a web service. When a user connects to a service, the transparent proxy intercepts...
Read more >Transparent proxy support - The Linux Kernel documentation
Transparent proxy support ¶. This feature adds Linux 2.2-like transparent proxy support to current kernels. To use it, enable the socket match and...
Read more >Transparent Proxying - mitmproxy docs
When a transparent proxy is used, traffic is redirected into a proxy at the network layer, without any client configuration being required.
Read more >What is a transparent proxy: an easy explanation - NordVPN
It can filter, authenticate, and cache your requests. A transparent proxy does exactly the same while being 'invisible'. In other words, clients ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks. Testing it now and will submit a PR shortly. BTW, fantastic work on the proxy.
It was just released, it might takes hours to sync to the maven central, maybe you can check it later!