CLI tool
yhan-sun/p2wlan avatar
yhan-sun/p2wlan

P2WLAN review: self-hosted rooms, direct paths, and encrypted relay fallback

跨平台 P2P 虚拟局域网(VirtualLAN)工具,让异地设备像在同一局域网中互联。支持 NAT 穿透、IPv6 直连、房间组网与 Relay 回退,覆盖 Windows / macOS / Linux / Android。

2,695 stars119 forksRustMIT

At a glance

What is it?
P2WLAN builds a routed virtual LAN across Windows, macOS, Linux, and Android, with NAT traversal attempts and an encrypted Relay fallback. It suits users willing to operate a Control service or accept dependency on one.
Who is it for?
Adopt P2WLAN when participants can install a client and someone will operate the Control service or self-host it. Do not choose it for layer 2 bridging, unattended access to devices without P2WLAN, or networks where no usable Relay exists.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 3 days ago.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 20, 2026, and from our analysis. They are not legal advice.

Editorial analysis

P2WLAN's routed private network for remote devices

P2WLAN addresses a specific gap between ordinary remote-access clients and conventional network bridging. It gives participating devices private virtual IP addresses, then makes those addresses usable across homes, mobile networks, campuses, cloud hosts, and different providers. The target audience includes people organizing Minecraft or Terraria sessions, administrators reaching a NAS or HomeLab, developers connecting to remote machines over SSH or RDP, and teams that want selected services to remain on a private virtual network rather than receiving individual public port mappings.

The boundary is important. Installing P2WLAN does not place every device on the local home or office network into the overlay. Both endpoints must participate by running P2WLAN. The remote service must also listen on an address reachable through the virtual interface, and its firewall must permit the relevant traffic. This is a routed layer 3 network, not an Ethernet layer 2 bridge. Software that depends on broadcast discovery, L2 adjacency, or physical-network integration is therefore outside the design described by the README.

Rooms provide the organizational layer. A room can hold a game group, a development environment, or a set of maintenance devices without mixing every participant into one undifferentiated network. The client presents room membership, device presence, virtual IPs, connection paths, and latency. This is a more useful boundary for P2WLAN's use cases than treating the entire installation as one permanent VPN site.

How P2WLAN chooses Direct and Relay paths

The README describes a direct-path-first data flow. Once connected to a Control service, the client joins a personal network or room and receives a private virtual IP. It can communicate with another device through the local network, reachable IPv6, or IPv4 UDP hole punching. Applications continue addressing the same virtual IP regardless of which path currently carries the traffic. That continuity matters because a session can move from Direct to Relay and later recover a Direct path without requiring a separate address scheme for each service.

Control coordinates the participants, while the data path can be Direct or Relay. A successful Direct connection avoids consuming Relay bandwidth for the transferred data. Relay is described as end-to-end encrypted, although the README does not expose the protocol details needed to assess that design further. The repository layout shows separate Rust workspaces for NAT handling, network binding, WireGuard support, relaying, cryptography, the client daemon, and the CLI. The `Cargo.toml` also includes `x25519-dalek`, `chacha20poly1305`, `blake2`, `sha2`, and `zeroize`, but dependency presence alone does not establish protocol behavior.

P2WLAN does not treat the conventional NAT type label as an automatic reason to stop. For difficult combinations, the README says the client can use observed port patterns, port prediction, fixed anchors, or bounded birthday probing. When high-entropy mappings and strict filtering leave no reliable direct route, the client uses a reachable TLS Relay and continues looking for evidence of a better direct path. IPv6 is attempted when both endpoints have usable IPv6 and UDP access.

Installing P2WLAN and completing the first room connection

The README does not provide copyable installation or CLI commands. It directs users to download formal builds from the GitHub releases page, then enter a Control address supplied by an administrator or deploy their own service using `docs/guides/self-hosting.md`. Because no exact CLI syntax is documented, inventing a `p2wlan` command would be misleading.

A first real use starts with obtaining a release build for Windows, macOS, Linux, or Android. The README says to log in using the administrator-provided Control address, connect to a personal network or room, and confirm that the participating devices appear with virtual IP addresses. It then instructs users to access the target through that virtual IP and the service's port. For a Minecraft example, that means connecting to the server by its room-assigned virtual IP. For a HomeLab service, the equivalent check is access to the service port through the NAS or virtual machine's P2WLAN address.

The first verification should not stop at showing devices as online. Check each room member's path indicator and latency. A Direct path indicates that traffic is not using Relay bandwidth, while Relay means the fallback is carrying the connection. The README also says the client exposes traffic information and built-in diagnostics, so those displays are the appropriate place to investigate an address assignment or connectivity problem.

NAT limits, firewall duties, and unavailable Relays

