Improve: config convergent and add log-level

This commit is contained in:
Dreamacro
2018-07-26 00:04:59 +08:00
parent 7357d2d0c2
commit 8389150318
31 changed files with 757 additions and 484 deletions

View File

@ -10,8 +10,11 @@ const (
AtypDomainName = 3
AtypIPv6 = 4
TCP = iota
TCP NetWork = iota
UDP
HTTP SourceType = iota
SOCKS
)
type NetWork int
@ -23,9 +26,12 @@ func (n *NetWork) String() string {
return "udp"
}
type SourceType int
// Addr is used to store connection address
type Addr struct {
NetWork NetWork
Source SourceType
AddrType int
Host string
IP *net.IP