mirror of
https://github.com/fatedier/frp.git
synced 2026-01-11 22:23:12 +00:00
optimize the code of the command line (#3614)
This commit is contained in:
@@ -95,3 +95,8 @@ func ParseBasicAuth(auth string) (username, password string, ok bool) {
|
||||
}
|
||||
return cs[:s], cs[s+1:], true
|
||||
}
|
||||
|
||||
func BasicAuth(username, passwd string) string {
|
||||
auth := username + ":" + passwd
|
||||
return "Basic " + base64.StdEncoding.EncodeToString([]byte(auth))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user