Skip to content

Commit

Permalink
修复生成base64编码的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hsernos committed Jan 20, 2021
1 parent f63782f commit aaba0cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/protocols/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func base64Encode(str string) string {
}

func base64EncodeWithEq(str string) string {
return base64.RawStdEncoding.EncodeToString([]byte(str))
return base64.StdEncoding.EncodeToString([]byte(str))
}

func base64Decode(str string) string {
Expand Down
2 changes: 1 addition & 1 deletion core/protocols/vmess.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,5 @@ func (v *VMess) GetLink() string {
"tls": v.Tls,
}
jsonData, _ := json.Marshal(data)
return "vmess://" + base64Encode(string(jsonData))
return "vmess://" + base64EncodeWithEq(string(jsonData))
}

0 comments on commit aaba0cb

Please sign in to comment.