diff --git a/src/en/general-development/setup/server-hosting-tutorial.md b/src/en/general-development/setup/server-hosting-tutorial.md index a3e32e18f..24b0b942c 100644 --- a/src/en/general-development/setup/server-hosting-tutorial.md +++ b/src/en/general-development/setup/server-hosting-tutorial.md @@ -306,6 +306,49 @@ name = "wizards_den_us_west" # password = "" ``` +### Privacy Policy + +```admonish failure "This is not legal advice" +This functionality and documentation is provided on a best-effort basis **only**. We intend to make it as easy as possible for server hosts to comply with legal requirements, but nothing here is a replacement for talking with a real lawyer if it comes down to it. +``` + +The launcher has the capability of presenting a privacy policy prompt when a player tries to connect to your server, if configured. This is likely desirable for all major servers. + +How it works: the game server provides three parameters that the launcher will check as early as possible in the connection handshake: + +* Link: a link to a HTTP(S) URL where your privacy policy is hosted. +* Identifier: a unique value that identifies a specific server group's privacy policy, to unambiguously distinguish it. +* Version: a unique value that identifies a version of your privacy policy, to allow recognizing changes. + +To configure this, you should configure the following three CVars in your configuration: + +```toml +[status] +privacy_policy_link = "https://example.com/privacy" +# Set this to a unique value for your server community. +# DO NOT COPY PASTE THIS. +privacy_policy_identifier = "example_server_identifier" +# This can be anything, but a date may be the most humanly meaningful. +# Change it every time you update your privacy policy! +privacy_policy_version = "2024-11-30" +``` + +#### Details + +```admonish info +This section is provided to help you best understand how the launcher interacts with your game server while this feature is enabled. +``` + +When a player first connects to your server with this system enabled, they will be prompted with a link to the privacy policy and the ability to accept or decline it. + +* If they click the link, the privacy policy linked will open in their browser. +* If they click accept, the launcher will continue with normal connection procedures (downloading resources, starting client, connecting to game server, etc...) +* If they click decline, the connection is aborted immediately. In this scenario, no further contact with your server will have happened than a single `HTTP GET` of the `/info` server API endpoint. + +If they click accept, the consent (based on identifier and version) is saved into the launcher's database and they will not be re-prompted again later. + +If you change your version parameter later, players will be prompted again by the same dialog, although with different text clearly indicating that your privacy policy has been updated since they last accepted it. + ## Troubleshooting ### Unable to advertise to hub / people cannot connect diff --git a/src/en/robust-toolbox/server-http-api.md b/src/en/robust-toolbox/server-http-api.md index f3bbbb54d..69ab9de2a 100644 --- a/src/en/robust-toolbox/server-http-api.md +++ b/src/en/robust-toolbox/server-http-api.md @@ -47,7 +47,17 @@ More detailed JSON server information that is mostly necessary when connecting t "icon": "discord", // Icon to use for this button, can be left out. See below for valid icon names. "url": "https://discord.gg/abcdef" // Link this button opens when pressed. Must be http:// or https:// } - ] + ], + // Optional, specifies information about a privacy policy that players must agree with. + "privacy_policy": { + // Link that contains the privacy policy, accessible via web browser. + "link": "https://example.com/privacy", + // An identifier that will be stored by the launcher when accepted. + // THIS SHOULD BE UNIQUE FOR EVERY SERVER COMMUNITY. DON'T JUST COPY PASTE THIS FROM SOMEBODY ELSE. + "identifier": "example", + // The "version" of the privacy policy. This should be changed if the server's privacy policy has been updated. + "version": "example" + } } ```