Add Crowdin, introduce new provider schema, introduce NetherNet blog post (#51)

* Begin testing i18n

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Add crowdin in-context demo for non-mdx

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Add crowdin-sync system

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Working sync system for translations

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Only build en locale for PRs

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Modify yarn install

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Do not immute cache

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Try with standard yarn install

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Revert to yarn --immutable

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Remove explicit url/file-loader resolutions

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Only log webpack errors

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Added MCServerHost to hosting providers (#47)

* Added MCServerHost to hosting providers

* Update providers.ts

* Correct grammar and make instructions more concise

---------

Co-authored-by: Kas-tle <26531652+Kas-tle@users.noreply.github.com>

* Update supported Bedrock versions

* Remove and Replace "TydiumCraft Skin API" (#53)

* Update community-geyser-projects.md

I no longer will run TydiumCraft Skin API. I have no interest in continuing it at this time (or anything minecraft related). However I have switched out the spot with an API that 100% is always updated and active. Hosted by my good friend Bret06. This works so much better as well. Thanks for everything over the years guys! Tydium out!

* Update wiki/other/community-geyser-projects.md

👍

Co-authored-by: chris <github@onechris.mozmail.com>

---------

Co-authored-by: chris <github@onechris.mozmail.com>

* Update wording for creepernation api

Update wording because it’s bothering me

* Update GeyserExtras description  (#52)

* Update community-geyser-projects.md

* Update wiki/other/community-geyser-projects.md

Co-authored-by: chris <github@onechris.mozmail.com>

---------

Co-authored-by: Luke <32024335+lukeeey@users.noreply.github.com>
Co-authored-by: chris <github@onechris.mozmail.com>

* Try matrix build strategy

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Fix matrix output

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Matrix goes to GITHUB_OUTPUT

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Fix deploy needs to combine

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Ensure correct commit is used if crowdin updates

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Make sure excluded content is respected

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Allow permission for commit action write

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Sync translations with Crowdin

* Update index.md to make clear that this is for servers, not purely for clients (#57)

* Update providers.ts (#58)

* Update providers.ts

VemoxHost added

* Maintain alphabetized list

---------

Co-authored-by: Kas-tle <26531652+Kas-tle@users.noreply.github.com>

* Start on re-writing the providers page to provide more useful details to improve the setup guide

* more work on this

* Rework paper page for setup

* Don't try and build paper setup as a full page

* adjust not listed message

* update mod/proxy pages

* Initial setup i18n

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Add ability to hide proxy setup instructions by provider

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Temporary auto deployment; fix broken links

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Fix heading consistency

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Update language on provider instructions

* Update language on new provider instructions

* Upgrade actions/setup-node due to hang issue

* Both

* Forgot how many times we setup node...

* Documentation for changes in API/2.6.2 (#62)

* Document latest Geyser changes:
- remote resource packs

* Update/Finish pack docs

* small typo fixes

* Update page content

* fix build

* Update supported Bedrock version

* Add Modrinth Servers to providers (#63)

* Update supported versions & api version

* Update versions.json to include 1.21.72 (#64)

* Update bedrock version (#67)

* Add 'we are not mojang' disclaimer to footer

* Stop translations from overriding footer message

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Fix Standalone dump view (#68)

* Add OrionNodes to providers (#69)

* Update supported Bedrock versions in versions.json (1.21.81, 1.21.82) (#70)

* Update faq.mdx to include recommended API (#73)

Tydium skin API is abandoned, please direct users to a working API such as the one recommended by Tydium

Derived from: https://github.com/GeyserMC/GeyserWebsite/commit/19ae50f95ddbfc24ff34a42d278bdc263e0200e6

* Update anticheat-compatibility.md (#74)

* Update versions.json

* Update versions.json (#75)

* Remove LAC because it is no longer being maintained (#76)

* Update versions.json for 1.21.7 (#77)

* Update versions.json for 1.21.93 (#78)

* Update versions.json for 1.21.94 (#79)

* Update versions.json for Java 1.21.8 (#80)

* Update Geyser Api version (#81)

* Readd Hydraulic and add Rainbow, provide Item API V2 warning for Hydraulic (#82)

* Fix incorrect Ubuntu on Oracle Cloud instructions (#84)

* Remove Geyser Android App and Tempest (#83)

* Update version.json for 1.21.100 (#88)

* Update getting-started-with-the-api.md (#89)

* Add and update wiki pages, add Thunder download. (#90)

* Add a Thunder and Rainbow wiki page, touch up some other pages

* Fix mobile sidebar

* Address review 1/2

* Address review 1.5/2 (oops)

* Address review 2/2

Co-authored-by: chris <github@onechris.mozmail.com>

---------

Co-authored-by: chris <github@onechris.mozmail.com>

* Indicate 1.21.101 on the Geyser Website (#93)

* Added GeyserFloatingPoints to FAQ (#92)

* Added GeyserFloatingPoints.

* Update wiki/geyser/faq.mdx

Co-authored-by: chris <github@onechris.mozmail.com>

---------

Co-authored-by: chris <github@onechris.mozmail.com>

* Update versions.json to indicate support for bedrock 1.21.111

* Update versions.json for Java 1.21.9/1.21.10 (#97)

* Update versions.json for Java 1.21.9

* Update versions.json to include 1.21.10

* Update supported Bedrock version

---------

Co-authored-by: Aurorawr <auroranova8756@gmail.com>
Co-authored-by: chris <github@onechris.mozmail.com>

* Update extensions file for new dependency system (#98)

* Update extensions file for new dependency system

* Update version

* Update wiki/geyser/extensions.md

---------

Co-authored-by: chris <github@onechris.mozmail.com>

* Replace the Crowdin link with the current one (#101)

* Replace the Crowdin link with the current one

* Replace the link with the subdomain redirect

* Update versions.json to include 1.21.114 (#102)

* Update rainbow.md to indicate 1.21.9/.10 (#103)

* Revise port forwarding instructions for Ubuntu

Updated instructions for allowing Minecraft and Geyser through the OS firewall on Ubuntu.

* Update providers and deploy action

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Sync translations with Crowdin

* Correct providers syntax

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Use more templates wherever possible

* Add build cache; update docusaurus-og

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Test deploy time with cache hit

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Use read-only cache for matrix build

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Unlikely we will use gh actions on arm...

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* This time cache will hit

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Hopefully correct yarn cache path...

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Maybe npm?

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Surely...

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* This time...

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Include yarn/docusaurus cache for PRs

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Add page IDs to more pages, fix broken pages

* Update i18n pages

* Sync translations with Crowdin

* Add missing support pages and articles on providers, add Discord links

* Add blog post on preparing Geyser servers for NetherNet

Drafted with the help of Claude Opus 5.5.

* Rewrite the hosted setup guide for NetherNet, add hosting page

Provider entries now describe ports, signaling and install steps, grouped
in the order the setup guide shows them. The guide generates the NetherNet
config from them, and the old supported hosting providers list is replaced
by a hosting page for Open Collaboration supporters.

Drafted with the help of Claude Opus 5.5.

* Rewrite the self-hosted setup guides for NetherNet

The self-hosting pages now use the same steps and generated config as the
hosted guide, and point out that the Geyser port needs both TCP and UDP.

Drafted with the help of Claude Opus 5.5.

* Add HTTPS for NetherNet page

Covers serving built-in signaling over HTTPS, with a certificate in the
Geyser config or with a reverse proxy (Caddy, nginx).

Drafted with the help of Claude Opus 5.5.

* Skip Crowdin sync in deploy workflow when no token is set

Forks do not have the Crowdin secrets, so the sync step failed there and
nothing got deployed. Without a token, the workflow now builds and deploys
the pushed commit as is.

Drafted with the help of Claude Opus 5.5.

* Address: rtm's comments

* Improve layout, drop confusing 26.40 note on setup guide

* Cleanup blog post language / line breaks

* Merge proxy server guides for server hosts, adjust exarotron provider entry, adjust setup guides to work with crowdin

* Split the proxy setup guides back into Velocity and BungeeCord

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Update hosting providers to upstream and collapse strings into defaults

Port upstream's provider changes to the new format: add Minehost and
ConsulHosting, update MCServerHost, rename Feather to Dawn and Modrinth
Servers to Modrinth Hosting, merge RamShard into RackGenius, add MyArena,
and drop hosts upstream removed. Restore link fixes the rewrite undid
and install details dropped from the live page.

Replace host-specific strings with templates or the generated steps
where they say the same thing. Hosts that pick the port themselves show
where it comes from instead of the config step.

Hosts without NetherNet details that shared the Java server's port now
ask for a new port, open for both TCP and UDP, and the generated config
turns clone-remote-port off. Hosts that cannot give out a port fall back
to the "Not listed" guide for the Java server's port, which uses Warden.
BisectHosting no longer uses assumed example data. Entries keep the date
of their last edit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Remove Dawn and date Aternos and exaroton today

Dawn now integrates with Aternos, so it no longer needs its own entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Remove unused translation strings and fix the English GeyserConnect text

Drop keys the code no longer uses from every locale: the old EmoteOffhand
description ID, the theme's old unlisted content strings, strings removed
on this branch, and the removed Custom Resource Packs sidebar category.
The English GeyserConnect description had an outdated message that
overrode the current one on the English site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Hide the NetherNet and RakNet option when only the Java port is available

With only the Java server's port there is no second UDP port for RakNet,
so the "Not listed" Java port guide shows the NetherNet config without
transport tabs. Drop the placeholder text that only applied there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add an HTTPS step to the self-hosted guides and correct external signaling HTTPS claims

Self-hosted guides end with a recommended step to serve signaling over
HTTPS, since Geyser's built-in signaling uses plain HTTP by default and
players get a "Trust on First Use?" prompt. External signaling services
do not all provide HTTPS, so the blog post and HTTPS page now name Warden
as one that does instead of implying all do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Update port forwarding guide, update OVH note

* Sync translations with Crowdin

* Hide entire placeholder strings and correcntly mark chrome json in crowdin

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Update actions and yarn

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Sync translations with Crowdin

* Apply batched suggestions from code review

Co-authored-by: Eclipse <eclipse@eclipseisoffline.xyz>

* Fix NetherNet docs for the final Geyser PR

- Built-in signaling serves HTTPS instead of HTTP once a certificate is configured (blog, system properties)
- "Free port" is now "available port" in the blog
- System properties: drop the removed "none" signaling mode, fix the signaling port default
- playit.gg: note that the guide is for RakNet, and link playit.gg's NetherNet progress

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Build the setup guides from translation strings

The per-platform setup pages are replaced by SetupGuide.tsx, which renders the
hosted and self-hosted guides from shared MDXTranslatable strings, so Crowdin
translates each sentence once instead of every page separately.

Also:
- "Not listed" with only the Java port sets mode: nxs instead of relying on Geyser's fallback
- The playit.gg note links playit.gg's NetherNet progress instead of describing a setup
- "free port" is now "available port"

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Remove the trustedProxies.fetch system property for now

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix crowdin sync and don't translate trade names

Signed-off-by: GitHub <noreply@github.com>

* Sync translations with Crowdin

* Fix build

Signed-off-by: GitHub <noreply@github.com>

* Sync translations with Crowdin

* Address more concerns with nethernet https guide

Signed-off-by: GitHub <noreply@github.com>

* Fix signaling-trusted-proxies config in nethernet https article

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Remove port forwarding from the HTTPS guide

Ports are already covered by the setup guide, and HTTPS does not change
which ports need to be opened. Reverse proxies now use
signaling-trusted-proxies, which reads X-Forwarded-For.

* Remove placeholder hosts, hide the hosting page until it launches

- Remove the placeholder hosts and their logos
- Aternos and exaroton are bronze supporters: highlighted with a badge in
  the setup guide, without a "last updated" date, but not listed on the
  hosting page, which only shows gold and silver
- Hide the hosting page and its links for now, and mention in the blog
  post that it is coming soon

* Supporting hosts configure Geyser, they do not install it

* Sync translations with Crowdin

* Move nethernet https guide up on sidebar

* Update to docusaurus 3.10 and fix all type errors

Signed-off-by: GitHub <noreply@github.com>

* HTTP and HTTPS do not both run at once

* Link win-acme's and nginx's own Windows guides in the HTTPS guide

* Fix crowdin key exclusion logic

Signed-off-by: GitHub <noreply@github.com>

* Sync translations with Crowdin

* Address reviews, clear up instructions for users. Adds info on haproxy, NXS and MOTD forwarding

* Note certificate permissions and where to save the Caddyfile

* Sync translations with Crowdin

* Document the geyser nethernet command

* Sync translations with Crowdin

* Support directly linking to the "not listed" or a specific hosts' guide

* Mention warden supporting custom domains

* Add HOSTING_PROVIDERS.md, update existing server host setup entries to reduce translation strings used

* Sync translations with Crowdin

---------

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Yara Durand <87721861+Roolps@users.noreply.github.com>
Co-authored-by: chris <github@onechris.mozmail.com>
Co-authored-by: Tydium <67938521+Tydium@users.noreply.github.com>
Co-authored-by: Creeperz653 <76449952+Creeperz653@users.noreply.github.com>
Co-authored-by: LetsGoAway <68365423+letsgoawaydev@users.noreply.github.com>
Co-authored-by: Luke <32024335+lukeeey@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dan <20766261+D4n2021@users.noreply.github.com>
Co-authored-by: santevemox <57247088+santevemox@users.noreply.github.com>
Co-authored-by: rtm516 <ryantmilner@hotmail.co.uk>
Co-authored-by: Emma Alexia <wafflecoffee7@gmail.com>
Co-authored-by: Alex <zomka@fard.ing>
Co-authored-by: Aurorawr <100384210+Novampr@users.noreply.github.com>
Co-authored-by: Jens Collaert <63231928+Jens-Co@users.noreply.github.com>
Co-authored-by: OrionNodes <ethan@orionnodes.com>
Co-authored-by: SylentHuntress <91935048+sylenthuntress@users.noreply.github.com>
Co-authored-by: oryxel <gamingnoob681@gmail.com>
Co-authored-by: Eclipse <eclipse@eclipseisoffline.xyz>
Co-authored-by: Nebojsa Majic <79749977+Onako2@users.noreply.github.com>
Co-authored-by: qscbm187531 <1309635304@qq.com>
Co-authored-by: Eveline Carter <6444703+drakon64@users.noreply.github.com>
Co-authored-by: SleepyPop <81194303+SleepyPopp@users.noreply.github.com>
Co-authored-by: Aurorawr <auroranova8756@gmail.com>
Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
315 files changed
+27919 -9717

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ const useQuery = () => {
return new URLSearchParams(useLocation().search);
};
export const Collapsibles = ({ children }) => {
export const Collapsibles = ({ children }: { children: React.ReactNode }) => {
return (
<div className="collapsible">
{children}
+1 -1
View File
@@ -1,6 +1,6 @@
import React from 'react';
export const Columns = ({ children }) => {
export const Columns = ({ children }: { children: React.ReactNode }) => {
return <div className="columns">{children}</div>;
};
+7 -1
View File
@@ -1,7 +1,13 @@
import React from 'react';
import styles from './styles.module.scss';
const HeroBanner = ({ title, subheading, backgroundImage }) => {
interface HeroBannerProps {
title: React.ReactNode;
subheading: React.ReactNode;
backgroundImage: string;
}
const HeroBanner = ({ title, subheading, backgroundImage }: HeroBannerProps) => {
return (
<div
className={styles.heroBanner}
+5
View File
@@ -0,0 +1,5 @@
export const InlineCode = ({ children }: { children: React.ReactNode }) => (
<code style={{ display: 'inline' }}>
{children}
</code>
);
+331
View File
@@ -0,0 +1,331 @@
import React from 'react';
import Translate, { translate } from "@docusaurus/Translate"
import Link from '@docusaurus/Link';
import { InlineCode } from "./InlineCode";
import { Versions } from "./Versions";
const supportedVersions = <Translate id="mdx.setup.supported_versions">Supported versions</Translate>;
const code = (text: string) => <InlineCode>{text}</InlineCode>;
const bold = (node: React.ReactNode) => <strong>{node}</strong>;
export const MDXTranslatable = {
setup: {
host_provider: () => <Translate id="mdx.setup.host_provider">Host Provider</Translate>,
self_host: () => <Translate id="mdx.setup.self_host">Self Host</Translate>,
paper_spigot: () => <>Paper / Spigot</>,
modded_servers: () => <Translate id="mdx.setup.modded_servers">Modded Servers</Translate>,
fabric: () => <>Fabric</>,
neoforge: () => <>NeoForge</>,
proxy_servers: () => <Translate id="mdx.setup.proxy_servers">Proxy Servers</Translate>,
velocity: () => <>Velocity</>,
bungeecord: () => <>BungeeCord</>,
viaproxy: () => <>ViaProxy</>,
standalone: () => <Translate id="mdx.setup.standalone">Standalone</Translate>,
checking_server_version: () => <Translate id="mdx.setup.checking_server_version">Checking your server version</Translate>,
installing_geyser: () => <Translate id="mdx.setup.installing_geyser">Installing Geyser</Translate>,
download_jar: ({ jarName }: { jarName: string }) => (
<Translate id="mdx.setup.download_jar" values={{
jarName: <Link to='/download'><InlineCode>{jarName}</InlineCode></Link>
}}>
{"Download {jarName}."}
</Translate>
),
place_jar: ({ jarName, jarDirectory }: { jarName: string, jarDirectory: string }) => (
<Translate id="mdx.setup.place_jar" values={{
jarName: <InlineCode>{jarName}</InlineCode>,
jarDirectory: <InlineCode>{jarDirectory}</InlineCode>
}}>
{"Place the {jarName} in the {jarDirectory} folder."}
</Translate>
),
restart_server: () => <Translate id="mdx.setup.restart_server">Restart the server.</Translate>,
restart_geyser: () => <Translate id="mdx.setup.restart_geyser">Restart Geyser.</Translate>,
restart_velocity: () => <Translate id="mdx.setup.restart_velocity">Restart Velocity.</Translate>,
restart_bungeecord: () => <Translate id="mdx.setup.restart_bungeecord">Restart BungeeCord.</Translate>,
restart_viaproxy: () => <Translate id="mdx.setup.restart_viaproxy">Restart ViaProxy.</Translate>,
fabric_dependency: () => (
<Translate id="mdx.setup.fabric_dependency" values={{ fabricApi: <Link to='https://modrinth.com/mod/fabric-api'>Fabric API</Link> }}>
{"If it is not installed already, download {fabricApi} and place it in the same folder."}
</Translate>
),
// Platform notices and version checks
version_step_viaversion: () => (
<Translate id="mdx.setup.version_step_viaversion" values={{
version: Versions.java(),
viaVersion: <Link to='https://viaversion.com/viaversion'>ViaVersion</Link>,
supportedVersions: <Link to='/wiki/geyser/supported-versions/'>{supportedVersions}</Link>
}}>
{"If your server is not running {version}, you will need to install {viaVersion}. For more information, see {supportedVersions}."}
</Translate>
),
version_step_proxy: () => (
<Translate id="mdx.setup.version_step_proxy" values={{ version: Versions.java() }}>
{"All servers on the network must accept {version} Java clients, as Geyser imitates one."}
</Translate>
),
proxy_install_only: ({ proxy }: { proxy: string }) => (
<Translate id="mdx.setup.proxy_install_only" values={{ proxy }}>
{"Install Geyser only on the {proxy} server! You can install Floodgate on all servers for better skin support and network-wide Floodgate API availability for other plugins."}
</Translate>
),
modded_requirements: ({ jarName }: { jarName: string }) => (
<Translate id="mdx.setup.modded_requirements" values={{
jarName,
version: Versions.java(),
supportedVersions: <Link to='/wiki/geyser/supported-versions#using-geyser-on-fabric-neoforge-servers-not-on-the-latest-minecraft-version'>{supportedVersions}</Link>
}}>
{"{jarName} runs only on a {version} server, and only works alongside server-side mods. Mods that players also need to install on their client will not work. See {supportedVersions} for more details."}
</Translate>
),
// Self-hosted guides
self_port_choice: ({ platform }: { platform: string }) => (
<Translate id="mdx.setup.self_port_choice" values={{ platform }}>
{"Since you are self-hosting, you can choose the port freely; the default is 19132. Geyser uses it over both TCP and UDP, so it cannot be the port of the {platform} server."}
</Translate>
),
self_port_choice_standalone: () => (
<Translate id="mdx.setup.self_port_choice_standalone">
Since you are self-hosting, you can choose the port freely; the default is 19132. Geyser uses it over both TCP and UDP.
</Translate>
),
self_port_sharing: () => (
<Translate id="mdx.setup.self_port_sharing" values={{ important: bold(<Translate id="mdx.setup.self_port_sharing.important">Important</Translate>) }}>
{"{important}: No other program can use the Geyser port, over either protocol. This includes programs that use UDP, such as voice chat mods or Query, and programs that use TCP, such as another server, a web map, or a website."}
</Translate>
),
connect_local_title: () => <Translate id="mdx.setup.connect_local_title">Connecting from the same network</Translate>,
connect_local: () => (
<Translate id="mdx.setup.connect_local" values={{ localhost: code('localhost'), loopback: code('127.0.0.1'), ten: code('10.'), oneNineTwo: code('192.168.') }}>
{"On the same device as the server, connect with {localhost} or {loopback} as the address. Other devices in the same local network can use your local IPv4 address, which starts with {ten} or {oneNineTwo}."}
</Translate>
),
connect_lan: () => (
<Translate id="mdx.setup.connect_lan" values={{ friends: bold(<Translate id="mdx.setup.connect_lan.friends">Friends</Translate>) }}>
{"Alternatively, open Minecraft: Bedrock Edition and join the LAN server in the {friends} tab."}
</Translate>
),
connect_remote_title: () => <Translate id="mdx.setup.connect_remote_title">Connecting from a different network</Translate>,
connect_remote: () => (
<Translate id="mdx.setup.connect_remote">
To let players from outside your network join, you need to make the Geyser port reachable from the internet.
</Translate>
),
connect_tcp_udp: () => (
<Translate id="mdx.setup.connect_tcp_udp" values={{
webrtcPort: code('webrtc-port')
}}>
{"The Geyser port has to be forwarded for both TCP and UDP. Before NetherNet, forwarding UDP was enough. Now, players use TCP to find your server and UDP to play on it, so without TCP your server will not show up. If you use the \"NetherNet and RakNet\" option, also forward the {webrtcPort} for UDP."}
</Translate>
),
connect_options: () => <Translate id="mdx.setup.connect_options">You have two options:</Translate>,
connect_port_forwarding: () => (
<Translate id="mdx.setup.connect_port_forwarding" values={{
portForwarding: bold(<Translate id="mdx.setup.connect_port_forwarding.title">Port forwarding</Translate>),
guide: <Link to='/wiki/geyser/port-forwarding'><Translate id="mdx.setup.connect_port_forwarding.guide">Port forwarding</Translate></Link>
}}>
{"{portForwarding}: open the Geyser port (e.g. 19132) for both TCP and UDP in your router and in your firewall. Players then connect with your public IPv4 address and the port. For detailed steps, see {guide}."}
</Translate>
),
connect_playit: () => (
<Translate id="mdx.setup.connect_playit" values={{
playit: bold('playit.gg'),
guide: <Link to='/wiki/geyser/playit-gg'><Translate id="mdx.setup.connect_playit.guide">playit.gg Setup</Translate></Link>,
status: <Link to='https://status.playit.gg/3/adding-nethernet-support'><Translate id="mdx.setup.connect_playit.status">NetherNet support on playit.gg</Translate></Link>
}}>
{"{playit}: if you cannot open a port, or do not want to expose your home IP address, playit.gg can create a tunnel for you. See {guide}. That guide was written for RakNet. For NetherNet, see {status}. Ngrok does not work, since it does not support UDP."}
</Translate>
),
https_step_title: () => <Translate id="mdx.setup.https_step_title">Recommended: Set up HTTPS for signaling</Translate>,
https_step: () => (
<Translate id="mdx.setup.https_step" values={{
httpsGuide: <Link to='/wiki/geyser/nethernet-https'><Translate id="mdx.setup.https_step.guide">HTTPS for NetherNet</Translate></Link>,
warden: <Link to='https://warden.cloud'>Warden</Link>
}}>
{"Geyser's built-in signaling server uses plain HTTP by default, so Minecraft shows players a \"Trust on First Use?\" prompt the first time they join. To avoid this prompt, serve signaling over HTTPS, as explained in {httpsGuide}. Some external signaling services, such as {warden}, provide HTTPS as well."}
</Translate>
),
floodgate_info: () => (
<Translate id="mdx.setup.floodgate_info" values={{ floodgate: <Link to='/wiki/floodgate/setup/'>Floodgate</Link> }}>
{"To allow Bedrock Edition players to join your server without a paid Java Edition account, you can use {floodgate}."}
</Translate>
),
// ViaProxy
viaproxy_not_plugin_title: () => <Translate id="mdx.setup.viaproxy_not_plugin.title">ViaProxy is not a plugin or mod</Translate>,
viaproxy_not_plugin: () => (
<Translate id="mdx.setup.viaproxy_not_plugin" values={{
plugins: code('plugins'), mods: code('mods')
}}>
{"ViaProxy is a standalone program that runs separately from your Minecraft server. Do not put the ViaProxy jar into your server's {plugins} or {mods} folder. To run Geyser as a plugin or mod on your server instead, pick your server software in the tabs above."}
</Translate>
),
viaproxy_setup: () => (
<Translate id="mdx.setup.viaproxy_setup" values={{ viaProxy: <Link to='https://viaversion.com/viaproxy?tab=readme-ov-file#usage-for-players-gui'>ViaProxy</Link> }}>
{"Set up {viaProxy}."}
</Translate>
),
viaproxy_accounts: () => (
<Translate id="mdx.setup.viaproxy_accounts" values={{ floodgate: <Link to='/wiki/floodgate/setup'>Floodgate</Link> }}>
{"If you use the ViaProxy GUI, you can use its account management to join online mode servers with Bedrock Edition. If you use the ViaProxy CLI and want Bedrock players to join your online mode server, install and set up {floodgate}."}
</Translate>
),
viaproxy_auth_type: () => (
<Translate id="mdx.setup.viaproxy_auth_type" values={{ authType: code('auth-type') }}>
{"ViaProxy manages the {authType} setting itself, so its value in the config is ignored."}
</Translate>
),
// Geyser Standalone
standalone_java: () => (
<Translate id="mdx.setup.standalone_java">
You need Java 21 or newer to run Geyser. To run Geyser Standalone on Android, see the end of this page.
</Translate>
),
standalone_not_plugin: () => (
<Translate id="mdx.setup.standalone_not_plugin">
Geyser Standalone is not a plugin or mod. It is a separate Java program that runs alongside your Java Edition server.
</Translate>
),
standalone_download: () => (
<Translate id="mdx.setup.standalone_download" values={{ standalone: <Link to='/download'>Geyser Standalone</Link> }}>
{"Download {standalone}."}
</Translate>
),
standalone_folder: () => <Translate id="mdx.setup.standalone_folder">Create a new folder for Geyser, and put the jar in it.</Translate>,
standalone_start: () => <Translate id="mdx.setup.standalone_start">Start Geyser Standalone:</Translate>,
standalone_gui: () => (
<Translate id="mdx.setup.standalone_gui" values={{ gui: bold('GUI') }}>
{"{gui} (recommended): double-click the jar file. Geyser creates all the files it needs."}
</Translate>
),
standalone_console: () => (
<Translate id="mdx.setup.standalone_console" values={{
console: bold(<Translate id="mdx.setup.standalone_console.console">Console</Translate>),
startupScript: <Link to='/wiki/geyser/creating-a-startup-script/'><Translate id="mdx.setup.standalone_console.startup_script">Creating a Startup Script</Translate></Link>
}}>
{"{console}: create a startup script, like the one you would use for a Paper server. See {startupScript} for what to put into it. Run it, and Geyser creates all the files it needs."}
</Translate>
),
standalone_remote_intro: () => (
<Translate id="mdx.setup.standalone_remote_intro" values={{ java: code('java') }}>
{"To choose which Java Edition server Geyser Standalone sends players to, find the {java} section:"}
</Translate>
),
standalone_remote: () => (
<Translate id="mdx.setup.standalone_remote" values={{
address: code('address'), port: code('port'), authType: code('auth-type'),
floodgate: code('floodgate'), online: code('online'), offline: code('offline'),
floodgateSetup: <Link to='/wiki/floodgate/setup'><Translate id="mdx.setup.standalone_remote.floodgate_setup">Floodgate Setup</Translate></Link>
}}>
{"Change {address} to the Java server's address, or leave it as it is if the server runs on the same machine as Geyser. Then change {port} to the Java server's port. Set {authType} to {floodgate} if you set up Floodgate on the Java server, otherwise to {online} for an online mode server or {offline} for an offline mode server. To use Floodgate with Geyser Standalone, see {floodgateSetup}."}
</Translate>
),
standalone_android_title: () => <Translate id="mdx.setup.standalone_android_title">Running Geyser Standalone on Android</Translate>,
standalone_android_caution: () => (
<Translate id="mdx.setup.standalone_android_caution">
Apps such as Termux can run Geyser on Android, but how well this works depends on how powerful your device is. Do so at your own risk.
</Translate>
),
standalone_termux_install: () => (
<Translate id="mdx.setup.standalone_termux_install" values={{ termux: <Link to='https://termux.com/'>Termux</Link> }}>
{"Download and install {termux}."}
</Translate>
),
run_command: ({ command }: { command: string }) => (
<Translate id="mdx.setup.run_command" values={{ command: code(command) }}>{"Run {command}."}</Translate>
),
standalone_termux_script: () => (
<Translate id="mdx.setup.standalone_termux_script">
Alternatively, there is an automated setup script for clean Termux installs. It might not work for everyone, so try it if the steps above do not work:
</Translate>
),
https_note: () => (
<Translate id="mdx.setup.https_note" values={{ https: <Link to="/wiki/geyser/nethernet-https">HTTPS</Link> }}>
{"Unless signaling runs over {https}, Minecraft asks players whether they trust the server the first time they join."}
</Translate>
),
configuring_geyser: () => <Translate id="mdx.setup.configuring_geyser">Configuring Geyser</Translate>,
open_config_match: ({ configLocation }: { configLocation: string }) => (
<Translate id="mdx.setup.open_config_simple" values={{ configLocation: <InlineCode>{configLocation}</InlineCode>, bedrock: <InlineCode>bedrock:</InlineCode> }}>
{"Now open the file {configLocation}. Find the part that starts with {bedrock}, and change the lines shown below."}
</Translate>
),
preconfigured: ({ name }: { name: string }) => (
<Translate id="mdx.setup.preconfigured" values={{ name }}>
{"No changes needed. {name} automatically configures Geyser."}
</Translate>
),
transport_nethernet_explainer: () => (
<Translate id="mdx.setup.transport_nethernet_simple">
NetherNet is supported fully by 26.50+. If you'd like to also have working MOTD and player count for older versions, you will need to set up both NetherNet and Raknet.
</Translate>
),
transport_both_explainer: () => (
<Translate id="mdx.setup.transport_both_compat">
Also accepts RakNet, for additional compatibility: some Bedrock versions, such as 26.40, fetch the server's MOTD and player count over RakNet. This option needs a separate UDP port for NetherNet.
</Translate>
),
placeholder: () => <Translate id="mdx.setup.placeholder_word">Replace this</Translate>,
replace_with: () => <Translate id="mdx.setup.replace_with_simple">With this</Translate>,
placeholder_java_port: () => <Translate id="mdx.setup.placeholder_java_port">The port of the Java server.</Translate>,
placeholder_java_port_udp: () => (
<Translate id="mdx.setup.placeholder_java_port_udp" values={{ port: <InlineCode>port</InlineCode> }}>
{"A UDP port for NetherNet, other than {port}. This can be the Java server's port: the Java server only uses it over TCP, so Geyser can use it over UDP. Any other available UDP port works too."}
</Translate>
),
placeholder_second_available_port: () => (
<Translate id="mdx.setup.placeholder_second_available_port" values={{ port: <InlineCode>port</InlineCode> }}>
{"An available UDP port for NetherNet, other than {port}. Open it for UDP."}
</Translate>
),
raknet_on_port: () => (
<Translate id="mdx.setup.raknet_on_port" values={{ port: <InlineCode>port</InlineCode> }}>
{"RakNet uses {port} over UDP, so that port has to be open for UDP as well."}
</Translate>
),
summary_nethernet_reported: () => <Translate id="mdx.setup.summary.nethernet_reported_generic">Reported to work with NetherNet</Translate>,
summary_supporter_configures: ({ name }: { name: string }) => (
<Translate id="mdx.setup.summary.supporter_configures" values={{ name }}>{"{name} configures Geyser for you automatically, including NetherNet."}</Translate>
),
summary_updated: ({ date }: { date: string }) => (
<Translate id="mdx.setup.summary.updated" values={{ date }}>{"Instructions last updated on {date}"}</Translate>
),
badge_gold: () => <Translate id="mdx.setup.badge.gold">Gold supporter</Translate>,
badge_silver: () => <Translate id="mdx.setup.badge.silver">Silver supporter</Translate>,
badge_bronze: () => <Translate id="mdx.setup.badge.bronze">Bronze supporter</Translate>,
unconfirmed_title: () => <Translate id="mdx.setup.unconfirmed_title">Not checked for NetherNet yet</Translate>,
warning_title: () => <Translate id="mdx.setup.warning_title">Warning</Translate>,
unconfirmed: ({ name }: { name: string }) => (
<Translate id="mdx.setup.unconfirmed_reach_out_update" values={{ name, discord: <Link to="https://discord.gg/geysermc">Discord</Link> }}>
{"These instructions have not been checked for NetherNet yet. If Bedrock players can't join, reach out to {name} to get instructions on how to use Geyser, and let us know on {discord} so we can update this guide."}
</Translate>
),
try_not_listed: ({ link }: { link: string }) => (
<Translate id="mdx.setup.try_not_listed" values={{
notListed: <a href={link}><Translate id="mdx.setup.try_not_listed.link">"Not listed" guide for using only the Java server's port</Translate></a>,
warden: <Link to="https://warden.cloud">Warden</Link>
}}>
{"If your host cannot give you a separate port, follow the {notListed} instead. Players then join through {warden}, an external signaling service."}
</Translate>
),
no_signaling: ({ name }: { name: string }) => (
<Translate id="mdx.setup.no_signaling" values={{ name }}>
{"{name} supports neither built-in nor external signaling, so Bedrock players cannot connect over NetherNet."}
</Translate>
),
additional_steps: () => <Translate id="mdx.setup.additional_steps">Additional Steps</Translate>,
connecting_on_bedrock: () => <Translate id="mdx.setup.connecting_on_bedrock">Connecting on Bedrock</Translate>,
hosting_provider_article: () => <Translate id="mdx.setup.hosting_provider_article_short">Host's Geyser guide</Translate>,
hosting_provider_website: () => <Translate id="mdx.setup.hosting_provider_website_short">Website</Translate>,
hosting_provider_support: () => <Translate id="mdx.setup.hosting_provider_support_short">Support</Translate>,
hosting_provider_discord: () => <>Discord</>,
}
}
+9 -1
View File
@@ -1,6 +1,14 @@
import React from 'react';
const PlatformIcon = ({ img = null, svg: SvgComponent = null, text="", width = '20px', height = '20px' }) => {
type PlatformIconProps = {
img?: string | null;
svg?: React.ComponentType<React.SVGProps<SVGSVGElement>> | null;
text: string;
width?: string;
height?: string;
};
const PlatformIcon = ({ img = null, svg: SvgComponent = null, text="", width = '20px', height = '20px' }: PlatformIconProps) => {
return (
img != null ?
<>
+1 -1
View File
@@ -135,7 +135,7 @@ export const ProjectDownload: React.FC<ProjectDownloadProps> = ({ projectId, des
);
};
function LinkedCommitMessage({ message, repo }) {
function LinkedCommitMessage({ message, repo }: { message: string, repo: string }) {
const regex = /#(\d+)/g;
const parts = message.split(/(#\d+)/).filter((part: string) => part);
+207
View File
@@ -0,0 +1,207 @@
$gold: #d4af37;
$silver: #a8a9ad;
$bronze: #cd7f32;
.summary {
margin: 1rem 0;
padding: 0.5rem 0.75rem;
border: 1px solid var(--ifm-color-emphasis-300);
border-radius: var(--ifm-global-radius);
font-size: 0.875rem;
// Supporting hosts get the tier color on the whole border, like their cards on the hosting page
&.gold {
border: 2px solid $gold;
}
&.silver {
border: 2px solid $silver;
}
&.bronze {
border: 2px solid $bronze;
}
}
.summaryRow {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.25rem 0.5rem;
}
.summaryName {
font-size: 1rem;
}
// Logos sit on a dark plate in both themes, like on the hosting page
.summaryLogo {
display: flex;
align-items: center;
height: 1.5rem;
padding: 0.15rem 0.3rem;
border-radius: 0.25rem;
background-color: #1b1b1d;
img {
height: 100%;
width: auto;
}
}
.tierBadge {
color: #1c1e21;
&:hover {
color: #1c1e21;
text-decoration: none;
}
&.gold {
background-color: $gold;
}
&.silver {
background-color: $silver;
}
&.bronze {
background-color: $bronze;
}
}
// Link buttons below the description, in the site's primary green
.summaryLinks {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 0.75rem;
:global(.button) {
display: inline-flex;
align-items: center;
gap: 0.4rem;
}
}
.summaryMeta {
margin-top: 0.25rem;
color: var(--ifm-color-emphasis-700);
}
.hostNote {
font-size: 0.875rem;
color: var(--ifm-color-emphasis-700);
p:last-child {
margin-bottom: 0;
}
}
// Numbered steps with a line connecting them
.steps {
list-style: none;
counter-reset: step;
padding-left: 0;
margin: 2rem 0;
}
.step {
counter-increment: step;
position: relative;
padding-left: 3rem;
padding-bottom: 1.5rem;
&::before {
content: counter(step);
position: absolute;
left: 0;
top: 0;
width: 2rem;
height: 2rem;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: var(--ifm-font-weight-bold);
color: var(--ifm-color-white);
background-color: var(--ifm-color-primary);
}
&:not(:last-child)::after {
content: '';
position: absolute;
left: calc(1rem - 1px);
top: 2.25rem;
bottom: 0.25rem;
width: 2px;
background-color: var(--ifm-color-emphasis-300);
}
}
// Step titles are h4 headings (see Step), shown at h3 size
.stepTitle {
margin: 0.2rem 0 0.75rem;
font-size: var(--ifm-h3-font-size);
}
.stepBody {
> :last-child {
margin-bottom: 0;
}
}
.transportExplainer {
color: var(--ifm-color-emphasis-700);
}
.placeholders {
display: table;
width: 100%;
td:first-child {
white-space: nowrap;
}
}
// Readable status pills (the default warning badge has too little contrast)
.pill {
display: inline-block;
padding: 0.1rem 0.55rem;
border-radius: 999px;
font-size: 0.8rem;
font-weight: var(--ifm-font-weight-semibold);
line-height: 1.5;
white-space: nowrap;
}
// A mock of Bedrock's "Add Server" screen
.addServer {
max-width: 22rem;
padding: 0.75rem 1rem 1rem;
border: 2px solid #1e1e1f;
background-color: #48494a;
color: #fff;
font-family: var(--ifm-font-family-base);
box-shadow: inset 0 -4px 0 #313233;
label {
display: block;
margin-top: 0.5rem;
font-size: 0.8rem;
color: #d0d1d4;
}
}
.addServerTitle {
text-align: center;
font-weight: var(--ifm-font-weight-bold);
}
.addServerField {
margin-top: 0.2rem;
padding: 0.35rem 0.6rem;
border: 2px solid #1e1e1f;
background-color: #313233;
font-size: 0.9rem;
}
+625 -70
View File
@@ -1,89 +1,644 @@
import type { HostingProvider, ProviderType } from "@site/src/types/providers";
import ReactMarkdown from "react-markdown";
import Admonition from '@theme/Admonition';
import React, { useState } from 'react';
import type { GeyserConfig, HostingProvider, OpenCollaborationTier, PortSource } from "@site/src/types/providers";
import React, { createContext, useContext, useEffect, useRef, useState } from 'react';
import Translate, { translate } from "@docusaurus/Translate";
import { providersData } from "../data/providers";
import Admonition from '@theme/Admonition';
import { MDXTranslatable } from "./MDXTranslatable";
import ReactMarkdown from 'react-markdown';
import Link from '@docusaurus/Link';
import Heading from '@theme/Heading';
import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import clsx from 'clsx';
import styles from './Provider.module.scss';
import useBaseUrl from '@docusaurus/useBaseUrl';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import { useHistory, useLocation } from '@docusaurus/router';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faBook, faGlobe, faHeadset } from '@fortawesome/free-solid-svg-icons';
import { faDiscord } from '@fortawesome/free-brands-svg-icons';
export const noP = (props: { children: any; }) => {
export const noP = (props: { children?: any; }) => {
const { children } = props;
return children;
}
export const Provider = ({ type }) => {
const hostingProviders: HostingProvider[] = providersData[type as ProviderType]
return (
<table>
<thead>
<tr>
<th>Provider</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{hostingProviders.map((provider: HostingProvider) => (
<tr>
<td>
<a href={provider.url}>{provider.name}</a>
</td>
<td>
{provider.description != null ? (
<ReactMarkdown children={provider.description} components={{ p: noP }} />
) : (
''
)}
</td>
</tr>
))}
</tbody>
</table>
)
// Ports for hosts we have no notes on. The setup guide offers both, as tabs.
const notListedPorts: Record<'allocated' | 'javaOnly', HostingProvider['config']> = {
// One allocated port, open for both TCP and UDP, used for signaling and gameplay
allocated: {
udp: {
obtain: translate({
id: 'providers.provider.not_listed.allocate_port',
message: "Allocate a port in your server panel, open for both TCP and UDP."
})
},
builtin_signaling: 'same_as_udp'
},
// Only the Java server port: gameplay shares it over UDP, and players find the server through external signaling
javaOnly: {
udp: 'java'
}
}
export const ProviderSelector = () => {
const providers: HostingProvider[] = [
...Object.values(providersData.built_in),
...Object.values(providersData.support),
...Object.values(providersData.no_support)
].flat().sort((a, b) => a.name.localeCompare(b.name));
providers.unshift({
name: 'Not listed',
description: translate({
id: 'providers.provider.not_listed.description',
message: "If your hosting provider is not listed, try enabling the `clone-remote-port` option in the config. Then, restart the server, and try connecting with the same IP and port as on Java Edition. <br> If this does not work, ask your server hosting provider for a UDP port, and use that. For VPS/KVM servers please follow the self-hosting steps."
const notListed: HostingProvider = {
name: 'Not listed',
url: null,
config: { ...notListedPorts.allocated, confirmed: false },
notices: {
info: translate({
id: 'providers.provider.not_listed.info',
message: "For VPS/KVM servers, please follow the self-hosting steps."
})
} as HostingProvider);
const [selectedProvider, setSelectedProvider] = useState(null);
const handleSelectionChange = (event) => {
const selectedName = event.target.value;
const provider = providers.find(p => p.name === selectedName);
setSelectedProvider(provider);
}
}
// The two "Not listed" options, shown as tabs that switch together in the config and connect steps
const notListedVariants = [
{
value: 'allocated',
label: translate({ id: 'mdx.setup.not_listed.tab_allocated', message: 'I can allocate ports' }),
provider: { ...notListed, config: notListedPorts.allocated }
},
{
value: 'java-only',
label: translate({ id: 'mdx.setup.not_listed.tab_java_only', message: 'I only have the Java server port' }),
provider: { ...notListed, config: notListedPorts.javaOnly }
}
];
// What a self-hosted server looks like to the config builder: one port, open for both TCP and UDP
const selfHosted: HostingProvider = {
name: 'Self-hosted',
url: null,
config: { udp: 19132, builtin_signaling: 'same_as_udp' }
}
// Open Collaboration tiers that are highlighted in the setup guide, highest first
export const highlightedTiers: OpenCollaborationTier[] = ['gold', 'silver', 'bronze'];
// Tiers that get an entry on the hosting page
export const hostingPageTiers: OpenCollaborationTier[] = ['gold', 'silver'];
export const isHighlighted = (provider: HostingProvider) =>
provider.open_collaboration?.tier ? highlightedTiers.includes(provider.open_collaboration.tier) : false;
const byName = (a: HostingProvider, b: HostingProvider) => a.name.localeCompare(b.name);
const byTierThenName = (a: HostingProvider, b: HostingProvider) => {
const tierA = a.open_collaboration?.tier;
const tierB = b.open_collaboration?.tier;
const indexA = tierA ? highlightedTiers.indexOf(tierA) : Infinity;
const indexB = tierB ? highlightedTiers.indexOf(tierB) : Infinity;
return indexA - indexB || byName(a, b);
};
export const openCollaborationProviders: HostingProvider[] = providersData.filter(isHighlighted).sort(byTierThenName);
const otherProviders: HostingProvider[] = providersData.filter(p => !isHighlighted(p)).sort(byName);
// Whether the host configures Geyser itself. A type guard, so the other branch knows the config has ports.
export const isPreconfigured = (config: GeyserConfig): config is Extract<GeyserConfig, { preconfigured: true }> => config.preconfigured === true;
// NetherNet details count as confirmed unless the host is marked with `confirmed: false`
export const isConfirmed = (provider: HostingProvider) => provider.config.confirmed !== false;
// Links to the setup guide with a provider selected
export const providerSetupLink = (provider: HostingProvider) => `/wiki/geyser/setup/?host=provider&provider=${encodeURIComponent(provider.name)}`;
interface ProviderSelectorProps {
setProvider: (provider: HostingProvider | null) => void;
}
export const ProviderSelector = ({ setProvider }: ProviderSelectorProps) => {
const providers: HostingProvider[] = [notListed, ...openCollaborationProviders, ...otherProviders];
const [selectedProvider, setSelectedProvider] = useState<HostingProvider | null>(null);
const history = useHistory();
const location = useLocation();
const select = (name: string) => {
const provider = providers.find(p => p.name.toLowerCase() === name.toLowerCase()) ?? null;
setSelectedProvider(provider);
setProvider(provider);
}
// The "Not listed" ports tab, kept while the self host tab is open so it can be restored
const hiddenPorts = useRef<string | null>(null);
// Keep the selected host in the URL, so the guide for a host can be linked
const linkProvider = (name: string | null, ports: string | null = null) => {
const params = new URLSearchParams(location.search);
// Only the "Not listed" guide uses the ports tabs
if (name !== notListed.name) {
params.delete('ports');
} else if (ports) {
params.set('ports', ports);
}
if (name === null) {
params.delete('provider');
} else {
params.set('host', 'provider');
params.set('provider', name);
}
const query = params.toString();
history.replace({ search: query ? `?${query}` : '', hash: location.hash });
}
const selectAndLink = (name: string) => {
select(name);
linkProvider(name === 'none' ? null : name);
}
useEffect(() => {
const name = new URLSearchParams(location.search).get('provider');
if (name) {
select(name);
}
}, []);
// The host only belongs in the URL while the hosting provider tab is open
useEffect(() => {
const params = new URLSearchParams(location.search);
const onProviderTab = (params.get('host') ?? 'provider') === 'provider';
if (!onProviderTab && params.has('provider')) {
hiddenPorts.current = params.get('ports');
linkProvider(null);
} else if (onProviderTab && selectedProvider && !params.has('provider')) {
linkProvider(selectedProvider.name, hiddenPorts.current);
hiddenPorts.current = null;
}
}, [location.search]);
const option = (provider: HostingProvider) => (
<option key={provider.name} value={provider.name}>
{provider.name}
</option>
);
return (
<div className="host-select">
<select onChange={handleSelectionChange}>
<select value={selectedProvider?.name ?? 'none'} onChange={event => selectAndLink(event.target.value)}>
<option value="none">Select a provider</option>
{providers.map((provider) => (
<option key={provider.name} value={provider.name}>
{provider.name}
</option>
))}
</select>
<Admonition type="tip" title={<Translate id='components.provider.instructions'>Provider Instructions</Translate>}>
{selectedProvider ? (
<ReactMarkdown>{selectedProvider.description}</ReactMarkdown>
) : (
<p>
<Translate id='components.provider.select'>Select a provider to see specific installation instructions</Translate>
</p>
{option(notListed)}
{openCollaborationProviders.length > 0 && (
<optgroup label={translate({ id: 'components.provider.open_collaboration_group', message: "Hosts that support Geyser's development" })}>
{openCollaborationProviders.map(option)}
</optgroup>
)}
</Admonition>
<optgroup label={translate({ id: 'components.provider.other_group', message: 'Other providers' })}>
{otherProviders.map(option)}
</optgroup>
</select>
</div>
);
}
/**
* Picks the signaling setup for a provider: built-in signaling when the host gives Geyser a TCP port, external signaling otherwise.
*/
const signalingSetup = (provider: HostingProvider) => {
const { config } = provider;
if (isPreconfigured(config)) {
// The host runs signaling itself; players connect with the port it gives them.
return { builtin: false, external: true, separateTcp: false, bedrockPort: config.port };
}
const { udp, builtin_signaling, external_signaling } = config;
const builtin = builtin_signaling !== undefined;
const external = external_signaling !== false;
// The TCP port built-in signaling uses is the Bedrock `port`, so it is also the port players connect with.
// Without built-in signaling, `port` is only used as the UDP port.
const separateTcp = builtin && builtin_signaling !== 'same_as_udp';
const bedrockPort: PortSource = separateTcp ? builtin_signaling as PortSource : udp;
return { builtin, external, separateTcp, bedrockPort };
}
type Transport = 'nethernet' | 'both';
type ConfigNote = {
placeholder?: string; // shown in the placeholder column; notes without one are shown below the table
text: React.ReactNode;
}
/**
* Builds the `bedrock` section of the Geyser config for a provider, and the notes explaining its placeholders.
*/
const buildConfig = (provider: HostingProvider, transport: Transport, selfHost: boolean) => {
const { config } = provider;
if (isPreconfigured(config)) {
throw new Error(`${provider.name} is preconfigured, so it has no config to build`);
}
const { udp, external_signaling, notes: configNotes = [] } = config;
const { builtin, separateTcp, bedrockPort } = signalingSetup(provider);
const lines = ['bedrock:'];
const notes: ConfigNote[] = [];
const portValue = (source: PortSource, placeholder: string): string => {
if (source === 'java') {
notes.push({ placeholder, text: <MDXTranslatable.setup.placeholder_java_port /> });
return placeholder;
}
if (typeof source === 'number') {
return String(source);
}
notes.push({ placeholder, text: <ReactMarkdown components={{ p: noP }}>{source.obtain}</ReactMarkdown> });
return placeholder;
}
if (bedrockPort === 'java') {
lines.push(' clone-remote-port: true');
} else {
// Many hosts used to preset clone-remote-port, which makes Geyser ignore `port`
if (!selfHost) {
lines.push(' clone-remote-port: false');
}
lines.push(` port: ${portValue(bedrockPort, separateTcp ? 'TCP_PORT' : 'TCP_UDP_PORT')}`);
}
if (separateTcp) {
lines.push(` webrtc-port: ${portValue(udp, 'UDP_PORT')}`);
if (transport === 'both') {
notes.push({ text: <MDXTranslatable.setup.raknet_on_port /> });
}
} else if (transport === 'both' && !selfHost) {
// RakNet stays on `port`. The Java server only uses its port over TCP, so NetherNet can use it over UDP
// without the user having to get another port.
lines.push(' webrtc-port: UDP_PORT');
notes.push({ placeholder: 'UDP_PORT', text: <MDXTranslatable.setup.placeholder_java_port_udp /> });
} else if (transport === 'both') {
lines.push(' webrtc-port: UDP_PORT');
notes.push({ placeholder: 'UDP_PORT', text: <MDXTranslatable.setup.placeholder_second_available_port /> });
}
lines.push(` transport: ${transport}`);
// Built-in signaling is the default, so the signaling section only needs changes for hosts that confirmed something else.
// Sharing the Java server's port always ends up on external signaling, so say so instead of relying on Geyser's fallback.
if ((isConfirmed(provider) || udp === 'java') && !builtin) {
lines.push(' signaling:', ' mode: nxs');
if (external_signaling) {
lines.push(' nxs:', ` endpoint: ${external_signaling.endpoint}`);
if (external_signaling.token_instruction) {
lines.push(' token: YOUR_TOKEN');
notes.push({ placeholder: 'YOUR_TOKEN', text: <ReactMarkdown components={{ p: noP }}>{external_signaling.token_instruction}</ReactMarkdown> });
}
}
}
for (const note of configNotes) {
notes.push({ text: <ReactMarkdown components={{ p: noP }}>{note}</ReactMarkdown> });
}
return { yaml: lines.join('\n'), notes };
}
const ConfigSnippet = ({ provider, transport, configLocation, selfHost, explain = true }: { provider: HostingProvider, transport: Transport, configLocation: string, selfHost: boolean, explain?: boolean }) => {
const { yaml, notes } = buildConfig(provider, transport, selfHost);
const placeholders = notes.filter(note => note.placeholder);
const others = notes.filter(note => !note.placeholder);
return (
<>
{explain && (
<p className={styles.transportExplainer}>
{transport === 'nethernet' && <MDXTranslatable.setup.transport_nethernet_explainer />}
{transport === 'both' && <MDXTranslatable.setup.transport_both_explainer />}
</p>
)}
<CodeBlock language="yaml" title={configLocation}>{yaml}</CodeBlock>
{placeholders.length > 0 && (
<table className={styles.placeholders}>
<thead>
<tr>
<th><MDXTranslatable.setup.placeholder /></th>
<th><MDXTranslatable.setup.replace_with /></th>
</tr>
</thead>
<tbody>
{placeholders.map(note => (
<tr key={note.placeholder}>
<td><code>{note.placeholder}</code></td>
<td>{note.text}</td>
</tr>
))}
</tbody>
</table>
)}
{others.map((note, i) => <p key={i}>{note.text}</p>)}
</>
);
}
const ConnectInstructions = ({ provider }: { provider: HostingProvider }) => {
if (provider.connect) {
return <ReactMarkdown>{provider.connect}</ReactMarkdown>;
}
const { bedrockPort } = signalingSetup(provider);
const preconfigured = isPreconfigured(provider.config);
// Sharing the Java server's port leaves no TCP port for built-in signaling, so Geyser switches to external signaling,
// which gives the server its own address. Hosts that configure Geyser themselves may run signaling another way.
if (bedrockPort === 'java' && !preconfigured) {
return (
<p>
<Translate id="providers.provider.not_listed.java_only_connect" values={{ warden: <Link to="https://warden.cloud">Warden</Link> }}>
{"Players do not connect with the Java server's address. After Geyser starts, it shows the address and port to use in the console, provided by the external signaling service ({warden} by default). Share these with your players."}
</Translate>
</p>
);
}
let port: React.ReactNode;
if (bedrockPort === 'java') {
port = <Translate id="mdx.setup.connect.port_java">Your Java server's port</Translate>;
} else if (typeof bedrockPort === 'number') {
port = String(bedrockPort);
} else if (preconfigured) {
// There is no config step to refer to, so show where the port comes from
port = <ReactMarkdown components={{ p: noP }}>{bedrockPort.obtain}</ReactMarkdown>;
} else {
port = <Translate id="mdx.setup.connect.port_config_step">The port you set in "Configuring Geyser"</Translate>;
}
return (
<>
<p>
<Translate id="mdx.setup.connect.intro">
In Minecraft: Bedrock Edition, go to Play, then Servers, and select Add Server. Fill it in like this:
</Translate>
</p>
<div className={styles.addServer} aria-hidden="true">
<div className={styles.addServerTitle}><Translate id="mdx.setup.connect.add_server">Add Server</Translate></div>
<label><Translate id="mdx.setup.connect.server_name">Server Name</Translate></label>
<div className={styles.addServerField}><Translate id="mdx.setup.connect.server_name_value">Anything you like</Translate></div>
<label><Translate id="mdx.setup.connect.server_address">Server Address</Translate></label>
<div className={styles.addServerField}><Translate id="mdx.setup.connect.server_address_value">Your Java server's address</Translate></div>
<label><Translate id="mdx.setup.connect.port">Port</Translate></label>
<div className={styles.addServerField}>{port}</div>
</div>
</>
);
}
const tierBadges: Record<OpenCollaborationTier, React.ReactNode> = {
gold: <MDXTranslatable.setup.badge_gold />,
silver: <MDXTranslatable.setup.badge_silver />,
bronze: <MDXTranslatable.setup.badge_bronze />,
};
/**
* A compact bar at the top of the guide: who the host is, and what it supports.
*/
const HostSummary = ({ provider }: { provider: HostingProvider }) => {
const { i18n } = useDocusaurusContext();
const confirmed = isConfirmed(provider);
const tier = isHighlighted(provider) ? provider.open_collaboration?.tier : null;
const logo = useBaseUrl(provider.open_collaboration?.logo ?? '');
// The host's own guide is the main action, so it is the filled button
const links = [
provider.links?.article ? { to: provider.links.article, icon: faBook, primary: true, label: <MDXTranslatable.setup.hosting_provider_article /> } : undefined,
provider.url ? { to: provider.url, icon: faGlobe, label: <MDXTranslatable.setup.hosting_provider_website /> } : undefined,
provider.links?.support ? { to: provider.links.support, icon: faHeadset, label: <MDXTranslatable.setup.hosting_provider_support /> } : undefined,
provider.links?.discord ? { to: provider.links.discord, icon: faDiscord, label: <MDXTranslatable.setup.hosting_provider_discord /> } : undefined,
].filter((link): link is NonNullable<typeof link> => link !== undefined);
// The provider list is crowd-sourced, so this is worded as a report rather than a guarantee
const reported = confirmed && <MDXTranslatable.setup.summary_nethernet_reported />;
// Dates are stored as YYYY-MM-DD; format them in UTC so they do not shift by a day in other time zones
const updated = provider.updated && new Date(`${provider.updated}T00:00:00Z`)
.toLocaleDateString(i18n.currentLocale, { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC' });
return (
<div className={clsx(styles.summary, tier && styles[tier])}>
<div className={styles.summaryRow}>
{tier && provider.open_collaboration?.logo && (
<span className={styles.summaryLogo}><img src={logo} alt="" /></span>
)}
<strong className={styles.summaryName}>{provider.name}</strong>
{/* TODO: link the badge to /hosting again once the hosting page launches */}
{tier && (
<span className={clsx(styles.pill, styles.tierBadge, styles[tier])}>
{tierBadges[tier]}
</span>
)}
</div>
{tier ? (
// Supporting hosts configure Geyser for their users, so the crowd-sourced details do not apply
<div className={styles.summaryMeta}>
<MDXTranslatable.setup.summary_supporter_configures name={provider.name} />
</div>
) : (updated || reported) && (
<div className={styles.summaryMeta}>
{updated && <MDXTranslatable.setup.summary_updated date={updated} />}
{updated && reported && ' · '}
{reported}
</div>
)}
<div className={styles.summaryLinks}>
{links.map(link => (
<Link
key={link?.to}
to={link?.to}
className={clsx('button button--sm button--primary', !link?.primary && 'button--outline')}
>
<FontAwesomeIcon icon={link?.icon} fixedWidth />
{link?.label}
</Link>
))}
</div>
</div>
);
}
/**
* Shown first, above the host summary: the steps below may not work if NetherNet is not confirmed for this host.
*/
const UnconfirmedNotice = ({ provider }: { provider: HostingProvider }) => {
// The fallback is "Not listed" with only the Java server's port, which uses external signaling (Warden).
// Keep the platform the user is on.
const platform = new URLSearchParams(useLocation().search).get('platform');
const notListedLink = useBaseUrl(`${providerSetupLink(notListed)}&ports=java-only${platform ? `&platform=${encodeURIComponent(platform)}` : ''}`);
// "Not listed" has no instructions to check, so it gets no notice; its steps cover both options instead
if (isConfirmed(provider) || provider === notListed) {
return null;
}
return (
<Admonition type="caution" title={<MDXTranslatable.setup.unconfirmed_title />}>
<p>
<MDXTranslatable.setup.unconfirmed name={provider.name} />
</p>
{/* A plain link, so the page reloads and the selector picks up the provider from the URL */}
<p><MDXTranslatable.setup.try_not_listed link={notListedLink} /></p>
</Admonition>
);
}
/**
* Host-specific warnings, shown below the host summary with the platform notices.
*/
const HostNotice = ({ provider }: { provider: HostingProvider }) => {
const { builtin, external } = signalingSetup(provider);
if (!builtin && !external) {
return (
<Admonition type="danger">
<MDXTranslatable.setup.no_signaling name={provider.name} />
</Admonition>
);
}
const warn = provider.notices?.warn;
if (!warn) {
return null;
}
return (
<Admonition type="caution" title={<MDXTranslatable.setup.warning_title />}>
<ReactMarkdown>{warn}</ReactMarkdown>
</Admonition>
);
}
// Numbered setup steps, shared by the hosted provider and self-hosted guides
export const SetupSteps = ({ children }: { children: React.ReactNode }) => (
<ol className={styles.steps}>{children}</ol>
);
// Level 4 keeps step titles out of the table of contents, which only lists levels 2 and 3
export const Step = ({ title, id, children }: { title: React.ReactNode, id: string, children: React.ReactNode }) => (
<li className={styles.step}>
<Heading as="h4" id={id} className={styles.stepTitle}>{title}</Heading>
<div className={styles.stepBody}>{children}</div>
</li>
);
/**
* The config changes for a server, with a tab for NetherNet only and one that also accepts RakNet.
*/
const ConfigTabs = ({ provider, configLocation, selfHost = false, standalone = false }: { provider: HostingProvider, configLocation: string, selfHost?: boolean, standalone?: boolean }) => {
// With only the Java server's port, there is no second UDP port for RakNet, so only NetherNet is possible
if (!isPreconfigured(provider.config) && provider.config.udp === 'java') {
return (
<>
<p><MDXTranslatable.setup.open_config_match configLocation={configLocation} /></p>
<ConfigSnippet provider={provider} transport="nethernet" configLocation={configLocation} selfHost={selfHost} explain={false} />
<p>{standalone ? <MDXTranslatable.setup.restart_geyser /> : <MDXTranslatable.setup.restart_server />}</p>
</>
);
}
return (
<>
<p><MDXTranslatable.setup.open_config_match configLocation={configLocation} /></p>
<Tabs groupId="geyser-transport">
<TabItem value="nethernet" label={translate({ id: 'mdx.setup.transport_nethernet_tab', message: 'NetherNet' })} default>
<ConfigSnippet provider={provider} transport="nethernet" configLocation={configLocation} selfHost={selfHost} />
</TabItem>
<TabItem value="both" label={translate({ id: 'mdx.setup.transport_both_tab', message: 'NetherNet and RakNet' })}>
<ConfigSnippet provider={provider} transport="both" configLocation={configLocation} selfHost={selfHost} />
</TabItem>
</Tabs>
<p>{standalone ? <MDXTranslatable.setup.restart_geyser /> : <MDXTranslatable.setup.restart_server />}</p>
</>
);
}
// The config step for self-hosted servers, for use in the self-hosting pages
export const SelfHostConfig = ({ configLocation, standalone }: { configLocation: string, standalone?: boolean }) => (
<ConfigTabs provider={selfHosted} configLocation={configLocation} selfHost standalone={standalone} />
);
const ConnectStep = ({ provider }: { provider: HostingProvider }) => (
<>
<ConnectInstructions provider={provider} />
{/* Unconfirmed hosts get the default built-in signaling, which is the one that can use HTTPS,
unless they share the Java server's port, where Geyser uses external signaling instead */}
{!isPreconfigured(provider.config) && provider.config.udp !== 'java' && (signalingSetup(provider).builtin || !isConfirmed(provider)) && (
<p><MDXTranslatable.setup.https_note /></p>
)}
</>
);
// The provider picked in the setup guide
export const SelectedProvider = createContext<HostingProvider | null>(null);
export interface ProviderGeyserSetupProps {
jarName: string;
jarDirectory: string;
configLocation: string;
notice?: React.ReactNode; // Platform notice, shown below the host summary so the host comes first
versionStep?: React.ReactNode; // Shown as the first step, e.g. which plugin older server versions need
installNote?: React.ReactNode; // An extra item in the install step, e.g. a required dependency
}
export const ProviderGeyserSetup: React.FC<ProviderGeyserSetupProps> = ({ jarName, jarDirectory, configLocation, notice, versionStep, installNote }) => {
const provider = useContext(SelectedProvider);
if (!provider) {
return null;
}
return (
<>
<UnconfirmedNotice provider={provider} />
{provider.url && <HostSummary provider={provider} />}
{notice}
<HostNotice provider={provider} />
<SetupSteps>
{versionStep && (
<Step id="checking-server-version" title={<MDXTranslatable.setup.checking_server_version />}>
<p>{versionStep}</p>
</Step>
)}
<Step id="installing-geyser" title={<MDXTranslatable.setup.installing_geyser />}>
{provider.install ? (
<ReactMarkdown>{provider.install}</ReactMarkdown>
) : (
<ul>
<li><MDXTranslatable.setup.download_jar jarName={jarName} /></li>
<li><MDXTranslatable.setup.place_jar jarName={jarName} jarDirectory={jarDirectory} /></li>
{installNote && <li>{installNote}</li>}
<li><MDXTranslatable.setup.restart_server /></li>
</ul>
)}
</Step>
<Step id="configuring-geyser" title={<MDXTranslatable.setup.configuring_geyser />}>
{provider === notListed ? (
<Tabs groupId="not-listed-ports" queryString="ports">
{notListedVariants.map((variant, i) => (
<TabItem key={variant.value} value={variant.value} label={variant.label} default={i === 0}>
<ConfigTabs provider={variant.provider} configLocation={configLocation} />
</TabItem>
))}
</Tabs>
) : provider.config.preconfigured ? (
<p><MDXTranslatable.setup.preconfigured name={provider.name} /></p>
) : (
<ConfigTabs provider={provider} configLocation={configLocation} />
)}
</Step>
{provider.extra_step && (
<Step id="additional-steps" title={<MDXTranslatable.setup.additional_steps />}>
<ReactMarkdown>{provider.extra_step}</ReactMarkdown>
</Step>
)}
<Step id="connecting-on-bedrock" title={<MDXTranslatable.setup.connecting_on_bedrock />}>
{provider === notListed ? (
// Same groupId as the config step, so both switch together
<Tabs groupId="not-listed-ports" queryString="ports">
{notListedVariants.map((variant, i) => (
<TabItem key={variant.value} value={variant.value} label={variant.label} default={i === 0}>
<ConnectStep provider={variant.provider} />
</TabItem>
))}
</Tabs>
) : (
<ConnectStep provider={provider} />
)}
</Step>
</SetupSteps>
{provider.notices?.info && (
<div className={styles.hostNote}>
<ReactMarkdown>{provider.notices.info}</ReactMarkdown>
</div>
)}
</>
)
}
+7 -6
View File
@@ -1,6 +1,6 @@
import React, { useEffect, useRef, useState } from 'react';
export const Questions = ({ children }) => {
export const Questions = ({ children }: { children: React.ReactNode }) => {
return (
<div className="questions">
{children}
@@ -8,9 +8,9 @@ export const Questions = ({ children }) => {
);
};
export const Q = ({ children }) => {
export const Q = ({ children }: { children: React.ReactNode }) => {
const [isAnswerVisible, setIsAnswerVisible] = useState(false);
const answerRef = useRef(null);
const answerRef = useRef<HTMLDivElement>(null);
const [answerHeight, setAnswerHeight] = useState(0);
useEffect(() => {
@@ -19,8 +19,9 @@ export const Q = ({ children }) => {
}
}, [isAnswerVisible]);
const questionText = children[0];
const answerComponent = React.Children.toArray(children)[1];
const childArray = React.Children.toArray(children);
const questionText = childArray[0];
const answerComponent = childArray[1];
const arrowClass = isAnswerVisible ? 'collapsible-arrow expanded' : 'collapsible-arrow';
@@ -38,7 +39,7 @@ export const Q = ({ children }) => {
);
};
export const A = ({ children }) => {
export const A = ({ children }: { children: React.ReactNode }) => {
return (
<div className="answer">
{children}
+208
View File
@@ -0,0 +1,208 @@
import React from 'react';
import Admonition from '@theme/Admonition';
import CodeBlock from '@theme/CodeBlock';
import { MDXTranslatable } from './MDXTranslatable';
import { ProviderGeyserSetup, SelfHostConfig, SetupSteps, Step } from './Provider';
const t = MDXTranslatable.setup;
export type PlatformId = 'paper-spigot' | 'fabric' | 'neoforge' | 'velocity' | 'bungeecord' | 'viaproxy' | 'standalone';
type Platform = {
name: string;
jarName: string;
jarDirectory: string;
configLocation: string;
notice?: React.ReactNode; // shown above the steps
versionStep?: React.ReactNode;
installFirst?: React.ReactNode; // an item before downloading Geyser, e.g. setting up the program it runs in
installNote?: React.ReactNode; // an extra item in the install step
configNotes?: React.ReactNode; // extra paragraphs in the configure step when self-hosting
restart: React.ReactNode; // the last install item when self-hosting
}
// Everything that differs between platforms; the guides below are the same for all of them
const platforms: Record<Exclude<PlatformId, 'standalone'>, Platform> = {
'paper-spigot': {
name: 'Paper / Spigot',
jarName: 'Geyser-Spigot.jar',
jarDirectory: 'plugins',
configLocation: '/plugins/Geyser-Spigot/config.yml',
versionStep: <t.version_step_viaversion />,
restart: <t.restart_server />,
},
fabric: {
name: 'Fabric',
restart: <t.restart_server />,
jarName: 'Geyser-Fabric.jar',
jarDirectory: 'mods',
configLocation: '/config/Geyser-Fabric/config.yml',
notice: <Admonition type="caution"><t.modded_requirements jarName="Geyser-Fabric" /></Admonition>,
installNote: <t.fabric_dependency />,
},
neoforge: {
name: 'NeoForge',
restart: <t.restart_server />,
jarName: 'Geyser-NeoForge.jar',
jarDirectory: 'mods',
configLocation: '/config/Geyser-NeoForge/config.yml',
notice: <Admonition type="caution"><t.modded_requirements jarName="Geyser-NeoForge" /></Admonition>,
},
velocity: {
name: 'Velocity',
restart: <t.restart_velocity />,
jarName: 'Geyser-Velocity.jar',
jarDirectory: 'plugins',
configLocation: '/plugins/Geyser-Velocity/config.yml',
notice: <Admonition type="info"><t.proxy_install_only proxy="Velocity" /></Admonition>,
versionStep: <t.version_step_proxy />,
},
bungeecord: {
name: 'BungeeCord',
restart: <t.restart_bungeecord />,
jarName: 'Geyser-BungeeCord.jar',
jarDirectory: 'plugins',
configLocation: '/plugins/Geyser-BungeeCord/config.yml',
notice: <Admonition type="info"><t.proxy_install_only proxy="BungeeCord" /></Admonition>,
versionStep: <t.version_step_proxy />,
},
viaproxy: {
name: 'ViaProxy',
restart: <t.restart_viaproxy />,
jarName: 'Geyser-ViaProxy.jar',
jarDirectory: 'plugins',
configLocation: '/plugins/Geyser/config.yml',
notice: <Admonition type="warning" title={<t.viaproxy_not_plugin_title />}><t.viaproxy_not_plugin /></Admonition>,
installFirst: <t.viaproxy_setup />,
configNotes: (
<>
<p><t.viaproxy_accounts /></p>
<p><t.viaproxy_auth_type /></p>
</>
),
},
};
// The setup guide for a server at a hosting provider. Reads the host from SelectedProvider.
export const HostedGuide = ({ platform }: { platform: Exclude<PlatformId, 'viaproxy' | 'standalone'> }) => {
const { jarName, jarDirectory, configLocation, notice, versionStep, installNote } = platforms[platform];
return <ProviderGeyserSetup jarName={jarName} jarDirectory={jarDirectory} configLocation={configLocation}
notice={notice} versionStep={versionStep} installNote={installNote} />;
}
const ConnectStep = ({ lan = false }: { lan?: boolean }) => (
<Step id="connecting-on-bedrock" title={<t.connecting_on_bedrock />}>
<p>
<strong><t.connect_local_title /></strong><br />
<t.connect_local />{lan && <> <t.connect_lan /></>}
</p>
<p>
<strong><t.connect_remote_title /></strong><br />
<t.connect_remote />
</p>
<Admonition type="caution"><t.connect_tcp_udp /></Admonition>
<p><t.connect_options /></p>
<ul>
<li><t.connect_port_forwarding /></li>
<li><t.connect_playit /></li>
</ul>
</Step>
);
const HttpsStep = () => (
<Step id="setting-up-https" title={<t.https_step_title />}>
<p><t.https_step /></p>
</Step>
);
const StandaloneGuide = () => (
<>
<Admonition type="info"><t.standalone_java /></Admonition>
<Admonition type="caution"><t.standalone_not_plugin /></Admonition>
<SetupSteps>
<Step id="installing-geyser" title={<t.installing_geyser />}>
<ul>
<li><t.standalone_download /></li>
<li><t.standalone_folder /></li>
<li>
<t.standalone_start />
<ul>
<li><t.standalone_gui /></li>
<li><t.standalone_console /></li>
</ul>
</li>
</ul>
</Step>
<Step id="configuring-geyser" title={<t.configuring_geyser />}>
<SelfHostConfig configLocation="config.yml" standalone />
<p><t.self_port_choice_standalone /></p>
<p><t.self_port_sharing /></p>
<p><t.standalone_remote_intro /></p>
<CodeBlock language="yaml">{[
'java:',
' # The IP address of the Java Edition server.',
' address: 127.0.0.1',
'',
' # The port of the Java Edition server.',
' port: 25565',
'',
' # What type of authentication Bedrock players will be checked against when logging into the Java server.',
' # Can be "floodgate" (see https://wiki.geysermc.org/floodgate/), "online", or "offline".',
' auth-type: online',
].join('\n')}</CodeBlock>
<p><t.standalone_remote /></p>
</Step>
<ConnectStep lan />
<HttpsStep />
</SetupSteps>
<h4 id="running-geyser-standalone-on-android"><t.standalone_android_title /></h4>
<Admonition type="caution"><t.standalone_android_caution /></Admonition>
<ol>
<li><t.standalone_termux_install /></li>
<li><t.run_command command="pkg install openjdk-21" /></li>
<li><t.run_command command="wget -O Geyser-Standalone.jar https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/standalone" /></li>
<li><t.run_command command="java -jar Geyser-Standalone.jar" /></li>
</ol>
<p><t.standalone_termux_script /></p>
<CodeBlock language="bash">curl https://gist.githubusercontent.com/rtm516/e3e07d6595ee41e05a38b03c0f4d7a80/raw/install.sh | bash</CodeBlock>
</>
);
// The setup guide for a server you host yourself
export const SelfHostGuide = ({ platform }: { platform: PlatformId }) => {
if (platform === 'standalone') {
return <StandaloneGuide />;
}
const { name, jarName, jarDirectory, configLocation, notice, versionStep, installFirst, installNote, configNotes, restart } = platforms[platform];
return (
<>
{notice}
<SetupSteps>
{versionStep && (
<Step id="checking-server-version" title={<t.checking_server_version />}>
<p>{versionStep}</p>
</Step>
)}
<Step id="installing-geyser" title={<t.installing_geyser />}>
<ul>
{installFirst && <li>{installFirst}</li>}
<li><t.download_jar jarName={jarName} /></li>
<li><t.place_jar jarName={jarName} jarDirectory={jarDirectory} /></li>
{installNote && <li>{installNote}</li>}
<li>{restart}</li>
</ul>
</Step>
<Step id="configuring-geyser" title={<t.configuring_geyser />}>
<SelfHostConfig configLocation={configLocation} />
<p><t.self_port_choice platform={name} /></p>
<p><t.self_port_sharing /></p>
{configNotes}
</Step>
<ConnectStep />
<HttpsStep />
</SetupSteps>
<Admonition type="info"><t.floodgate_info /></Admonition>
</>
);
}
+3 -2
View File
@@ -1,5 +1,6 @@
import versions from '../data/versions.json';
export const Versions = ({ platform }) => {
return versions[platform].supported
export const Versions = {
bedrock: () => versions.bedrock.supported,
java: () => versions.java.supported,
};
+4
View File
@@ -104,6 +104,10 @@ html[data-theme='dark'] {
@include header-link(24px, 24px, url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"/></svg>'));
}
.header-hosting-link {
@include header-link(24px, 24px, url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M64 32C28.7 32 0 60.7 0 96v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V352c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"/></svg>'));
}
.header-github-link {
@include header-link(24px, 24px, url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E"));
}
+925 -697
View File
File diff suppressed because it is too large. Load diff
+109
View File
@@ -0,0 +1,109 @@
// TODO: the hosting page is hidden until it launches. Rename this file back to hosting.tsx, and restore the links to /hosting.
import React from 'react';
import Layout from '@theme/Layout';
import Link from '@docusaurus/Link';
import Translate, { translate } from '@docusaurus/Translate';
import ReactMarkdown from 'react-markdown';
import useBaseUrl from '@docusaurus/useBaseUrl';
import HeroBanner from '@site/src/components/HeroBanner';
import HeroBackground from '@site/static/img/site/split-background.webp';
import { hostingPageTiers, openCollaborationProviders, providerSetupLink } from '@site/src/components/Provider';
import type { HostingProvider, OpenCollaborationTier } from '@site/src/types/providers';
import styles from './hosting.module.scss';
const tierNames: Partial<Record<OpenCollaborationTier, string>> = {
gold: translate({ id: 'pages.hosting.tier.gold', message: 'Gold supporters' }),
silver: translate({ id: 'pages.hosting.tier.silver', message: 'Silver supporters' }),
bronze: translate({ id: 'pages.hosting.tier.bronze', message: 'Bronze supporters' }),
};
const HostCard = ({ provider }: { provider: HostingProvider }) => (
<div className={`${styles.card} ${styles[provider.open_collaboration!.tier]}`}>
{provider.open_collaboration!.logo && (
<div className={styles.logoPlate}>
<img className={styles.logo} src={useBaseUrl(provider.open_collaboration!.logo)} alt={provider.name} loading="lazy" />
</div>
)}
<h3>{provider.name}</h3>
{provider.open_collaboration!.description && (
<div className={styles.description}>
<ReactMarkdown>{provider.open_collaboration!.description}</ReactMarkdown>
</div>
)}
<div className={styles.links}>
{provider.url && (
<Link className="button button--primary" to={provider.url}>
<Translate id="pages.hosting.card.website">Website</Translate>
</Link>
)}
<Link className="button button--outline button--primary" to={providerSetupLink(provider)}>
<Translate id="pages.hosting.card.setup">Setup guide</Translate>
</Link>
</div>
</div>
);
const HostingPage: React.FC = () => (
<>
<HeroBanner
title={<Translate id="pages.hosting.title">Hosting Providers</Translate>}
subheading={<Translate id="pages.hosting.subheading">Hosting providers that support the development of Geyser.</Translate>}
backgroundImage={HeroBackground}
/>
<section className={styles.intro}>
<p>
<Translate
id="pages.hosting.intro"
values={{ openCollaboration: <Link to="https://opencollaboration.dev">Open Collaboration</Link> }}
>
{"The hosts below support Geyser and related projects through {openCollaboration}. Their support helps fund work on Geyser, such as keeping up with major changes to Bedrock Edition, like the switch to NetherNet. " +
"All hosts listed below also configure Geyser automatically when installed, making using Geyser easier than ever. We'd like to thank them all for their support."}
</Translate>
</p>
</section>
{openCollaborationProviders.some(p => hostingPageTiers.includes(p.open_collaboration!.tier)) ? hostingPageTiers.map(tier => {
const hosts = openCollaborationProviders.filter(p => p.open_collaboration!.tier === tier);
return hosts.length > 0 && (
<section key={tier} className={styles.tier}>
<h2>{tierNames[tier]}</h2>
<div className={`${styles.grid} ${styles[`${tier}Grid`]}`}>
{hosts.map(provider => <HostCard key={provider.name} provider={provider} />)}
</div>
</section>
);
}) : (
<p className={styles.empty}>
<Translate id="pages.hosting.empty">No hosting providers are listed yet.</Translate>
</p>
)}
<section className={styles.notes}>
<h2><Translate id="pages.hosting.other.title">Using another host?</Translate></h2>
<p>
<Translate
id="pages.hosting.other.text"
values={{ setupGuide: <Link to="/wiki/geyser/setup/"><Translate id="pages.hosting.other.setup_guide">setup guide</Translate></Link> }}
>
{"Hosts not being listed here does not mean Geyser won't run there. The {setupGuide} includes community collected notes for many other hosts, and general instructions for those not listed."}
</Translate>
</p>
</section>
</>
);
export default function Hosting(): JSX.Element {
return (
<Layout
title={translate({ id: 'pages.hosting.meta.title', message: 'Hosting Providers' })}
description={translate({ id: 'pages.hosting.meta.description', message: 'Hosting providers that support the development of Geyser through Open Collaboration.' })}
>
<main>
<div className="container margin-vert--lg">
<HostingPage />
</div>
</main>
</Layout>
);
}
+102
View File
@@ -0,0 +1,102 @@
.intro,
.notes,
.empty {
max-width: 48rem;
margin: 2rem auto;
}
.empty {
text-align: center;
color: var(--ifm-color-emphasis-700);
}
.tier {
margin: 2.5rem 0;
h2 {
text-align: center;
}
}
// Flex rather than grid, so a row that is not full stays centered
.grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 1.5rem;
> .card {
flex: 0 1 18rem;
}
}
.goldGrid > .card {
flex-basis: 26rem;
}
.card {
display: flex;
flex-direction: column;
gap: 0.75rem;
padding: 1.5rem;
border: 1px solid var(--ifm-color-emphasis-300);
border-radius: var(--ifm-card-border-radius, 0.5rem);
background: var(--ifm-card-background-color);
text-align: center;
h3 {
margin: 0;
}
}
.gold {
border: 2px solid #d4af37;
padding: 2rem;
.logoPlate {
height: 7rem;
}
}
.silver {
border-color: #a8a9ad;
}
// Logos sit on a dark plate in both themes, so light and dark artwork both stay readable
.logoPlate {
display: flex;
align-items: center;
justify-content: center;
height: 5.5rem;
padding: 1rem;
border-radius: 0.375rem;
background-color: #1b1b1d;
}
.logo {
max-height: 100%;
max-width: 100%;
object-fit: contain;
}
.description {
flex-grow: 1;
p:last-child {
margin-bottom: 0;
}
}
// Both buttons share one row: they split the width evenly, with less padding than usual so they fit narrow cards.
// Long translations wrap inside the button instead of pushing it onto a new line.
.links {
display: flex;
gap: 0.5rem;
> :global(.button) {
flex: 1 1 0;
min-width: 0;
padding-inline: 0.75rem;
white-space: normal;
}
}
+64 -33
View File
@@ -8,41 +8,68 @@ import { Grid } from '@site/src/components/Grid';
import CodeBlock from '@theme/CodeBlock';
import clsx from 'clsx';
const PluginList = ({plugins}, {}) => {
const [activePlugin, setActivePlugin] = useState<any>({});
const pluginPopoverRef = useRef<any>(null);
interface Plugin {
main: string;
name: string;
version: string;
enabled: boolean;
authors: string[];
}
interface PluginListProps {
plugins: Plugin[];
}
const PluginList = ({ plugins }: PluginListProps) => {
const [activePlugin, setActivePlugin] = useState<Partial<Plugin>>({});
const pluginPopoverRef = useRef<HTMLDivElement>(null);
useEffect(() => {
const handleClickOutside = (event) => setActivePlugin({});
const handleClickOutside = (event: MouseEvent) => {
if (
pluginPopoverRef.current &&
!pluginPopoverRef.current.contains(event.target as Node)
) {
setActivePlugin({});
}
};
document.addEventListener("mousedown", handleClickOutside);
return () => {
document.removeEventListener("mousedown", handleClickOutside);
};
}, [pluginPopoverRef]);
}, []);
return <Grid elementsPerRow={5}>
{plugins.map(plugin => (
<div key={plugin.main}>
<div onClick={() => setActivePlugin(plugin)} className={styles.pluginName}>
<b>{plugin.name}</b> <div className={styles.pluginEnabledIndicator} style={{ backgroundColor: plugin.enabled ? "green" : "red" }} />
</div>
{activePlugin?.main === plugin.main ? (
<div ref={pluginPopoverRef} className={styles.pluginInfoPopover}>
<p className={styles.pluginNamePopover}>{plugin.name}</p>
<p>{plugin.version}</p>
<p className={styles.pluginEnabled} style={{ backgroundColor: plugin.enabled ? "green" : "red" }}>{plugin.enabled ? "Enabled" : "Disabled"}</p>
<p className={styles.pluginAuthorsLabel}>Authors:</p>
<ul>
{plugin.authors.map(author => <li>{author}</li>)}
</ul>
return (
<Grid elementsPerRow={5}>
{plugins.map((plugin: Plugin) => (
<div key={plugin.main}>
<div onClick={() => setActivePlugin(plugin)} className={styles.pluginName}>
<b>{plugin.name}</b>
<div className={styles.pluginEnabledIndicator} style={{ backgroundColor: plugin.enabled ? "green" : "red" }} />
</div>
) : undefined}
</div>
))}
</Grid>
{activePlugin?.main === plugin.main ? (
<div ref={pluginPopoverRef} className={styles.pluginInfoPopover}>
<p className={styles.pluginNamePopover}>{plugin.name}</p>
<p>{plugin.version}</p>
<p className={styles.pluginEnabled} style={{ backgroundColor: plugin.enabled ? "green" : "red" }}>
{plugin.enabled ? "Enabled" : "Disabled"}
</p>
<p className={styles.pluginAuthorsLabel}>Authors:</p>
<ul>
{plugin.authors.map((author: string, index: number) => (
<li key={index}>{author}</li>
))}
</ul>
</div>
) : undefined}
</div>
))}
</Grid>
);
};
const DumpViewerPage: React.FC = () => {
@@ -53,12 +80,15 @@ const DumpViewerPage: React.FC = () => {
const urlReg = /^(https?:\/\/)?dump\.geysermc\.org/;
useEffect(() => {
// Get the ID from the URL
let id = window.location.href.includes('?') ? window.location.href.split('?').pop() : '';
if (id === '' || id === undefined) {
// Get the ID from the URL with a fallback for undefined pop results
const queryPart = window.location.href.includes('?') ? window.location.href.split('?').pop() : '';
let id = queryPart ?? '';
if (id === '') {
id = window.location.hash.slice(1);
}
if (id !== undefined && id !== '') {
if (id !== '') {
setDumpId(id);
handleLoad(id);
}
@@ -72,13 +102,14 @@ const DumpViewerPage: React.FC = () => {
let id = dumpId;
if (dumpId.match(urlReg)) {
id = dumpId.split('/').pop();
id = dumpId.split('/').pop() ?? dumpId;
}
setDumpId(id);
handleLoad(id);
}
const handleLoad = async (dumpId) => {
const handleLoad = async (dumpId: string) => {
try {
// Construct the raw dump URL
const url = 'https://dump.geysermc.org/raw/' + dumpId;
@@ -97,7 +128,7 @@ const DumpViewerPage: React.FC = () => {
}
}
const capitalizeFirstLetter = (string) => {
const capitalizeFirstLetter = (string: string) => {
return string.charAt(0).toUpperCase() + string.slice(1)
}
-134
View File
@@ -1,134 +0,0 @@
import fs from 'fs';
import path from 'path';
import { LoadContext, Plugin, PluginOptions } from '@docusaurus/types';
import logger from '@docusaurus/logger';
import ts from "typescript";
// Welcome to hell
const createProvidersJsonPlugin = (_context: LoadContext, _options: PluginOptions): Plugin => {
return {
name: 'docusaurus-plugin-create-providers-json',
async postBuild({ outDir }) {
const providersFilePath = path.join(__dirname, '../data/providers.ts');
const providersFileContent = fs.readFileSync(providersFilePath, 'utf-8');
const providersAst = ts.createSourceFile('providers.ts', providersFileContent, ts.ScriptTarget.Latest, true);
let providersDataNode: ts.ObjectLiteralExpression | null = null;
let descriptionTemplatesNode: ts.ObjectLiteralExpression | null = null;
for (const statement of providersAst.statements) {
if (ts.isVariableStatement(statement)) {
for (const decl of statement.declarationList.declarations) {
if (
ts.isIdentifier(decl.name) &&
decl.initializer
) {
if (decl.name.text === 'providersData' && ts.isObjectLiteralExpression(decl.initializer)) {
providersDataNode = decl.initializer;
} else if (decl.name.text === 'descriptionTemplates' && ts.isObjectLiteralExpression(decl.initializer)) {
descriptionTemplatesNode = decl.initializer;
}
}
}
}
}
if (!providersDataNode) {
logger.error('Could not find providersData in providers.ts');
return;
}
if (!descriptionTemplatesNode) {
logger.error('Could not find defaultDescriptions in providers.ts');
return;
}
function parseDescriptionTemplates(node: ts.ObjectLiteralExpression): Record<string, string> {
const map: Record<string, string> = {};
for (const prop of node.properties) {
if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)) {
const key = prop.name.text;
const val = extractDescription(prop.initializer);
map[key] = val || '';
}
}
return map;
}
let defaultDescriptionsMap = parseDescriptionTemplates(descriptionTemplatesNode);
function extractDescription(node: ts.Expression): string {
if (ts.isCallExpression(node)) {
const expr = node.expression;
if (ts.isIdentifier(expr) && expr.text === 'translate') {
const arg = node.arguments[0];
if (arg && ts.isObjectLiteralExpression(arg)) {
for (const prop of arg.properties) {
if (
ts.isPropertyAssignment(prop) &&
ts.isIdentifier(prop.name) &&
prop.name.text === 'message' &&
ts.isStringLiteral(prop.initializer)
) {
return prop.initializer.text;
}
}
}
}
} else if (ts.isPropertyAccessExpression(node)) {
if (ts.isIdentifier(node.expression) && node.expression.text === 'descriptionTemplates') {
const key = node.name.text;
return defaultDescriptionsMap[key] || '';
}
}
}
function parseProvidersArray(prop: ts.PropertyAssignment): {name: string; url: string; description: string;}[] {
if (ts.isArrayLiteralExpression(prop.initializer)) {
return prop.initializer.elements
.filter(ts.isObjectLiteralExpression)
.map(element => {
let nameVal = '';
let urlVal = '';
let descVal = '';
for (const property of element.properties) {
if (ts.isPropertyAssignment(property) && ts.isIdentifier(property.name)) {
const key = property.name.text;
const val = property.initializer;
if (key === 'name' && ts.isStringLiteral(val)) {
nameVal = val.text;
} else if (key === 'url' && ts.isStringLiteral(val)) {
urlVal = val.text;
} else if (key === 'description') {
descVal = extractDescription(val);
}
}
}
return { name: nameVal, url: urlVal, description: descVal };
});
}
return [];
}
let providersJson = {};
for (const prop of providersDataNode.properties) {
if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)) {
providersJson[prop.name.text] = parseProvidersArray(prop);
}
}
const dataDir = path.join(outDir, 'data');
if (!fs.existsSync(dataDir)) {
fs.mkdirSync(dataDir, { recursive: true });
}
const outputFilePath = path.join(dataDir, 'providers.json');
fs.writeFileSync(outputFilePath, JSON.stringify(providersJson, null, 4), 'utf-8');
}
};
};
export default createProvidersJsonPlugin;
+12 -12
View File
@@ -5,21 +5,21 @@ import logger from '@docusaurus/logger';
import versions from '../data/versions.json';
const createVersionsJsonPlugin = (context: LoadContext, options: PluginOptions): Plugin => {
return {
name: 'docusaurus-plugin-create-versions-json',
return {
name: 'docusaurus-plugin-create-versions-json',
async postBuild({ outDir, routes, plugins }) {
const versionsFilePath = path.join(outDir, 'versions.json');
async postBuild({ outDir, routes, plugins }) {
const versionsFilePath = path.join(outDir, 'versions.json');
fs.writeFileSync(versionsFilePath, JSON.stringify({
"bedrock": {
"protocol": versions.bedrock.latest
}
}, null, 2), 'utf-8');
fs.writeFileSync(versionsFilePath, JSON.stringify({
"bedrock": {
"protocol": versions.bedrock.latest
}
}, null, 2), 'utf-8');
logger.success(`Created versions.json file at ${versionsFilePath}`);
},
};
logger.success(`Created versions.json file at ${versionsFilePath}`);
},
};
};
export default createVersionsJsonPlugin;
+591
View File
@@ -0,0 +1,591 @@
import AdmZip from 'adm-zip';
import { I18nConfig, LoadContext, Plugin, PluginOptions } from '@docusaurus/types';
import crowdin, {
Credentials,
ResponseObject,
SourceFiles,
SourceFilesModel,
SourceStrings,
SourceStringsModel,
UploadStorage,
} from '@crowdin/crowdin-api-client';
import path from 'path';
import fs from 'fs';
import logger from '@docusaurus/logger';
import { finished } from "stream/promises";
import { Readable } from 'stream';
import { ReadableStream } from 'stream/web';
import matter from 'gray-matter';
import { safeGlobby } from '@docusaurus/utils';
import crypto from 'crypto';
import retry from 'retry';
type TranslationJson = {
[key: string]: {
message: string,
description?: string,
};
}
type Locales = {
defaultLocale: string,
locales: string[],
path: string,
localeConfigs: {
[locale: string]: {
path: string
}
},
}
type MarkdownFolders = {
path: string,
destination: string,
}[];
const PLUGIN_NAME = 'docusaurus-plugin-crowdin-sync';
const crowdinSyncPlugin = (context: LoadContext, options: PluginOptions): Plugin => {
return {
name: PLUGIN_NAME,
extendCli(cli) {
cli
.command('crowdin-sync')
.description('Sync translations with Crowdin')
.action(async () => {
const pluginDir = path.join(context.generatedFilesDir, PLUGIN_NAME);
const credentials: Credentials = {
token: process.env.CROWDIN_TOKEN || '',
organization: process.env.CROWDIN_ORGANIZATION,
};
const crowdinClient = new crowdin(credentials);
const projectId = options.projectId as number;
const locales = populateLocales({ i18n: context.siteConfig.i18n });
const markdownFolders = options.markdownFolders as MarkdownFolders;
await uploadAction({ context, options, crowdinClient, projectId, pluginDir, locales, markdownFolders });
logger.info('Uploaded files to Crowdin');
await downloadAction({ context, options, crowdinClient, projectId, pluginDir, locales, markdownFolders });
logger.info('Downloaded translations from Crowdin');
})
},
}
};
const uploadAction = async (inp: {
context: LoadContext,
options: PluginOptions,
crowdinClient: crowdin,
projectId: number,
pluginDir: string,
locales: Locales,
markdownFolders: MarkdownFolders,
}) => {
const { context, options, crowdinClient, projectId, pluginDir, locales, markdownFolders } = inp;
const { uploadStorageApi, sourceFilesApi, sourceStringsApi } = crowdinClient;
const unprocessedFiles = new Set<string>();
const markdownFiles = await safeGlobby(
markdownFolders.map(s => path.join(context.siteDir, s.path)),
{ expandDirectories: ['**/*.{md,mdx}'] }
);
const markdownSyncedMap = new Map<string, { file: string, content: string }>();
for (const file of markdownFiles) {
let content = fs.readFileSync(file, 'utf8');
const parsed = matter(content);
const data = parsed.data || {};
if (!data.crowdin_page_id) {
data.crowdin_page_id = crypto.randomUUID();
content = matter.stringify(parsed.content, data);
fs.writeFileSync(file, content);
}
if (!data.crowdin_sync) continue;
markdownSyncedMap.set(data.crowdin_page_id, { file, content });
unprocessedFiles.add(file);
}
const jsonFolder = path.join(locales.path, locales.localeConfigs[locales.defaultLocale].path);
const jsonFiles = await safeGlobby(
[path.join(context.siteDir, jsonFolder)],
{ expandDirectories: ['**/*.json'] }
);
for (const file of jsonFiles) {
unprocessedFiles.add(file);
}
if (!fs.existsSync(pluginDir)) {
fs.mkdirSync(pluginDir, { recursive: true });
}
const files = await fetchPaginatedCrowdinData<ResponseObject<SourceFilesModel.File>>(
sourceFilesApi.listProjectFiles.bind(sourceFilesApi),
projectId
);
const directories = await fetchPaginatedCrowdinData<ResponseObject<SourceFilesModel.Directory>>(
sourceFilesApi.listProjectDirectories.bind(sourceFilesApi),
projectId
);
const markdownOptions: {
importOptions: SourceFilesModel.ImportOptions,
exportOptions: SourceFilesModel.ExportOptions,
} = {
importOptions: {
excludedFrontMatterElements: ['permalink', 'page_sidebar', 'hide_title', 'crowdin_page_id', 'crowdin_sync'],
excludeCodeBlocks: true,
},
exportOptions: {
strongMarker: 'asterisk',
emphasisMarker: 'asterisk',
},
}
for (const file of files) {
const filePath = path.join(pluginDir, file.data.path);
const fileDir = path.dirname(filePath);
if (!fs.existsSync(fileDir)) {
fs.mkdirSync(fileDir, { recursive: true });
}
const downloadFileData = await sourceFilesApi.downloadFile(projectId, file.data.id);
await downloadFile({ url: downloadFileData.data.url, filePath });
const content = fs.readFileSync(filePath, 'utf8');
let remove = false;
let crowdinContentHash = '';
switch (path.extname(filePath)) {
case '.json':
const relativeJsonPath = file.data.path.slice(1);
if (!unprocessedFiles.delete(relativeJsonPath)) {
remove = true;
break;
}
await updateCrowdinFileDirectory({
projectId,
sourceFilesApi,
file,
directories,
finalPath: path.resolve('/', file.data.path),
});
crowdinContentHash = crypto.createHash('sha256').update(content).digest('hex');
const jsonContent = processJsonContent(fs.readFileSync(relativeJsonPath, 'utf8'), options.jsonKeyExclusions as string[]);
const jsonHash = crypto.createHash('sha256').update(jsonContent).digest('hex');
if (jsonHash === crowdinContentHash) break;
await updateCrowdinFile({
projectId,
sourceFilesApi,
file,
content: jsonContent,
filePath: relativeJsonPath,
uploadStorageApi,
});
break;
case '.md':
case '.mdx':
const parsed = matter(content);
const data = parsed.data || {};
if (!data.crowdin_page_id) throw new Error(`Missing crowdin_page_id in MD/MDX frontmatter for ${filePath}`);
const synced = markdownSyncedMap.get(data.crowdin_page_id);
if (!synced) {
remove = true;
break;
}
unprocessedFiles.delete(synced.file);
await updateCrowdinFileDirectory({
projectId,
sourceFilesApi,
file,
directories,
finalPath: path.resolve('/', synced.file),
});
crowdinContentHash = crypto.createHash('sha256').update(content).digest('hex');
const syncedHash = crypto.createHash('sha256').update(synced.content).digest('hex');
if (syncedHash === crowdinContentHash) break;
await updateCrowdinFile({
projectId,
sourceFilesApi,
file,
content: synced.content,
filePath: synced.file,
uploadStorageApi,
...markdownOptions,
});
await hideInlineCodeStrings({
projectId,
sourceStringsApi,
fileId: file.data.id,
});
}
if (remove) {
await sourceFilesApi.deleteFile(projectId, file.data.id);
}
}
for (const file of unprocessedFiles) {
const filePath = path.join(context.siteDir, file);
const fileOptions: {
importOptions?: SourceFilesModel.ImportOptions,
exportOptions?: SourceFilesModel.ExportOptions,
type?: SourceFilesModel.FileType,
} = {};
let content: string;
switch (path.extname(file)) {
case '.json':
fileOptions.type = 'chrome';
content = processJsonContent(fs.readFileSync(filePath, 'utf8'), options.jsonKeyExclusions as string[]);
break;
case '.md':
fileOptions.type = 'md';
fileOptions.importOptions = markdownOptions.importOptions;
fileOptions.exportOptions = markdownOptions.exportOptions;
content = fs.readFileSync(filePath, 'utf8');
break;
case '.mdx':
fileOptions.type = 'mdx_v2' as SourceFilesModel.FileType;
fileOptions.importOptions = markdownOptions.importOptions;
fileOptions.exportOptions = markdownOptions.exportOptions;
content = fs.readFileSync(filePath, 'utf8');
break;
default:
logger.warn(`Skipping unsupported file type for ${file}`);
continue;
}
const directoryId = await createCrowdinDirectory({
projectId,
sourceFilesApi,
directories,
finalDir: path.dirname(file),
});
if (directoryId === null) throw new Error(`Failed to create directory for ${file}`);
const storage = await uploadStorageApi.addStorage(path.basename(file), content);
const createdFile = await sourceFilesApi.createFile(projectId, {
storageId: storage.data.id,
name: path.basename(file),
directoryId,
...fileOptions,
});
if (path.extname(file) === '.md' || path.extname(file) === '.mdx') {
await hideInlineCodeStrings({
projectId,
sourceStringsApi,
fileId: createdFile.data.id,
});
}
}
};
const downloadAction = async (inp: {
context: LoadContext,
options: PluginOptions,
crowdinClient: crowdin,
projectId: number,
pluginDir: string,
locales: Locales,
markdownFolders: MarkdownFolders,
}) => {
const { context, options, crowdinClient, projectId, pluginDir, locales, markdownFolders } = inp;
const { translationsApi } = crowdinClient;
const build = await translationsApi.buildProject(projectId);
let retries = 0;
while (retries < 60) {
const status = await translationsApi.checkBuildStatus(projectId, build.data.id);
logger.info(`Translation bundle build status: ${status.data.status}`);
if (status.data.status === 'finished') break;
if (status.data.status === 'failed') {
throw new Error('Translations build failed');
}
await new Promise(resolve => setTimeout(resolve, 1000));
retries++;
}
const translations = await translationsApi.downloadTranslations(projectId, build.data.id);
const zipPath = path.join(pluginDir, 'translations.zip');
await downloadFile({ url: translations.data.url, filePath: zipPath });
const zip = new AdmZip(zipPath);
for (const entry of zip.getEntries()) {
if (entry.isDirectory) continue;
const entryParts = entry.entryName.split('/');
if (entryParts.length < 2) continue;
const locale = entryParts[0];
if (locale === locales.defaultLocale) continue;
const entryPath = entryParts.slice(1).join('/');
if (entryPath.startsWith(path.join(locales.path, '/'))) {
const destinationPath = path.join(
context.siteDir,
locales.path,
locales.localeConfigs[locale].path,
entryPath.slice(locales.path.length + locales.localeConfigs[locales.defaultLocale].path.length + 1)
);
const destinationDir = path.dirname(destinationPath);
if (!fs.existsSync(destinationDir)) {
fs.mkdirSync(destinationDir, { recursive: true });
}
zip.extractEntryTo(entry, destinationDir, false, true);
continue;
}
const markdownFolder = markdownFolders.find(f => entryPath.startsWith(path.join(f.path, '/')));
if (markdownFolder) {
const destinationPath = path.join(
context.siteDir,
locales.path,
locales.localeConfigs[locale].path,
markdownFolder.destination,
entryPath.slice(markdownFolder.path.length)
);
const destinationDir = path.dirname(destinationPath);
if (!fs.existsSync(destinationDir)) {
fs.mkdirSync(destinationDir, { recursive: true });
}
zip.extractEntryTo(entry, destinationDir, false, true);
continue;
}
}
};
const populateLocales = (inp: { i18n: I18nConfig }): Locales => {
const { i18n } = inp;
const defaultLocale = i18n.defaultLocale ?? 'en';
const locales = i18n.locales ?? [defaultLocale];
const localePath = i18n.path ?? 'i18n';
const localeConfigs: { [locale: string]: { path: string } } = {};
for (const locale of locales) {
localeConfigs[locale] = {
path: (i18n.localeConfigs[locale] ?? {}).path ?? locale,
};
}
return {
defaultLocale,
locales,
path: localePath,
localeConfigs,
}
};
const processJsonContent = (content: string, exclusions: string[] = []): string => {
const jsonContent: TranslationJson = JSON.parse(content);
const includedContent: TranslationJson = {};
for (const key in jsonContent) {
if (!jsonContent[key]?.message?.trim()) {
continue;
}
if (exclusions.some(exclusion => key.startsWith(exclusion))) {
continue;
}
includedContent[key] = jsonContent[key];
}
return JSON.stringify(includedContent, null, 2);
};
const fetchPaginatedCrowdinData = async <T>(
apiMethod: (projectId: number, params: { limit: number, offset: number }) => Promise<{ data: T[] }>,
projectId: number
): Promise<T[]> => {
const limit = 500;
let offset = 0;
let remaining = true;
const results: T[] = [];
while (remaining) {
const response = await apiMethod(projectId, { limit, offset });
if (response.data.length < limit) {
remaining = false;
} else {
offset += limit;
}
results.push(...response.data);
}
return results;
};
const downloadFile = async (inp: { url: string, filePath: string }) => {
const { url, filePath } = inp;
logger.info(`Downloading translation file to ${filePath}`);
const { body } = await fetch(url);
const stream = fs.createWriteStream(filePath);
await finished(Readable.fromWeb(body as ReadableStream<any>).pipe(stream));
};
const updateCrowdinFile = async (inp: {
projectId: number,
sourceFilesApi: SourceFiles,
file: ResponseObject<SourceFilesModel.File>,
content: string,
filePath: string,
uploadStorageApi: UploadStorage,
importOptions?: SourceFilesModel.ImportOptions,
exportOptions?: SourceFilesModel.ExportOptions,
}) => {
const { projectId, sourceFilesApi, file, content, filePath, uploadStorageApi, importOptions, exportOptions } = inp;
const storage = await uploadStorageApi.addStorage(path.basename(filePath), content);
await sourceFilesApi.updateOrRestoreFile(projectId, file.data.id, {
storageId: storage.data.id,
name: path.basename(filePath),
updateOption: 'clear_translations_and_approvals',
importOptions,
exportOptions
})
};
const updateCrowdinFileDirectory = async (inp: {
projectId: number,
sourceFilesApi: SourceFiles,
file: ResponseObject<SourceFilesModel.File>,
directories: ResponseObject<SourceFilesModel.Directory>[],
finalPath: string,
}) => {
const { projectId, sourceFilesApi, file, directories, finalPath } = inp;
if (finalPath === file.data.path) return;
const parentDirId = await createCrowdinDirectory({
projectId,
sourceFilesApi,
directories,
finalDir: path.dirname(finalPath),
});
await sourceFilesApi.editFile(projectId, file.data.id, [
{
op: 'replace',
path: '/directoryId',
value: parentDirId,
}
])
};
const createCrowdinDirectory = async (inp: {
projectId: number,
sourceFilesApi: SourceFiles,
directories: ResponseObject<SourceFilesModel.Directory>[],
finalDir: string,
}) => {
const { projectId, sourceFilesApi, directories, finalDir } = inp;
const pathArr = finalDir.split('/');
const remainingDirs: string[] = [];
let parentDirId: number | null = null;
for (let i = pathArr.length; i > 0; i--) {
const dirPath = path.join('/', pathArr.slice(0, i).join('/'));
const dir = directories.find(d => d.data.path === dirPath);
if (dir) {
parentDirId = dir.data.id;
if (i === pathArr.length) {
return parentDirId;
}
break;
}
remainingDirs.unshift(pathArr[i - 1]);
}
for (const dir of remainingDirs) {
const newDir = await sourceFilesApi.createDirectory(projectId, {
name: dir,
directoryId: parentDirId ?? undefined,
});
directories.push(newDir);
parentDirId = newDir.data.id;
}
return parentDirId;
}
// Matches strings consisting only of `inline code`, whitespace, or Crowdin inline tags like <0/>
const INLINE_CODE_ONLY_REGEX = /^(?:`[^`]+`|\s|<[0-9]+\/>)+$/;
const hideInlineCodeStrings = async (inp: {
projectId: number,
sourceStringsApi: SourceStrings,
fileId: number,
}) => {
const { projectId, sourceStringsApi, fileId } = inp;
const strings = await fetchPaginatedCrowdinData<ResponseObject<SourceStringsModel.String>>(
(projId, params) => sourceStringsApi.listProjectStrings(projId, { fileId, ...params }),
projectId
);
for (const str of strings) {
if (
typeof str.data.text === 'string' &&
!str.data.isHidden &&
INLINE_CODE_ONLY_REGEX.test(str.data.text.trim())
) {
await sourceStringsApi.editString(projectId, str.data.id, [
{
op: 'replace',
path: '/isHidden',
value: true,
},
]);
}
}
};
export default crowdinSyncPlugin;
-4
View File
@@ -1,4 +0,0 @@
// This is a fake module that simulates @docusaurus/Translate
export function translate (data) {
return data.message
}
+17
View File
@@ -0,0 +1,17 @@
import {Plugin, LoadContext, PluginOptions} from '@docusaurus/types';
const PLUGIN_NAME = 'docusaurus-modify-webpack';
const modifyWebpackPlugin = (_context: LoadContext, _options: PluginOptions): Plugin => {
return {
name: PLUGIN_NAME,
configureWebpack() {
return {
infrastructureLogging: {
level: 'error'
}
}
}
}
}
export default modifyWebpackPlugin;
+25
View File
@@ -0,0 +1,25 @@
import fs from 'fs';
import path from 'path';
import {LoadContext, Plugin, PluginOptions} from '@docusaurus/types';
const PLUGIN_NAME = 'docusaurus-plugin-output-locales';
const ouputLocalesPlugin = (context: LoadContext, options: PluginOptions): Plugin => {
return {
name: PLUGIN_NAME,
extendCli(cli) {
cli
.command('output-locales')
.description('Sync translations with Crowdin')
.action(async () => {
fs.writeFileSync(
path.join(context.siteDir, 'locales.json'),
JSON.stringify(context.siteConfig.i18n.locales),
'utf-8'
)
});
}
};
}
export default ouputLocalesPlugin;
+13 -4
View File
@@ -7,7 +7,7 @@ import { faDownload, faHouse, faBlog, faBook, IconDefinition } from '@fortawesom
const geyserLogo = join(__dirname, '../../static/img/icons/geyser.png');
const geyserLogoBase64 = `data:image/png;base64,${readFileSync(geyserLogo).toString('base64')}`;
const titleElement = ({ children }) => React.createElement(
const titleElement = ({ children }: { children: React.ReactNode }) => React.createElement(
'label',
{
style: {
@@ -109,7 +109,7 @@ export const blogOgRenderer: ImageRenderer<BlogPageData> = async (data, context)
const authorImages = data.data.metadata.authors.map(async author => React.createElement(
'img',
{
src: await encodeRemoteImage(author.imageURL),
src: await encodeRemoteImage(author.imageURL || geyserLogoBase64),
style: {
width: 112.5,
height: 112.5,
@@ -154,8 +154,15 @@ export const pageOgRenderer: ImageRenderer<PageData> = async (data, context) =>
const extraTitleLength = (' ' + context.siteConfig.titleDelimiter + ' ' + context.siteConfig.title).length;
await data.document.load();
const title = (data.document.loaded && data.document.root.querySelector('title')?.textContent).slice(0, -extraTitleLength) || context.siteConfig.title;
const description = (data.document.loaded && data.document.root.querySelector('meta[name="description"]').getAttribute('content')) || context.siteConfig.tagline;
const root = data?.document?.loaded ? data.document.root : null;
const title =
root?.querySelector('title')?.textContent?.slice(0, -extraTitleLength) ||
context?.siteConfig?.title;
const description =
root?.querySelector('meta[name="description"]')?.getAttribute('content') ||
context?.siteConfig?.tagline;
const element = React.createElement(
'div',
@@ -236,6 +243,8 @@ async function getTtfFont(family: string, axes: string[], value: number[]): Prom
const css = await cssCall.text();
const ttfUrl = css.match(/url\(([^)]+)\)/)?.[1];
if (!ttfUrl) throw new Error("Could not find TTF URL in CSS");
return await fetch(ttfUrl).then(res => res.arrayBuffer());
}
+57 -11
View File
@@ -1,15 +1,61 @@
import React from "react";
// Where a port comes from: either same as java server, a number, or instructions to obtain it.
export type PortSource = 'java' | number | { obtain: string };
// The Geyser config changes a user makes on a host that does not configure Geyser itself.
export type ManualConfig = {
preconfigured?: false;
// The UDP port NetherNet (WebRTC) traffic uses. This is required for any NetherNet connection.
udp: PortSource;
// The TCP port Geyser can run built-in signaling on. Omit if the host does not give out a TCP port that is free
// for Geyser; players then connect through an external signaling service instead.
// This cannot be the Java port. Use 'same_as_udp' when the UDP port above is also open on TCP (e.g. Pterodactyl allocations).
builtin_signaling?: Exclude<PortSource, 'java'> | 'same_as_udp';
// External signaling (NXS). Geyser uses Warden (https://warden.cloud) by default.
// Set an object if the host runs its own NXS-compatible signaling service, or false if the host blocks external signaling.
external_signaling?: false | {
endpoint: string;
token_instruction?: string; // how to get the token for this endpoint
};
}
// The host configures transport, signaling and ports itself (e.g. through system properties), so no config changes are needed.
export type Preconfigured = {
preconfigured: true;
port: PortSource; // The port players connect with
}
export type GeyserConfig = (ManualConfig | Preconfigured) & {
confirmed?: false; // Set while the host has not confirmed these details; leave it out once they have.
notes?: string[]; // Shown below the config, e.g. which Bedrock address to use, or alternatives to the default port
}
export type OpenCollaborationTier = 'bronze' | 'silver' | 'gold';
// Properties are grouped in the order the setup guide shows them.
export type HostingProvider = {
name: string;
url: string;
description: React.ReactNode;
}
export type ProviderType = "built_in" | "support" | "no_support";
export type Providers = {
built_in: HostingProvider[];
support: HostingProvider[];
no_support: HostingProvider[];
url: string | null;
updated?: string; // When these instructions were last added or edited, as 'YYYY-MM-DD'. Shown at the top of the setup guide.
links?: { // All optional
article?: string; // host article for Geyser
support?: string; // link to host support, can show when setup help fails
discord?: string; // host discord server
};
// Set for hosts that support Geyser through Open Collaboration.
// Silver and gold hosts are highlighted on /hosting and in the setup guide
open_collaboration?: {
tier: OpenCollaborationTier;
logo?: string; // e.g. '/img/hosts/example.webp', placed in static/img/hosts
description?: string; // a short blurb for the hosting page
};
install?: string; // Step 1: replaces the download steps, e.g. aternos installs Geyser through its plugin list
config: GeyserConfig; // Step 2: NetherNet network details, and what to change in the Geyser config
extra_step?: string; // Step 3: e.g.: must enable udp in settings/enable geyser mode, usually some step in panel
connect?: string; // Step 4: overrides the generated instructions on what players must input to connect
notices?: {
info?: string; // Additional information. Displayed in info bubble.
warn?: string; // shaming server hosting providers with issues.
unsupported?: string; // If set, Geyser does not work on this host, and this is the reason.
};
proxies_banned?: boolean; // If the provider does not allow proxies, we hide proxy setup instructions (e.g. Aternos)
}