Release 1.2.0 Windows amd64 with Hysteria 2

This commit is contained in:
Navis
2026-07-28 07:14:52 +03:00
parent 5d968dc0e3
commit 7eaf53f7c2
22 changed files with 801 additions and 75 deletions
+23
View File
@@ -0,0 +1,23 @@
package hysteria2
import "testing"
func TestNormalizeShareLink(t *testing.T) {
got, remark, err := NormalizeShareLink("hy2://secret@example.com:443/?sni=example.com&insecure=1#EU")
if err != nil {
t.Fatal(err)
}
if remark != "EU" {
t.Fatalf("remark=%q", remark)
}
if !Detect(got) {
t.Fatalf("not detected: %s", got)
}
host, port, err := HostPort(got)
if err != nil {
t.Fatal(err)
}
if host != "example.com" || port != "443" {
t.Fatalf("host=%q port=%q", host, port)
}
}