v0.5.0 with ALPN h3

This commit is contained in:
Alireza Ahmadi
2023-04-05 11:13:49 +02:00
parent e0a64a8257
commit 02a4f0c7d4
2 changed files with 3 additions and 1 deletions

View File

@@ -93,6 +93,7 @@ const UTLS_FINGERPRINT = {
};
const ALPN_OPTION = {
H3: "h3",
H2: "h2",
HTTP1: "http/1.1",
};

View File

@@ -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!")