Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
toohandsome opened this issue Aug 18, 2021 · 6 comments
Open

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

toohandsome opened this issue Aug 18, 2021 · 6 comments

Comments

@toohandsome
Copy link

运行的 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": "[email protected]",
                "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
Copy link
Author

toohandsome commented Aug 18, 2021

image
使用xray 同样不行

image

@felix-fly
Copy link
Owner

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

@toohandsome
Copy link
Author

toohandsome commented Aug 18, 2021

我使用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
Copy link
Author

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

@felix-fly
Copy link
Owner

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

@ghost
Copy link

ghost commented Sep 27, 2021

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants