Skip to content

转换目标为Surge时,hysteria协议错误 #821

Open
@antergone

Description

@antergone

确认版本最新

  • 我已经确认在最新Action编译的版本中复现

检索issue

  • 我已经确认之前没有issue涉及此BUG

subconverter版本

latest

转换过程

目标为Surge时,hysteria协议错误

转换设置

默认配置

复现步骤

https://sub.xeton.dev/sub?target=surge&ver=4&new_name=true&url=hysteria2%3A%2F%2Ftoken%40mocknode.com%3A12345%2F%3Finsecure%3D1%26sni%3Dwww.bing.com%23MockNode

Mock一个节点即可

期望结果

Proxy部分协议应该为 hysteria2

[Proxy]
DIRECT = direct
MockNode = hysteria2, mocknode.com, 12345, password=token,skip-cert-verify=true,sni=www.bing.com
🎯 全球直连 = direct

实际结果

Proxy部分协议为 hysteria

[Proxy]
DIRECT = direct
MockNode = hysteria, mocknode.com, 12345, password=token,skip-cert-verify=true,sni=www.bing.com
🎯 全球直连 = direct

排查问题

代码走读了一下,问题点可能在这里:

case ProxyType::Hysteria2:
if(surge_ver < 4)
continue;
proxy = "hysteria, " + hostname + ", " + port + ", password=" + password;
if(x.DownSpeed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions