Skip to content

[Bug]: Hysteria2, Trojan 带有斜杠的密码导出后不能导入 #5807

@ze0lite

Description

@ze0lite

预期情况

选择服务器导出后应该可以从剪切板直接导入

实际情况

导入没有反应

复现方法

  1. 创建一个 Hysteria 2 节点,别的不重要,就是密码里面一定要有正斜杠 /:例如 ABCDEF10abcdef/12345w==
  2. 选择,右键,批量导出分享 URL
  3. 到左上角服务器,选择批量导入

日志信息

没有有意义的

2024-10-10 12:02:06.3412-DEBUG Base64Decode,The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
2024-10-10 12:02:06.3579-DEBUG    at System.Convert.FromBase64_ComputeResultLength(Char* inputPtr, Int32 inputLength)
   at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
   at System.Convert.FromBase64String(String s)
   at v2rayN.Utils.Base64Decode(String plainText)

额外信息

导出的URL形如

hysteria2://ABCDEF10abcdef/12345w==@1.2.3.4:8443/?sni=example.com&insecure=0#hy

正确可以导入的形式是

hysteria2://ABCDEF10abcdef%2f12345w==@1.2.3.4:8443/?sni=example.com&insecure=0#hy

我确认已更新至最新版本

我确认已查询历史issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions