1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-05 16:55:27 -05:00

understand OTA bit

This commit is contained in:
Darien Raymond
2016-01-29 14:09:51 +00:00
parent 008c285324
commit 7f5184e943
3 changed files with 43 additions and 8 deletions

View File

@@ -25,13 +25,7 @@ func (subject *AddressSubject) DisplayString() string {
}
func (subject *AddressSubject) Equals(another v2net.Address) {
if subject.value.IsIPv4() && another.IsIPv4() {
IP(subject.value.IP()).Equals(another.IP())
} else if subject.value.IsIPv6() && another.IsIPv6() {
IP(subject.value.IP()).Equals(another.IP())
} else if subject.value.IsDomain() && another.IsDomain() {
assert.StringLiteral(subject.value.Domain()).Equals(another.Domain())
} else {
if !subject.value.Equals(another) {
subject.Fail(subject.DisplayString(), "equals to", another)
}
}