diff --git a/README.md b/README.md index 631c2b0..113d43e 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Features - FileMaker Admin API PKI Authentication - View and change the settings for the persistent cache (for FileMaker Server 2024) - View and change the setting for blocking new users (for FileMaker Server 2024) +- View the HTTPS tunneling setting for FileMaker Pro and FileMaker Go (for FileMaker Server 2024 (21.1)) - View and change the "Only open last opened databases" setting (for FileMaker Server 2024 (21.1)) Supported Servers diff --git a/fmcsadmin.go b/fmcsadmin.go index e97f9d8..9db4134 100644 --- a/fmcsadmin.go +++ b/fmcsadmin.go @@ -1085,6 +1085,7 @@ func (c *cli) Run(args []string) int { case "authenticatedstream", "parallelbackupenabled": case "persistcacheenabled", "syncpersistcache", "databaseserverautorestart": case "blocknewusersenabled": + case "enablehttpprotocolnetwork": case "onlyopenlastopeneddatabases": default: exitStatus = 10001 @@ -1140,6 +1141,8 @@ func (c *cli) Run(args []string) int { printOptions = append(printOptions, "databaseserverautorestart") case "blocknewusersenabled": printOptions = append(printOptions, "blocknewusersenabled") + case "enablehttpprotocolnetwork": + printOptions = append(printOptions, "enablehttpprotocolnetwork") case "onlyopenlastopeneddatabases": printOptions = append(printOptions, "onlyopenlastopeneddatabases") default: @@ -1171,6 +1174,7 @@ func (c *cli) Run(args []string) int { printOptions = append(printOptions, "blocknewusersenabled") } if !usingCloud && version >= 21.1 { + printOptions = append(printOptions, "enablehttpprotocolnetwork") printOptions = append(printOptions, "onlyopenlastopeneddatabases") } } @@ -1236,7 +1240,7 @@ func (c *cli) Run(args []string) int { } } - if option == "onlyopenlastopeneddatabases" { + if option == "enablehttpprotocolnetwork" || option == "onlyopenlastopeneddatabases" { if usingCloud { // for Claris FileMaker Cloud exitStatus = 3 @@ -4111,6 +4115,12 @@ func getServerGeneralConfigurations(urlString string, token string, printOptions } } + if option == "enablehttpprotocolnetwork" { + if version >= 21.1 { + getServerSettingAsBool(strings.Replace(urlString, "/server/config/general", "/fmclients/httpstunneling", 1), token, []string{option}) + } + } + if option == "onlyopenlastopeneddatabases" { if version >= 21.1 { if onlyOpenLastOpenedDatabases { @@ -4195,6 +4205,8 @@ func getServerSettingAsBool(urlString string, token string, printOptions []strin err = scan.ScanTree(v, "/response/parallelBackupEnabled", &enabled) } else if u.Path == path.Join(getAPIBasePath(), "server", "config", "blocknewusers") { err = scan.ScanTree(v, "/response/blockNewUsers", &enabled) + } else if u.Path == path.Join(getAPIBasePath(), "fmclients", "httpstunneling") { + err = scan.ScanTree(v, "/response/enableHTTPSTunneling", &enabled) } enabledStr = "false" @@ -4214,6 +4226,8 @@ func getServerSettingAsBool(urlString string, token string, printOptions []strin fmt.Println("ParallelBackupEnabled = " + enabledStr + " [default: false] ") case "blocknewusersenabled": fmt.Println("BlockNewUsersEnabled = " + enabledStr + " [default: false] ") + case "enablehttpprotocolnetwork": + fmt.Println("EnableHttpProtocolNetwork = " + enabledStr + " [default: false] ") case "onlyopenlastopeneddatabases": fmt.Println("OnlyOpenLastOpenedDatabases = " + enabledStr + " [default: false] ") default: diff --git a/fmcsadmin_test.go b/fmcsadmin_test.go index 70ec4fb..ce5a939 100644 --- a/fmcsadmin_test.go +++ b/fmcsadmin_test.go @@ -1164,6 +1164,7 @@ func TestGetFlags(t *testing.T) { * fmcsadmin get serverprefs SyncPersistCache * fmcsadmin get serverprefs DatabaseServerAutoRestart * fmcsadmin get serverprefs BlockNewUsersEnabled + * fmcsadmin get serverprefs EnableHttpProtocolNetwork * fmcsadmin get serverprefs OnlyOpenLastOpenedDatabases * fmcsadmin --fqdn example.jp get backuptime * fmcsadmin --fqdn example.jp -u USERNAME get backuptime diff --git a/release-notes.txt b/release-notes.txt index 53de8b7..3a10817 100644 --- a/release-notes.txt +++ b/release-notes.txt @@ -5,8 +5,9 @@ This software is distributed under the Apache License, Version 2.0, see LICENSE. Version: 2.3.0-dev (in development) - Add support for Claris FileMaker Server 2024 (21.1). - Add support for macOS Sequoia 15. -- Update "GET SERVERPREFS" command to view the "Only open last opened databases" setting for Claris FileMaker Server 2024 (21.1). (Usage: "fmcsadmin get serverprefs OnlyOpenLastOpenedDatabases") -- Update "SET SERVERPREFS" command to open only the databases that were opened when the database server was last shut down for Claris FileMaker Server 2024 (21.1). (Usage: "fmcsadmin set serverprefs OnlyOpenLastOpenedDatabases=true") +- Update "GET SERVERPREFS" command to view the "Only open last opened databases" setting. (Usage: "fmcsadmin get serverprefs OnlyOpenLastOpenedDatabases") +- Update "SET SERVERPREFS" command to open only the databases that were opened when the database server was last shut down. (Usage: "fmcsadmin set serverprefs OnlyOpenLastOpenedDatabases=true") +- Update "GET SERVERPREFS" command to get the https tunneling setting for FileMaker Pro and FileMaker Go. (Usage: "fmcsadmin get serverprefs EnableHttpProtocolNetwork") - Built with Go 1.23. - [INFO] Drop support for Claris FileMaker Server 19.6. - [INFO] Drop support for macOS Monterey 12.