Files
openvpn-install/docs/clients-zh.md
2024-07-28 15:12:11 -05:00

2.0 KiB

English | 中文

配置 OpenVPN 客户端

OpenVPN 客户端 在 Windows, macOS, iOS, Android 和 Linux 上可用。macOS 用户也可以使用 Tunnelblick

要添加 VPN 连接,首先将生成的 .ovpn 文件安全地传送到你的设备,然后打开 OpenVPN 应用程序并导入 VPN 配置文件。

要管理 OpenVPN 客户端,请再次运行安装脚本:sudo bash openvpn.sh

阅读 📖 VPN book 以了解配置和管理 OpenVPN 客户端的分步说明。

查看 OpenVPN 脚本的使用信息。
Usage: bash openvpn.sh [options]

Options:

  --addclient [client name]     add a new client
  --exportclient [client name]  export configuration for an existing client
  --listclients                 list the names of existing clients
  --revokeclient [client name]  revoke an existing client
  --uninstall                   remove OpenVPN and delete all configuration
  -y, --yes                     assume "yes" as answer to prompts when revoking a client or removing OpenVPN
  -h, --help                    show this help message and exit

Install options (optional):

  --auto                        auto install OpenVPN using default or custom options
  --serveraddr [DNS name]       server address, must be a fully qualified domain name (FQDN).
                                If not specified, the server's IPv4 address will be used.
  --proto [TCP or UDP]          protocol for OpenVPN (TCP or UDP, default: UDP)
  --port [number]               port for OpenVPN (1-65535, default: 1194)
  --clientname [client name]    name for the first OpenVPN client (default: client)
  --dns1 [DNS server IP]        primary DNS server for clients (default: Google Public DNS)
  --dns2 [DNS server IP]        secondary DNS server for clients

To customize options, you may also run this script without arguments.