mirror of https://github.com/schollz/croc.git
allow disabling multiplexing
This commit is contained in:
parent
648c41d707
commit
3941762bf3
|
@ -51,6 +51,7 @@ func Run() (err error) {
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{Name: "code, c", Usage: "codephrase used to connect to relay"},
|
cli.StringFlag{Name: "code, c", Usage: "codephrase used to connect to relay"},
|
||||||
cli.BoolFlag{Name: "no-local", Usage: "disable local relay when sending"},
|
cli.BoolFlag{Name: "no-local", Usage: "disable local relay when sending"},
|
||||||
|
cli.BoolFlag{Name: "no-multi", Usage: "disable multiplexing"},
|
||||||
cli.StringFlag{Name: "ports", Value: "9009,9010,9011,9012,9013", Usage: "ports of the local relay (optional)"},
|
cli.StringFlag{Name: "ports", Value: "9009,9010,9011,9012,9013", Usage: "ports of the local relay (optional)"},
|
||||||
},
|
},
|
||||||
HelpName: "croc send",
|
HelpName: "croc send",
|
||||||
|
@ -136,15 +137,16 @@ func getConfigFile() string {
|
||||||
func send(c *cli.Context) (err error) {
|
func send(c *cli.Context) (err error) {
|
||||||
setDebugLevel(c)
|
setDebugLevel(c)
|
||||||
crocOptions := croc.Options{
|
crocOptions := croc.Options{
|
||||||
SharedSecret: c.String("code"),
|
SharedSecret: c.String("code"),
|
||||||
IsSender: true,
|
IsSender: true,
|
||||||
Debug: c.GlobalBool("debug"),
|
Debug: c.GlobalBool("debug"),
|
||||||
NoPrompt: c.GlobalBool("yes"),
|
NoPrompt: c.GlobalBool("yes"),
|
||||||
RelayAddress: c.GlobalString("relay"),
|
RelayAddress: c.GlobalString("relay"),
|
||||||
Stdout: c.GlobalBool("stdout"),
|
Stdout: c.GlobalBool("stdout"),
|
||||||
DisableLocal: c.Bool("no-local"),
|
DisableLocal: c.Bool("no-local"),
|
||||||
RelayPorts: strings.Split(c.String("ports"), ","),
|
RelayPorts: strings.Split(c.String("ports"), ","),
|
||||||
Ask: c.GlobalBool("ask"),
|
Ask: c.GlobalBool("ask"),
|
||||||
|
NoMultiplexing: c.Bool("no-multi"),
|
||||||
}
|
}
|
||||||
b, errOpen := ioutil.ReadFile(getConfigFile())
|
b, errOpen := ioutil.ReadFile(getConfigFile())
|
||||||
if errOpen == nil && !c.GlobalBool("remember") {
|
if errOpen == nil && !c.GlobalBool("remember") {
|
||||||
|
|
Loading…
Reference in New Issue