felix-fly / v2ray-openwrt

路由器Openwrt手工/脚本/ipk包安装V2ray简单流程
656 stars 160 forks source link

请问 k3 官改系统下如何运行? #31

Open toohandsome opened 3 years ago

toohandsome commented 3 years ago

运行的 v4.41.0 的 v2ray-linux-armv5.tar.gz 里面的文件 看日志是执行成功了的,如图所示: image 配置文件如下:

{
  "log": {
    "access": "",
    "error": "",
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "tag": "socks",
      "port": 10808,
      "listen": "127.0.0.1",
      "protocol": "socks",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "auth": "noauth",
        "udp": true,
        "allowTransparent": false
      }
    },
    {
      "tag": "http",
      "port": 10809,
      "listen": "127.0.0.1",
      "protocol": "http",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "udp": false,
        "allowTransparent": false
      }
    }
  ],
  "outbounds": [
    {
      "tag": "proxy",
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "110.81.209.555",
            "port": 443,
            "users": [
              {
                "id": "1e9a0e99-4937-4e81-8c18-xxxxxx",
                "alterId": 0,
                "email": "t@t.tt",
                "security": "auto",
                "encryption": "none",
                "flow": "xtls-rprx-direct"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "xtls",
        "xtlsSettings": {
          "allowInsecure": false,
          "serverName": "www.123.xyz"
        }
      },
      "mux": {
        "enabled": false,
        "concurrency": -1
      }
    },
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag": "block",
      "protocol": "blackhole",
      "settings": {
        "response": {
          "type": "http"
        }
      }
    }
  ],
  "routing": {
    "strategy": "rules",
    "settings": {
      "rules": [{
        "type": "field",
        "domain" : ["ext:site.dat:gw"],
        "outboundTag": "proxy"
      }, {
        "type": "field",
        "domain" : ["ext:site.dat:ad"],
        "outboundTag": "blocked"
      }]
    }
  }
}

但是接入该路由器下的设备无法访问gsite

toohandsome commented 3 years ago

image 使用xray 同样不行

image

felix-fly commented 3 years ago

v2ray不支持xtls 透明代理需要配置iptables 配置文件有问题

toohandsome commented 3 years ago

我使用xray启动的,请问该如何配置呢? 我暂时没配置透明代理,使用树莓派手动设置代理访问google,以下是日志:

image

image

配置文件如下(从xray项目拷贝修改的)

{
  "log": {
    "access": "access.log",
    "error": "error.log",
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "tag": "socks",
      "port": 10808,
      "listen": "0.0.0.0",
      "protocol": "socks",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "auth": "noauth",
        "udp": true,
        "allowTransparent": false
      }
    },{
      "tag": "http",
      "port": 10809,
      "listen": "0.0.0.0",
      "protocol": "http",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "udp": false,
        "allowTransparent": false
      }
    },{
    "port": 12345,
    "protocol": "dokodemo-door",
    "sniffing": {
      "enabled": true,
      "destOverride": ["http", "tls"]
    },
    "settings": {
      "network": "tcp,udp",
      "followRedirect": true
    }
  }],
  "outbounds": [{
    "protocol": "freedom",
    "settings": {}
  }, {
    "protocol": "blackhole",
    "settings": {},
    "tag": "blocked"
  }, {
    "protocol": "vless",
    "tag": "proxy",
    "settings": {
      "vnext": [{
        "address": "1111",
        "port": 443,
        "users": [{
          "id": "1e9a0e99-4937-1111-8c111118-11",
          "flow": "xtls-rprx-direct",
          "encryption": "none"
        }]
      }]
    },
    "streamSettings": {
      "network": "tcp",
      "security": "xtls",
      "xtlsSettings": {
        "serverName": "1111.xyz"
      }
    }
  }],
  "routing": {
    "strategy": "rules",
    "settings": {
      "rules": [{
        "type": "field",
        "domain" : ["ext:site.dat:gw"],
        "outboundTag": "proxy"
      }, {
        "type": "field",
        "domain" : ["ext:site.dat:ad"],
        "outboundTag": "blocked"
      }]
    }
  }
}
toohandsome commented 3 years ago

解决了 参考 https://github.com/v2fly/v2ray-core/issues/304 证书的问题

felix-fly commented 3 years ago

恭喜 官改应该没有内置证书

ghost commented 3 years ago

解决了 参考 v2fly/v2ray-core#304 证书的问题

看得不太懂,能帮忙详细说一下么?