private static InetSocketAddress overrideProxy ( String proxyHostPort ) { if ( proxyHostPort == null ) { return null ; } String [ ] parts = proxyHostPort . split ( ":" , 2 ) ; int port = 80 ; if ( parts . length > 1 ) { port = Integer . parseInt ( parts [ 1 ] ) ; } log . warning ( "Detected GRPC_PROXY_EXP and will honor it, but this feature will " + "be removed in a future release. Use the JVM flags " + "\"-Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT\" to set the https proxy for " + "this JVM." ) ; return new InetSocketAddress ( parts [ 0 ] , port ) ; }
GRPC_PROXY_EXP is deprecated but let s maintain compatibility for now .