a
This commit is contained in:
@ -2,6 +2,7 @@ proxy更新日志
|
|||||||
v6.4
|
v6.4
|
||||||
1.http(s)代理增加了--jumper参数,可以穿透外部代理连接上级.
|
1.http(s)代理增加了--jumper参数,可以穿透外部代理连接上级.
|
||||||
2.sps代理增加了--jumper参数,可以穿透外部代理连接上级.
|
2.sps代理增加了--jumper参数,可以穿透外部代理连接上级.
|
||||||
|
3.修复了--debug不能正常工作的问题.
|
||||||
|
|
||||||
v6.3
|
v6.3
|
||||||
1.fixed #156
|
1.fixed #156
|
||||||
|
|||||||
@ -37,8 +37,9 @@ var (
|
|||||||
app *kingpin.Application
|
app *kingpin.Application
|
||||||
service *services.ServiceItem
|
service *services.ServiceItem
|
||||||
cmd *exec.Cmd
|
cmd *exec.Cmd
|
||||||
cpuProfilingFile, memProfilingFile, blockProfilingFile, goroutineProfilingFile, threadcreateProfilingFile *os.File
|
cpuProfilingFile, memProfilingFile, blockProfilingFile,
|
||||||
isDebug bool
|
goroutineProfilingFile, threadcreateProfilingFile *os.File
|
||||||
|
isDebug *bool
|
||||||
)
|
)
|
||||||
|
|
||||||
func initConfig() (err error) {
|
func initConfig() (err error) {
|
||||||
@ -60,7 +61,7 @@ func initConfig() (err error) {
|
|||||||
//build srvice args
|
//build srvice args
|
||||||
app = kingpin.New("proxy", "happy with proxy")
|
app = kingpin.New("proxy", "happy with proxy")
|
||||||
app.Author("snail").Version(APP_VERSION)
|
app.Author("snail").Version(APP_VERSION)
|
||||||
isDebug := app.Flag("debug", "debug log output").Default("false").Bool()
|
isDebug = app.Flag("debug", "debug log output").Default("false").Bool()
|
||||||
daemon := app.Flag("daemon", "run proxy in background").Default("false").Bool()
|
daemon := app.Flag("daemon", "run proxy in background").Default("false").Bool()
|
||||||
forever := app.Flag("forever", "run proxy in forever,fail and retry").Default("false").Bool()
|
forever := app.Flag("forever", "run proxy in forever,fail and retry").Default("false").Bool()
|
||||||
logfile := app.Flag("log", "log file path").Default("").String()
|
logfile := app.Flag("log", "log file path").Default("").String()
|
||||||
@ -299,7 +300,7 @@ func initConfig() (err error) {
|
|||||||
spsArgs.LoadBalanceHashTarget = sps.Flag("lb-hashtarget", "use target address to choose parent for LB").Default("false").Bool()
|
spsArgs.LoadBalanceHashTarget = sps.Flag("lb-hashtarget", "use target address to choose parent for LB").Default("false").Bool()
|
||||||
spsArgs.LoadBalanceOnlyHA = sps.Flag("lb-onlyha", "use only `high availability mode` to choose parent for LB").Default("false").Bool()
|
spsArgs.LoadBalanceOnlyHA = sps.Flag("lb-onlyha", "use only `high availability mode` to choose parent for LB").Default("false").Bool()
|
||||||
spsArgs.RateLimit = sps.Flag("rate-limit", "rate limit (bytes/second) of each connection, such as: 100K 1.5M . 0 means no limitation").Short('l').Default("0").String()
|
spsArgs.RateLimit = sps.Flag("rate-limit", "rate limit (bytes/second) of each connection, such as: 100K 1.5M . 0 means no limitation").Short('l').Default("0").String()
|
||||||
spsArgs.Jumper = sps.Flag("jumper", "https or socks5 proxies used when connecting to parent, only worked of -T is tls or tcp, format is https://username:password@host:port https://host:port or socks5://username:password@host:port socks5://host:port").Short('J').Default("").String()
|
spsArgs.Jumper = sps.Flag("jumper", "https or socks5 proxies used when connecting to parent, only worked of -T is tls or tcp, format is https://username:password@host:port https://host:port or socks5://username:password@host:port socks5://host:port").Default("").String()
|
||||||
spsArgs.Debug = isDebug
|
spsArgs.Debug = isDebug
|
||||||
|
|
||||||
//########dns#########
|
//########dns#########
|
||||||
|
|||||||
2
main.go
2
main.go
@ -48,7 +48,7 @@ func Clean(s *services.Service) {
|
|||||||
log.Printf("clean process %d", cmd.Process.Pid)
|
log.Printf("clean process %d", cmd.Process.Pid)
|
||||||
cmd.Process.Kill()
|
cmd.Process.Kill()
|
||||||
}
|
}
|
||||||
if isDebug {
|
if *isDebug {
|
||||||
saveProfiling()
|
saveProfiling()
|
||||||
}
|
}
|
||||||
cleanupDone <- true
|
cleanupDone <- true
|
||||||
|
|||||||
Reference in New Issue
Block a user