-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve English and explanations.
- Loading branch information
Showing
1 changed file
with
64 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,64 @@ | ||
# Minecraft Random Proxy | ||
|
||
|
||
|
||
https://github.com/Urpagin/MCRandomProxy/assets/72459611/47de9c00-a61d-49e8-aa8c-d7ce70481680 | ||
|
||
|
||
|
||
## Why & How? | ||
|
||
First choose a port to expose the app, e.g `25565`. | ||
Then make a file named `servers.txt` containing different Minecraft servers in this format: | ||
|
||
```txt | ||
IPv4:port | ||
IPv4:port | ||
IPv4:port | ||
... | ||
``` | ||
|
||
(`servers.txt` must be at the same level, or next to the binary.) | ||
|
||
When that is ready, run the app, and you are able to connect to it from your Minecraft client. | ||
Let's say you're running it on the same machine as your client: connect to `127.0.0.1:<the_port_you_chose_earlier>`. | ||
At each new connection, you'll connect to a random server on the specified file `servers.txt`. | ||
|
||
|
||
And for the how, the program uses Asio (a networking library in C++) to route all the incoming packets from you (the client) | ||
to some server chosen at random, and forward all packets coming from the random server to the client (you). | ||
|
||
This also means that every packet exchanged can be read and also modified by the program 😉😉😉😉😉, although currently that is not | ||
the case. | ||
|
||
## Installation | ||
|
||
### Linux 🐧 | ||
|
||
There is a prebuilt binary for x64 systems. | ||
|
||
As for other architectures, you must build it yourself: | ||
|
||
1. Clone | ||
``` | ||
git clone https://github.com/Urpagin/MCRandomProxy && cd MCRandomProxy | ||
``` | ||
2. Make Build Directory | ||
``` | ||
mkdir build && cd build | ||
``` | ||
3. Build | ||
``` | ||
cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build . --config Release -- -j 16 | ||
``` | ||
The program is compiled and ready to be executed (`./MCRandomProxy`). Now make the `servers.txt` file next to the binary. | ||
|
||
4. Make & Populate `servers.txt` | ||
``` | ||
vim servers.txt | ||
``` | ||
|
||
### Windows 🪟 | ||
|
||
There is a prebuilt binary for x64 systems. | ||
|
||
Requires Microsoft Visual C++ Redistributable (vcredist) to be installed: | ||
|
||
Useful links: | ||
|
||
- [Download](https://aka.ms/vs/17/release/vc_redist.x86.exe) | ||
|
||
- [Download Page](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022) | ||
|
||
### MacOS 🍎 | ||
|
||
There is **no** prebuilt binary yet. You must build it yourself. | ||
|
||
### Docker 🐳 | ||
|
||
*Yet to be done.* | ||
# Minecraft Random Proxy | ||
|
||
[Demo Video](https://github.com/Urpagin/MCRandomProxy/assets/72459611/47de9c00-a61d-49e8-aa8c-d7ce70481680 | ||
) | ||
|
||
## Why & How? | ||
|
||
1. **Setup the Port and Server List** | ||
- Choose a port to expose the app (e.g., `25565`). | ||
- Create a file named `servers.txt` containing a list of Minecraft servers in the following format: | ||
```txt | ||
IPv4:port | ||
IPv4:port | ||
IPv4:port | ||
... | ||
``` | ||
> *(Ensure `servers.txt` is located next to the binary.)* | ||
2. **Run the App** | ||
- Start the program, then connect to it via your Minecraft client. | ||
- If the app is running on the same machine as your client, use the following address: `127.0.0.1:<port_you_chose>`. | ||
- Each new connection will randomly route you to one of the servers listed in `servers.txt`. | ||
3. **How It Works** | ||
- The program uses the Asio networking library (C++) to route incoming packets from your client to a randomly selected server and back. | ||
- While the program has the potential to read or modify packets, it currently only forwards them without changes. | ||
--- | ||
## Installation | ||
### Linux 🐧 | ||
- **Prebuilt Binary:** Available for x64 systems. | ||
- **Other Architectures:** Build the application manually: | ||
1. Clone the repository: | ||
```bash | ||
git clone https://github.com/Urpagin/MCRandomProxy && cd MCRandomProxy | ||
``` | ||
2. Create a build directory: | ||
```bash | ||
mkdir build && cd build | ||
``` | ||
3. Build the program: | ||
```bash | ||
cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build . --config Release -- -j 16 | ||
``` | ||
After building, run the program (`./MCRandomProxy`) and place the `servers.txt` file next to the binary. | ||
4. Create and populate `servers.txt`: | ||
```bash | ||
vim servers.txt | ||
``` | ||
### Windows 🪟 | ||
- **Prebuilt Binary:** Available for x64 systems. | ||
- **Dependency:** Install Microsoft Visual C++ Redistributable (vcredist): | ||
- [Direct Download](https://aka.ms/vs/17/release/vc_redist.x86.exe) | ||
- [Microsoft VC++ Redistributable Page](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022) | ||
### macOS 🍎 | ||
- No prebuilt binary available. You must build the program manually. | ||
### Docker 🐳 | ||
- *Perhaps in the distant future.* |