Release 3.9.0+1: Remnawave API configs, Remnawave-style UI with flags, Windows build.

EOF

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Navis
2026-08-01 16:17:10 +03:00
co-authored by Cursor
parent 92cf707597
commit 015ded9bd5
24 changed files with 985 additions and 159 deletions
+30
View File
@@ -0,0 +1,30 @@
package remnawave
import "testing"
func TestPublicSubURL(t *testing.T) {
got := PublicSubURL("https://panel.example.com/api/", "abc12")
want := "https://panel.example.com/api/sub/abc12"
if got != want {
t.Fatalf("got %q want %q", got, want)
}
}
func TestParseInput(t *testing.T) {
base, short, ok := ParseInput("https://vpn.example.com/api/sub/xyz789/clash")
if !ok || base != "https://vpn.example.com" || short != "xyz789" {
t.Fatalf("got base=%q short=%q ok=%v", base, short, ok)
}
_, _, ok = ParseInput("https://example.com/not-a-sub")
if ok {
t.Fatal("expected not ok")
}
}
func TestExtractSubscriptionURL(t *testing.T) {
body := `{"response":{"subscriptionUrl":"https://vpn.example.com/api/sub/abc"}}`
got := extractSubscriptionURL(body)
if got != "https://vpn.example.com/api/sub/abc" {
t.Fatalf("got %q", got)
}
}