2016-07-25 17:45:25 -04:00
|
|
|
package socks
|
|
|
|
|
|
|
|
import (
|
2016-08-20 14:55:45 -04:00
|
|
|
"v2ray.com/core/common/protocol"
|
2016-07-25 17:45:25 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
func (this *Account) Equals(another protocol.Account) bool {
|
2016-09-17 18:41:21 -04:00
|
|
|
if account, ok := another.(*Account); ok {
|
|
|
|
return this.Username == account.Username
|
2016-07-25 17:45:25 -04:00
|
|
|
}
|
2016-09-17 18:41:21 -04:00
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *Account) AsAccount() (protocol.Account, error) {
|
|
|
|
return this, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewAccount() protocol.AsAccount {
|
|
|
|
return &Account{}
|
2016-07-25 17:45:25 -04:00
|
|
|
}
|