Support SOCKS5 proxy for tri protocol in NettyConnectionClient
- Dominant language
- Java
- Stars
- 41.6k
- Forks
- 26.4k
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 4
Description
### Pre-check
- [x] I am sure that all the content I provide is in English.
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar feature requirement.
### Apache Dubbo Component
Java SDK (apache/dubbo)
### Descriptions
**Body:**
Hello maintainers,
We are currently using Dubbo **3.3.6** with the **tri (Triple) protocol**. While reviewing the source code, I noticed that `org.apache.dubbo.remoting.transport.netty4.NettyConnectionClient` still contains the following TODO:
```java
// set null but do not close this client, it will be reconnecting in the future
ch.closeFuture().addListener(channelFuture -> clearNettyChannel());
// TODO support Socks5
```
From our current testing, it seems that **tri protocol does not yet support SOCKS5 proxying** on the client side. JVM-level proxy settings such as:
```bash
-DsocksProxyHost=...
-DsocksProxyPort=...
```
do not appear to work for tri connections, which is understandable since the client is based on **Netty** rather than plain JDK sockets.
We have a real use case for this feature, such as:
- local development environments accessing remote Dubbo services through a SOCKS5 proxy
- cross-network or restricted-network scenarios where direct connectivity is not available
Could you please clarify:
1. Is **SOCKS5 support for tri protocol** already on the roadmap?
2. If yes, is there any **planned version or milestone** for it?
3. If not, what would be the **recommended extension point or workaround** for now?
For example, is it expected to support something like Netty's `Socks5ProxyHandler` in the client pipeline in the future?
Environment:
- Dubbo version: **3.3.6**
- Protocol: **tri / Triple**
- Transport: **Netty**
Thanks in advance.
### Related issues
_No response_
### Are you willing to submit a pull request to fix on your own?
- [x] Yes I am willing to submit a pull request on my own!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
Contributor guide
Research direction
Start with org.apache.dubbo.remoting.transport.netty4.NettyConnectionClient and its TODO for SOCKS5 support, then review how tri protocol client connections build the Netty pipeline. Done means determining and implementing client-side SOCKS5 proxy support for tri connections, with verification that connections work through a SOCKS5 proxy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100