1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-09 11:46:42 -05:00
This commit is contained in:
Darien Raymond 2017-09-07 22:58:10 +02:00
parent 9594f76f93
commit b589ca89c1

View File

@ -2,22 +2,22 @@ package socks
import "v2ray.com/core/common/protocol"
func (v *Account) Equals(another protocol.Account) bool {
func (a *Account) Equals(another protocol.Account) bool {
if account, ok := another.(*Account); ok {
return v.Username == account.Username
return a.Username == account.Username
}
return false
}
func (v *Account) AsAccount() (protocol.Account, error) {
return v, nil
func (a *Account) AsAccount() (protocol.Account, error) {
return a, nil
}
func (v *ServerConfig) HasAccount(username, password string) bool {
if v.Accounts == nil {
func (c *ServerConfig) HasAccount(username, password string) bool {
if c.Accounts == nil {
return false
}
storedPassed, found := v.Accounts[username]
storedPassed, found := c.Accounts[username]
if !found {
return false
}