From 1548bc0262d4e920879b5ae5ab9c6c1b19ed0328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=81=E3=82=BB?= <123655015+chise0713@users.noreply.github.com> Date: Mon, 25 Dec 2023 03:45:01 +0800 Subject: [PATCH] Update command.md to fit latest release (#432) also adds ENG and fix a rendering issue --- docs/document/command.md | 26 ++++++++++++++++++++++++-- docs/document/level-2/redirect.md | 2 +- docs/en/document/command.md | 26 +++++++++++++++++++++++--- 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/docs/document/command.md b/docs/document/command.md index 683f5e732..3a4498521 100644 --- a/docs/document/command.md +++ b/docs/document/command.md @@ -21,9 +21,12 @@ The commands are: version Show current version of Xray api Call an API in an Xray process tls TLS tools - uuid Generate new UUIDs + uuid Generate UUIDv4 or UUIDv5 + x25519 Generate key pair for x25519 key exchange + wg Generate key pair for wireguard key exchange Use "xray help " for more information about a command. + ``` ### xray run @@ -103,7 +106,6 @@ xray tls [arguments] ``` ### xray uuid - 生成 UUID。 使用方法: @@ -112,9 +114,29 @@ xray tls [arguments] xray uuid [-i "example"] ``` +### xray x25519 +生成 x25519 密钥对。 + +使用方法: + +``` +xray x25519 [-i "(base64.RawURLEncoding)" --std-encoding ] +``` + +### xray wg +生成 wireguard curve25519 密钥对。 + +使用方法: + +``` +xray wg [-i "(base64.StdEncoding)"] +``` + ::: tip 当 `-config` 没有指定时,Xray 将先后尝试从以下路径加载 `config.json` : - 工作目录(Working Directory) - [环境变量](../config/features/env.md#资源文件路径)中 `Xray.location.asset` 所指定的路径 ::: + + diff --git a/docs/document/level-2/redirect.md b/docs/document/level-2/redirect.md index 16b0d4514..e47fc5151 100644 --- a/docs/document/level-2/redirect.md +++ b/docs/document/level-2/redirect.md @@ -95,7 +95,7 @@ lsmod | grep wireguard ## 4、Xray-core 配置文件修改 -```jsonc +```json { "api": { "services": [ diff --git a/docs/en/document/command.md b/docs/en/document/command.md index b1d0512ee..4f2bcadcb 100644 --- a/docs/en/document/command.md +++ b/docs/en/document/command.md @@ -21,11 +21,13 @@ The commands are: version Show current version of Xray api Call an API in an Xray process tls TLS tools - uuid Generate new UUIDs + uuid Generate UUIDv4 or UUIDv5 + x25519 Generate key pair for x25519 key exchange + wg Generate key pair for wireguard key exchange Use "xray help " for more information about a command. -``` +``` ### xray run Specify one or more configuration files and run. @@ -99,7 +101,7 @@ xray tls [arguments] ### xray uuid -Generated UUID. +Generate UUID. Usage: @@ -107,6 +109,24 @@ Usage: xray uuid ``` +### xray x25519 +Generate x25519 key pair。 + +Usage: + +``` +xray x25519 [-i "(base64.RawURLEncoding)" --std-encoding] +``` + +### xray wg +Generate wireguard curve25519 key pair。 + +Usage: + +``` +xray wg [-i "(base64.StdEncoding)"] +``` + ::: tip When `-config` is not specified, Xray will try to load `config.json` from the following paths: