account.go 371 B

1234567891011121314151617181920
  1. package socks
  2. import (
  3. "v2ray.com/core/common/protocol"
  4. )
  5. func (this *Account) Equals(another protocol.Account) bool {
  6. if account, ok := another.(*Account); ok {
  7. return this.Username == account.Username
  8. }
  9. return false
  10. }
  11. func (this *Account) AsAccount() (protocol.Account, error) {
  12. return this, nil
  13. }
  14. func NewAccount() protocol.AsAccount {
  15. return &Account{}
  16. }