Introduction
This mod aims to add P2P connection for both client and dedicated server through Epic Online Service, in order to add a multiplayer connection method whenever direct access to public IP is not available (for hosting player or server), e.g. behind Nedwork Address Translation.
Requirements
This mod can only operate on the following platforms:
- Windows (x86_64)
- Windows (arm64) (not yet tested)
- Linux (x86_64), with GNU C Library version 2.17+* (not yet tested)
- Linux (arm64), with GNU C Library version 2.17+*
- MacOS (x86_64), with system version at least OS X 10.15 (Catalina)
- MacOS (arm64) (not yet tested)
* System bundled with Musl C can try gcompat
* Android is not supported due to technical issues
Details
Client
Joining
If the mod successfully loaded and operate, input a connection address with correct format will both works as like normal server address in "Add Server" and "Direct Connection"

Hosting
If the mod successfully loaded and operate, after Open To LAN operation, the connection address through P2P will also printed in chat. It is able to copy through clicking, just like the original LAN port.

Server
The connection address through P2P will be printed just after "Start serving on..". Note that the connection address do not include brackets.

Commands
The following commands works on both dedicated server and client.
/eosp2p status: Show if mod operates or not, with reason./eosp2p eosaddress: Show the connection address of the current world. Error thrown if not yet published.
Known Issues (that I failed to solve)
- Frequent connect and disconnect may causes issues.
- The correct close reason may not shown up (as the connection close before the close reason arrived)
- Server PING function will shows that server not accessible instead of latency
Credits
This project incorporates the following open-source software libraries. We gratefully acknowledge the authors and contributors for their amazing work.
- kcp
- Author/Copyright: Copyright (c) 2017 Lin Wei (skywind3000 at gmail.com)
- License: MIT License (See Appendix Section 1)
- Link: https://github.com/skywind3000/kcp
- skarupke/flat_hash_map
- Author/Copyright: Copyright Malte Skarupke 2017
- License: Boost Software License, Version 1.0 (See Appendix Section 2)
- Link: https://github.com/skarupke/flat_hash_map
- Magic Enum C++
- Author/Copyright: Copyright (c) 2019 - 2026 Daniil Goncharov
- License: MIT License (See Appendix Section 1)
- Link: https://github.com/Neargye/magic_enum
- CPP/CRC
- Author/Copyright: Copyright (c) 2022 Darren V Levine
- License: MIT License (See Appendix Section 1)
- Link: https://github.com/DarrenLevine/cppcrc
-
- Author/Copyright: Copyright (c) 2012 - present, Victor Zverovich and contributors
- License: MIT License (See Appendix Section 1)
- Link: https://github.com/fmtlib/fmt