Add JVM SOCKS5 proxy support to NettyConnectionClient#16285
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 3.3 #16285 +/- ##
============================================
+ Coverage 60.79% 60.81% +0.01%
+ Complexity 11777 11775 -2
============================================
Files 1953 1953
Lines 89208 89214 +6
Branches 13458 13458
============================================
+ Hits 54234 54254 +20
+ Misses 29403 29395 -8
+ Partials 5571 5565 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds SOCKS5 proxy support to the tri/HTTP2 Netty client path by wiring Netty’s Socks5ProxyHandler into NettyConnectionClient when JVM-style proxy properties are present, addressing #16276.
Changes:
- Read
socksProxyHost/socksProxyPortfrom Dubbo’s global configuration (incl. system properties) and conditionally addSocks5ProxyHandlerto the Netty pipeline. - Skip proxying for local/loopback targets via a new
isFilteredAddress(...)helper. - Add supporting imports/constants for the new behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@zrlw Let's handle the Copilot prompt first, either reject or accept is fine |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyConnectionClient.java:63
NettyClient.SOCKS_PROXY_HOST/PORT/DEFAULT_SOCKS_PROXY_PORTare declaredprivateinNettyClient, so referencing them here will not compile. Define these keys locally (or make them accessible via a public/package-private constant in another change).
public final class NettyConnectionClient extends AbstractNettyConnectionClient {
private Bootstrap bootstrap;
…ttyClient to reduce NumberFormatException probability during parsing socksProxyPort
What is the purpose of the change?
try to fix #16276
Checklist