diff --git a/.gitignore b/.gitignore index f36c9c0..9c505bf 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ subs logs data .env -.vscode/settings.json \ No newline at end of file +.vscode/settings.json +test \ No newline at end of file diff --git a/api/route.go b/api/route.go index db165c8..256ea9d 100644 --- a/api/route.go +++ b/api/route.go @@ -18,7 +18,6 @@ var staticFiles embed.FS func SetRoute(r *gin.Engine) { r.Use(middleware.ZapLogger()) - // 使用内嵌的模板文件 tpl, err := template.ParseFS(staticFiles, "static/*") if err != nil { log.Fatalf("Error parsing templates: %v", err) @@ -33,9 +32,6 @@ func SetRoute(r *gin.Engine) { r.GET( "/", func(c *gin.Context) { version := constant.Version - if len(constant.Version) > 7 { - version = constant.Version[:7] - } c.HTML( 200, "index.html", gin.H{ "Version": version, diff --git a/test/parser_test.go b/test/parser_test.go deleted file mode 100644 index a14f891..0000000 --- a/test/parser_test.go +++ /dev/null @@ -1,22 +0,0 @@ -package test - -import ( - "strings" - "testing" -) - -func TestParser(t *testing.T) { - // res, err := parser.ParseTrojan("trojan://Abse64hhjewrs@test.com:8443?type=ws&path=%2Fx&host=test.com&security=tls&fp=&alpn=http%2F1.1&sni=test.com#test") - // if err != nil { - // t.Log(err.Error()) - // t.Fail() - // } - // bytes, err := yaml.Marshal(res) - // if err != nil { - // t.Log(err.Error()) - // t.Fail() - // } - // t.Log(string(bytes)) - t.Log(strings.SplitN("123456", "/?", 2)) - -}