1. 程式人生 > 實用技巧 >v-2ray橋接配置檔案

v-2ray橋接配置檔案

{
  "log" : {                                 
    "access": "/var/log/v-2ray/access.log",
    "error": "/var/log/v-2ray/error.log",
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "tag": "tg-in",
      "port": 1234,
      "protocol": "mtproto",    // 入站協議為 VMess
      "settings": {
        "users"
: [{"secret": "**********************"}] } }, { "tag": "socks-in", "port": 4321, "protocol": "socks", "settings": { "auth": "password", "accounts": [ { "user": "****", "pass": "****" } ],
"udp": true, "ip": "127.0.0.1", "userLevel": 0 } } ], // ========== BEGIN STEP 1 ========== // 國內中轉伺服器當作國外伺服器的“客戶端” // 國際流量發往國外伺服器上 "outbounds": [ { "tag": "vmess-out", "protocol": "vmess", "settings": { "vnext": [ { "address
": "******", "port": 443, "users": [ { "id": "******", "alterId": 233, "email": "[email protected]", "security": "auto" } ] } ], "servers": null, "response": null }, "streamSettings": { "network": "ws", "security": "tls", "tlsSettings": { "allowInsecure": false, "serverName": "******" }, "tcpSettings": null, "kcpSettings": null, "wsSettings": { "connectionReuse": true, "path": "/", "headers": { "Host": "*****" } }, "httpSettings": null, "quicSettings": null }, "mux": { "enabled": true, "concurrency": 8 } }, { "tag": "tg-out", "protocol": "mtproto", "settings": {}, "proxySettings": { "tag": "vmess-out" // 把 tg-out 的流量由 vmess-out 轉發 } }, { "tag": "tag-freedom", "protocol": "freedom", "settings": {}, "proxySettings": { "tag": "vmess-out" } } ], // ========== END STEP 1 ========== "routing": { // 路由設定 "domainStrategy": "IPOnDemand", "strategy": "rules", "rules": [ { "type": "field", "inboundTag": ["tg-in"], "outboundTag": "tg-out" }, { "type": "field", "inboundTag": ["socks-in"], "outboundTag": "tag-freedom" } ] } }