mirror of https://github.com/schollz/croc.git
ifix cliwq!
This commit is contained in:
parent
ec8768bc70
commit
2c2c3f58ac
|
@ -214,20 +214,20 @@ func relay(c *cli.Context) (err error) {
|
||||||
if c.GlobalBool("debug") {
|
if c.GlobalBool("debug") {
|
||||||
debugString = "debug"
|
debugString = "debug"
|
||||||
}
|
}
|
||||||
ports := strings.Split(c.GlobalString("ports"), ",")
|
ports := strings.Split(c.String("ports"), ",")
|
||||||
tcpPorts := strings.Join(ports[1:], ",")
|
tcpPorts := strings.Join(ports[1:], ",")
|
||||||
for i, port := range ports {
|
for i, port := range ports {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
go func(portStr string) {
|
go func(portStr string) {
|
||||||
err = tcp.Run(debugString, portStr, tcpPorts)
|
err = tcp.Run(debugString, portStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}(port)
|
}(port)
|
||||||
}
|
}
|
||||||
return tcp.Run(debugString, ports[0])
|
return tcp.Run(debugString, ports[0],tcpPorts)
|
||||||
}
|
}
|
||||||
|
|
||||||
// func dirSize(path string) (int64, error) {
|
// func dirSize(path string) (int64, error) {
|
||||||
|
|
Loading…
Reference in New Issue