所有命令都必须提供 EDGEVPNTOKEN 或 EDGEVPNCONFIG,否则无法组网;token/配置文件等同于网络完全控制权,泄露即失守;从源码完整构建需 Node 20.19+,直接 go build 需先存在 api/react-ui/dist 目录;节点间建连可能耗时数分钟,README 建议至少等 5 分钟;项目未经安全审计,不适合敏感流量或生产环境。
edgevpn
mudlerApache-2.0活跃维护基于 libp2p 构建的去中心化 P2P VPN,无需中心服务器,靠共享令牌自动发现节点并建立加密隧道,适合搭建跨云、跨 NAT 的网状网络。
:sailboat: The immutable, decentralized, statically built p2p VPN without any central server and automatic discovery! Create decentralized introspectable tunnels over p2p with shared tokens
curl -sfL https://raw.githubusercontent.com/mudler/edgevpn/master/install.sh | sh
edgevpn -g > config.yamlREADME 未说明具体硬件或显存要求;需能创建 tun/tap 虚拟网卡(默认接口 edgevpn0),支持 Linux 桌面 GUI(alpha)。
基于 libp2p 的无中心服务器 p2p VPN,用共享 token 自动组网并分配虚拟 IP
基于 libp2p 构建的去中心化 P2P VPN,无需中心服务器,靠共享令牌自动发现节点并建立加密隧道,适合搭建跨云、跨 NAT 的网状网络。
核心能力
- 用共享 token 或配置文件自动组建去中心化网络
- 自动为节点分配虚拟 IP 并内置小型 DNS 解析
- 可把 TCP 服务经 p2p 反向代理暴露,类似 ngrok
- 支持节点间直接通过 p2p 传输文件
- 可作为 Go 库嵌入,提供分布式 p2p 账本能力
容易踩的坑
- v0.35.5最新正式版2026-09-03 · 2026-09-03 06:56 UTC
What's Changed
- fix(deps): bump golang.org/x/crypto to v0.56.0 for GO-2026-6354 and G… by @jimmykarily in https://github.com/mudler/edgevpn/pull/1078
Full Changelog: https://github.com/mudler/edgevpn/compare/v0.35.4...v0.35.5
- v0.35.42026-08-17 · 2026-08-17 10:23 UTC
查看更新说明
What's Changed
- chore(deps): update dependency autoprefixer to v10.5.4 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1046
- fix(deps): update module github.com/labstack/echo/v4 to v5 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1041
- chore(deps): update dependency font-awesome to v7 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1001
- fix(deps): update module golang.org/x/sys to v0.47.0 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1055
- react UI design system by @mudler in https://github.com/mudler/edgevpn/pull/1063
- fix: repair HTTP egress, the proxy subcommand and ledger ownership by @localai-bot in https://github.com/mudler/edgevpn/pull/1064
- Fix/proxy egress ownership by @mudler in https://github.com/mudler/edgevpn/pull/1066
- fix: correct license badge in README from GPL3 to Apache 2.0 by @mudler with @Copilot in https://github.com/mudler/edgevpn/pull/1072
- fix(deps): bump pion/stun to v3.1.5 and pion/dtls to v3.1.4 (2 CVEs) by @mauro-agent in https://github.com/mudler/edgevpn/pull/1075
New Contributors
- @mauro-agent made their first contribution in https://github.com/mudler/edgevpn/pull/1075
Full Changelog: https://github.com/mudler/edgevpn/compare/v0.35.3...v0.35.4
- v0.35.32026-07-07 · 2026-07-07 11:17 UTC
查看更新说明
What's Changed
- fix(deps): update module github.com/labstack/echo/v5 to v5.2.1 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1043
- fix(deps): update module github.com/urfave/cli/v2 to v3 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1030
- Fix typo --peerguardian flag in docs by @julianpistorius in https://github.com/mudler/edgevpn/pull/1010
- fix(deps): update module github.com/onsi/gomega to v1.42.1 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1044
- fix(deps): update module github.com/creachadair/otp to v0.5.4 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/921
- fix(deps): update module github.com/onsi/ginkgo/v2 to v2.32.0 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1042
- chore(deps): update actions/checkout action to v7 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1048
- fix(deps): update module github.com/urfave/cli/v3 to v3.10.1 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1047
- fix(deps): update module github.com/cenkalti/backoff/v4 to v7 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1050
- fix(deps): update module github.com/cenkalti/backoff/v4 to v7 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1052
- fix(deps): update module github.com/libp2p/go-libp2p-kad-dht to v0.41.0 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1051
- fix(deps): update module github.com/urfave/cli/v2 to v3 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1045
- chore(deps): bump docs/themes/docsy from
bbf68d4to01c827eby @dependabot[bot] in https://github.com/mudler/edgevpn/pull/1009
New Contributors
- @julianpistorius made their first contribution in https://github.com/mudler/edgevpn/pull/1010
Full Changelog: https://github.com/mudler/edgevpn/compare/v0.35.2...v0.35.3
- v0.35.22026-06-09 · 2026-06-09 07:01 UTC
查看更新说明
What's Changed
- Bump golang.org/x/net to fix GO-2026-5026 by @jimmykarily in https://github.com/mudler/edgevpn/pull/1039
- fix(deps): update module golang.zx2c4.com/wireguard/windows to v1 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1038
- chore(deps): update codecov/codecov-action action to v7 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1037
- fix(deps): update module golang.org/x/sys to v0.46.0 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1040
- fix(deps): update module github.com/labstack/echo/v4 to v5 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1025
Full Changelog: https://github.com/mudler/edgevpn/compare/v0.35.1...v0.35.2
- v0.35.12026-06-08 · 2026-06-08 06:50 UTC
查看更新说明
What's Changed
- Bump go toolchain and crypto to get rid of security reports by @jimmykarily in https://github.com/mudler/edgevpn/pull/1035
- chore(deps): update docker/build-push-action action to v7 by @renovate[bot] in https://github.com/mudler/edgevpn/pull/1002
Full Changelog: https://github.com/mudler/edgevpn/compare/v0.35.0...v0.35.1
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
EdgeVPN uses libp2p to build private decentralized networks that can be accessed via shared secrets.
It can:
-
Create a VPN : Secure VPN between p2p peers
- Automatically assign IPs to nodes
- Embedded tiny DNS server to resolve internal/external IPs
- Create trusted zones to restrict which peers may join (experimental: it does not currently stop a token holder from entering the zone — see the security model)
- For example, the Kairos CNCF project uses it as a layer for creating decentralized clusters with Kubernetes
-
Act as a reverse Proxy : Share a tcp service like you would do with
ngrok. EdgeVPN let expose TCP services to the p2p network nodes without establishing a VPN connection: creates reverse proxy and tunnels traffic into the p2p network. -
Send files via p2p : Send files over p2p between nodes without establishing a VPN connection.
-
Be used as a library: Plug a distributed p2p ledger easily in your golang code! For example EdgeVPN powers LocalAI's P2P features (you can learn more about it here).
See the documentation.
:camera: Screenshots
| Dashboard (Dark mode) | Dashboard (Light mode) |
|---|---|
![]() | ![]() |
| DNS | Machine index |
|---|---|
![]() | ![]() |
| Services | Blockchain index |
|---|---|
![]() | ![]() |
:new: GUI
A Desktop GUI application (alpha) for Linux is available here
| Dashboard | Connections index |
|---|---|
![]() | ![]() |
![]() |
Kubernetes
Check out Kairos for seeing EdgeVPN in action with Kubernetes!
:running: Installation
Download the precompiled static release in the releases page. You can either install it in your system or just run it.
Or install the latest release with the one-liner:
curl -sfL https://raw.githubusercontent.com/mudler/edgevpn/master/install.sh | sh
Every installation route — install script, release archives, Homebrew, the container image and building from source — is covered in Install EdgeVPN.
:hammer: Building from source
The web UI is a React application compiled into the binary, so a Node toolchain (Node 20.19+) is required for a full build:
make build # builds the UI if needed, then the Go binary
make react-ui-force # force a clean UI rebuild
go build alone works only when api/react-ui/dist already exists —
the UI is embedded with //go:embed, and a missing directory is a
compile error. For Go-only work you can stub it:
mkdir -p api/react-ui/dist && touch api/react-ui/dist/index.html
See api/react-ui/README.md for frontend development.
:computer: Usage
EdgeVPN works by generating tokens (or a configuration file) that can be shared between different machines, hosts or peers to access to a decentralized secured network between them.
Every token is unique and identifies the network, no central server setup, or specifying hosts ip is required.
To generate a config run:
# Generate a new config file and use it later as EDGEVPNCONFIG
$ edgevpn -g > config.yaml
OR to generate a portable token:
$ EDGEVPNTOKEN=$(edgevpn -g -b)
Note, tokens are config merely encoded in base64, so this is equivalent:
$ EDGEVPNTOKEN=$(edgevpn -g | tee config.yaml | base64 -w0)
All edgevpn commands implies that you either specify a EDGEVPNTOKEN (or --token as parameter) or a EDGEVPNCONFIG as this is the way for edgevpn to establish a network between the nodes.
The configuration file is the network definition and allows you to connect over to your peers securely.
Warning Exposing this file or passing-it by is equivalent to give full control to the network.
:satellite: As a VPN
To start the VPN, simply run edgevpn without any argument.
An example of running edgevpn on multiple hosts:
# on Node A
$ EDGEVPNTOKEN=.. edgevpn --address 10.1.0.11/24
# on Node B
$ EDGEVPNTOKEN=.. edgevpn --address 10.1.0.12/24
# on Node C ...
$ EDGEVPNTOKEN=.. edgevpn --address 10.1.0.13/24
...
... and that's it! the --address is a virtual unique IP for each node, and it is actually the ip where the node will be reachable to from the vpn. You can assign IPs freely to the nodes of the network, while you can override the default edgevpn0 interface with IFACE (or --interface)
Note: It might take up time to build the connection between nodes. Wait at least 5 mins, it depends on the network behind the hosts.
:question: Is it for me?
The decentralized approach is chatty and might not suit low-latency workloads, and this software has not been security audited. Read when not to use EdgeVPN before you rely on it.
:question: Why?
First of all it's my first experiment with libp2p. Second, I always wanted a more "open" ngrok alternative, but I always prefer to have "less infra" as possible to maintain. That's why building something like this on top of libp2p makes sense.
:warning: Warning!
This software has not been through a full security audit — don't rely on it for sensitive traffic or production environments. The full caveats are in when not to use EdgeVPN.
:books: Examples
- A network-decentralized k3s test cluster — a multi-node Kubernetes development cluster across machines behind NAT.
- Use EdgeVPN as a library — embed a node in your own Go program.
🧑💻 Projects using EdgeVPN
- Kairos - creates Kubernetes clusters with K3s automatically using EdgeVPN networks
🐜 Contribution
You can improve this project by contributing in following ways:
- report bugs
- fix issues
- request features
- asking questions (just open an issue)
and any other way if not mentioned here.
:notebook: Credits
- The awesome libp2p library
- https://github.com/songgao/water for tun/tap devices in golang
- Room example (shamelessly parts are copied by)
- Logo originally made by Uniconlabs from www.flaticon.com, modified by me
:notebook: Troubleshooting
Bootstrap failures, receive-buffer warnings and poor network performance are covered in Troubleshooting.
:notebook: TODO
- VPN
- Send and receive files via p2p
- Expose remote/local services via p2p tunnelling
- Store arbitrary data on the blockchain
- Allow to persist blockchain on disk
:notebook: LICENSE
Apache License v2.
edgevpn Copyright (C) 2021 Ettore Di Giacinto
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.








