diff --git a/README.md b/README.md index ca1613e..a83a921 100644 --- a/README.md +++ b/README.md @@ -2,21 +2,23 @@ This is a Velocity plugin that makes it possible to host a modern Forge server behind a Velocity proxy! -Unlike other solutions, this plugin does not require any special modifications to the client. (The player doesn't need to do anything) +Unlike other solutions, this plugin does not require any special modifications to the backend server nor the client. (The player doesn't need to do anything) -This plugin is right now in its alpha stage and should not be used in production, use it at your own risk, you have been warned. ## How to get started: -### On the Velocity proxy side: 1. Download and install this plugin to your proxy. - -### On the Forge server side: -1. Download and install "Ambassador-Forge" as a mod to your Forge server. (Found at https://github.com/adde0109/Ambassador-Forge) -2. Start the server. -3. If you wish to use modern forwarding, close the server and open "ambassador-common.toml" in the config folder and put your forwarding secret in the "forwardingSecret" field. -4. In "server.properties" make sure online-mode is set to false. -5. You are now ready to start the server and connect to it with Velocity! +2. After starting the server, configure the plugin it to your liking using the config file found in the folder "Ambassador". +3. If you want to use modern forwarding you can use this mod on the Forge server: https://github.com/adde0109/Proxy-Compatible-Forge ## Features -* Server switching. -* Server switching using kick to reset the client. -* Server switching using client mod: https://github.com/Just-Chaldea/Forge-Client-Reset-Packet +* Server switching using kick to reset the client with configureble message and switch timeout. +* Server switching using client mod for instant server switching: https://github.com/Just-Chaldea/Forge-Client-Reset-Packet + +## Stuck on "Negotiating": +Why: This is happening because the client finishes the reset after the reset-timeout time has passed and thus, the proxy disconnects the client and the screen. Usually because to the client took too long to reset the forge registries. + +Fix: Increase the "reset-timeout" in the config. +If you know that everyone who is connecting to the server is using the packet client reset packet mod (Pixelmon include this mod), you can set this value to the max (Velocity's timout found in Velocity.toml). +This timout is meant to allow for people that doesn't have the mod to get disconnected more quickly. + +## Discord +https://discord.gg/Vusz9pBNyJ diff --git a/Velocity b/Velocity index f744b37..c7ba525 160000 --- a/Velocity +++ b/Velocity @@ -1 +1 @@ -Subproject commit f744b37ad5c7b6f00ca01681f26b75cad2584b7e +Subproject commit c7ba5255e3b0170a0e7183f3a38927931de34a03 diff --git a/build.gradle.kts b/build.gradle.kts index b1e9b17..d80a4ac 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,7 @@ plugins { java idea - id("com.github.johnrengelman.shadow") version "7.1.2" + id("com.github.johnrengelman.shadow") version "8.1.1" } group = "org.adde0109" @@ -20,11 +20,11 @@ dependencies { compileOnly("com.velocitypowered:velocity-proxy") annotationProcessor("com.velocitypowered:velocity-api") compileOnly("com.electronwill.night-config:toml:3.6.6") - implementation("org.bstats:bstats-velocity:3.0.0") - compileOnly("io.netty:netty-buffer:4.1.86.Final") - compileOnly("io.netty:netty-transport:4.1.86.Final") - compileOnly("io.netty:netty-codec:4.1.86.Final") - compileOnly("io.netty:netty-handler:4.1.86.Final") + implementation("org.bstats:bstats-velocity:3.0.1") + compileOnly("io.netty:netty-buffer:4.1.90.Final") + compileOnly("io.netty:netty-transport:4.1.90.Final") + compileOnly("io.netty:netty-codec:4.1.90.Final") + compileOnly("io.netty:netty-handler:4.1.90.Final") } tasks { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 249e583..ccebba7 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 070cb70..bdc9a83 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index a69d9cb..79a61d4 100644 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,10 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' @@ -143,12 +143,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac diff --git a/gradlew.bat b/gradlew.bat index f127cfd..93e3f59 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME%