Browse Source

allow the web interface to be disabled

Alan Shreve 12 years ago
parent
commit
a2cf6b70c1
2 changed files with 5 additions and 2 deletions
  1. 1 1
      src/ngrok/client/cli.go
  2. 4 1
      src/ngrok/client/main.go

+ 1 - 1
src/ngrok/client/cli.go

@@ -125,7 +125,7 @@ func parseArgs() *Options {
 	webport := flag.Int(
 		"webport",
 		4040,
-		"The port on which the web interface is served")
+		"The port on which the web interface is served, -1 to disable")
 
 	logto := flag.String(
 		"log",

+ 4 - 1
src/ngrok/client/main.go

@@ -255,7 +255,10 @@ func Main() {
 
 	// init ui
 	ctl := ui.NewController()
-	web.NewWebView(ctl, s, opts.webport)
+	if opts.webport != -1 {
+		web.NewWebView(ctl, s, opts.webport)
+	}
+
 	if opts.logto != "stdout" {
 		term.New(ctl, s)
 	}