mirror of https://github.com/v2ray/v2ray-core
refactor
parent
a52eb8f82b
commit
9100a78914
|
@ -172,7 +172,7 @@ func (p *AddressParser) writeAddress(writer io.Writer, address net.Address) erro
|
||||||
}
|
}
|
||||||
case net.AddressFamilyDomain:
|
case net.AddressFamilyDomain:
|
||||||
domain := address.Domain()
|
domain := address.Domain()
|
||||||
if IsDomainTooLong(domain) {
|
if isDomainTooLong(domain) {
|
||||||
return newError("Super long domain is not supported: ", domain)
|
return newError("Super long domain is not supported: ", domain)
|
||||||
}
|
}
|
||||||
if _, err := writer.Write([]byte{tb, byte(len(domain))}); err != nil {
|
if _, err := writer.Write([]byte{tb, byte(len(domain))}); err != nil {
|
||||||
|
|
|
@ -85,6 +85,6 @@ func (sc *SecurityConfig) GetSecurityType() SecurityType {
|
||||||
return sc.Type
|
return sc.Type
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsDomainTooLong(domain string) bool {
|
func isDomainTooLong(domain string) bool {
|
||||||
return len(domain) > 256
|
return len(domain) > 256
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue