This commit is contained in:
huyunfan 2024-12-17 12:20:13 +08:00
parent 817e8edb28
commit b2b9ef41cd

View File

@ -8,6 +8,7 @@ import (
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"os" "os"
"proxyrules/src/service"
"strings" "strings"
) )
@ -226,6 +227,7 @@ func loadCredentials(filePath string) (map[string]string, error) {
} }
func main() { func main() {
service.GenerateConfig()
r := gin.Default() r := gin.Default()
r.Static("/static", "./static") // 将 static 目录映射到 /static 路径 r.Static("/static", "./static") // 将 static 目录映射到 /static 路径
r.SetHTMLTemplate(template.Must(template.New("index").Parse(htmlTemplate))) r.SetHTMLTemplate(template.Must(template.New("index").Parse(htmlTemplate)))