account.go 339 B

123456789101112131415161718
  1. package socks
  2. import (
  3. "github.com/v2ray/v2ray-core/common/protocol"
  4. )
  5. type Account struct {
  6. Username string `json:"user"`
  7. Password string `json:"pass"`
  8. }
  9. func (this *Account) Equals(another protocol.Account) bool {
  10. socksAccount, ok := another.(*Account)
  11. if !ok {
  12. return false
  13. }
  14. return this.Username == socksAccount.Username
  15. }