You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/22 13:16:22 UTC

[GitHub] [dubbo] changfubai commented on a change in pull request #8876: [3.0] socks proxy filtering local address

changfubai commented on a change in pull request #8876:
URL: https://github.com/apache/dubbo/pull/8876#discussion_r713930638



##########
File path: dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyClient.java
##########
@@ -127,6 +128,16 @@ protected void initChannel(SocketChannel ch) throws Exception {
         });
     }
 
+    private boolean isFilteredAddress(String host) {
+        // filter local address
+        if (StringUtils.isEquals(NetUtils.getLocalHost(), host) ||
+            "localhost".equals(host) ||

Review comment:
       这个有常量可以用的吧~  
   另外,用StringUtils.equalsAny()就可以了,不用equals两次




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org