Do not resolve unresolved address for request if the first handler in pipeline is SocksProxyHandler
See original GitHub issueExpected behavior
Some interface for handlers (for example CanConnectUnresolved
) that will force Netty to not resolve unresolved addresses for requests with the first handler that implemented this interface.
Socks5ProxyHandler
& Socks4ProxyHandler
have support for unresolved addresses and can be marked with this interface. It’s a very good way for actual proxy usage because this way address will not be resolved in the restricted network (e.g. Russian internet 😦 ) where DNS answers can be compromised.
Actual behavior
Netty always forces address resolving before starting the request pipeline.
Steps to reproduce
Start an HTTP request to the unresolved socket address.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Message handlers and pipelines - IBM
A pipeline is a set of message handlers that are executed in sequence. ... Not every request is succeeded by a response; some...
Read more >How to avoid broken master with Pipelines for Merged Results ...
This merge commit is written in refs/merge-requests/:iid/merge and does not change commit history of master branch. GitLab creates a pipeline on ...
Read more >Sharing Context in MediatR Pipelines - Jimmy Bogard
MediatR, a small library that implements the Mediator pattern, helps simplify scenarios when you want a simple in-memory request/response ...
Read more >ASP.NET: Request Processing, Filtering, and Content ...
HTTP modules are filters that can examine and modify the contents of HTTP request and response messages as they pass through the pipeline....
Read more >Request Processing - Apache Software Foundation
This pipeline performs initial processing of the request. It can be extended by contributing a HttpServletRequestFilter into the HttpServletRequestHandler ...
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 FreeTop 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
Top GitHub Comments
is OK.
@normanmaurer I’m using netty via the heavily customized AsyncHttpClient.
SOCKS proxy support was added basing on this pull request: https://github.com/AsyncHttpClient/async-http-client/pull/1466/files#diff-e8a099a4ff024fa6b7322065055df7e0R413 It’s a link to the exact lines with pipeline change for adding proxy.
The main difference was that it didn’t work for me that way. I spent much time to understand that this way domain name address was resolved in my home network, not using the proxy so my network provider returned invalid IP address instead of actual, replacing responses from name servers.
SocksProxyHandler
class receives an already resolved address and uses IP address instead of domain for the new connection via proxy.All works like a charm when
SocksProxyHandler
classes receive not resolved socket address and use the domain name instead of IP for connection. This way proxy resolves the name itself in the normal “not limited network”.