init
This commit is contained in:
@@ -89,8 +89,6 @@ public class InetAddUtil {
|
|||||||
&& !address.isLinkLocalAddress() // filter 169.254.0.0/16
|
&& !address.isLinkLocalAddress() // filter 169.254.0.0/16
|
||||||
&& !address.getHostAddress().contains(":");// filter IPv6
|
&& !address.getHostAddress().contains(":");// filter IPv6
|
||||||
}
|
}
|
||||||
private final static Ip2regionSearcher IP_SEARCHER = SpringContextHolder.getBean(Ip2regionSearcher.class);
|
|
||||||
|
|
||||||
|
|
||||||
private static final UserAgentAnalyzer USER_AGENT_ANALYZER = UserAgentAnalyzer
|
private static final UserAgentAnalyzer USER_AGENT_ANALYZER = UserAgentAnalyzer
|
||||||
.newBuilder()
|
.newBuilder()
|
||||||
@@ -245,7 +243,7 @@ public class InetAddUtil {
|
|||||||
* 根据ip获取详细地址
|
* 根据ip获取详细地址
|
||||||
*/
|
*/
|
||||||
public static String getLocalCityInfo(String ip) {
|
public static String getLocalCityInfo(String ip) {
|
||||||
IpInfo ipInfo = IP_SEARCHER.memorySearch(ip);
|
IpInfo ipInfo = SpringContextHolder.getBean(Ip2regionSearcher.class).memorySearch(ip);
|
||||||
if(ipInfo != null){
|
if(ipInfo != null){
|
||||||
return ipInfo.getAddress();
|
return ipInfo.getAddress();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ public class TunnelServerConfiguration {
|
|||||||
tunnelServer.setPort(arthasProperties.getHttpPort());
|
tunnelServer.setPort(arthasProperties.getHttpPort());
|
||||||
tunnelServer.setSsl(false);
|
tunnelServer.setSsl(false);
|
||||||
tunnelServer.setPath(ArthasConstants.DEFAULT_WEBSOCKET_PATH);
|
tunnelServer.setPath(ArthasConstants.DEFAULT_WEBSOCKET_PATH);
|
||||||
|
|
||||||
tunnelServer.setClientConnectHost(InetAddUtil.getInetAddress());
|
tunnelServer.setClientConnectHost(InetAddUtil.getInetAddress());
|
||||||
if (tunnelClusterStore != null) {
|
if (tunnelClusterStore != null) {
|
||||||
tunnelServer.setTunnelClusterStore(tunnelClusterStore);
|
tunnelServer.setTunnelClusterStore(tunnelClusterStore);
|
||||||
|
|||||||
Reference in New Issue
Block a user