mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-15 13:41:23 +08:00
Merge remote-tracking branch 'origin/Alpha' into Alpha
This commit is contained in:
commit
93ea1248e3
@ -10,8 +10,10 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var encRaw = base64.RawStdEncoding
|
||||
var enc = base64.StdEncoding
|
||||
var (
|
||||
encRaw = base64.RawStdEncoding
|
||||
enc = base64.StdEncoding
|
||||
)
|
||||
|
||||
func DecodeBase64(buf []byte) []byte {
|
||||
dBuf := make([]byte, encRaw.DecodedLen(len(buf)))
|
||||
@ -149,7 +151,7 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
|
||||
vless["skip-cert-verify"] = false
|
||||
vless["tls"] = false
|
||||
tls := strings.ToLower(query.Get("security"))
|
||||
if strings.Contains(tls, "tls") {
|
||||
if strings.HasSuffix(tls, "tls") {
|
||||
vless["tls"] = true
|
||||
}
|
||||
sni := query.Get("sni")
|
||||
@ -244,7 +246,11 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
|
||||
vmess["server"] = values["add"]
|
||||
vmess["port"] = values["port"]
|
||||
vmess["uuid"] = values["id"]
|
||||
vmess["alterId"] = values["aid"]
|
||||
if alterId, ok := values["aid"]; ok {
|
||||
vmess["alterId"] = alterId
|
||||
} else {
|
||||
vmess["alterId"] = 0
|
||||
}
|
||||
vmess["cipher"] = "auto"
|
||||
vmess["udp"] = true
|
||||
vmess["tls"] = false
|
||||
|
Loading…
Reference in New Issue
Block a user