mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
bug fix
This commit is contained in:
parent
8c40e7281f
commit
4e7ad9e6de
2 changed files with 11 additions and 11 deletions
|
@ -49,7 +49,7 @@
|
||||||
tls: <a-tag color="green">{{ i18n "enabled" }}</a-tag><br />
|
tls: <a-tag color="green">{{ i18n "enabled" }}</a-tag><br />
|
||||||
tls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
|
tls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
|
||||||
</td>
|
</td>
|
||||||
<td v-else-if="inbound.xtls">
|
<td v-else-if="inbound.XTLS">
|
||||||
xtls: <a-tag color="green">{{ i18n "enabled" }}</a-tag><br />
|
xtls: <a-tag color="green">{{ i18n "enabled" }}</a-tag><br />
|
||||||
xtls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
|
xtls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -300,7 +300,7 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string {
|
||||||
|
|
||||||
if security == "xtls" {
|
if security == "xtls" {
|
||||||
params["security"] = "xtls"
|
params["security"] = "xtls"
|
||||||
xtlsSetting, _ := stream["xtlsSettings"].(map[string]interface{})
|
xtlsSetting, _ := stream["XTLSSettings"].(map[string]interface{})
|
||||||
alpns, _ := xtlsSetting["alpn"].([]interface{})
|
alpns, _ := xtlsSetting["alpn"].([]interface{})
|
||||||
var alpn []string
|
var alpn []string
|
||||||
for _, a := range alpns {
|
for _, a := range alpns {
|
||||||
|
@ -310,15 +310,15 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string {
|
||||||
params["alpn"] = strings.Join(alpn, ",")
|
params["alpn"] = strings.Join(alpn, ",")
|
||||||
}
|
}
|
||||||
|
|
||||||
xtlsSettings, _ := searchKey(xtlsSetting, "settings")
|
XTLSSettings, _ := searchKey(xtlsSetting, "settings")
|
||||||
if xtlsSetting != nil {
|
if xtlsSetting != nil {
|
||||||
if sniValue, ok := searchKey(xtlsSettings, "serverName"); ok {
|
if sniValue, ok := searchKey(XTLSSettings, "serverName"); ok {
|
||||||
params["sni"], _ = sniValue.(string)
|
params["sni"], _ = sniValue.(string)
|
||||||
}
|
}
|
||||||
if fpValue, ok := searchKey(xtlsSettings, "fingerprint"); ok {
|
if fpValue, ok := searchKey(XTLSSettings, "fingerprint"); ok {
|
||||||
params["fp"], _ = fpValue.(string)
|
params["fp"], _ = fpValue.(string)
|
||||||
}
|
}
|
||||||
if insecure, ok := searchKey(xtlsSettings, "allowInsecure"); ok {
|
if insecure, ok := searchKey(XTLSSettings, "allowInsecure"); ok {
|
||||||
if insecure.(bool) {
|
if insecure.(bool) {
|
||||||
params["allowInsecure"] = "1"
|
params["allowInsecure"] = "1"
|
||||||
}
|
}
|
||||||
|
@ -444,7 +444,7 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string
|
||||||
|
|
||||||
if security == "xtls" {
|
if security == "xtls" {
|
||||||
params["security"] = "xtls"
|
params["security"] = "xtls"
|
||||||
xtlsSetting, _ := stream["xtlsSettings"].(map[string]interface{})
|
xtlsSetting, _ := stream["XTLSSettings"].(map[string]interface{})
|
||||||
alpns, _ := xtlsSetting["alpn"].([]interface{})
|
alpns, _ := xtlsSetting["alpn"].([]interface{})
|
||||||
var alpn []string
|
var alpn []string
|
||||||
for _, a := range alpns {
|
for _, a := range alpns {
|
||||||
|
@ -454,15 +454,15 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string
|
||||||
params["alpn"] = strings.Join(alpn, ",")
|
params["alpn"] = strings.Join(alpn, ",")
|
||||||
}
|
}
|
||||||
|
|
||||||
xtlsSettings, _ := searchKey(xtlsSetting, "settings")
|
XTLSSettings, _ := searchKey(xtlsSetting, "settings")
|
||||||
if xtlsSetting != nil {
|
if xtlsSetting != nil {
|
||||||
if sniValue, ok := searchKey(xtlsSettings, "serverName"); ok {
|
if sniValue, ok := searchKey(XTLSSettings, "serverName"); ok {
|
||||||
params["sni"], _ = sniValue.(string)
|
params["sni"], _ = sniValue.(string)
|
||||||
}
|
}
|
||||||
if fpValue, ok := searchKey(xtlsSettings, "fingerprint"); ok {
|
if fpValue, ok := searchKey(XTLSSettings, "fingerprint"); ok {
|
||||||
params["fp"], _ = fpValue.(string)
|
params["fp"], _ = fpValue.(string)
|
||||||
}
|
}
|
||||||
if insecure, ok := searchKey(xtlsSettings, "allowInsecure"); ok {
|
if insecure, ok := searchKey(XTLSSettings, "allowInsecure"); ok {
|
||||||
if insecure.(bool) {
|
if insecure.(bool) {
|
||||||
params["allowInsecure"] = "1"
|
params["allowInsecure"] = "1"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue