question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Transparent Proxy

See original GitHub issue

I 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:

  1. Add proxy/TransparentProxyHandler which adds tlsFrontendHandler in the pipeline (if TLS is not detected, it auto switches to HTTP1 anyway).
  2. 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));
        }

  1. Add caching of client certificates that are generated for performance.

Please let me know your thoughts on this.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
abbasvallianicommented, May 4, 2021

Thanks. Testing it now and will submit a PR shortly. BTW, fantastic work on the proxy.

0reactions
chhsiao90commented, May 14, 2021

It was just released, it might takes hours to sync to the maven central, maybe you can check it later!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found