Crates.io | mcbe-lan-advertizer |
lib.rs | mcbe-lan-advertizer |
version | 0.1.1 |
source | src |
created_at | 2023-01-10 18:04:11.588956 |
updated_at | 2024-02-13 10:06:31.727348 |
description | Listens for Minecraft Bedrock LAN Ping packets and responds with a Pong packet. |
homepage | |
repository | https://github.com/max-ishere/mcbe-lan-advertizer |
max_upload_size | |
id | 755731 |
size | 37,987 |
Keywords: MCPE, Minecraft Bedrock, Friends tab, LAN games, cannot join local dedicated server.
Abbreviations
MCBE - Minecraft Bedrock Edition
MS - Microsoft
An MCBE client sends out special network broadcasts called Pings and asks all other devices on the network if they have a server running.
Say you have a phone and an iPad. If you start a LAN world on an iPad and then open minecraft on the phone, your phone will ask the iPad if it has a server (Pings the iPad). The iPad will say "Yes, on port 12345" (Thats a Pong). The phone will take iPad's IP address, that port 12345 and try to connect to it.
However a dedicated minecraft server that you run on a computer or laptop may not respond to your phone's Pings for whatever reason. Even if you are on the same network. So this program will do that for the server. This way if you cannot use the Servers tab because of parental restrictions/don't have a microsoft account logged in then you can still join your dedicated LAN server that runs on your laptop.
This is also useful if the dedicated server does not accept 2 players under 1 MS account so you may want to disable online mode and maybe log out from your MS account on one of the devices.
If the server's IP is not the same IP from which the Pong packet was sent then you will not be able to connect to the server. This is because the IP address is not part of the Pong packet. Instead the Pong sender's IP is the IP address that the client will connect.
So, no you cannot join some-server.net using this program. If really want to do that I can only point you to setting up a proxy. This is beyond the scope of this application.
Special thanks to u/Riven5's suggestion to use jhead/phantom. As Phantom's readme says:
Phantom README.md:
Makes hosted Bedrock/MCPE servers show up as LAN servers, specifically for consoles. You can now play on remote servers (not Realms!) on your Xbox and PS4 with friends. It's like having a LAN server that's not actually there, spooky.
I am not related to phantom in any way so if you have any questions about that software please contact the developer in their prefered way. Their README seems to have enough instructions on how to use the software so you should not have any issues.
Advantages:
Running:
advertize relay [ optional path to server.properties ]
# E.g:
advertize relay bedrock_servers/creative_1/server.properties
# You have to give a path to the file itself, not just the directory,
# otherwise the file won't be found.
In this mode the program will look into the current directory for a file called
server.properties
. In this file it will look for the server-port
. Then it will
start a UDP socket on port 19132 and when it recieves a Ping it will forward it to
0.0.0.0:server-port
. And the responce from that (a Pong) will be sent back to the
client that Pinged the program. This is useful if you want to accurately reflect
the number of players online.
Disadvantages:
Advantages
advertize from_props [ optional path to server.properties ] proto <num> <str>
# E.g:
advertize from_props creative_world/server.properties proto 560 '1.19.51'
In this mode the server.properties
is read and only the information there is used
to respond to Pings. In this mode online player count will always be 0. Look up <num>
and <str>
in Bedrock protocol version numbers. num
is the single number (560) and str
is the 1.19.51 representation.
In the project's github you will find the sample server.properties
. It only contains
the configuration that is required by this program, but it is not sufficient for an
MCBE server. Ideally you will run the advertize
executable in the same directory as the
bedrock server executable.
Currently we recommend to use cargo install
. We might provide binary releases in the future.
You need to have cargo and rust installed for this.
cargo install mcbe-lan-advertizer
Then either:
server.properties
in the current directory.server.propeties
.Run the following commands in your terminal (cmd.exe
on Windows).
git
installed for this.git clone https://github.com/max-ishere/mcbe-lan-advertizer
cargo
and rust installed.cargo build --release
# --release will optimize the app so it runs more efficiently
cp target/release/advertize (path)
You can also do this in a file manager by opening the project, then target
and then release
folder.
cd ..
rm mcbe-lan-advertizer
Ask on Discussions.