Skip to content

fix(utils): prioritize common ALPN protocols and use a single ALPN for Tuic nodes in Surge configuration.#326

Merged
geekdada merged 1 commit intosurgioproject:masterfrom
ShadowsSide:master
Mar 8, 2026
Merged

fix(utils): prioritize common ALPN protocols and use a single ALPN for Tuic nodes in Surge configuration.#326
geekdada merged 1 commit intosurgioproject:masterfrom
ShadowsSide:master

Conversation

@ShadowsSide
Copy link
Contributor

@ShadowsSide ShadowsSide commented Mar 8, 2026

Bug 修复: 生成 Surge 配置时,TUIC 只配置单个 alpn 值( 优先选取 [h3] )


关键
在 Surge 中, TUIC 仅支持配置单个alpn

复现
alpn 有多个值传入时,例如:

alpn:
  - h3
  - h2
  - http/1.1

则输出结果为:alpn: h3,h2.http/1.1,导致 Surge 无法正常启动

改进
遇到上述情况时,预期输出为: alpn: h3

  • 采用优先级为 h3 > h2 > http/1.1
  • 无匹配时 fallback 取第一个值

@ShadowsSide ShadowsSide requested a review from geekdada as a code owner March 8, 2026 00:34
@netlify
Copy link

netlify bot commented Mar 8, 2026

Deploy Preview for surgio-documentation ready!

Name Link
🔨 Latest commit 25b20b6
🔍 Latest deploy log https://app.netlify.com/projects/surgio-documentation/deploys/69acc42f33d64300083cc2b2
😎 Deploy Preview https://deploy-preview-326--surgio-documentation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@geekdada geekdada merged commit 31176d6 into surgioproject:master Mar 8, 2026
10 checks passed
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