Xray-core/proxy/mtproto/config.go

25 lines
342 B
Go
Raw Permalink Normal View History

2020-11-25 11:01:53 +00:00
package mtproto
import (
2020-12-04 01:36:16 +00:00
"github.com/xtls/xray-core/common/protocol"
2020-11-25 11:01:53 +00:00
)
func (a *Account) Equals(another protocol.Account) bool {
aa, ok := another.(*Account)
if !ok {
return false
}
if len(a.Secret) != len(aa.Secret) {
return false
}
for i, v := range a.Secret {
if v != aa.Secret[i] {
return false
}
}
return true
}