feat(sub): auto-detect subscription formats

This commit is contained in:
Tomilla
2026-07-06 10:02:18 +08:00
parent 8bb9a8c6d5
commit 99072457d1
8 changed files with 668 additions and 66 deletions
+2 -2
View File
@@ -281,7 +281,7 @@ func TestSub_HostSockoptJSON(t *testing.T) {
SockoptParams: `{"tcpFastOpen":true}`,
})
js := NewSubJsonService("", "", "", NewSubService(""))
out, _, err := js.GetJson("s1", "req.example.com")
out, _, err := js.GetJson("s1", "req.example.com", false)
if err != nil {
t.Fatalf("GetJson: %v", err)
}
@@ -299,7 +299,7 @@ func TestSub_HostMuxJSON(t *testing.T) {
MuxParams: `{"enabled":true,"concurrency":8}`,
})
js := NewSubJsonService("", "", "", NewSubService(""))
out, _, err := js.GetJson("s1", "req.example.com")
out, _, err := js.GetJson("s1", "req.example.com", false)
if err != nil {
t.Fatalf("GetJson: %v", err)
}