feat: v2 supports international version (#11939)

This commit is contained in:
ssongliu
2026-02-25 10:56:06 +08:00
committed by GitHub
parent a8a92da483
commit c3f45d4787
47 changed files with 223 additions and 92 deletions

View File

@@ -245,6 +245,13 @@ func LoadParams(param string) string {
}
return info
}
func LoadParamsWithoutPanic(param string) string {
stdout, err := cmd.RunDefaultWithStdoutBashCf("grep '^%s=' /usr/local/bin/1pctl | cut -d'=' -f2", param)
if err != nil {
return ""
}
return strings.ReplaceAll(stdout, "\n", "")
}
func GetRealClientIP(c *gin.Context) string {
addr := c.Request.RemoteAddr