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

feat(singbox): Support network=tcp in VMESS/VLESS #274

Merged
merged 2 commits into from
Jun 30, 2024
Merged

feat(singbox): Support network=tcp in VMESS/VLESS #274

merged 2 commits into from
Jun 30, 2024

Conversation

cnsunyour
Copy link
Contributor

singbox 的 vmess/vless 节点不用必须指定 transport ,也就是 surgio 里的 network 可以是默认值 tcp 。
我的 server 端用 singbox 配置的 vless+vision+reality 节点,本地修改后测试连接成功。
不过没有 vmess 节点,因此只测试了 vless ,并未测试 vmess ,只是根据文档中描述 transport 为非必须项,

Copy link

netlify bot commented Jun 27, 2024

Deploy Preview for surgio-documentation failed.

Name Link
🔨 Latest commit 6b35360
🔍 Latest deploy log https://app.netlify.com/sites/surgio-documentation/deploys/668005453f931a00081f7706

@geekdada
Copy link
Member

感谢共享代码。之前Singbox的支持也是社区贡献的,可能遗漏了这个点。麻烦可以顺便看看测试用例吗?

@cnsunyour
Copy link
Contributor Author

好的,我修改后生成的 singbox 配置的 vless 节点是这样:

    {
      "type": "vless",
      "tag": "自建A2",
      "server": "www.example.com",
      "server_port": 12345,
      "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "flow": "xtls-rprx-vision",
      "tls": {
        "enabled": true,
        "utls": {
          "enabled": true,
          "fingerprint": "chrome"
        },
        "reality": {
          "enabled": true,
          "public_key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "short_id": "xxxxxxxxxxxxx"
        },
        "server_name": "www.example.com"
      }
    }

对应的 surgio provider 配置是这样:

    {
      nodeName: "自建A2",
      type: "vless",
      hostname: "www.example.com",
      method: "none",
      network: "tcp",
      port: 12345,
      uuid: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      flow: "xtls-rprx-vision",
      sni: "www.example.com",
      udpRelay: true,
      clientFingerprint: "chrome",
      realityOpts: {
        shortId: "xxxxxxxxxxxxx",
        publicKey: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      }
    }

@geekdada
Copy link
Member

可以修改一下用例吗,通过 CI 就能合并了

@cnsunyour
Copy link
Contributor Author

噢噢,我试着改一下。抱歉之前没理解意思。

Copy link

codecov bot commented Jun 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.80%. Comparing base (31d4aab) to head (6b35360).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #274   +/-   ##
=======================================
  Coverage   75.79%   75.80%           
=======================================
  Files          66       66           
  Lines        2768     2769    +1     
  Branches      720      720           
=======================================
+ Hits         2098     2099    +1     
  Misses        412      412           
  Partials      258      258           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@geekdada geekdada merged commit ae64ef0 into surgioproject:master Jun 30, 2024
7 of 11 checks passed
@geekdada
Copy link
Member

感谢!

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

Successfully merging this pull request may close these issues.

2 participants