diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index d6774703..b702f850 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -93,6 +93,7 @@ const UTLS_FINGERPRINT = { }; const ALPN_OPTION = { + H3: "h3", H2: "h2", HTTP1: "http/1.1", }; diff --git a/web/controller/sub.go b/web/controller/sub.go index 122c60d1..5695f032 100644 --- a/web/controller/sub.go +++ b/web/controller/sub.go @@ -2,6 +2,7 @@ package controller import ( "encoding/base64" + "strings" "x-ui/web/service" "github.com/gin-gonic/gin" @@ -27,7 +28,7 @@ func (a *SUBController) initRouter(g *gin.RouterGroup) { func (a *SUBController) subs(c *gin.Context) { subId := c.Param("subid") - host := c.Request.URL.Hostname() + host := strings.Split(c.Request.Host, ":")[0] subs, err := a.subService.GetSubs(subId, host) if err != nil { c.String(400, "Error!")