{"id":471,"date":"2025-07-30T14:52:30","date_gmt":"2025-07-30T06:52:30","guid":{"rendered":"https:\/\/www.nice9z.cn\/?p=471"},"modified":"2025-07-30T14:52:36","modified_gmt":"2025-07-30T06:52:36","slug":"%e3%80%90%e6%95%99%e7%a8%8b%e5%b8%96%e3%80%91%e5%88%a9%e7%94%a8velocity%e4%b8%ad%e8%bd%ac%e6%b5%b7%e5%a4%96%e9%ab%98%e5%bb%b6%e8%bf%9fmc%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%88%b0%e4%bd%8e%e5%bb%b6%e8%bf%9fv","status":"publish","type":"post","link":"https:\/\/www.nice9z.cn\/?p=471","title":{"rendered":"\u3010\u6559\u7a0b\u5e16\u3011\u5229\u7528Velocity\u4e2d\u8f6c\u6d77\u5916\u9ad8\u5ef6\u8fdfMC\u670d\u52a1\u5668\u5230\u4f4e\u5ef6\u8fdfVPS\u4ee5\u964d\u4f4e\u56fd\u5185\u76f4\u8fde\u5ef6\u8fdf"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">    \u5199\u5728\u524d\u9762\u7684\u8bdd\uff1a\u505a\u8fd9\u4e2a\u6559\u7a0b\u7684\u539f\u56e0\u662f\u56e0\u4e3a\u6211\u624b\u91cc\u6709\u4e00\u53f0\u6ee1\u914d\u7684\u7532\u9aa8\u4e91\u65b0\u52a0\u5761\u7684VPS\uff0c\u6700\u8fd1\u60f3\u7740\u8ddf\u670b\u53cb\u4e00\u8d77\u73a9MC\uff0c\u5c31\u5728\u8fd9\u53f0\u670d\u52a1\u5668\u4e0a\u5f00\u4e86\u4e2amc\u7684\u670d\u52a1\u5668\uff0c\u4f46\u8fd9\u53f0VPS\u7684\u7ebf\u8def\u5e76\u4e0d\u662f\u5f88\u597d\uff0c\u5728\u56fd\u5185\u8fde\u7684\u8bdd\u53ea\u6709\u79fb\u52a8\u53ef\u4ee5\u76f4\u8fde\uff0c\u800c\u4e14\u670b\u53cb\u4eec\u7684\u5730\u7406\u4f4d\u7f6e\u548c\u7f51\u7edc\u8fd0\u8425\u5546\u90fd\u4e0d\u4e00\u6837\uff0c\u7535\u4fe1\u88f8\u8fde\u5ef6\u8fdf\u53ef\u4ee5\u98d9\u5230200+\uff0c\u6839\u672c\u6ca1\u6cd5\u73a9\uff0c\u4f46\u662f\u56fd\u5185\u6027\u80fd\u80fd\u591f\u5f00mc\u7684vps\u4ef7\u683c\u8d35\u7684\u4e0a\u5929\uff0c\u6ca1\u529e\u6cd5\uff0c\u4e8e\u662f\u6211\u5c31\u7422\u78e8\u7740\u901a\u8fc7\u4e2d\u8f6c\u7684\u65b9\u5f0f\uff0c\u628a\u7532\u9aa8\u4e91\u670d\u52a1\u5668\u7684\u6570\u636e\u8f6c\u53d1\u7ed9\u79bb\u5927\u9646\u8ddd\u79bb\u5c1a\u53ef\u4e14\u662f\u4f18\u5316\u7ebf\u8def\u7684\u673a\u5668\uff0c\u8fd9\u5c31\u6709\u4e86\u8fd9\u671fVelocity\u4e2d\u8f6cMC\u670d\u52a1\u5668\u7684\u6559\u7a0b\u3002\u5982\u679c\u4f60\u7684\u60c5\u51b5\u8ddf\u6211\u4e00\u6837\uff0c\u6709\u4e00\u53f0\u6027\u80fd\u5c1a\u53ef\u7684\u6d77\u5916\u670d\u52a1\u5668\u4ee5\u53ca\u4e00\u53f0\u5927\u9646\u4f18\u5316\u7ebf\u8def\u7684VPS\uff08\u5ef6\u8fdf\u8981\u5728100\u4ee5\u5185\u7684\uff09\uff0c\u800c\u4e14\u53c8\u60f3\u5f00mc\u670d\u52a1\u5668\uff0c\u4e0d\u59a8\u770b\u770b\u8fd9\u7bc7\u6559\u7a0b\u3002\u8fd9\u7bc7\u6559\u7a0b\u5e76\u975e\u662f\u6211\u539f\u521b\uff0c\u6211\u4e5f\u53ea\u662f\u5728\u524d\u4eba\u7684\u57fa\u7840\u4e0a\u6574\u5408\u4e86\u4e00\u4e0b\uff0c\u611f\u8c22nodeseek\u4e0a\u5927\u4f6c\u7684\u652f\u6301\u4ee5\u53ca\u66fe\u7ecf\u73a9\u8fc7\u7684\u7aef\u53e3\u8f6c\u53d1\u7ed9\u6211\u7684\u7075\u611f\u3002\u8bdd\u4e0d\u591a\u8bf4\uff0c\u6559\u7a0b\u5f00\u59cb\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">\u524d\u671f\u51c6\u5907\uff1a<br>1.\u4e00\u53f0\u9ad8\u6027\u80fd\u7684VPS\u670d\u52a1\u5668\uff084C8G20G\u8d77\u6b65\uff09\uff0c\u4e00\u53f0\u5230\u4f60\u5f53\u4f60\u4f4d\u7f6e\u7684\u4f18\u5316\u7ebf\u8def\u7684VPS\uff08\u4e2d\u8f6c\u673a\u5185\u5b58\u9700\u8981\u2265512M\uff0c\u5176\u4ed6\u4e0d\u505a\u8981\u6c42\uff0c\u5e26\u5bbd\u548c\u6d41\u91cf\u591f\u5c31\u597d\uff0c\u6211\u81ea\u5df1\u7528\u7684\u662f\u963f\u91cc\u4e91\u9999\u6e2f200M\u5e26\u5bbd\u7684\u670d\u52a1\u5668\uff0c\u4e09\u7f514837\u76f4\u8fde\uff0c\u5168\u56fd\u5e73\u5747\u5ef6\u8fdf40ms\uff09<br>2.FinalShell\u7b49ssh\u7ba1\u7406\u8f6f\u4ef6<br>3.\u4e00\u70b9\u70b9\u52a8\u624b\u80fd\u529b\u3001\u4e00\u70b9\u70b9\u8010\u5fc3\u4ee5\u53ca\u4e00\u9897\u4f1a\u601d\u8003\u67e5\u9605\u8d44\u6599\u7684\u8111\u74dc\u74dc<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">1.\u4e0b\u8f7d\u5e76\u5b89\u88c5\u524d\u7f6e<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7528\u81ea\u5e26\u7684\u5305\u7ba1\u7406\u5668\u5b89\u88c5 jre (Java Runtime Environment)<br><code>sudo apt install openjdk-21-jre-headless<\/code>\u00a0\u6216\u00a0<code>sudo yum install openjdk-21-jre-headless<\/code><\/li>\n\n\n\n<li>\u6216\u8005\u4f60\u6709\u5176\u4ed6\u65b9\u6cd5\u5b89\u88c5 java \u4e5f\u662f\u53ef\u4ee5\u7684<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">2.\u4e0b\u8f7d\u5e76\u542f\u52a8 velocity<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5efa\u7acb\u8fd0\u884c\u76ee\u5f55<br><code>mkdir -p \/opt\/velocity<\/code><br>\u8fdb\u5165\u76ee\u5f55<br><code>cd \/opt\/velocity<\/code><\/li>\n\n\n\n<li>\u62c9\u53d6 velocity \u6838\u5fc3<br><code>wget https:\/\/fill-data.papermc.io\/v1\/objects\/1d9dc624bef59a62f320bc22a134e44a7b9326538463e94726465297e6324751\/velocity-3.4.0-SNAPSHOT-521.jar -O velocity.jar<\/code><\/li>\n\n\n\n<li>\u542f\u52a8 velocity \u751f\u6210\u6240\u9700\u6587\u4ef6<br><code>java -jar velocity.jar<\/code><br>\u7136\u540e\u8f93\u5165\u00a0<code>stop<\/code>\u00a0\u6216\u6309 Ctrl+C \u5173\u95ed<\/li>\n\n\n\n<li>\u4f7f\u7528Finalshell\u81ea\u5e26\u7684\u6587\u4ef6\u7ba1\u7406\u7f16\u8f91 velocity.toml<br>\u5728 [servers] \u4e0b\u7f16\u8f91\u4f60\u6240\u9700\u8981\u8f6c\u53d1\u7684\u670d\u52a1\u5668<code># \u4e8b\u4f8b<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">lobby = &#8220;1.2.3.4:30066&#8221; survival = &#8220;1.2.3.4:30067&#8221; try = [&#8220;survival&#8221;] # <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\u8f93\u5165\u9ed8\u8ba4\u8fde\u63a5\u7684\u670d\u52a1\u5668 \u5982\u679c\u4f60\u8fd8\u6709\u4ec0\u4e48\u60f3\u914d\u7f6e\u4e3a\u53ef\u4ee5\u53c2\u8003\u00a0<a href=\"https:\/\/www.nodeseek.com\/jump?to=https%3A%2F%2Fdocs.papermc.io%2Fvelocity%2Fconfiguration%2F\" target=\"_blank\" rel=\"noreferrer noopener\">velocity \u5b98\u65b9\u6587\u6863<\/a> \u6ce8\u610f\u4e86\u4e2d\u8f6c\u51fa\u6765\u7684\u5730\u5740\u4f1a\u9ed8\u8ba4\u8fde\u63a5try\u540e\u9762\u5bf9\u5e94\u7684ip+\u7aef\u53e3\uff08<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-cyan-blue-color\">\u662f\u4f60\u642d\u5efa\u670d\u52a1\u5668\u7684\u90a3\u53f0vps\u7684ip+mc\u7684\u7aef\u53e3<\/mark>\uff09\uff0c\u6240\u4ee5\u5982\u679c\u53ea\u9700\u8981\u4e2d\u8f6c\u4e00\u4e2a\u5730\u5740\uff0c\u800c\u4e0d\u9700\u8981\u591a\u7248\u672c\u591a\u4e16\u754c\u4e2d\u8f6c\u7684\u8bdd\uff0c\u53ef\u4ee5\u53ea\u586b\u5199try\u540e\u9762\u5bf9\u5e94\u7684\u5730\u5740\u7136\u540e\u628a\u5176\u4ed6\u7684\u5220\u6389\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u540c\u65f6\u590d\u5236 forwarding.secret \u7684\u5185\u5bb9\u5907\u7528\uff0c\u4e3a\u4e86\u4fdd\u8bc1\u6240\u6709\u4eba\u90fd\u4ec5\u901a\u8fc7 velocity \u8fdb\u884c\u8fde\u63a5\uff0c\u6240\u4ee5\u9700\u8981\u4e00\u4e2a\u5bc6\u94a5\u8fdb\u884c\u9a8c\u8bc1\u3002<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">\u6ce8\u610f\u662f\u6253\u5f00forwarding.secret\u8fd9\u4e2a\u6587\u4ef6\uff0c\u91cc\u9762\u6709\u4e00\u4e32\u4ee3\u7801\uff0c\u800c\u4e0d\u662f\u81ea\u5df1\u60f3\u586b\u4ec0\u4e48\u586b\u4ec0\u4e48\u3002<\/mark><br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3.\u914d\u7f6e\u540e\u7aef<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6253\u5f00\u4f60\u642d\u5efaMC\u670d\u52a1\u5668\u7684VPS\u7684SSH\u754c\u9762<\/li>\n\n\n\n<li>\u5982\u679c\u4f60\u7528\u7684\u662f paper \u6838\u5fc3\uff0c\u7f16\u8f91\u00a0<code>.\/config\/paper-global.yml<\/code><br>\u4fee\u6539 proxies\/velocity\/enabled \u4e3a true<br>\u5e76\u628a forwarding.secret \u7684\u5185\u5bb9\u7c98\u8d34\u5230 proxies\/velocity\/secret \u4e2d<code># \u4e8b\u4f8b proxies: bungee-cord: online-mode: true proxy-protocol: false velocity: enabled: true # \u4fee\u6539\u8fd9\u91cc online-mode: true secret: \u2018\u2019 # \u5bc6\u94a5\u7c98\u8d34\u5230\u8fd9\u91cc <\/code><\/li>\n\n\n\n<li>\u540c\u65f6\u628a\u6b63\u7248\u9a8c\u8bc1\u5173\u95ed\u3002<\/li>\n\n\n\n<li>\u6700\u540e\u91cd\u542f\u670d\u52a1\u7aef<\/li>\n\n\n\n<li>\u5982\u679c\u4f60\u7528\u7684\u662f\u5176\u4ed6\u6838\u5fc3\uff0c\u53ef\u4ee5\u81ea\u884c\u8c37\u6b4c<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">4.velocity \u4ee3\u7406\u670d\u52a1\u5668\u81ea\u542f\u52a8<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u56de\u5230\u524d\u7aef\u4ee3\u7406\u670d\u52a1\u5668<br>\u521b\u5efa\u5e76\u7f16\u8f91 velocity.service<br><code>touch \/etc\/systemd\/system\/velocity.service<\/code><br><code>vim \/etc\/systemd\/system\/velocity.service<\/code><br>\u8f93\u5165\u4ee5\u4e0b\u914d\u7f6e\uff1a<code># \/etc\/systemd\/system\/velocity.service [Unit] Description=Velocity Minecraft Proxy [Service] WorkingDirectory=\/opt\/velocity ExecStart=\/usr\/bin\/java -Xms512M -Xmx512M -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -jar velocity.jar User=nobody Type=simple Restart=on-failure RestartSec=10 [Install] WantedBy=multi-user.target<\/code><\/li>\n\n\n\n<li>\u91cd\u8f7d service \u6587\u4ef6<br><code>sudo systemctl daemon-reload<\/code><\/li>\n\n\n\n<li>\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u52a8<br><code>sudo systemctl enable velocity<\/code><\/li>\n\n\n\n<li>\u542f\u52a8 velocity<br><code>sudo systemctl start velocity<\/code><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u7528 docker \u542f\u52a8\uff08\u53ef\u9009\uff09<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4f60\u4e0d\u60f3\u8fd9\u4e48\u9ebb\u70e6\u53ef\u4ee5\u8bd5\u8bd5\u7528 docker \u6765\u542f\u52a8<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5b89\u88c5 Docker\uff08\u8fd9\u91cc\u7701\u7565\uff09<\/li>\n\n\n\n<li>\u4e00\u6837\u5148\u521b\u5efa\u5de5\u4f5c\u76ee\u5f55<br><code>mkdir -p \/opt\/velocity<\/code><br><code>cd \/opt\/velocity<\/code><\/li>\n\n\n\n<li>\u7f16\u8f91 compose.yaml<br><code>touch compose.yaml<\/code><br><code>vim compose.yaml<\/code><br>\u91cc\u9762\u8f93\u5165<code>services: velocity: image: itzg\/mc-proxy stdin_open: true tty: true environment: TYPE: VELOCITY MEMORY: 256M volumes: - .\/:\/server ports: - 25565:25565 restart: unless-stopped<\/code><\/li>\n\n\n\n<li>\u542f\u52a8\u4e00\u6b21 docker compose \u751f\u6210\u914d\u7f6e\u6587\u4ef6<br><code>sudo docker compose up -d &amp;&amp; sudo docker compose down<\/code><\/li>\n\n\n\n<li>\u7f16\u8f91 velocity.toml #2<\/li>\n\n\n\n<li>\u914d\u7f6e\u540e\u7aef #3<\/li>\n\n\n\n<li>\u542f\u52a8 docker compose<br><code>sudo docker compose up -d<\/code><br>\u5b8c\u6210<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u53c2\u8003:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.nodeseek.com\/jump?to=https%3A%2F%2Fdocs.papermc.io%2Fvelocity%2F\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/docs.papermc.io\/velocity\/<\/a><br><a href=\"https:\/\/www.nodeseek.com\/jump?to=https%3A%2F%2Fforum.level1techs.com%2Ft%2Fhow-to-reverse-proxy-your-minecraft-server-with-velocity%2F163497\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/forum.level1techs.com\/t\/how-to-reverse-proxy-your-minecraft-server-with-velocity\/163497<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u540e\u6253\u5f00mc\uff0c\u5728\u52a0\u5165\u670d\u52a1\u5668\u4e2d\u8f93\u5165\u4f60\u7684\u4e2d\u8f6c\u673a\u7684ip+mc\u7aef\u53e3\u5373\u53ef\u8bbf\u95ee\u6e38\u620f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Just Enjoy!!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5199\u5728\u524d\u9762\u7684\u8bdd\uff1a\u505a\u8fd9\u4e2a\u6559\u7a0b\u7684\u539f\u56e0\u662f\u56e0\u4e3a\u6211\u624b\u91cc\u6709\u4e00\u53f0\u6ee1\u914d\u7684\u7532\u9aa8\u4e91\u65b0\u52a0\u5761\u7684VPS\uff0c\u6700\u8fd1\u60f3\u7740\u8ddf\u670b\u53cb\u4e00\u8d77\u73a9MC\uff0c\u5c31\u5728\u8fd9\u53f0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[18,1],"tags":[],"class_list":["post-471","post","type-post","status-publish","format-standard","hentry","category-learning","category-categories"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.nice9z.cn\/index.php?rest_route=\/wp\/v2\/posts\/471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nice9z.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nice9z.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nice9z.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nice9z.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=471"}],"version-history":[{"count":5,"href":"https:\/\/www.nice9z.cn\/index.php?rest_route=\/wp\/v2\/posts\/471\/revisions"}],"predecessor-version":[{"id":477,"href":"https:\/\/www.nice9z.cn\/index.php?rest_route=\/wp\/v2\/posts\/471\/revisions\/477"}],"wp:attachment":[{"href":"https:\/\/www.nice9z.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nice9z.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nice9z.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}