# 如何将每台设备连接到我自己的 VPN 服务器？

> 逐步说明如何用 WireGuard、Outline 或 AmneziaWG，将 iPhone、Android 手机、Windows 电脑、Mac 或路由器连接到个人 TunnelVPS 服务器。

- URL: https://tunnelvps.com/zh/guides/
- 最后更新: 2026-11-16
- 发布者: TunnelVPS (https://tunnelvps.com)

一台服务器，所有设备：每个系统该安装哪个应用，配置如何送到设备上，以及五份逐步指南从哪里开始。

**简要回答 — 如何把我的设备连接到 TunnelVPS 服务器？**

先在 **TunnelVPS** 服务器上安装 WireGuard，为每台设备创建一个对等节点，然后把每个节点导入官方应用：iPhone、iPad 和 Mac 使用 App Store，Android 使用 Google Play，Windows 使用安装程序。运行 OpenWrt 或 GL.iNet 固件的路由器使用同样的文件。TunnelVPS 不限制设备数量；每个系统各有一份指南。

**要点速览**

- **先在服务器上安装**：VPN 通过 [安装指南](https://tunnelvps.com/zh/help/install-wireguard-in-one-command/ "How do I install WireGuard on my TunnelVPS server?") 安装在服务器上；服务器不会预装任何东西。
- **每台设备一个对等节点**：每部手机、笔记本或路由器都有自己的一对密钥和隧道地址。
- **手机** 扫描服务器上生成的二维码；**电脑和路由器** 导入 `.conf` 文件。
- **Outline 和 AmneziaWG** 在同样的系统上有各自的应用。

## 每台设备需要哪个应用？

*按设备列出的官方 VPN 应用及其来源，于 2026 年 11 月 16 日在各项目自己的页面上阅读*

| 设备 | WireGuard | Outline | AmneziaVPN | 指南 |
| --- | --- | --- | --- | --- |
| iPhone、iPad | App Store | 是（iOS） | 是（iOS） | [iPhone 指南](https://tunnelvps.com/zh/guides/wireguard-iphone/ "How do I set up WireGuard on an iPhone?") |
| Android | Google Play 或直接下载的 APK | 是 | 是 | [Android 指南](https://tunnelvps.com/zh/guides/wireguard-android/ "How do I set up WireGuard on Android?") |
| Windows 10 和 11 | 来自 wireguard.com 的安装程序 | 是 | 是 | [Windows 指南](https://tunnelvps.com/zh/guides/wireguard-windows/ "How do I set up WireGuard on Windows?") |
| macOS | Mac App Store | 是 | 是 | [macOS 指南](https://tunnelvps.com/zh/guides/wireguard-macos/ "How do I set up WireGuard on a Mac?") |
| 路由器 | OpenWrt 软件包或 GL.iNet 面板 | 否 | 否 | [路由器指南](https://tunnelvps.com/zh/guides/wireguard-router/ "How do I put a whole home network on WireGuard?") |

*价格查看日期：2026年11月16日.*

## 哪些逐步操作指南涵盖服务器？

*TunnelVPS 服务器的 16 份操作指南，从下单到流量监控，2026 年 11 月 16 日*

| 问题 | 指南 |
| --- | --- |
| 如何为WireGuard添加设备？ | [添加 WireGuard 设备](https://tunnelvps.com/zh/guides/how-to-add-a-device-to-a-wireguard-server/ "How do I add a device to WireGuard?") |
| 如何检查VPN是否存在DNS泄露？ | [检查 DNS 泄露](https://tunnelvps.com/zh/guides/how-to-check-a-vpn-for-dns-leaks/ "How do I check a VPN for DNS leaks?") |
| 如何为WireGuard开启IP转发？ | [WireGuard 的 IP 转发](https://tunnelvps.com/zh/guides/how-to-enable-ip-forwarding-for-wireguard/ "How do I enable IP forwarding for WireGuard?") |
| 如何在VPS上安装AmneziaWG？ | [安装 AmneziaWG](https://tunnelvps.com/zh/guides/how-to-install-amneziawg-on-a-vps/ "How do I install AmneziaWG on a VPS?") |
| 如何在VPS上安装wg-easy？ | [安装 wg-easy](https://tunnelvps.com/zh/guides/how-to-install-wg-easy-on-a-vps/ "How do I install wg-easy on a VPS?") |
| 如何保持 VPS 更新？ | [保持 VPS 更新](https://tunnelvps.com/zh/guides/how-to-keep-a-vpn-server-updated/ "How do I keep a VPS updated?") |
| 如何为手机生成 WireGuard 二维码？ | [WireGuard 二维码](https://tunnelvps.com/zh/guides/how-to-make-a-wireguard-qr-code-for-a-phone/ "How do I make a WireGuard QR code for a phone?") |
| 如何监控 WireGuard 流量？ | [监控 WireGuard 流量](https://tunnelvps.com/zh/guides/how-to-monitor-wireguard-traffic/ "How do I monitor WireGuard traffic?") |
| 如何在 UFW 中开放 WireGuard 端口？ | [UFW 中的 WireGuard 端口](https://tunnelvps.com/zh/guides/how-to-open-the-wireguard-port-in-ufw/ "How do I open the WireGuard port in UFW?") |
| 如何加固 VPS 上的 SSH？ | [加固 SSH](https://tunnelvps.com/zh/guides/how-to-secure-ssh-on-a-vpn-server/ "How do I secure SSH on a VPS?") |
| 如何搭建 Outline VPN 服务器？ | [Outline VPN 服务器](https://tunnelvps.com/zh/guides/how-to-set-up-an-outline-vpn-server/ "How do I set up an Outline VPN server?") |
| 如何搭建我自己的 VPN 服务器？ | [搭建你自己的 VPN 服务器](https://tunnelvps.com/zh/guides/how-to-set-up-your-own-vpn-server/ "How do I set up my own VPN server?") |
| 如何与家人共享我的 VPN 服务器？ | [与家人共享 VPN](https://tunnelvps.com/zh/guides/how-to-share-your-vpn-server-with-family/ "How do I share a VPN server with my family?") |
| 如何设置 WireGuard 分流隧道？ | [WireGuard 分流隧道](https://tunnelvps.com/zh/guides/how-to-split-tunnel-with-wireguard/ "How do I set up WireGuard split tunneling?") |
| 如何设置 WireGuard IPv6？ | [WireGuard IPv6](https://tunnelvps.com/zh/guides/how-to-use-ipv6-with-wireguard/ "How do I set up WireGuard IPv6?") |
| 如何在 Linux 上使用 WireGuard？ | [Linux 上的 WireGuard](https://tunnelvps.com/zh/guides/how-to-use-wireguard-on-linux/ "How do I use WireGuard on Linux?") |

## 在任何设备连接之前，服务器上必须完成哪些工作？

**服务器需要安装 WireGuard、一对服务器密钥、一个 `wg0.conf` 文件，并开启 IP 转发。** 服务器不预装任何VPN：每台服务器起始都是干净的Debian或Ubuntu系统。WireGuard通过一条有文档的命令安装（sudo apt install wireguard），Outline从Outline Manager桌面应用设置，AmneziaWG则通过SSH从AmneziaVPN应用设置；TunnelVPS的指南会逐步讲解每一种。。全新的 TunnelVPS 服务器是干净的 Ubuntu 或 Debian，可通过 SSH 以 root 身份访问。[首次 SSH 登录指南](https://tunnelvps.com/zh/help/first-ssh-login/ "How do I log in to a TunnelVPS server over SSH?") 带你到命令提示符，安装指南用大约十条命令完成其余部分。

`wg0` 接口运行后，每台新设备只需两步：为它生成一对密钥，并添加一个 `[Peer]` 段，其中包含它的公钥和专属隧道地址。

## 配置如何送到手机或笔记本上？

**手机读取二维码；电脑和路由器导入一个小型文本文件。** TunnelVPS 于 2026 年 11 月 16 日阅读了 WireGuard 安装页面：它列出了 iOS、Android、Windows 和 macOS 的客户端，以及用于路由器的 OpenWrt 软件包。客户端文件包含设备的私钥、隧道地址、服务器的公钥，以及服务器的 IP 地址和端口。在服务器上，`qrencode` 软件包可以直接在终端中把该文件打印为二维码。

该文件属于机密：拿到它的人都能使用隧道。通过 SSH 传输，或以二维码形式显示，并删除不再需要的副本。要移除丢失的手机，请在服务器上删除它的 `[Peer]` 段，然后重新加载 WireGuard。

*在服务器上把客户端配置打印为二维码*

```bash
apt install qrencode
qrencode -t ansiutf8 < /etc/wireguard/clients/DEVICE.conf
```

## 一台 TunnelVPS 服务器能承载多少台设备？

**TunnelVPS 不限制设备数量：方案的 vCPU、内存和月流量决定了实际上限。** WireGuard 很轻量，因此即使是 Solo 也能同时处理几台设备的浏览。Amnezia 建议 10 个或以上的同时连接使用 2 vCPU 和 2 GB 内存，Duo（3 vCPU / 3 GB / 40 GB）及更大的方案均满足要求。对大多数家庭而言，流量比 CPU 更重要：[流量指南](https://tunnelvps.com/zh/how-much-traffic-does-a-vpn-use/ "How much traffic does a personal VPN use in a month?") 按设备估算一个月的用量。

## 设备常见问题

### 同一台服务器上，一台设备能用 WireGuard，另一台用 Outline 吗？

可以。两种协议监听不同的端口，因此服务器可以为笔记本运行 WireGuard，为网络限制更严格的手机运行 Outline 或 AmneziaWG。Home 及更大的方案可以同时容纳两者。

### 每台设备都需要单独的配置吗？

需要。每台设备都有自己的密钥和隧道地址，因此可以单独移除某一台而不影响其他设备。两台设备共用一个文件，会争抢同一个地址。

### TunnelVPS 会限制连接的设备数量吗？

不会。TunnelVPS 不限制设备数量；唯一的上限是方案的流量和 vCPU。

### 设备应该使用哪个 DNS 服务器？

用户信任的任何解析器都可以。示例文件使用公共解析器；AdGuard Home 等 DNS 过滤器也可以直接在服务器上运行。

**结论**

- **尽量在每台设备上使用 WireGuard**：四个系统和路由器都有官方应用。
- **对于所在网络屏蔽了 WireGuard 的那台设备，添加 Outline 或 AmneziaWG。**

## 来源

1. [WireGuard：安装与客户端应用](https://www.wireguard.com/install/) — WireGuard (read 2026-11-16)
2. [WireGuard：快速入门（密钥、对等节点）](https://www.wireguard.com/quickstart/) — WireGuard (read 2026-11-16)
3. [Outline：开始使用](https://getoutline.org/get-started/) — Outline Foundation (read 2026-11-16)
4. [AmneziaVPN 客户端：平台与协议](https://github.com/amnezia-vpn/amnezia-client) — Amnezia (read 2026-11-16)
5. [GL.iNet：WireGuard 客户端（固件 4.7 及更高版本）](https://docs.gl-inet.com/router/en/4/interface_guide/wireguard_client/) — GL.iNet (read 2026-11-16)

**先获取服务器** Home 方案为一个家庭每月包含 5 TB，按 12 个月计费时每月 $6.37。 [订购12个月的Home](https://tunnelvps.com/app/checkout/?plan=home&term=12m&image=ubuntu-24.04&from=guides&lang=zh) · [在服务器上安装 WireGuard](https://tunnelvps.com/zh/help/install-wireguard-in-one-command/ "如何在我的 TunnelVPS 服务器上安装 WireGuard？")

---

TunnelVPS: TunnelVPS在纽约、达拉斯、洛杉矶、伦敦、阿姆斯特丹和法兰克福租用Linux KVM服务器，用于个人VPN（WireGuard、Outline或AmneziaWG），用加密货币支付，无需身份证件。共5款套餐，内存从2到16 GB，每月流量从2到6 TB，六个城市价格相同；选择12个月租期时，每款价格都比一家无KYC加密货币主机的同类套餐至少低25%（该对比价格于2026年11月16日查看）。运营方为巴拿马的DomaineGoat LLC。
