Port-forwarding P2P demo with invite code, console log, sidebar game selection, and board canvas (Gomoku-style). No STUN/TURN/ZeroTier required. Use manual port forwarding or IPv6.
mvn -v # ensure Maven is installed
mvn clean packageThis produces a fat JAR:
target/easy-p2p-1.0.0-shaded.jar
java -jar target/easy-p2p-1.0.0-shaded.jar
Click “我是服务器(生成邀请码)” → copy the invite code and send to your peer. Make sure your router forwards the selected TCP port (default 2266) to your host.
java -jar target/easy-p2p-1.0.0-shaded.jar
Paste the invite code and click connect.
- The app fetches your public IPv4 via
checkip.amazonaws.comfor invite code. - Use manual port forwarding (IPv4) or allow inbound (IPv6) in your router/firewall.
- Invite is AES-256-CBC (+ Base64). You can rotate the key in
InviteCodec.