Browse Source

Give inspect address a default setting

Harvey Chapman 9 years ago
parent
commit
8713b4b685
2 changed files with 2 additions and 1 deletions
  1. 1 1
      src/ngrok/client/config.go
  2. 1 0
      src/ngrok/client/model.go

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

@@ -73,7 +73,7 @@ func LoadConfiguration(opts *Options) (config *Configuration, err error) {
 	}
 	}
 
 
 	if config.InspectAddr == "" {
 	if config.InspectAddr == "" {
-		config.InspectAddr = "127.0.0.1:4040"
+		config.InspectAddr = defaultInspectAddr
 	}
 	}
 
 
 	if config.HttpProxy == "" {
 	if config.HttpProxy == "" {

+ 1 - 0
src/ngrok/client/model.go

@@ -21,6 +21,7 @@ import (
 
 
 const (
 const (
 	defaultServerAddr   = "ngrokd.ngrok.com:443"
 	defaultServerAddr   = "ngrokd.ngrok.com:443"
+	defaultInspectAddr  = "127.0.0.1:4040"
 	pingInterval        = 20 * time.Second
 	pingInterval        = 20 * time.Second
 	maxPongLatency      = 15 * time.Second
 	maxPongLatency      = 15 * time.Second
 	updateCheckInterval = 6 * time.Hour
 	updateCheckInterval = 6 * time.Hour