Velocity互通服

前置

Velocity下载

FabricProxy-Lite下载

安装

老样子,放Velocity到一个文件夹,然后

1
java -jar velocityxxxxx.jar #根据自己的版本来看
1
2
3
4
5
6
7
8
9
10
11
12
13
[19:19:27 INFO]: Booting up Velocity 3.1.2-SNAPSHOT (git-1a1391a5-b155)...
[19:19:27 INFO]: Loading localizations...
[19:19:28 INFO]: Connections will use epoll channels, libdeflate (Linux x86_64) compression, OpenSSL 1.0.x (Linux x86_64) ciphers
[19:19:28 WARN]: Player info forwarding is disabled! All players will appear to be connecting from the proxy and will have offline-mode UUIDs.
[19:19:28 INFO]: Loading plugins...
[19:19:28 INFO]: Loaded 0 plugins
[19:19:28 INFO]: Listening on /[0:0:0:0:0:0:0:0%0]:25577
[19:19:28 INFO]: Velocity and some of its plugins collect metrics and send them to bStats (https://bStats.org).
[19:19:28 INFO]: bStats collects some basic information for plugin authors, like how many people use
[19:19:28 INFO]: their plugin and their total player count. It's recommended to keep bStats enabled, but
[19:19:28 INFO]: if you're not comfortable with this, you can opt-out by editing the config.txt file in
[19:19:28 INFO]: the '/plugins/bStats/' folder and setting enabled to false.
[19:19:28 INFO]: Done (1.07s)!

上面是成功的提示,端口25577

配置

配置velocity.toml

1
vi velocity.toml

bind项为绑定的ip和端口号,一般只需要修改端口号即可,保持前面的0.0.0.0不变

motd为服务器的描述文字

online-mode是否开启正版验证

force-key-authentication 改成false

player-info-forwarding-mode项将引号中的内容改为modern

ping-passthrough项将引号中的内容改为all

[servers]中是子服务器列表

try中的内容是尝试登录服务器的顺序,将默认登录的子服务器放在第一位,多个服务器以逗号隔开

[query]下的port项,和bind中的端口号保持一致即可

官方文档

服务器配置

装一下FabricProxy-Lite下载这个mod

服务器启动一下,然后关掉

1
2
cd config/
vi FabricProxy-Lite.toml

image-20221106194139863

内容改成这样,其中secretVelocity路径下的forwarding .secret

image-20221106194244546

小写一个start.sh

1
2
#!/bin/sh
java -jar velocity-3.1.2-SNAPSHOT-155.jar
1
2
chmod u+x start.sh #给特权
./start.sh #启动