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

Commit

Permalink
Bring the documentation up to date
Browse files Browse the repository at this point in the history
Let's be honest, I need to spend more time on this, but I always have more pressing things to do than write documentation.

This brings the Velocity documentation in line with current support and adds a page about commands.
  • Loading branch information
astei committed Apr 14, 2019
1 parent 833e859 commit 87ddaf8
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 40 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
1 change: 1 addition & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ API and providing unparalleled scalability.
:caption: For Server Administrators

users/getting-started
users/commands
users/configuration
users/player-info-forwarding
users/frequently-asked-questions
Expand Down
50 changes: 50 additions & 0 deletions users/commands.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Commands
========

Velocity includes a few commands in the core of the proxy by default.
You can gain a richer set of commands by adding plugins.

The /velocity command
---------------------

The ``/velocity`` command contains a number of commands to help manage
the proxy.

``/velocity plugins``
^^^^^^^^^^^^^^^^^^^^^

If the user has the ``velocity.command.plugins`` permission, they can
view all the plugins currently active on the proxy.

``/velocity version``
^^^^^^^^^^^^^^^^^^^^^

Displays the Velocity proxy version.

``/velocity reload``
^^^^^^^^^^^^^^^^^^^^^

If the user has the ``velocity.command.reload`` permission, the proxy
will read and reconfigure itself from the ``velocity.toml`` on disk. If
there are problems with parsing the file, no changes will be applied.

The /server command
-------------------

If the user has the ``velocity.command.server`` permission (by default,
this is granted to all users), players can use this command to view and
change servers.

Executing just ``/server`` will send the user the name of the server they
are currently on, along with options to move to other servers configured
on the proxy.

If a server name is specified, Velocity will attempt to connect to the
server.

The /shutdown command
---------------------

When executed from the console, this will gracefully shut down the Velocity
proxy. All players will be disconnected from the proxy and plugins will have
a chance to finish up before the proxy shuts down.
63 changes: 49 additions & 14 deletions users/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,43 @@ These settings mostly cover the basic, most essential settings of the proxy.
| | | | the proxy. A value of ``0`` disables |
| | | | the rate limit. |
+---------------------------+------------+----------+----------------------------------------+
| ``connection-timeout`` | Integer | ``5000`` | This setting determines how long the |
| | | | proxy will wait to connect to a server |
| | | | before timing out. |
+---------------------------+------------+----------+----------------------------------------+
| ``read-timeout`` | Integer | ``30000``| This setting determines how long the |
| | | | proxy will wait to receive data from |
| | | | the server before timing out. If you |
| | | | use Forge, you may need to increase |
| | | | this setting. |
+---------------------------+------------+----------+----------------------------------------+
| ``proxy-protocol`` | Boolean | ``false``| This setting determines whether or not |
| | | | Velocity should receive HAProxy PROXY |
| | | | messages. If you don't use HAProxy, |
| | | | leave this setting off. |
+---------------------------+------------+----------+----------------------------------------+

``query`` section
^^^^^^^^^^^^^^^^^

+---------------+-------------+-----------+-------------------------------------------+
| Setting name | Type | Default | Description |
+===============+=============+===========+===========================================+
| ``enabled`` | Boolean | ``false`` | Whether or not Velocity should reply to |
| | | | GameSpy 4 (Minecraft query protocol) |
| | | | requests. You can usually leave this |
| | | | false. |
+---------------+-------------+-----------+-------------------------------------------+
| ``port`` | Number | ``25577`` | Specifies which port that Velocity should |
| | | | listen on for GameSpy 4 (Minecraft query |
| | | | protocol) requests. |
+---------------+-------------+-----------+-------------------------------------------+
+-----------------+-------------+-----------+-------------------------------------------+
| Setting name | Type | Default | Description |
+=================+=============+===========+===========================================+
| ``enabled`` | Boolean | ``false`` | Whether or not Velocity should reply to |
| | | | GameSpy 4 (Minecraft query protocol) |
| | | | requests. You can usually leave this |
| | | | false. |
+-----------------+-------------+-----------+-------------------------------------------+
| ``port`` | Number | ``25577`` | Specifies which port that Velocity should |
| | | | listen on for GameSpy 4 (Minecraft query |
| | | | protocol) requests. |
+-----------------+-------------+-----------+-------------------------------------------+
| ``map`` | String | Velocity | Specifies the map name to be shown to |
| | | | clients. |
+-----------------+-------------+-----------+-------------------------------------------+
| ``show-plugins``| Boolean | False | Whether or not Velocity plugins are |

This comment has been minimized.

Copy link
@hugmanrique

hugmanrique Apr 14, 2019

This False is inconsistent with the ones above (false). I'm really picky, sorry :(

