Skip to content

Commit bf1fc18

Browse files
authored
feat(newserver): add Velocity Proxy (#3904)
1 parent d3cdf63 commit bf1fc18

20 files changed

+226
-3
lines changed
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
##################################
2+
######## Default Settings ########
3+
##################################
4+
# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN!
5+
# Copy settings from here and use them in either:
6+
# common.cfg - applies settings to every instance.
7+
# [instance].cfg - applies settings to a specific instance.
8+
9+
#### Game Server Settings ####
10+
11+
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
12+
javaram="1024" # -Xmx$1024M
13+
14+
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
15+
startparameters=""
16+
17+
## Release Settings | https://docs.linuxgsm.com/game-servers/minecraft#release-settings
18+
# Version (latest|3.1.1)
19+
mcversion="latest"
20+
21+
#### LinuxGSM Settings ####
22+
23+
## LinuxGSM Stats
24+
# Send useful stats to LinuxGSM developers.
25+
# https://docs.linuxgsm.com/configuration/linuxgsm-stats
26+
# (on|off)
27+
stats="off"
28+
29+
## Notification Alerts
30+
# (on|off)
31+
32+
# Display IP | https://docs.linuxgsm.com/alerts#display-ip
33+
displayip=""
34+
35+
# More info | https://docs.linuxgsm.com/alerts#more-info
36+
postalert="off"
37+
38+
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
39+
discordalert="off"
40+
discordwebhook="webhook"
41+
42+
# Email Alerts | https://docs.linuxgsm.com/alerts/email
43+
emailalert="off"
44+
45+
emailfrom=""
46+
47+
# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify
48+
gotifyalert="off"
49+
gotifytoken="token"
50+
gotifywebhook="webhook"
51+
52+
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
53+
iftttalert="off"
54+
ifttttoken="accesstoken"
55+
iftttevent="linuxgsm_alert"
56+
57+
# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
58+
mailgunalert="off"
59+
mailgunapiregion="us"
60+
mailguntoken="accesstoken"
61+
mailgundomain="example.com"
62+
mailgunemailfrom="[email protected]"
63+
mailgunemail="[email protected]"
64+
65+
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
66+
pushbulletalert="off"
67+
pushbullettoken="accesstoken"
68+
channeltag=""
69+
70+
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
71+
pushoveralert="off"
72+
pushovertoken="accesstoken"
73+
pushoveruserkey="userkey"
74+
75+
# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat
76+
rocketchatalert="off"
77+
rocketchatwebhook="webhook"
78+
rocketchattoken=""
79+
80+
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack
81+
slackalert="off"
82+
slackwebhook="webhook"
83+
84+
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
85+
# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring".
86+
# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help".
87+
telegramapi="api.telegram.org"
88+
telegramalert="off"
89+
telegramtoken="accesstoken"
90+
telegramchatid=""
91+
curlcustomstring=""
92+
93+
## Updating | https://docs.linuxgsm.com/commands/update
94+
updateonstart="off"
95+
96+
## Backup | https://docs.linuxgsm.com/commands/backup
97+
maxbackups="4"
98+
maxbackupdays="30"
99+
stoponbackup="on"
100+
101+
## Logging | https://docs.linuxgsm.com/features/logging
102+
consolelogging="on"
103+
logdays="7"
104+
105+
## Monitor | https://docs.linuxgsm.com/commands/monitor
106+
# Query delay time
107+
querydelay="1"
108+
109+
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
110+
ansi="on"
111+
112+
#### Advanced Settings ####
113+
114+
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
115+
sleeptime="0.5"
116+
117+
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
118+
# 1: tmux kill
119+
# 2: CTRL+c
120+
# 3: quit
121+
# 4: quit 120s
122+
# 5: stop
123+
# 6: q
124+
# 7: exit
125+
# 8: 7 Days to Die
126+
# 9: GoldSrc
127+
# 10: Avorion
128+
# 11: end
129+
# 12: shutdown
130+
stopmode="12"
131+
132+
## Query mode
133+
# 1: session only
134+
# 2: gamedig (gsquery fallback)
135+
# 3: gamedig
136+
# 4: gsquery
137+
# 5: tcp
138+
querymode="2"
139+
querytype="minecraft"
140+
141+
## Console type
142+
consoleverbose="yes"
143+
consoleinteract="yes"
144+
145+
## Game Server Details
146+
# Do not edit
147+
gamename="Velocity Proxy"
148+
engine="lwjgl2"
149+
glibc="null"
150+
151+
#### Directories ####
152+
# Edit with care
153+
154+
## Game Server Directories
155+
systemdir="${serverfiles}"
156+
executabledir="${serverfiles}"
157+
preexecutable="java -Xmx${javaram}M -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:MaxInlineLevel=15 -jar"
158+
executable="./velocity.jar"
159+
servercfgdir="${systemdir}"
160+
servercfg="velocity.toml"
161+
servercfgdefault="velocity.toml"
162+
servercfgfullpath="${servercfgdir}/${servercfg}"
163+
164+
## Backup Directory
165+
backupdir="${lgsmdir}/backup"
166+
167+
## Logging Directories
168+
logdir="${rootdir}/log"
169+
gamelogdir="${systemdir}/logs"
170+
lgsmlogdir="${logdir}/script"
171+
consolelogdir="${logdir}/console"
172+
lgsmlog="${lgsmlogdir}/${selfname}-script.log"
173+
consolelog="${consolelogdir}/${selfname}-console.log"
174+
alertlog="${lgsmlogdir}/${selfname}-alert.log"
175+
postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
176+
177+
## Logs Naming
178+
lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
179+
consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"

lgsm/data/almalinux-8.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ ut99
119119
vh,glibc-devel
120120
vs
121121
vints,mono-complete
122+
vpmc,java-11-openjdk
122123
wet
123124
wf
124125
wmc,java-11-openjdk

lgsm/data/centos-8.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ ut99
118118
vh,glibc-devel
119119
vs
120120
vints,mono-complete
121+
vpmc,java-11-openjdk
121122
wet
122123
wf
123124
wmc,java-11-openjdk

lgsm/data/debian-10.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ ut99
119119
vh,libc6-dev
120120
vs
121121
vints,mono-complete
122+
vpmc,openjdk-11-jre
122123
wet
123124
wf
124125
wmc,openjdk-11-jre

lgsm/data/debian-11.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ ut99
119119
vh,libc6-dev
120120
vs
121121
vints,mono-complete
122+
vpmc,openjdk-11-jre
122123
wet
123124
wf
124125
wmc,openjdk-17-jre

lgsm/data/rhel-7.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ ut99
119119
vh,glibc-devel
120120
vs
121121
vints,mono-complete
122+
vpmc,java-11-openjdk
122123
wet
123124
wf
124125
wmc,java-11-openjdk

lgsm/data/rhel-8.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ ut99
119119
vh,glibc-devel
120120
vs
121121
vints,mono-complete
122+
vpmc,java-11-openjdk
122123
wet
123124
wf
124125
wmc,java-11-openjdk

lgsm/data/rocky-8.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ ut99
119119
vh,glibc-devel
120120
vs
121121
vints,mono-complete
122+
vpmc,java-11-openjdk
122123
wet
123124
wf
124125
wmc,java-11-openjdk

lgsm/data/serverlist.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ ut3,ut3server,Unreal Tournament 3
117117
ut99,ut99server,Unreal Tournament 99
118118
vh,vhserver,Valheim
119119
vints,vintsserver,Vintage Story
120+
vpmc,vpmcserver,Velocity Proxy MC
120121
vs,vsserver,Vampire Slayer
121122
wet,wetserver,Wolfenstein: Enemy Territory
122123
wf,wfserver,Warfork

lgsm/data/ubuntu-18.04.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ ut99
119119
vh,libc6-dev
120120
vs
121121
vints,mono-complete
122+
vpmc,openjdk-11-jre
122123
wet
123124
wf
124125
wmc,openjdk-11-jre

lgsm/data/ubuntu-20.04.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ ut99
119119
vh,libc6-dev
120120
vs
121121
vints,mono-complete
122+
vpmc,openjdk-11-jre
122123
wet
123124
wf
124125
wmc,openjdk-17-jre

lgsm/data/ubuntu-21.04.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ ut99
119119
vh,libc6-dev
120120
vs
121121
vints,mono-complete
122+
vpmc,openjdk-11-jre
122123
wet
123124
wf
124125
wmc,openjdk-17-jre

lgsm/data/ubuntu-21.10.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ ut99
117117
vh,libc6-dev
118118
vs
119119
vints,mono-complete
120+
vpmc,openjdk-11-jre
120121
wet
121122
wf
122123
wmc,openjdk-17-jre

lgsm/data/ubuntu-22.04.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ ut99
117117
vh,libc6-dev
118118
vs
119119
vints,mono-complete
120+
vpmc,openjdk-11-jre
120121
wet
121122
wf
122123
wmc,openjdk-17-jre

lgsm/functions/command_stop.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ fn_stop_graceful_select() {
231231
fn_stop_graceful_avorion
232232
elif [ "${stopmode}" == "11" ]; then
233233
fn_stop_graceful_cmd "end" 30
234+
elif [ "${stopmode}" == "12" ]; then
235+
fn_stop_graceful_cmd "shutdown" 30
234236
fi
235237
}
236238

lgsm/functions/command_update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ elif [ "${shortname}" == "mc" ]; then
2121
update_minecraft.sh
2222
elif [ "${shortname}" == "mcb" ]; then
2323
update_minecraft_bedrock.sh
24-
elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then
24+
elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then
2525
update_papermc.sh
2626
elif [ "${shortname}" == "mumble" ]; then
2727
update_mumble.sh

lgsm/functions/info_game.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,6 +2190,22 @@ fn_info_game_vints() {
21902190
configip=${configip:-"0.0.0.0"}
21912191
}
21922192

2193+
fn_info_game_vpmc() {
2194+
if [ ! -f "${servercfgfullpath}" ]; then
2195+
servername="${unavailable}"
2196+
configip="0.0.0.0"
2197+
port="25577"
2198+
else
2199+
servername=$(sed -nr 's/^motd\s*=\s*"(.*)"/\1/p' "${servercfgfullpath}")
2200+
bindaddress=$(sed -nr 's/^bind\s*=\s*"([0-9.:]+)"/\1/p' "${servercfgfullpath}")
2201+
configip=$(echo "${bindaddress}" | cut -d ':' -f 1)
2202+
port=$(echo "${bindaddress}" | cut -d ':' -f 2)
2203+
2204+
servername=${servername:-"NOT SET"}
2205+
fi
2206+
queryport=${port:-"25577"}
2207+
}
2208+
21932209
fn_info_game_wet() {
21942210
# Config
21952211
if [ ! -f "${servercfgfullpath}" ]; then
@@ -2456,6 +2472,8 @@ elif [ "${shortname}" == "vh" ]; then
24562472
fn_info_game_vh
24572473
elif [ "${shortname}" == "vints" ]; then
24582474
fn_info_game_vints
2475+
elif [ "${shortname}" == "vpmc" ]; then
2476+
fn_info_game_vpmc
24592477
elif [ "${shortname}" == "wet" ]; then
24602478
fn_info_game_wet
24612479
elif [ "${shortname}" == "wf" ]; then

lgsm/functions/info_messages.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ fn_info_message_ports() {
687687
echo -e "ss -tuplwn | grep AvorionServer"
688688
elif [ "${shortname}" == "bf1942" ]; then
689689
echo -e "ss -tuplwn | grep bf1942_lnxded"
690-
elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "rw" ] || [ "${shortname}" == "wmc" ]; then
690+
elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "rw" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then
691691
echo -e "ss -tuplwn | grep java"
692692
elif [ "${shortname}" == "terraria" ]; then
693693
echo -e "ss -tuplwn | grep Main"
@@ -1610,6 +1610,13 @@ fn_info_message_vints() {
16101610
} | column -s $'\t' -t
16111611
}
16121612

1613+
fn_info_message_vpmc() {
1614+
{
1615+
fn_port "header"
1616+
fn_port "Game" port tcp
1617+
} | column -s $'\t' -t
1618+
}
1619+
16131620
fn_info_message_wet() {
16141621
{
16151622
fn_port "header"
@@ -1798,6 +1805,8 @@ fn_info_message_select_engine() {
17981805
fn_info_message_ut2k4
17991806
elif [ "${shortname}" == "ut3" ]; then
18001807
fn_info_message_ut3
1808+
elif [ "${shortname}" == "vpmc" ]; then
1809+
fn_info_message_vpmc
18011810
elif [ "${shortname}" == "wet" ]; then
18021811
fn_info_message_wet
18031812
elif [ "${shortname}" == "wf" ]; then

lgsm/functions/install_server_files.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ elif [ "${shortname}" == "mcb" ]; then
222222
elif [ "${shortname}" == "pmc" ]; then
223223
install_eula.sh
224224
update_papermc.sh
225-
elif [ "${shortname}" == "wmc" ]; then
225+
elif [ "${shortname}" == "wmc" ]||[ "${shortname}" == "vpmc" ]; then
226226
update_papermc.sh
227227
elif [ "${shortname}" == "mumble" ]; then
228228
update_mumble.sh

lgsm/functions/update_papermc.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ remotelocation="papermc.io"
122122

123123
if [ "${shortname}" == "pmc" ]; then
124124
paperproject="paper"
125+
elif [ "${shortname}" == "vpmc" ]; then
126+
paperproject="velocity"
125127
elif [ "${shortname}" == "wmc" ]; then
126128
paperproject="waterfall"
127129
fi

0 commit comments

Comments
 (0)