mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2025-02-22 01:13:14 +03:00
Add usage for convert-command. (#551)
Co-authored-by: nobody <nobody@nowhere.mars>
This commit is contained in:
parent
ce67731e6f
commit
d3f8d436b0
@ -20,13 +20,13 @@ The commands are:
|
|||||||
run Run Xray with config, the default command
|
run Run Xray with config, the default command
|
||||||
version Show current version of Xray
|
version Show current version of Xray
|
||||||
api Call an API in an Xray process
|
api Call an API in an Xray process
|
||||||
|
convert Convert configs
|
||||||
tls TLS tools
|
tls TLS tools
|
||||||
uuid Generate UUIDv4 or UUIDv5
|
uuid Generate UUIDv4 or UUIDv5
|
||||||
x25519 Generate key pair for x25519 key exchange
|
x25519 Generate key pair for x25519 key exchange
|
||||||
wg Generate key pair for wireguard key exchange
|
wg Generate key pair for wireguard key exchange
|
||||||
|
|
||||||
Use "xray help <command>" for more information about a command.
|
Use "xray help <command>" for more information about a command.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### xray run
|
### xray run
|
||||||
@ -101,6 +101,59 @@ xray api <command> [arguments]
|
|||||||
rmo Remove outbounds
|
rmo Remove outbounds
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### xray convert
|
||||||
|
|
||||||
|
把配置文件转换成 protobuf 或者把 typedMessage 转换成 json
|
||||||
|
|
||||||
|
使用方法:
|
||||||
|
|
||||||
|
```
|
||||||
|
xray convert <command> [arguments]
|
||||||
|
|
||||||
|
The commands are:
|
||||||
|
|
||||||
|
pb Convert multiple json configs to protobuf
|
||||||
|
json Convert typedMessage to json
|
||||||
|
```
|
||||||
|
|
||||||
|
pb 子命令使用示例:
|
||||||
|
```bash
|
||||||
|
# 用法:xray convert pb [-debug] [-type] [json file] [json file] ...
|
||||||
|
|
||||||
|
# 把三个配置合并成 mix.pb
|
||||||
|
xray convert pb c1.json c2.json c3.json > mix.pb
|
||||||
|
|
||||||
|
# 使用 -debug 选项查看 mix.pb 的内容
|
||||||
|
xray convert pb -debug mix.pb
|
||||||
|
|
||||||
|
# 使用 mix.pb 启动 Xray-core
|
||||||
|
xray -c mix.pb
|
||||||
|
|
||||||
|
# 详细说明
|
||||||
|
xray help convert pb
|
||||||
|
```
|
||||||
|
|
||||||
|
json 子命令使用示例:
|
||||||
|
```bash
|
||||||
|
# 用法:xray convert json [-type] [stdin:] [typedMessage file]
|
||||||
|
|
||||||
|
tmsg='{
|
||||||
|
"type": "xray.proxy.shadowsocks.Account",
|
||||||
|
"value": "CgMxMTEQBg=="
|
||||||
|
}'
|
||||||
|
|
||||||
|
echo ${tmsg} | xray convert json stdin:
|
||||||
|
|
||||||
|
# 上面这个命令的输出结果是:
|
||||||
|
'{
|
||||||
|
"cipherType": "AES_256_GCM",
|
||||||
|
"password": "111"
|
||||||
|
}'
|
||||||
|
|
||||||
|
# 详细说明
|
||||||
|
xray help convert json
|
||||||
|
```
|
||||||
|
|
||||||
### xray tls
|
### xray tls
|
||||||
|
|
||||||
一些与 TLS 相关的工具。
|
一些与 TLS 相关的工具。
|
||||||
|
Loading…
x
Reference in New Issue
Block a user