proton-vpn.is
简体中文
简体中文繁體中文EnglishРусскийفارسی

首页 / 图解教程 / 路由器上用 WireGuard

路由器上用 WireGuard

在 OpenWrt 路由器上用 WireGuard 连接 Proton VPN:生成配置、装 luci-proto-wireguard、导入、防火墙,让家里所有设备走 VPN。

在路由器上配好,全家设备都走 VPN
在路由器上配好,全家设备都走 VPN GoddersUK, CC BY-SA 3.0

适合谁

电视、游戏机这类装不了软件的设备。路由器在免费版里只占 1 台,下面接多少设备都行。

生成配置

  1. 登录 account.protonvpn.com,Downloads → WireGuard configuration。
  2. Platform 选 Router,起个名字。
  3. 选服务器,Create,再Download。

OpenWrt

路由器 SSH
opkg update
opkg install luci-proto-wireguard
reboot
  1. Network → Interfaces → Add new interface,名字写 proton0,协议选 WireGuard VPN。
  2. Load configuration,把配置内容粘进去,Import settings。
  3. Peers 页点Edit,勾选 Route Allowed IPs,Save。
  4. Firewall Settings 里把它放进 wan 区域。
  5. Save & Apply。
  1. 电视、手机接家里 Wi-Fi,不用设置
  2. 路由器用 WireGuard 加密
  3. Proton 服务器换成它的 IP
通了之后的路

只让部分走

把不想走的网段从 AllowedIPs 里去掉,用计算器。默认的 0.0.0.0/0 是全部都走。

要注意

  • 运营商送的路由器多数不支持。
  • 路由器处理器弱时,速度会明显低于电脑直连。
  • 官方会下线旧服务器,连不上时重新生成一份配置。
同一份配置能给两台设备用吗?

不要。每台设备单独生成一份。

路由器上有 NetShield 吗?

Plus 生成配置时可以勾选级别,免费版只能选 VPN Accelerator。

接着看第一次连接

下一班

本页词条:路由器装 Proton VPN、OpenWrt WireGuard、Proton VPN WireGuard 配置文件