remove SOCKS4 suppport for auto handler

This commit is contained in:
rui.zheng 2017-08-13 17:13:01 +08:00
parent 8cbd2722f6
commit 5869a51585
4 changed files with 10 additions and 8 deletions

View File

@ -117,11 +117,12 @@ scheme://[bind_address]:port/[host]:hostport
"ChainNodes": [
"http://192.168.1.1:8080",
"https://10.0.2.1:443"
]
],
"Debug": true
}
```
ServeNodes等同于-L参数ChainNodes等同于-F参数
`ServeNodes`等同于`-L`参数,`ChainNodes`等同于`-F`参数`Debug`等同于`-D`参数。
使用方法

View File

@ -117,11 +117,12 @@ The configuration file is in standard JSON format:
"ChainNodes": [
"http://192.168.1.1:8080",
"https://10.0.2.1:443"
]
],
"Debug": true
}
```
ServeNodes is equivalent to the -L parameter, ChainNodes is equivalent to the -F parameter.
`ServeNodes` is equivalent to the `-L` parameter, `ChainNodes` is equivalent to the `-F` parameter, `Debug` is equivalent to the `-D` parameter.
Usage
------

View File

@ -24,7 +24,7 @@ import (
var (
options struct {
ChainNodes, ServeNodes stringList
DebugMode bool
Debug bool
}
)
@ -37,7 +37,7 @@ func init() {
flag.Var(&options.ChainNodes, "F", "forward address, can make a forward chain")
flag.Var(&options.ServeNodes, "L", "listen address, can listen on multiple ports")
flag.StringVar(&configureFile, "C", "", "configure file")
flag.BoolVar(&options.DebugMode, "D", false, "enable debug log")
flag.BoolVar(&options.Debug, "D", false, "enable debug log")
flag.BoolVar(&printVersion, "V", false, "print version")
flag.Parse()
@ -57,7 +57,7 @@ func init() {
}
gost.SetLogger(&gost.LogLogger{})
gost.Debug = options.DebugMode
gost.Debug = options.Debug
}
func main() {

View File

@ -96,7 +96,7 @@ func (h *autoHandler) Handle(conn net.Conn) {
cc := &bufferdConn{Conn: conn, br: br}
switch b[0] {
case gosocks4.Ver4:
SOCKS4Handler(h.options...).Handle(cc)
return // SOCKS4(a) does not suppport authentication method, so we ignore it.
case gosocks5.Ver5:
SOCKS5Handler(h.options...).Handle(cc)
default: // http