config.go 347 B

123456789101112131415161718192021222324
  1. package mtproto
  2. import (
  3. "github.com/v2fly/v2ray-core/v4/common/protocol"
  4. )
  5. func (a *Account) Equals(another protocol.Account) bool {
  6. aa, ok := another.(*Account)
  7. if !ok {
  8. return false
  9. }
  10. if len(a.Secret) != len(aa.Secret) {
  11. return false
  12. }
  13. for i, v := range a.Secret {
  14. if v != aa.Secret[i] {
  15. return false
  16. }
  17. }
  18. return true
  19. }