mcbe_lan_advertizer/lib.rs
1//! # Minecraft Bedrock Server LAN Advertizer
2//!
3//! On pocket edition there is a way to play with friends on same LAN using
4//! the friends tab. For this to work a client will send a Ping packet as a
5//! broadcast to port 19132. Normally a server will respond to these packets
6//! with Pong packet.
7//!
8//! Most mobile servers (open to LAN games) will respond to Pings properly.
9//! However a dedicated server may ignore a request because it thinks it's
10//! outside the LAN. Or because of some other reason that we do not know.
11//!
12//! # Modes of operation
13//!
14//! ## Relay
15//!
16//! In relay mode the program will listen on port 19132 and forward packets
17//! to the real server. This way the server thinks the Ping comes from a
18//! localhost client and should not deny this request. Then the program will
19//! take the Pong that the real server generated and send it to the client.
20//!
21//! # server.properties
22//!
23//! In properties mode the program will read `server.properties` and use the
24//! information there to generate a Pong packet. This can be used if the
25//! server still does not respond with Pong requests.
26//!
27//! Because the actual server runs on a random port that port number is
28//! transmitted in the Pong packet. Thus we can run a dedicated server on
29//! any port and point this program to Pong the correct, but arbitrary port.
30//!
31//! # Usage
32//!
33//! See [`config::args`]
34//!
35//! # Still have questions or need support?
36//!
37//! Read the extended [README.md](https://github.com/max-ishere/mcbe-lan-advertizer) on GitHub. It has more details while this page
38//! is dedicated to developers.
39
40#[macro_use]
41extern crate thiserror;
42
43pub mod config;
44pub mod error;
45pub mod pong;