0 0 0

判断代理(翻墙)

MixoFQ
6月前 327
javags(SDK_INT, null, "android.os.Build$VERSION", "SDK_INT")

f(SDK_INT >= 14) {

 java(address, null, "java.lang.System.getProperty", "String", "http.proxyHost")

 java(port, null,  "java.lang.System.getProperty", "String", "http.proxyPort")

 f(port == null || port == "") {

   s port = -1

   } else {

   java(port, null,  "java.lang.Integer.parseInt", "String", port)

   }

 } else {

 java(address, null, "android.net.Proxy.getHost", "Context", activity)

 java(port, null, "android.net.Proxy.getPort", "Context", activity)

 }

f(address == null || address == "" || port == -1) {

 tw("没有使用代理")

 } else {

 tw("使用了代理")

 }
v3 v5 v6
最新回复 (0)

    暂无评论

请先登录后发表评论!

返回
请先登录后发表评论!