| | | | included in query responses. |
+-----------------+-------------+-----------+-------------------------------------------+

The default configuration
-------------------------
Expand Down Expand Up @@ -182,10 +203,24 @@ Below is the default configuration file for Velocity, ``velocity.toml``.
# Disable by setting to 0
login-ratelimit = 3000
# Specify a custom timeout for connection timeouts here. The default is five seconds.
connection-timeout = 5000
# Specify a read timeout for connections here. The default is 30 seconds.
read-timeout = 30000
# Enables compatibility with HAProxy.
proxy-protocol = false
[query]
# Whether to enable responding to GameSpy 4 query responses or not
# Whether to enable responding to GameSpy 4 query responses or not.
enabled = false
# If query responding is enabled, on what port should query response listener listen on?
# If query is enabled, on what port should the query protocol listen on?
port = 25577
# This is the map name that is reported to the query services.
map = "Velocity"
# Whether plugins should be shown in query response by default or not
show-plugins = false
26 changes: 14 additions & 12 deletions users/frequently-asked-questions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Frequently asked questions
What versions of Minecraft does Velocity support?
-------------------------------------------------

Velocity supports Minecraft 1.8-1.13.1. It is important to note, however, that
Velocity supports Minecraft 1.8-1.13.2. It is important to note, however, that
Velocity does not translate between protocol versions - most packets from
the client and server are passed through the proxy unchanged. If you need
a multi-protocol solution for your Minecraft server, please consider installing
Expand All @@ -22,9 +22,9 @@ against Paper, although Sponge also runs well.
Is Velocity compatible with my Forge mod(s)?
--------------------------------------------

Velocity is compatible with Minecraft Forge (1.8-1.12.2) and supports legacy IP
forwarding for SpongeForge. Most mods should work without issue and with less
trouble than with BungeeCord or Waterfall.
Velocity is compatible with Minecraft Forge (1.8-1.12.2) and its legacy player
information forwarding is compatible with SpongeForge. Most mods should work
without issue and with less issues than with BungeeCord or Waterfall.

However, there are certain mods that are incompatible with the server-switching
behavior Velocity employs. These are issues that only the author of the mod can
Expand All @@ -43,19 +43,20 @@ There are several ways to increase the throughput of the proxy.
Keep an eye on your plugins
^^^^^^^^^^^^^^^^^^^^^^^^^^^

The most important performance killer by far are your plugins! Velocity implements
The biggest performance killer by far are your plugins! Velocity implements
several measures to attempt to reduce issues caused by misbehaving plugins, but
these measures are imperfect. It is important you monitor your plugins to ensure
they are not hurting your proxy throughput.
these measures are imperfect. It is important you monitor your plugins to
ensure they are not hurting your proxy throughput.

Disable compression between the proxy and your backend server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If your backend server has compression enabled (by default, Minecraft servers
compress packets larger than 256 bytes), then Velocity is forced to do additional
decompression to process packets going through the proxy. The best solution is to
disable compression on your backend server, so that only Velocity is responsible for
compressing packets.
compress packets larger than 256 bytes), then Velocity is forced to decompress
the packets from servers so it can process them, usually only to compress then
shortly afterwards because it did not find anything interesting. To eliminate
this inefficiency, you should disable compression on your backend server, so
that only Velocity is responsible for compressing packets.

To disable compression, simply set ``network-compression-threshold=-1`` in your
``server.properties``, and then reboot your server.
Expand All @@ -64,4 +65,5 @@ Keep up to date
^^^^^^^^^^^^^^^

The Velocity team constantly seeks to improve the throughput of the proxy, and
you can only benefit from our efforts if you keep the proxy regularly up-to-date.
you can only benefit from our efforts if you keep the proxy regularly
up-to-date.
32 changes: 18 additions & 14 deletions users/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Getting started with Velocity

Velocity is refreshingly easy to set up.

.. warning:: Velocity is in an alpha-quality state and is primarily suited for testing and small networks.
.. note:: Velocity is in an beta-quality state. Production networks
are running Velocity successfully with hundreds of concurrent players, but
your experience may vary.


Installing Java
Expand All @@ -28,30 +30,32 @@ 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:
Open up ``velocity.toml`` and find the ``[servers]`` section. This section
looks like this:

.. code-block:: plaintext
.. code::
[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.
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.
This is a minimal setup. Since we're not forwarding IPs and player information,
the Minecraft server will assume you connected from offline mode and will use
a different UUID and display only the default Steve and Alex skins. However,
Velocity can forward this information onto your Minecraft servers with some
extra configuration. See :doc:`./player-info-forwarding` to learn how to
configure this feature.

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

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.
in great detail.

0 comments on commit 87ddaf8

Please sign in to comment.