The largest technical limitation is that P2WLAN cannot guarantee a direct path through every combination of NAT, carrier filtering, and firewall policy. Its own NAT table distinguishes regular support from conditional support. A port-restricted NAT paired with symmetric NAT depends on finding a usable port relationship. Symmetric NAT on both ends requires coordination and may still fail when random mappings overlap with strict filtering. Multi-layer NAT, CGNAT, campus networks, and mobile networks add environmental uncertainty that cannot be inferred from a simple NAT type name.

If IPv4 UDP is blocked and there is no reachable IPv6 or other direct path, P2WLAN needs a configured and reachable Relay. Without one, the README does not promise connectivity. That makes Relay configuration part of the service's availability model, not a cosmetic backup. Administrators using the hosted option also need to account for its Control dependency. Self-hosters take responsibility for server placement, bandwidth, domains, accounts, data, and operating costs.

Service-side firewall configuration is another common failure point. P2WLAN assigns the virtual IP, but it does not make the application listen there or automatically open the application port. SSH, RDP, NAS interfaces, game servers, and web panels each need a reachable listening address and the right firewall permission. Likewise, installing P2WLAN on one endpoint does not make an ordinary LAN printer or another device without the client reachable unless that device is otherwise exposed or separately proxied.

P2WLAN compared with Tailscale, ZeroTier, and EasyTier

The main alternative choice depends on network semantics and administrative preference. Tailscale uses a hosted control plane and WireGuard data plane, with access policies and device management, while Headscale is a separate self-hosted control option. Its fallback uses Peer Relay or DERP when a direct WireGuard path is unavailable. P2WLAN instead centers rooms, a self-hostable Control and Relay, and its own direct-path logic. An organization already standardized on Tailscale policy management may find less value in introducing another overlay.

ZeroTier is the closer choice when layer 2 behavior matters. Its comparison entry cites virtual Ethernet and layer 2 bridging, including integration with physical LANs when configured. P2WLAN explicitly uses a layer 3 TUN network and does not offer Ethernet layer 2 broadcast bridging. Choose ZeroTier's approach when discovery protocols or bridge semantics require peers to behave like one broadcast domain. P2WLAN is the better match when applications can address routable virtual IPs and rooms are the desired grouping mechanism.

EasyTier takes another route through decentralized mesh transport, protocol selection, subnet proxying, and automatic routing. Its members must agree on a network identifier and key, and topology-dependent routing or relay configuration remains with the operator. P2WLAN reduces that topology work for its stated use cases by putting Control and Relay behind a room-oriented client, but users still need an administrator or self-hosting capability. None of these distinctions removes the need to verify firewall, NAT, and service-listening behavior.

P2WLAN release cadence, upgrades, and MIT licensing

The repository is not archived, and its last push was on 2026-10-17. The recent release history includes `v0.1.170` on 2026-10-08, `v0.1.169` earlier that day, and `v0.1.168` on 2026-09-30. That cadence indicates recent development activity, but the version numbers remain below `1.0`. Operators should therefore expect closer release review than they might apply to a mature stable branch. The README does not document a long-term-support branch, compatibility matrix, automated upgrade procedure, or rollback procedure, so those points remain unconfirmed.

The Rust workspace version is `0.1.170`, matching the latest listed release. Its clients, Control, and Relay source are described as open under the MIT License. That permits use, modification, distribution, and sublicensing subject to the License terms, but this review does not provide legal advice. Self-hosting also carries operational costs outside software licensing, including servers, bandwidth, domains, account administration, backups, and monitoring. An upgrade may affect client compatibility with an already deployed Control or Relay, yet the README does not state the compatibility policy. Check the release documentation for each component before rolling a deployment forward.

Editorial conclusion

Adopt P2WLAN when participants can install a client and someone will operate the Control service or self-host it. Do not choose it for layer 2 bridging, unattended access to devices without P2WLAN, or networks where no usable Relay exists. Verify target-service firewall rules, actual Direct or Relay status, IPv4 and IPv6 path behavior, and the operational cost of the chosen Control and Relay deployment before moving production access onto the virtual network.

Frequently asked questions

Does P2WLAN work when direct UDP connectivity is unavailable?

P2WLAN can fall back to an end-to-end encrypted Relay when a direct path is unavailable. That path requires a Relay that is configured and reachable; the README does not promise connectivity without one.

Can P2WLAN access every device on my home LAN?

No. The README states that both endpoints must run P2WLAN. Installing the client does not automatically join the rest of the local network to the virtual network.

Does P2WLAN support an administrator-managed Control service and self-hosting?

Yes. Users can enter a Control address supplied by an administrator or deploy their own service using the repository's `docs/guides/self-hosting.md` guide. Self-hosters bear the server, bandwidth, domain, account, and data management costs.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. yhan-sun/p2wlan on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/yhan-sun-p2wlan.svg)](https://hysenlabs.com/projects/yhan-sun-p2wlan)

Was this useful?