Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

Commit

Permalink
more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
astei committed Aug 9, 2018
1 parent 08985fd commit 19345d6
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 31 deletions.
1 change: 1 addition & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ API and providing unparalleled scalability.

users/getting-started
users/configuration
users/player-info-forwarding

.. toctree::
:maxdepth: 2
Expand Down
66 changes: 38 additions & 28 deletions users/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,40 @@ Root section

These settings mostly cover the basic, most essential settings of the proxy.

+------------------------+------------+-------------------------+-------------------------------------+
| Setting name | Type | Default | Description |
+========================+============+=========================+=====================================+
| ``bind`` | Address | ``0.0.0.0:25577`` | This tells the proxy to accept |
| | | | connections on a specific IP. |
| | | | By default, Velocity will listen |
| | | | for connections on all IP addresses |
| | | | on the computer on port 25577. |
+------------------------+------------+-------------------------+-------------------------------------+
| ``motd`` | Chat | ``&3A Velocity Server`` | This allows you to change the |
| | | | message shown to players when they |
| | | | add your server to their server |
| | | | list. You can use legacy Minecraft |
| | | | color codes or JSON chat. |
+------------------------+------------+-------------------------+-------------------------------------+
| ``show-max-players`` | Integer | ``500`` | This allows you to customize the |
| | | | number of "maximum" players in the |
| | | | player's server list. Note that |
| | | | Velocity doesn't have a maximum |
| | | | number of players it supports. |
+------------------------+------------+-------------------------+-------------------------------------+
| ``ip-forwarding`` | Mode | ``modern`` | This allows you to customize how |
| | | | player information such as IPs and |
| | | | UUIDs are forwarded to your server. |
| | | | See the "IP forwarding" section for |
| | | | more information. |
+------------------------+------------+-------------------------+-------------------------------------+
+-----------------------------------+------------+-------------------------+---------------------------------------+
| Setting name | Type | Default | Description |
+===================================+============+=========================+=======================================+
| ``bind`` | Address | ``0.0.0.0:25577`` | This tells the proxy to accept |
| | | | connections on a specific IP. |
| | | | By default, Velocity will listen |
| | | | for connections on all IP addresses |
| | | | on the computer on port 25577. |
+-----------------------------------+------------+-------------------------+---------------------------------------+
| ``motd`` | Chat | ``&3A Velocity Server`` | This allows you to change the |
| | | | message shown to players when they |
| | | | add your server to their server |
| | | | list. You can use legacy Minecraft |
| | | | color codes or JSON chat. |
+-----------------------------------+------------+-------------------------+---------------------------------------+
| ``show-max-players`` | Integer | ``500`` | This allows you to customize the |
| | | | number of "maximum" players in the |
| | | | player's server list. Note that |
| | | | Velocity doesn't have a maximum |
| | | | number of players it supports. |
+-----------------------------------+------------+-------------------------+---------------------------------------+
| ``player-info-forwarding`` | Mode | ``modern`` | This allows you to customize how |
| | | | player information such as IPs and |
| | | | UUIDs are forwarded to your server. |
| | | | See the "Player info forwarding" |
| | | | section for more information. |
+-----------------------------------+------------+-------------------------+---------------------------------------+
| ``player-info-forwarding-secret`` | String | ``5up3r53cr3t`` | This setting is used as a secret to |
| | | | ensure that player info forwarded |
| | | | by Velocity comes from your proxy |
| | | | and not from someone pretending to |
| | | | run Velocity. See the "Player info |
| | | | forwarding" section for more info. |
+-----------------------------------+------------+-------------------------+---------------------------------------+

``server`` section
^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -132,7 +139,10 @@ Below is the default configuration file for Velocity, ``velocity.toml``.
# servers using Minecraft 1.12 or lower.
# - "modern": Forward player IPs and UUIDs as part of the login process using Velocity's native
# forwarding. Only applicable for Minecraft 1.13 or higher.
ip-forwarding = "modern"
player-info-forwarding = "modern"
# If you are using modern IP forwarding, configure an unique secret here.
player-info-forwarding-secret = "5up3r53cr3t"
[servers]
# Configure your servers here.
Expand Down
34 changes: 31 additions & 3 deletions users/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,37 @@ and download the latest proxy build from it. Place the downloaded JAR file
into a directory just for your proxy. Afterwards, you can run the JAR using
``java -jar velocity-proxy-1.0-SNAPSHOT-all.jar``.

Configuring Your Servers
------------------------

Once Velocity is up and running, we can move on to configuring your servers
for use with Velocity. For now, we're going to get a basic setup going and
improve upon it later.

Open up ``velocity.toml`` and find the ``[servers]`` section. This section looks
like this:

.. code-block:: plaintext
[servers]
lobby = "127.0.0.1:30066"
factions = "127.0.0.1:30067"
minigames = "127.0.0.1:30068"
Go ahead and put your servers in this file, and then restart Velocity. Once you've
done that, you will need to open the ``server.properties`` file for each of your
servers and set the ``online-mode`` setting to ``false``. This allows Velocity
to connect to your server. Once you're done, you should restart your server.
Velocity should now be ready to use.

However, this is a a minimal setup. Notably, since we're not forwarding IPs and
player information, the Minecraft server will assume you connected from offline
mode. Velocity supports forwarding this information. See :doc:`./player-info-forwarding`
for more information about that.

What's Next?
------------

When you first run Velocity, it will produce a file called ``velocity.toml``.
In the next section, we will be going over this file and the settings inside
it.
In this section, you downloaded and added your servers to the ``velocity.toml``
file. This file is very important for us, so in the next section we'll cover it
in great detail.
45 changes: 45 additions & 0 deletions users/player-info-forwarding.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Configuring player information forwarding
=========================================

Velocity supports forwarding information about your players to your servers, such
as IP addresses, UUIDs, and skins. Velocity supports two different methods for
forwarding player information to your servers:

* ``modern`` forwarding is a Velocity-native format. It forwards all player information
in an efficient binary format and ensures that nobody tries to trick the server into
impersonating your Velocity proxy. However, it is only available for Minecraft 1.13
or higher.
* ``legacy`` forwarding is the player information forwarding protocol used by BungeeCord.
This is extremely compatible across all Minecraft versions that Velocity supports, but
requires proper configuration to ensure that nobody pretends to be your proxy by using
a firewall or a plugin like IPWhitelist.

Configuring modern forwarding
-----------------------------

Currently, no server implementations support Velocity's modern forwarding.

Configuring legacy BungeeCord-compatible forwarding
---------------------------------------------------

If you need to use legacy BungeeCord-compatible forwarding, simply set your ``player-info-forwarding``
setting in ``velocity.toml`` to ``legacy``. You will also need to make sure your server
is properly configured to understand the data.

.. caution:: Legacy BungeeCord-compatible forwarding allows anyone to pretend they are your proxy
and allow them to log in under any username or IP address! You must make sure that
you have a firewall set up on your servers or use a plugin such as `IPWhitelist <https://www.spigotmc.org/resources/ipwhitelist.61/>`_
to make sure your servers are protected.

Spigot / Paper
^^^^^^^^^^^^^^

To make Spigot or Paper understand the data forwarded from Velocity, set ``settings.bungeecord`` to
``true`` in your ``spigot.yml`` and then reboot your server.

Sponge
^^^^^^

To configure Sponge to understand the data forwarded from Velocity, set ``modules.bungeecord`` to ``true``
and ``bungeecord.ip-forwarding`` to ``true`` in your ``config/sponge/global.conf`` file, and then restart
your Sponge server.

0 comments on commit 19345d6

Please sign in to comment.