Skip to content

Commit 48fa010

Browse files
Add hosting domain blacklist (#4618)
* Add hosting domain blacklist * Add info about shared domains in wiki --------- Co-authored-by: Colin McDonald <colin@moonsworth.com>
1 parent b4a5cc1 commit 48fa010

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

.scripts/validate.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@
3636
"docs",
3737
]
3838

39+
HOSTING_DOMAIN_BLACKLIST = [
40+
# https://apexminecrafthosting.com/
41+
"mc.gg",
42+
"apexmc.co",
43+
# https://lilypad.gg/
44+
"smp.fan",
45+
"modpack.lol",
46+
"minecraft.vodka",
47+
"minecraft.horse"
48+
]
3949

4050

4151

@@ -257,6 +267,10 @@ def check_metadata(args: argparse.Namespace) -> defaultdict[str, list[str]]:
257267
continue
258268

259269
domain = get_tld(address, as_object=True, fail_silently=True, fix_protocol=True)
270+
271+
if domain is not None and domain.fld in HOSTING_DOMAIN_BLACKLIST:
272+
messages[server_id].append(f"The domain {domain.fld} belongs to a hosting provider. You must use a custom domain that you fully own (e.g. myserver.com instead of myserver.hosting.com). Please review the [documentation](https://lunarclient.dev/server-mappings/adding-servers/metadata#addresses).")
273+
260274
if domain is not None and domain.subdomain:
261275
messages[server_id].append(f"{address} does not follow the [documentation](https://lunarclient.dev/server-mappings/adding-servers/metadata). Please make sure the address is a valid domain, and does not have a subdomain.")
262276

docs/adding-servers/metadata.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { Callout } from "nextra/components";
2+
13
# Server Metadata
24

35
Each server must have a `metadata.json`, this file should follow the schema found in the root of this repository `metadata.schema.json`.
@@ -30,6 +32,11 @@ The `addresses` array in each server object is actually an array of IP suffixes.
3032

3133
The `primaryAddress` in each server object is for users to connect to your server on and is required to be resolvable. This primary address will be used to ensure that the server remains online and active. **This can (and should) include the subdomain for the server**.
3234

35+
<Callout type="warning" emoji="⚠️">
36+
Make sure that you own the root domain you want to submit. We do not support domains provided by hosting services (e.g. `myserver.host.com`). You must purchase and configure your own custom domain (e.g. `myserver.com`).
37+
</Callout>
38+
39+
3340
### Game Types
3441

3542
Game types help identify the style of games that your server will offer to player. The following are games you may include: `PvP`, `PvE`, `HCF`, `Factions`, `Minigames`, `Skyblock`, `Parkour`, `UHC`, `Hardcore`, `Survival`, `Open World`, `Prison`, `Creative`, `Roleplay`, `Adventure`, and `Pixelmon`.

0 commit comments

Comments
 (0)