diff --git a/common/protocol/address.go b/common/protocol/address.go index 598352a0..bdd2a208 100644 --- a/common/protocol/address.go +++ b/common/protocol/address.go @@ -172,7 +172,7 @@ func (p *AddressParser) writeAddress(writer io.Writer, address net.Address) erro } case net.AddressFamilyDomain: domain := address.Domain() - if IsDomainTooLong(domain) { + if isDomainTooLong(domain) { return newError("Super long domain is not supported: ", domain) } if _, err := writer.Write([]byte{tb, byte(len(domain))}); err != nil { diff --git a/common/protocol/headers.go b/common/protocol/headers.go index f3c6e153..5a3a1626 100644 --- a/common/protocol/headers.go +++ b/common/protocol/headers.go @@ -85,6 +85,6 @@ func (sc *SecurityConfig) GetSecurityType() SecurityType { return sc.Type } -func IsDomainTooLong(domain string) bool { +func isDomainTooLong(domain string) bool { return len(domain) > 256 }