general: optimize domain parts operations

This commit is contained in:
nadoo committed 2020-08-16 12:00:46 +08:00
1 parent 3a6fd63bc0
commit a118ec5837
14 files changed
+51 -65

No files matched your search

+4 -4
View File
@@ -5,7 +5,7 @@ import (
"strconv"
)
// Atyp is vmess addr type
// Atyp is vmess addr type.
type Atyp byte
// Atyp
@@ -16,13 +16,13 @@ const (
AtypIP6 Atyp = 3
)
// Addr is vmess addr
// Addr is vmess addr.
type Addr []byte
// Port is vmess addr port
// Port is vmess addr port.
type Port uint16
// ParseAddr parses the address in string s
// ParseAddr parses the address in string s.
func ParseAddr(s string) (Atyp, Addr, Port, error) {
var atyp Atyp
var addr Addr