Przeglądaj źródła

feat: so编译+联调

lilu 4 miesięcy temu
rodzic
commit
a5534f76e2

+ 1 - 1
.gitignore

@@ -29,7 +29,7 @@ local.properties
 signing.properties
 
 # Ignore shared object files
-*.so
+#*.so
 
 # Ignore Google services JSON
 app/google-services.json

BIN
app/libs/arm64-v8a/libhev-socks5-tunnel.so


BIN
app/libs/arm64-v8a/libhysteria2.so


BIN
app/libs/arm64-v8a/libtun2socks.so


BIN
app/libs/armeabi-v7a/libhev-socks5-tunnel.so


BIN
app/libs/armeabi-v7a/libhysteria2.so


BIN
app/libs/armeabi-v7a/libtun2socks.so


BIN
app/libs/x86/libhev-socks5-tunnel.so


BIN
app/libs/x86/libhysteria2.so


BIN
app/libs/x86/libtun2socks.so


BIN
app/libs/x86_64/libhev-socks5-tunnel.so


BIN
app/libs/x86_64/libhysteria2.so


BIN
app/libs/x86_64/libtun2socks.so


+ 98 - 0
app/src/main/assets/v2ray_config2.json

@@ -0,0 +1,98 @@
+{
+  "stats":{},
+  "log": {
+    "loglevel": "warning"
+  },
+  "policy":{
+      "levels": {
+        "8": {
+          "handshake": 4,
+          "connIdle": 300,
+          "uplinkOnly": 1,
+          "downlinkOnly": 1
+        }
+      },
+      "system": {
+        "statsOutboundUplink": true,
+        "statsOutboundDownlink": true
+      }
+  },
+  "inbounds": [{
+    "tag": "socks",
+    "port": 10808,
+    "protocol": "socks",
+    "settings": {
+      "auth": "noauth",
+      "udp": true,
+      "userLevel": 8
+    },
+    "sniffing": {
+      "enabled": true,
+      "destOverride": [
+        "http",
+        "tls"
+      ]
+    }
+  },
+  {
+    "tag": "http",
+    "port": 10809,
+    "protocol": "http",
+    "settings": {
+      "userLevel": 8
+    }
+  }
+],
+  "outbounds": [{
+    "tag": "proxy",
+    "protocol": "vless",
+    "settings": {
+      "vnext": [
+        {
+          "address": "38.75.137.27",
+          "port": 8089,
+          "users": [
+            {
+              "id": "c91112b9-0790-49a7-869f-805ff2bf5caa",
+              "encryption": "none",
+              "flow": "",
+              "level": 8
+            }
+          ]
+        }
+      ]
+    },
+    "streamSettings": {
+      "network": "tcp",
+      "security": "none"
+    },
+    "mux": {
+      "enabled": false
+    }
+  },
+  {
+    "protocol": "freedom",
+    "settings": {
+      "domainStrategy": "UseIP"
+    },
+    "tag": "direct"
+  },
+  {
+    "protocol": "blackhole",
+    "tag": "block",
+    "settings": {
+      "response": {
+        "type": "http"
+      }
+    }
+  }
+  ],
+  "routing": {
+      "domainStrategy": "AsIs",
+      "rules": []
+  },
+  "dns": {
+      "hosts": {},
+      "servers": []
+  }
+}

+ 0 - 1
app/src/main/java/com/v2ray/ang/handler/V2RayServiceManager.kt

@@ -152,7 +152,6 @@ object V2RayServiceManager {
         }
 
         currentConfig = config
-
         try {
             coreController.startLoop(result.content)
         } catch (e: Exception) {

+ 1 - 1
app/src/main/java/com/v2ray/ang/handler/V2rayConfigManager.kt

@@ -296,7 +296,7 @@ object V2rayConfigManager {
      * @return V2rayConfig object parsed from the JSON configuration, or null if the configuration is empty
      */
     private fun initV2rayConfig(context: Context): V2rayConfig? {
-        val assets = initConfigCache ?: Utils.readTextFromAssets(context, "v2ray_config.json")
+        val assets = initConfigCache ?: Utils.readTextFromAssets(context, "v2ray_config2.json")
         if (TextUtils.isEmpty(assets)) {
             return null
         }