-
安装 wireguard-tools
|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
1 2
|hljs bash sudo apt update sudo apt install wireguard-tools resolvconf ` <div class="code-widget-light code-widget copy-btn" data-clipboard-snippet=""> <i class="iconfont icon-copy"> </i> BASH </div> </pre></td> </tr> </tbody> </table> ` 编辑隧道文件 隧道文件放在 ` /etc/wireguard/ ` 下 例如 ` /etc/wireguard/wg0.conf ` 启动隧道 |-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ``` 1 ``` | ````hljs bash sudo wg-quick up <隧道名> ` <div class="code-widget-light code-widget copy-btn" data-clipboard-snippet=""> <i class="iconfont icon-copy"> </i> BASH </div> </pre></td> </tr> </tbody> </table> ` 停止隧道 |-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ``` 1 ``` | ```hljs bash sudo wg-quick down <隧道名> ` <div class="code-widget-light code-widget copy-btn" data-clipboard-snippet=""> <i class="iconfont icon-copy"> </i> BASH </div> </pre></td> </tr> </tbody> </table> ` 隧道名就是 ` .conf ` 文件的名称 #参考资料 #参考资料 参考资料 https://cn.linux-console.net/?p=29550 ``` | ```` |
|
在 Linux 中使用 Wireguard 客户端
未经允许不得转载:工具盒子 » 在 Linux 中使用 Wireguard 客户端