chore: proxyDialer can limited support old dial function

This commit is contained in:
wwqgtxx
2023-04-11 12:51:24 +08:00
parent ab3fce29ab
commit 92cc268209
15 changed files with 78 additions and 42 deletions

View File

@ -15,7 +15,10 @@ const (
TCP NetWork = iota
UDP
ALLNet
InvalidNet = 0xff
)
const (
HTTP Type = iota
HTTPS
SOCKS4
@ -33,12 +36,16 @@ const (
type NetWork int
func (n NetWork) String() string {
if n == TCP {
switch n {
case TCP:
return "tcp"
} else if n == UDP {
case UDP:
return "udp"
case ALLNet:
return "all"
default:
return "invalid"
}
return "all"
}
func (n NetWork) MarshalJSON() ([]byte, error) {