diff --git a/config.go b/config.go index b3f815d..5e73c84 100644 --- a/config.go +++ b/config.go @@ -8,6 +8,7 @@ import ( type Configuration struct { BaseUrl string `yaml:"baseUrl"` + PortNumber string `yaml:"portNumber"` Protocol string `yaml:"protocol"` DebugMode bool `yaml:"debugMode"` MaxTextureSize int `yaml:"maxTextureSize"` diff --git a/config.yaml b/config.yaml index 72d8af3..8968674 100644 --- a/config.yaml +++ b/config.yaml @@ -1,13 +1,16 @@ # The primary domain the Tripwire instance is hosted on. -# To specify a port, use a colon after the domain, then the port number. -# (e.g example.com:1234) +# If you are proxying Tripwire, include the port number your proxy uses. +# If not, it will use the regular port number. # It shouldn't be a local IP in production. baseUrl: "localhost" -# The protocol to be used for Tripwire +# The port number Tripwire will listen on. +portNumber: "8080" + +# The protocol to be used for Tripwire. protocol: "http://" -# Show debug output (if unsure, set to false) +# Show debug output. (if unsure, set to false) debugMode: true # The maximum size (in bytes) of a skin/cape that can be uploaded. diff --git a/main.go b/main.go index 48078b5..ee41c51 100644 --- a/main.go +++ b/main.go @@ -45,7 +45,7 @@ func handleRequests() { registerWebEndpoints(r) splitUrl := strings.Split(config.BaseUrl, ":") - port := "8080" + port := config.PortNumber if len(splitUrl) > 1 { port = splitUrl[1] }