Skip to content

Commit

Permalink
1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gooaclok819 committed Apr 14, 2024
1 parent 6a68416 commit 013b94e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion node/hy2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
2 changes: 1 addition & 1 deletion node/ss.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion node/ssr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions node/surge.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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"])
Expand Down
2 changes: 1 addition & 1 deletion node/tuic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 013b94e

Please sign in to comment.