From 4e7b01dbc42f9d254a648b207a96acff0c605625 Mon Sep 17 00:00:00 2001 From: A-Wels Date: Mon, 13 Mar 2023 16:30:25 +0100 Subject: [PATCH 1/6] flags for ServPort and ServPortQuery --- README.md | 7 +++++-- lib/config/config.go | 36 ++++++++++++++++++++++++++---------- lib/model/model.go | 2 ++ msh-config.json | 18 ++++++++++-------- 4 files changed, 43 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index a095c1be..44cd004a 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,8 @@ go build . - StopServer - Whitelist - \* StopServerAllowKill - - \* HibernationInfo and StartingInfo + - \* ServPort and ServPortQuery + - \* InfoHibernation and InfoStarting - \* TimeBeforeStoppingEmptyServer - \* NotifyUpdate 3. \* put the frozen icon you want in `path/to/server.jar/folder` (must be called `server-icon-frozen`, supported formats: `.png`, `.jpg`) @@ -105,7 +106,9 @@ Ports configuration - _msh enables query handling if `enable-query=true` in `server.properties`_ ```yaml "MshPort": 25555 # port to which players can join -"MshPortQuery": 25555 # port to which stats query requests are performed +"MshPortQuery": 25555 # port to which stats query requests are performed from players +"ServPort" : -1 # port to which msh connects to. Set to -1 to read value from server.properties +"ServPortQuery": -1 # port to which stats queries are performed from msh. Set to -1 to read from server.properties ``` TimeBeforeStoppingEmptyServer sets the time (after the last player disconnected) that msh waits before hibernating the minecraft server diff --git a/lib/config/config.go b/lib/config/config.go index b6dbbd3b..446519dd 100644 --- a/lib/config/config.go +++ b/lib/config/config.go @@ -209,6 +209,10 @@ func (c *Configuration) loadRuntime(confdef *Configuration) *errco.MshLog { flag.BoolVar(&c.Msh.SuspendAllow, "SuspendAllow", c.Msh.SuspendAllow, "Enables minecraft server process suspension.") // msh pterodactyl egg flag.IntVar(&c.Msh.SuspendRefresh, "SuspendRefresh", c.Msh.SuspendRefresh, "Specify how often the suspended minecraft server process must be refreshed.") // msh pterodactyl egg + // flags for ServPort and ServPortQuery + flag.IntVar(&c.Msh.ServPort, "servport", c.Msh.ServPort, "Specify ServPort.") + flag.IntVar(&c.Msh.ServPortQuery, "servportquery", c.Msh.ServPortQuery, "Specify ServPortQuery.") + // specify the usage when there is an error in the arguments flag.Usage = func() { // not using errco.NewLogln since log time is not needed @@ -301,18 +305,30 @@ func (c *Configuration) loadRuntime(confdef *Configuration) *errco.MshLog { // MshHost defined in global definition MshPort = c.Msh.MshPort MshPortQuery = c.Msh.MshPortQuery + + // load ServPort and ServPortQuery from msh-config file. Will be updated if set to default of -1 + ServPort = c.Msh.ServPort + ServPortQuery = c.Msh.ServPortQuery + // ServHost defined in global definition - if ServPort, logMsh = c.ParsePropertiesInt("server-port"); logMsh != nil { - logMsh.Log(true) - } else if ServPort == c.Msh.MshPort { - logMsh := errco.NewLogln(errco.TYPE_ERR, errco.LVL_1, errco.ERROR_CONFIG_LOAD, "ServPort and MshPort appear to be the same, please change one of them") - servstats.Stats.SetMajorError(logMsh) + // read server port from server.properties if not set via flag + if ServPort == -1 { + if ServPort, logMsh = c.ParsePropertiesInt("server-port"); logMsh != nil { + logMsh.Log(true) + } else if ServPort == c.Msh.MshPort { + logMsh := errco.NewLogln(errco.TYPE_ERR, errco.LVL_1, errco.ERROR_CONFIG_LOAD, "ServPort and MshPort appear to be the same, please change one of them") + servstats.Stats.SetMajorError(logMsh) + } } - if ServPortQuery, logMsh = c.ParsePropertiesInt("query.port"); logMsh != nil { - logMsh.Log(true) - } else if ServPortQuery == c.Msh.MshPortQuery { - logMsh := errco.NewLogln(errco.TYPE_ERR, errco.LVL_1, errco.ERROR_CONFIG_LOAD, "ServPortQuery and MshPortQuery appear to be the same, please change one of them") - servstats.Stats.SetMajorError(logMsh) + + // read server query port from server.properties if not set via flag + if ServPortQuery == -1 { + if ServPortQuery, logMsh = c.ParsePropertiesInt("query.port"); logMsh != nil { + logMsh.Log(true) + } else if ServPortQuery == c.Msh.MshPortQuery { + logMsh := errco.NewLogln(errco.TYPE_ERR, errco.LVL_1, errco.ERROR_CONFIG_LOAD, "ServPortQuery and MshPortQuery appear to be the same, please change one of them") + servstats.Stats.SetMajorError(logMsh) + } } errco.NewLogln(errco.TYPE_INF, errco.LVL_3, errco.ERROR_NIL, "msh connection proxy setup: %s:%d --> %s:%d", MshHost, MshPort, ServHost, ServPort) diff --git a/lib/model/model.go b/lib/model/model.go index 7716528e..7fc7f590 100644 --- a/lib/model/model.go +++ b/lib/model/model.go @@ -19,6 +19,8 @@ type Configuration struct { ID string `json:"ID"` MshPort int `json:"MshPort"` MshPortQuery int `json:"MshPortQuery"` + ServPort int `json:"ServPort"` + ServPortQuery int `json:"ServPortQuery"` TimeBeforeStoppingEmptyServer int64 `json:"TimeBeforeStoppingEmptyServer"` SuspendAllow bool `json:"SuspendAllow"` // specify if msh should suspend java server process SuspendRefresh int `json:"SuspendRefresh"` // specify if msh should refresh java server process suspension and every how many seconds diff --git a/msh-config.json b/msh-config.json index 1aecfe71..145dec01 100644 --- a/msh-config.json +++ b/msh-config.json @@ -1,9 +1,9 @@ { "Server": { - "Folder": "{path/to/server/folder}", - "FileName": "{server.jar}", - "Version": "1.19.2", - "Protocol": 760 + "Folder": "../2023-java", + "FileName": "purpur.jar", + "Version": "1.19.3", + "Protocol": 761 }, "Commands": { "StartServer": "java -jar nogui", @@ -13,9 +13,11 @@ }, "Msh": { "Debug": 1, - "ID": "", + "ID": "910c600810b6c65bee2a285c0c1cb42d48e728d4", "MshPort": 25555, "MshPortQuery": 25555, + "ServPort": -1, + "ServPortQuery": -1, "TimeBeforeStoppingEmptyServer": 30, "SuspendAllow": false, "SuspendRefresh": -1, @@ -25,7 +27,7 @@ "NotifyMessage": true, "Whitelist": [], "WhitelistImport": false, - "ShowResourceUsage": false, - "ShowInternetUsage": false + "ShowResourceUsage": false, + "ShowInternetUsage": false } -} \ No newline at end of file +} From 9d0d5b45f625aa079680fc3a0021dc55453d37e5 Mon Sep 17 00:00:00 2001 From: Alexander Welsing Date: Mon, 13 Mar 2023 16:39:25 +0100 Subject: [PATCH 2/6] Remove settings --- msh-config.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/msh-config.json b/msh-config.json index 145dec01..80bedac1 100644 --- a/msh-config.json +++ b/msh-config.json @@ -1,9 +1,9 @@ { "Server": { - "Folder": "../2023-java", - "FileName": "purpur.jar", - "Version": "1.19.3", - "Protocol": 761 + "Folder": "{path/to/server/folder}", + "FileName": "{server.jar}", + "Version": "1.19.2", + "Protocol": 760 }, "Commands": { "StartServer": "java -jar nogui", @@ -13,7 +13,7 @@ }, "Msh": { "Debug": 1, - "ID": "910c600810b6c65bee2a285c0c1cb42d48e728d4", + "ID": "", "MshPort": 25555, "MshPortQuery": 25555, "ServPort": -1, From 425bde62e844d65d4f9d2d049b48802a3ad12687 Mon Sep 17 00:00:00 2001 From: A-Wels Date: Wed, 15 Mar 2023 14:20:24 +0100 Subject: [PATCH 3/6] commandline arguments for servport and servportquery --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++-- lib/config/config.go | 11 +++++---- msh-config.json | 8 +++---- 3 files changed, 64 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 44cd004a..dc47adf4 100644 --- a/README.md +++ b/README.md @@ -107,8 +107,6 @@ Ports configuration ```yaml "MshPort": 25555 # port to which players can join "MshPortQuery": 25555 # port to which stats query requests are performed from players -"ServPort" : -1 # port to which msh connects to. Set to -1 to read value from server.properties -"ServPortQuery": -1 # port to which stats queries are performed from msh. Set to -1 to read from server.properties ``` TimeBeforeStoppingEmptyServer sets the time (after the last player disconnected) that msh waits before hibernating the minecraft server @@ -168,6 +166,60 @@ _for debug purposes (debug level 3 required)_ "ShowInternetUsage": false ``` +----- +#### Command-line parameters +These parameters can be applied when running the executable. Supplying these parameters overwrites the values specified in `msh-config.json` + +```yaml + -SuspendAllow + Enables minecraft server process suspension. + -SuspendRefresh int + Specify how often the suspended minecraft server process must be refreshed. (default -1) + -allowKill int + Specify after how many seconds the server should be killed (if stop command fails). (default 10) + -allowkill int + Specify after how many seconds the server should be killed (if stop command fails). (default 10) + -d int + Specify debug level. (default 1) + -file string + Specify minecraft server file name. (default "{server.jar}") + -folder string + Specify minecraft server folder path. (default "{path/to/server/folder}") + -infohibe string + Specify hibernation info. (default " §fserver status:\n §b§lHIBERNATING") + -infostar string + Specify starting info. (default " §fserver status:\n §6§lWARMING UP") + -msparam string + Specify start server parameters. (default "-Xmx1024M -Xms1024M") + -notifymes + Enables message notifications. (default true) + -notifyupd + Enables update notifications. (default true) + -port int + Specify msh port. (default 25555) + -protocol int + Specify minecraft server protocol. (default 760) + -servport int + Specify the port that msh connects to. + -servportquery int + Specify ServPortQuery that msh connects to. + -showint + Enables logging of msh interent usage (->clients / ->server). + -showres + Enables logging of msh resource usage (cpu / mem percentage). + -suspendallow + Enables minecraft server process suspension. + -suspendrefresh int + Specify how often the suspended minecraft server process must be refreshed. (default -1) + -timeout int + Specify time to wait before stopping minecraft server. (default 30) + -version string + Specify minecraft server version. (default "1.19.2") + -wlimport + Enables minecraft server whitelist import. + +``` + ----- ### CREDITS: diff --git a/lib/config/config.go b/lib/config/config.go index 446519dd..2573f397 100644 --- a/lib/config/config.go +++ b/lib/config/config.go @@ -210,8 +210,8 @@ func (c *Configuration) loadRuntime(confdef *Configuration) *errco.MshLog { flag.IntVar(&c.Msh.SuspendRefresh, "SuspendRefresh", c.Msh.SuspendRefresh, "Specify how often the suspended minecraft server process must be refreshed.") // msh pterodactyl egg // flags for ServPort and ServPortQuery - flag.IntVar(&c.Msh.ServPort, "servport", c.Msh.ServPort, "Specify ServPort.") - flag.IntVar(&c.Msh.ServPortQuery, "servportquery", c.Msh.ServPortQuery, "Specify ServPortQuery.") + flag.IntVar(&c.Msh.ServPort, "servport", c.Msh.ServPort, "Specify the port that msh connects to.") + flag.IntVar(&c.Msh.ServPortQuery, "servportquery", c.Msh.ServPortQuery, "Specify ServPortQuery that msh connects to.") // specify the usage when there is an error in the arguments flag.Usage = func() { @@ -306,13 +306,14 @@ func (c *Configuration) loadRuntime(confdef *Configuration) *errco.MshLog { MshPort = c.Msh.MshPort MshPortQuery = c.Msh.MshPortQuery - // load ServPort and ServPortQuery from msh-config file. Will be updated if set to default of -1 + // load ServPort and ServPortQuery from launch parameters. Will be updated if set to default of 0 ServPort = c.Msh.ServPort ServPortQuery = c.Msh.ServPortQuery // ServHost defined in global definition + // read server port from server.properties if not set via flag - if ServPort == -1 { + if ServPort == 0 { if ServPort, logMsh = c.ParsePropertiesInt("server-port"); logMsh != nil { logMsh.Log(true) } else if ServPort == c.Msh.MshPort { @@ -322,7 +323,7 @@ func (c *Configuration) loadRuntime(confdef *Configuration) *errco.MshLog { } // read server query port from server.properties if not set via flag - if ServPortQuery == -1 { + if ServPortQuery == 0 { if ServPortQuery, logMsh = c.ParsePropertiesInt("query.port"); logMsh != nil { logMsh.Log(true) } else if ServPortQuery == c.Msh.MshPortQuery { diff --git a/msh-config.json b/msh-config.json index 80bedac1..1634c3d1 100644 --- a/msh-config.json +++ b/msh-config.json @@ -13,11 +13,11 @@ }, "Msh": { "Debug": 1, - "ID": "", + "ID": "910c600810b6c65bee2a285c0c1cb42d48e728d4", "MshPort": 25555, "MshPortQuery": 25555, - "ServPort": -1, - "ServPortQuery": -1, + "ServPort": 0, + "ServPortQuery": 0, "TimeBeforeStoppingEmptyServer": 30, "SuspendAllow": false, "SuspendRefresh": -1, @@ -30,4 +30,4 @@ "ShowResourceUsage": false, "ShowInternetUsage": false } -} +} \ No newline at end of file From aa76fffdd62260bea43824ee7c6bd933add3329b Mon Sep 17 00:00:00 2001 From: A-Wels Date: Wed, 15 Mar 2023 14:22:08 +0100 Subject: [PATCH 4/6] remove arguments from msh-config.json --- msh-config.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/msh-config.json b/msh-config.json index 1634c3d1..2d0eac7d 100644 --- a/msh-config.json +++ b/msh-config.json @@ -16,8 +16,6 @@ "ID": "910c600810b6c65bee2a285c0c1cb42d48e728d4", "MshPort": 25555, "MshPortQuery": 25555, - "ServPort": 0, - "ServPortQuery": 0, "TimeBeforeStoppingEmptyServer": 30, "SuspendAllow": false, "SuspendRefresh": -1, From f8a7077cc6bfa3a3dbdf91f1a90e4669a1169f4e Mon Sep 17 00:00:00 2001 From: A-Wels Date: Wed, 15 Mar 2023 14:22:33 +0100 Subject: [PATCH 5/6] remove id --- msh-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msh-config.json b/msh-config.json index 2d0eac7d..fec46839 100644 --- a/msh-config.json +++ b/msh-config.json @@ -13,7 +13,7 @@ }, "Msh": { "Debug": 1, - "ID": "910c600810b6c65bee2a285c0c1cb42d48e728d4", + "ID": "", "MshPort": 25555, "MshPortQuery": 25555, "TimeBeforeStoppingEmptyServer": 30, From e0b3cd9c834467b13829f3adbb40e0b6d2ea3def Mon Sep 17 00:00:00 2001 From: gekigek99 <53654579+gekigek99@users.noreply.github.com> Date: Thu, 16 Mar 2023 11:46:01 +0100 Subject: [PATCH 6/6] config: refactored code fixed config file update with wrong parameters --- README.md | 66 +++----------------------------------------- lib/config/config.go | 45 ++++++++++++------------------ lib/model/model.go | 2 -- 3 files changed, 22 insertions(+), 91 deletions(-) diff --git a/README.md b/README.md index dc47adf4..b424dd8c 100644 --- a/README.md +++ b/README.md @@ -41,17 +41,14 @@ go build . ----- ### INSTRUCTIONS: 1. Install the Minecraft server you want -2. Edit the parameters in `msh-config.json` as needed (*check definitions*): +2. Edit `msh-config.json` as needed (*check definitions*): - Folder - FileName - StartServerParam - StopServer - Whitelist - - \* StopServerAllowKill - - \* ServPort and ServPortQuery - - \* InfoHibernation and InfoStarting - \* TimeBeforeStoppingEmptyServer - - \* NotifyUpdate + - \* [others...](#DEFINITIONS) 3. \* put the frozen icon you want in `path/to/server.jar/folder` (must be called `server-icon-frozen`, supported formats: `.png`, `.jpg`) 4. on the router (to which the server is connected): forward port 25555 to server ([tutorial](https://www.wikihow.com/Open-Ports#Opening-Router-Firewall-Ports)) 5. on the server: open port 25555 (example: [ufw firewall](https://www.configserverfirewall.com/ufw-ubuntu-firewall/ubuntu-firewall-open-port/)) @@ -68,7 +65,7 @@ _\* = it's not compulsory to modify this parameter_ ----- ### DEFINITIONS: -- _Some of these parameters can be configured with command-line arguments (--help to know which)_ +- _Some of these parameters can be configured with command-line arguments (`msh --help` to know more) (user supplied arguments will override config)_ Location of server folder and executable. You can find protocol/version [here](https://wiki.vg/Protocol_version_numbers) (but msh should set them automatically): ```yaml @@ -106,7 +103,7 @@ Ports configuration - _msh enables query handling if `enable-query=true` in `server.properties`_ ```yaml "MshPort": 25555 # port to which players can join -"MshPortQuery": 25555 # port to which stats query requests are performed from players +"MshPortQuery": 25555 # port to which stats query requests are performed from clients ``` TimeBeforeStoppingEmptyServer sets the time (after the last player disconnected) that msh waits before hibernating the minecraft server @@ -167,61 +164,6 @@ _for debug purposes (debug level 3 required)_ ``` ----- -#### Command-line parameters -These parameters can be applied when running the executable. Supplying these parameters overwrites the values specified in `msh-config.json` - -```yaml - -SuspendAllow - Enables minecraft server process suspension. - -SuspendRefresh int - Specify how often the suspended minecraft server process must be refreshed. (default -1) - -allowKill int - Specify after how many seconds the server should be killed (if stop command fails). (default 10) - -allowkill int - Specify after how many seconds the server should be killed (if stop command fails). (default 10) - -d int - Specify debug level. (default 1) - -file string - Specify minecraft server file name. (default "{server.jar}") - -folder string - Specify minecraft server folder path. (default "{path/to/server/folder}") - -infohibe string - Specify hibernation info. (default " §fserver status:\n §b§lHIBERNATING") - -infostar string - Specify starting info. (default " §fserver status:\n §6§lWARMING UP") - -msparam string - Specify start server parameters. (default "-Xmx1024M -Xms1024M") - -notifymes - Enables message notifications. (default true) - -notifyupd - Enables update notifications. (default true) - -port int - Specify msh port. (default 25555) - -protocol int - Specify minecraft server protocol. (default 760) - -servport int - Specify the port that msh connects to. - -servportquery int - Specify ServPortQuery that msh connects to. - -showint - Enables logging of msh interent usage (->clients / ->server). - -showres - Enables logging of msh resource usage (cpu / mem percentage). - -suspendallow - Enables minecraft server process suspension. - -suspendrefresh int - Specify how often the suspended minecraft server process must be refreshed. (default -1) - -timeout int - Specify time to wait before stopping minecraft server. (default 30) - -version string - Specify minecraft server version. (default "1.19.2") - -wlimport - Enables minecraft server whitelist import. - -``` - ------ - ### CREDITS: Author: [gekigek99](https://github.com/gekigek99) diff --git a/lib/config/config.go b/lib/config/config.go index 2573f397..1510f4b7 100644 --- a/lib/config/config.go +++ b/lib/config/config.go @@ -192,6 +192,8 @@ func (c *Configuration) loadRuntime(confdef *Configuration) *errco.MshLog { flag.IntVar(&c.Msh.Debug, "d", c.Msh.Debug, "Specify debug level.") // c.Msh.ID should not be set by a flag flag.IntVar(&c.Msh.MshPort, "port", c.Msh.MshPort, "Specify msh port.") + flag.IntVar(&ServPort, "servport", ServPort, "Specify the minecraft server port.") + flag.IntVar(&ServPortQuery, "servportquery", ServPortQuery, "Specify minecraft server port for queries.") flag.Int64Var(&c.Msh.TimeBeforeStoppingEmptyServer, "timeout", c.Msh.TimeBeforeStoppingEmptyServer, "Specify time to wait before stopping minecraft server.") flag.BoolVar(&c.Msh.SuspendAllow, "suspendallow", c.Msh.SuspendAllow, "Enables minecraft server process suspension.") flag.IntVar(&c.Msh.SuspendRefresh, "suspendrefresh", c.Msh.SuspendRefresh, "Specify how often the suspended minecraft server process must be refreshed.") @@ -209,10 +211,6 @@ func (c *Configuration) loadRuntime(confdef *Configuration) *errco.MshLog { flag.BoolVar(&c.Msh.SuspendAllow, "SuspendAllow", c.Msh.SuspendAllow, "Enables minecraft server process suspension.") // msh pterodactyl egg flag.IntVar(&c.Msh.SuspendRefresh, "SuspendRefresh", c.Msh.SuspendRefresh, "Specify how often the suspended minecraft server process must be refreshed.") // msh pterodactyl egg - // flags for ServPort and ServPortQuery - flag.IntVar(&c.Msh.ServPort, "servport", c.Msh.ServPort, "Specify the port that msh connects to.") - flag.IntVar(&c.Msh.ServPortQuery, "servportquery", c.Msh.ServPortQuery, "Specify ServPortQuery that msh connects to.") - // specify the usage when there is an error in the arguments flag.Usage = func() { // not using errco.NewLogln since log time is not needed @@ -302,34 +300,27 @@ func (c *Configuration) loadRuntime(confdef *Configuration) *errco.MshLog { // ---------------- setup load ----------------- // // load ports - // MshHost defined in global definition + + // MshHost defined in global definition MshPort = c.Msh.MshPort MshPortQuery = c.Msh.MshPortQuery - // load ServPort and ServPortQuery from launch parameters. Will be updated if set to default of 0 - ServPort = c.Msh.ServPort - ServPortQuery = c.Msh.ServPortQuery - // ServHost defined in global definition - - // read server port from server.properties if not set via flag - if ServPort == 0 { - if ServPort, logMsh = c.ParsePropertiesInt("server-port"); logMsh != nil { - logMsh.Log(true) - } else if ServPort == c.Msh.MshPort { - logMsh := errco.NewLogln(errco.TYPE_ERR, errco.LVL_1, errco.ERROR_CONFIG_LOAD, "ServPort and MshPort appear to be the same, please change one of them") - servstats.Stats.SetMajorError(logMsh) - } + if ServPort != 0 { + // ServPort defined in msh start arguments + } else if ServPort, logMsh = c.ParsePropertiesInt("server-port"); logMsh != nil { + logMsh.Log(true) + } else if ServPort == c.Msh.MshPort { + logMsh := errco.NewLogln(errco.TYPE_ERR, errco.LVL_1, errco.ERROR_CONFIG_LOAD, "ServPort and MshPort appear to be the same, please change one of them") + servstats.Stats.SetMajorError(logMsh) } - - // read server query port from server.properties if not set via flag - if ServPortQuery == 0 { - if ServPortQuery, logMsh = c.ParsePropertiesInt("query.port"); logMsh != nil { - logMsh.Log(true) - } else if ServPortQuery == c.Msh.MshPortQuery { - logMsh := errco.NewLogln(errco.TYPE_ERR, errco.LVL_1, errco.ERROR_CONFIG_LOAD, "ServPortQuery and MshPortQuery appear to be the same, please change one of them") - servstats.Stats.SetMajorError(logMsh) - } + if ServPortQuery != 0 { + // ServPortQuery defined in msh start arguments + } else if ServPortQuery, logMsh = c.ParsePropertiesInt("query.port"); logMsh != nil { + logMsh.Log(true) + } else if ServPortQuery == c.Msh.MshPortQuery { + logMsh := errco.NewLogln(errco.TYPE_ERR, errco.LVL_1, errco.ERROR_CONFIG_LOAD, "ServPortQuery and MshPortQuery appear to be the same, please change one of them") + servstats.Stats.SetMajorError(logMsh) } errco.NewLogln(errco.TYPE_INF, errco.LVL_3, errco.ERROR_NIL, "msh connection proxy setup: %s:%d --> %s:%d", MshHost, MshPort, ServHost, ServPort) diff --git a/lib/model/model.go b/lib/model/model.go index 7fc7f590..7716528e 100644 --- a/lib/model/model.go +++ b/lib/model/model.go @@ -19,8 +19,6 @@ type Configuration struct { ID string `json:"ID"` MshPort int `json:"MshPort"` MshPortQuery int `json:"MshPortQuery"` - ServPort int `json:"ServPort"` - ServPortQuery int `json:"ServPortQuery"` TimeBeforeStoppingEmptyServer int64 `json:"TimeBeforeStoppingEmptyServer"` SuspendAllow bool `json:"SuspendAllow"` // specify if msh should suspend java server process SuspendRefresh int `json:"SuspendRefresh"` // specify if msh should refresh java server process suspension and every how many seconds