Skip to content

add socks5 proxy support#3624

Merged
chickenlj merged 3 commits intoapache:masterfrom
nihongye:featureSocks5Support
Apr 26, 2019
Merged

add socks5 proxy support#3624
chickenlj merged 3 commits intoapache:masterfrom
nihongye:featureSocks5Support

Conversation

@nihongye
Copy link
Copy Markdown
Contributor

@nihongye nihongye commented Mar 9, 2019

What is the purpose of the change

add socks5 proxy support for dubbo-remoting-netty4.

Brief changelog

Check the system property 'socks5ProxyHost' in org.apache.dubbo.remoting.transport.netty4.NettyClient#initChannel, if it exists, use the system property socks5ProxyHost and socks5ProxyPort to create a Socks5ProxyHandler and add it to the first location of the ChannelPipeline

Verifying this change

XXXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a GITHUB_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Mar 9, 2019

Codecov Report

Merging #3624 into master will decrease coverage by 0.07%.
The diff coverage is 20%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3624      +/-   ##
============================================
- Coverage     63.77%   63.69%   -0.08%     
  Complexity       71       71              
============================================
  Files           712      713       +1     
  Lines         31450    31495      +45     
  Branches       5073     5076       +3     
============================================
+ Hits          20057    20061       +4     
- Misses         9103     9138      +35     
- Partials       2290     2296       +6
Impacted Files Coverage Δ Complexity Δ
...e/dubbo/remoting/transport/netty4/NettyClient.java 70.58% <20%> (-4.02%) 0 <0> (ø)
.../apache/dubbo/qos/protocol/QosProtocolWrapper.java 64.1% <0%> (-17.95%) 0% <0%> (ø)
...apache/dubbo/common/config/ConfigurationUtils.java 64% <0%> (-8%) 0% <0%> (ø)
...ava/org/apache/dubbo/config/DubboShutdownHook.java 75% <0%> (-6.25%) 0% <0%> (ø)
...pache/dubbo/registry/support/AbstractRegistry.java 77.39% <0%> (-4.6%) 0% <0%> (ø)
...dubbo/remoting/exchange/support/DefaultFuture.java 72.78% <0%> (-3.41%) 0% <0%> (ø)
...ommon/serialize/protostuff/utils/WrapperUtils.java 90.69% <0%> (-2.41%) 0% <0%> (ø)
.../exchange/support/header/HeaderExchangeServer.java 66.98% <0%> (-1.89%) 0% <0%> (ø)
.../apache/dubbo/remoting/transport/AbstractPeer.java 67.39% <0%> (ø) 0% <0%> (ø) ⬇️
...rialize/protostuff/delegate/TimestampDelegate.java 62.5% <0%> (ø) 0% <0%> (?)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a5f905...0fca65d. Read the comment docs.

@htynkn
Copy link
Copy Markdown
Member

htynkn commented Mar 10, 2019

just wondering what's situation we need use socket proxy? if it's common usage, do we need apply similar change to other remoting module?

@zonghaishang zonghaishang dismissed their stale review March 12, 2019 10:17

Please check the way to get SOCKS_PROXY_PORT

Copy link
Copy Markdown
Member

@zonghaishang zonghaishang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the way to get SOCKS_PROXY_PORT

@nihongye
Copy link
Copy Markdown
Contributor Author

@zonghaishang replace System.getProperty to ConfigUtils.getProperty. please review again

Copy link
Copy Markdown
Contributor

@chickenlj chickenlj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@chickenlj chickenlj added this to the 2.7.2 milestone Apr 26, 2019
@chickenlj chickenlj merged commit 083605a into apache:master Apr 26, 2019
@nihongye nihongye deleted the featureSocks5Support branch April 28, 2019 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants