mirror of https://github.com/schollz/croc.git
addresses #496 gettings ports doing LAN
This commit is contained in:
parent
3dedd41557
commit
1517767129
|
@ -166,6 +166,10 @@ func determinePass(c *cli.Context) (pass string) {
|
||||||
func send(c *cli.Context) (err error) {
|
func send(c *cli.Context) (err error) {
|
||||||
setDebugLevel(c)
|
setDebugLevel(c)
|
||||||
comm.Socks5Proxy = c.String("socks5")
|
comm.Socks5Proxy = c.String("socks5")
|
||||||
|
portsString:=c.String("ports")
|
||||||
|
if portsString=="" {
|
||||||
|
portsString="9009,9010,9011,9012,9013"
|
||||||
|
}
|
||||||
crocOptions := croc.Options{
|
crocOptions := croc.Options{
|
||||||
SharedSecret: c.String("code"),
|
SharedSecret: c.String("code"),
|
||||||
IsSender: true,
|
IsSender: true,
|
||||||
|
@ -177,7 +181,7 @@ func send(c *cli.Context) (err error) {
|
||||||
DisableLocal: c.Bool("no-local"),
|
DisableLocal: c.Bool("no-local"),
|
||||||
OnlyLocal: c.Bool("local"),
|
OnlyLocal: c.Bool("local"),
|
||||||
IgnoreStdin: c.Bool("ignore-stdin"),
|
IgnoreStdin: c.Bool("ignore-stdin"),
|
||||||
RelayPorts: strings.Split(c.String("ports"), ","),
|
RelayPorts: strings.Split(portsString, ","),
|
||||||
Ask: c.Bool("ask"),
|
Ask: c.Bool("ask"),
|
||||||
NoMultiplexing: c.Bool("no-multi"),
|
NoMultiplexing: c.Bool("no-multi"),
|
||||||
RelayPassword: determinePass(c),
|
RelayPassword: determinePass(c),
|
||||||
|
|
Loading…
Reference in New Issue