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

[Feature] Hysteria2 HTTP/HTTPS伪装 #2465

Closed
Buer-Nahida opened this issue Jan 10, 2025 · 0 comments
Closed

[Feature] Hysteria2 HTTP/HTTPS伪装 #2465

Buer-Nahida opened this issue Jan 10, 2025 · 0 comments
Labels
from end user An end user is asking a developer to fix their problem for free wontfix This will not be worked on

Comments

@Buer-Nahida
Copy link

Buer-Nahida commented Jan 10, 2025

这是官方hysteria2服务端的一个功能,用于将代理伪装成一个正常的HTTP网页,而非一个只支持HTTP/3协议的网站

官方文档的描述:

HTTP/HTTPS 伪装

通常支持 HTTP/3 的网站只是将其作为一个升级选项,在 80/443 端口上也提供 TCP 的 HTTP/HTTPS。如果希望模仿这种模式,可以使用 listenHTTP 和 listenHTTPS 选项来启用 HTTP/HTTPS 伪装。这种情况下,不需要用上述特殊参数启动 Chrome,和普通的网站一样访问即可验证伪装。

masquerade:
  # ... (上述其他字段)
  listenHTTP: :80 # HTTP (TCP) 监听地址。
  listenHTTPS: :443 # HTTPS (TCP) 监听地址。
  forceHTTPS: true # 是否强制使用 HTTPS。如果启用,HTTP 请求将被重定向到 HTTPS。

注意: 目前没有迹象表明有任何政府/商业防火墙在利用 "缺少 TCP HTTP/HTTPS" 这点来检测 Hysteria 服务器。本功能仅为执着于 "做戏做全套" 的用户提供。既然要 "做戏做全套",就没有理由将 HTTP/HTTPS 监听在 80/443 之外的自定义端口上(虽然 Hysteria 允许自定义监听地址)。

为什么要实现

很多人(包括我)都希望使用正常的HTTP网页伪装代理,让代理看起来只是一个普通的网站,也方便自己在443端口开一些其他的服务,对于vless-ws-tls这类可以使用nginx或caddy来伪装,但hysteria2并不可以这样,只能让hysteria2服务端自己处理,所以希望sing-box可以支持HTTP/HTTPS伪装功能

你会贡献代码吗

我正在研究sing-box的源码,希望可以为此功能贡献一份代码

@nekohasekai nekohasekai added wontfix This will not be worked on from end user An end user is asking a developer to fix their problem for free labels Jan 11, 2025
@nekohasekai nekohasekai closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from end user An end user is asking a developer to fix their problem for free wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants