-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# wg | ||
|
||
> 管理 WireGuard 接口配置。 | ||
> 更多信息:<https://www.wireguard.com/quickstart/>. | ||
- 检查当前激活接口的状态: | ||
|
||
`sudo wg` | ||
|
||
- 生成新的私钥: | ||
|
||
`wg genkey` | ||
|
||
- 从私钥生成公钥: | ||
|
||
`wg pubkey < {{路径/到/私钥}} > {{路径/到/公钥}}` | ||
|
||
- 同时生成公钥和私钥: | ||
|
||
`wg genkey | tee {{路径/到/私钥}} | wg pubkey > {{路径/到/公钥}}` | ||
|
||
- 展示 WireGuard 接口的当前配置: | ||
|
||
`sudo wg showconf {{wg0}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters