mirror of
https://gitcode.com/JianFeeeee/webui4frpc.git
synced 2026-09-19 16:38:31 +00:00
- 零 frp 源码依赖,单二进制 (Go + Vue3 + VueFlow + Element Plus) - 画布多对多连线,渲染 tcp/udp/http/https frpc 配置 - worker 进程管理:自愈、日志轮转、崩溃退避重启 - frpc 一键安装 (GitHub Releases) + 手动指定路径 - 三页 UI:状态(默认)/连接配置/设置 - 状态页实时节点/转发状态,节点可增删改启停 - 画布冲突检查:端口/域名冲突标红 + 弹窗拦截保存 - backend 单测覆盖 store/render/process/httpapi/install - plan.md + FRPC_FEATURES_AUDIT.md 文档
34 lines
594 B
Go
34 lines
594 B
Go
package install
|
|
|
|
import (
|
|
"net/http"
|
|
"net/http/httptest"
|
|
"testing"
|
|
)
|
|
|
|
func TestLatestVersion(t *testing.T) {
|
|
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
|
|
_, _ = w.Write([]byte(`{"tag_name":"v0.71.0"}`))
|
|
}))
|
|
defer ts.Close()
|
|
|
|
old := latestAPI
|
|
latestAPI = ts.URL
|
|
defer func() { latestAPI = old }()
|
|
|
|
v, err := latestVersion()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if v != "v0.71.0" {
|
|
t.Fatalf("version = %q", v)
|
|
}
|
|
}
|
|
|
|
func TestPlatformName(t *testing.T) {
|
|
p := platformName()
|
|
if p == "" || len(p) < 5 {
|
|
t.Fatalf("platform = %q", p)
|
|
}
|
|
}
|