Update install-release.sh

pull/74/head
shake 2024-05-15 16:27:12 +08:00 committed by GitHub
parent bd40bb3f4c
commit ada7770627
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 49 additions and 1 deletions

View File

@ -485,7 +485,55 @@ install_xray() {
# shellcheck disable=SC2153
if [[ -z "$JSONS_PATH" ]] && [[ ! -d "$JSON_PATH" ]]; then
install -d "$JSON_PATH"
echo "{}" > "${JSON_PATH}/config.json"
echo "{
"inbounds": [ // 服务端入站配置
{
"listen": "0.0.0.0",
"port": 443,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "28d274ea-491f-4fb4-91de-9cf38beb374b", // 必填改成自己的uuid或 1-30 字节的字符串
"flow": "xtls-rprx-vision" // 选填使用tcp就用这个使用H2协议则为空
}
],
"decryption": "none"
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"show": false, // 选填,若为 true输出调试信息
"dest": "www.amazon.com:443", // 必填国外的真正存在的网站后面必须带有443
"xver": 0, // 选填,格式同 VLESS fallbacks 的 xver
"serverNames": [ // 必填,客户端可用的 serverName 列表,暂不支持 * 通配符和dest相配
"amazon.com",
"www.amazon.com"
],
"privateKey": "OJOXrEfVy1jWvMkK72X7HnfY1-GxFUEvaCv7236F1Cc", // 必填刚才生成的私钥Private key
"minClientVer": "", // 选填,客户端 Xray 最低版本,格式为 x.y.z
"maxClientVer": "", // 选填,客户端 Xray 最高版本,格式为 x.y.z
"maxTimeDiff": 0, // 选填允许的最大时间差单位为毫秒0为不限制可以改为10000-60000之间。
"shortIds": [ // 必填,客户端可用的 shortId 列表,可用于区分不同的客户端
"99", // 客户端ID之一
"ffffffffffffffff" // 0 到 f长度为 2 的倍数,长度上限为 16
]
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "blocked"
}
]
} " > "${JSON_PATH}/config.json"
CONFIG_NEW='1'
fi