diff --git a/node/hy2.go b/node/hy2.go index f14319f..caa9e0a 100644 --- a/node/hy2.go +++ b/node/hy2.go @@ -78,7 +78,7 @@ func DecodeHY2URL(s string) (HY2, error) { if u.Scheme != "hy2" && u.Scheme != "hysteria2" { return HY2{}, fmt.Errorf("非hy2协议: %s", s) } - password := Base64Decode2(u.User.Username()) + password := u.User.Username() server := u.Hostname() port, _ := strconv.Atoi(u.Port()) insecure, _ := strconv.Atoi(u.Query().Get("insecure")) diff --git a/node/ss.go b/node/ss.go index 6fdb539..9100414 100644 --- a/node/ss.go +++ b/node/ss.go @@ -86,7 +86,7 @@ func DecodeSSURL(s string) (Ss, error) { port, _ := strconv.Atoi(parts[len(parts)-1]) server := strings.Replace(ValRetIPv6Addr(addr), ":"+parts[len(parts)-1], "", -1) cipher := strings.Split(param, ":")[0] - password := Base64Decode2(strings.Replace(param, cipher+":", "", 1)) + password := strings.Replace(param, cipher+":", "", 1) // 开发环境输出结果 if CheckEnvironment() { fmt.Println("Param:", Base64Decode(param)) diff --git a/node/ssr.go b/node/ssr.go index 4f5b6cb..89bbbd7 100644 --- a/node/ssr.go +++ b/node/ssr.go @@ -95,7 +95,7 @@ func DecodeSSRURL(s string) (Ssr, error) { if len(param) < 6 { return Ssr{}, errors.New("长度没有6") } - password := Base64Decode2(param[len(param)-1]) + password := param[len(param)-1] obfs := param[len(param)-2] method := param[len(param)-3] protocol := param[len(param)-4] diff --git a/node/surge.go b/node/surge.go index cbed908..e23b40c 100644 --- a/node/surge.go +++ b/node/surge.go @@ -41,10 +41,11 @@ func EncodeSurge(urls []string, sqlconfig SqlConfig) (string, error) { if vmess.Tls != "none" && vmess.Tls != "" { tls = true } + port, _ := convertToInt(vmess.Port) proxy := map[string]interface{}{ "name": vmess.Ps, "server": vmess.Add, - "port": vmess.Port, + "port": port, "uuid": vmess.Id, "tls": tls, "network": vmess.Net, @@ -53,8 +54,7 @@ func EncodeSurge(urls []string, sqlconfig SqlConfig) (string, error) { "udp": sqlconfig.Udp, "skip-cert-verify": sqlconfig.Cert, } - - vmessproxy := fmt.Sprintf("%s = vmess, %s, %d, username=%s , tls=%s, vmess-aead=true, udp-relay=%t , skip-cert-verify=%t", + vmessproxy := fmt.Sprintf("%s = vmess, %s, %d, username=%s , tls=%t, vmess-aead=true, udp-relay=%t , skip-cert-verify=%t", proxy["name"], proxy["server"], proxy["port"], proxy["uuid"], proxy["tls"], proxy["udp"], proxy["skip-cert-verify"]) if vmess.Net == "ws" { vmessproxy = fmt.Sprintf("%s, ws=true,ws-path=%s", vmessproxy, proxy["ws-path"]) diff --git a/node/tuic.go b/node/tuic.go index 73d1dc8..9e3a6e5 100644 --- a/node/tuic.go +++ b/node/tuic.go @@ -33,7 +33,7 @@ func DecodeTuicURL(s string) (Tuic, error) { uuid := u.User.Username() password, _ := u.User.Password() // log.Println(password) - password = Base64Decode2(password) + // password = Base64Decode2(password) server := u.Hostname() port, _ := strconv.Atoi(u.Port()) Congestioncontrol := u.Query().Get("Congestion_control")