mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-08-20 08:11:46 +00:00
feat: userpass auth
This commit is contained in:
@@ -231,7 +231,13 @@ func (c *clientConfig) URI() string {
|
||||
}
|
||||
var user *url.Userinfo
|
||||
if c.Auth != "" {
|
||||
user = url.User(c.Auth)
|
||||
// We need to handle the special case of user:pass pairs
|
||||
rs := strings.SplitN(c.Auth, ":", 2)
|
||||
if len(rs) == 2 {
|
||||
user = url.UserPassword(rs[0], rs[1])
|
||||
} else {
|
||||
user = url.User(c.Auth)
|
||||
}
|
||||
}
|
||||
u := url.URL{
|
||||
Scheme: "hysteria2",
|
||||
|
Reference in New Issue
Block a user