mirror of https://github.com/wulabing/Xray_onekey
xray-1.0.2 (#322)
[modify] 根据 https://github.com/rprx/v2fly-github-io/blob/master/docs/config/protocols/vless.md#%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%8C%87%E5%BC%95 规范UI 标识 [modify] UPDATE README.MDpull/324/head
parent
03bbad6c01
commit
82bdc1b894
56
README.MD
56
README.MD
|
@ -1,64 +1,64 @@
|
|||
## xray 基于 Nginx 的 vless + xtls 一键安装脚本
|
||||
> 感谢 JetBrains 提供的非商业开源软件开发授权
|
||||
## xray 基于 Nginx 的 VLESS + xtls 一键安装脚本
|
||||
> 感谢 JetBrains 提供的非商业开源软件开发授权!
|
||||
|
||||
> Thanks for non-commercial open source development authorization by JetBrains
|
||||
> Thanks for non-commercial open source development authorization by JetBrains!
|
||||
|
||||
### Telegram 群组
|
||||
* telegram 交流群:https://t.me/wulabing_v2ray
|
||||
* telegram 更新公告频道:https://t.me/wulabing_channel
|
||||
* Telegram 交流群:https://t.me/wulabing_v2ray
|
||||
* Telegram 更新公告频道:https://t.me/wulabing_channel
|
||||
|
||||
### 准备工作
|
||||
* 准备一个域名,并将A记录添加好。
|
||||
* 安装好 wget
|
||||
* 准备一个域名,并将 A 记录添加好;
|
||||
* 安装好 wget。
|
||||
|
||||
### 安装/更新方式(xray)
|
||||
vless + xtls + nginx + web
|
||||
VLESS + xtls + nginx + Web
|
||||
|
||||
```
|
||||
wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/xray/install.sh" && chmod +x install.sh && bash install.sh
|
||||
```
|
||||
|
||||
### 注意事项
|
||||
* 如果你不了解脚本中各项设置的具体含义,除域名外,请使用脚本提供的默认值
|
||||
* 使用本脚本需要你拥有 Linux 基础及使用经验,了解计算机网络部分知识,计算机基础操作
|
||||
* 目前支持Debian 9+ / Ubuntu 18.04+ / Centos7+
|
||||
* 群主仅提供极其有限的支持,如有问题可以询问群友
|
||||
* 如果你不了解脚本中各项设置的具体含义,除域名外,请使用脚本提供的默认值;
|
||||
* 使用本脚本需要你拥有 Linux 基础及使用经验,了解计算机网络部分知识,计算机基础操作;
|
||||
* 目前支持 Debian 9+ / Ubuntu 18.04+ / Centos7+;
|
||||
* 群主仅提供极其有限的支持,如有问题可以询问群友。
|
||||
|
||||
### 鸣谢
|
||||
|
||||
* 本脚本中 MTProxyTLS 基于 https://github.com/sunpma/mtp 二次修改 在此感谢 sunpma
|
||||
* 本脚本中 锐速4合1脚本原项目引用 https://www.94ish.me/1635.html 在此感谢
|
||||
* 本脚本中 锐速4合1脚本修改版项目引用 https://github.com/ylx2016/Linux-NetSpeed 在此感谢 ylx2016
|
||||
* 本脚本中 配置文件及部分逻辑参考 https://github.com/jiuqi9997/xray-yes 在此感谢 玖柒
|
||||
* 本脚本中 二维码API部分参考 https://github.com/mack-a/v2ray-agent 在此感谢 mack-a
|
||||
* 本脚本中 MTProxyTLS 基于 https://github.com/sunpma/mtp 二次修改 在此感谢 sunpma;
|
||||
* 本脚本中 锐速 4 合 1 脚本原项目引用 https://www.94ish.me/1635.html 在此感谢;
|
||||
* 本脚本中 锐速 4 合 1 脚本修改版项目引用 https://github.com/ylx2016/Linux-NetSpeed 在此感谢 ylx2016;
|
||||
* 本脚本中 配置文件及部分逻辑参考 https://github.com/jiuqi9997/xray-yes 在此感谢 玖柒;
|
||||
* 本脚本中 二维码 API 部分参考 https://github.com/mack-a/v2ray-agent 在此感谢 mack-a;
|
||||
|
||||
### 启动方式
|
||||
|
||||
启动 xray:systemctl start xray
|
||||
启动 xray:`systemctl start xray`
|
||||
|
||||
停止 xray:systemctl stop xray
|
||||
停止 xray:`systemctl stop xray`
|
||||
|
||||
启动 Nginx:systemctl start nginx
|
||||
启动 Nginx:`systemctl start nginx`
|
||||
|
||||
停止 Nginx:systemctl stop nginx
|
||||
停止 Nginx:`systemctl stop nginx`
|
||||
|
||||
### 相关目录
|
||||
|
||||
Web 目录:/www/xray_web
|
||||
Web 目录:`/www/xray_web`
|
||||
|
||||
xray 服务端配置:/usr/local/etc/xray/config.json
|
||||
xray 服务端配置:`/usr/local/etc/xray/config.json`
|
||||
|
||||
Nginx 目录: /etc/nginx
|
||||
Nginx 目录: `/etc/nginx`
|
||||
|
||||
证书文件: /ssl/xray.key 和 /ssl/xray.crt
|
||||
证书文件: `/ssl/xray.key`(私钥)和 `/ssl/xray.crt`(证书公钥)
|
||||
|
||||
### 捐赠
|
||||
|
||||
目前支持通过 MugglePay 接受虚拟货币捐赠
|
||||
目前支持通过 MugglePay 接受虚拟货币捐赠。
|
||||
|
||||
您可以通过Telegram向我匿名捐赠:发送 /pay @wulabing xxx 到 @MugglePayBot 即可 默认货币为 USDT
|
||||
您可以通过 Telegram 向我匿名捐赠:发送 `/pay @wulabing xxx` 到 @MugglePayBot 即可,默认货币为 USDT。
|
||||
|
||||
如需要通过支付宝/微信捐赠,请Telegram私聊 @wulabing 感谢您的支持
|
||||
如需要通过支付宝/微信捐赠,请在 Telegram 私聊 [@wulabing](https://t.me/wulabing),感谢您的支持!
|
||||
|
||||
## Stargazers over time
|
||||
|
||||
|
|
40
install.sh
40
install.sh
|
@ -4,7 +4,7 @@
|
|||
# System Request:Debian 9+/Ubuntu 18.04+/Centos 7+
|
||||
# Author: wulabing
|
||||
# Dscription: xray onekey Management
|
||||
# email:admin@wulabing.com
|
||||
# email: admin@wulabing.com
|
||||
#====================================================
|
||||
|
||||
cd "$(
|
||||
|
@ -46,9 +46,9 @@ function print_error() {
|
|||
|
||||
function is_root() {
|
||||
if [[ 0 == "$UID" ]]; then
|
||||
print_ok "当前用户是root用户,开始安装流程"
|
||||
print_ok "当前用户是 root 用户,开始安装流程"
|
||||
else
|
||||
print_error "当前用户不是root用户,请切换到root用户后重新执行脚本"
|
||||
print_error "当前用户不是 root 用户,请切换到 root 用户后重新执行脚本"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
@ -172,19 +172,19 @@ function basic_optimization() {
|
|||
fi
|
||||
}
|
||||
function domain_check() {
|
||||
read -rp "请输入你的域名信息(eg:www.wulabing.com):" domain
|
||||
read -rp "请输入你的域名信息(eg: www.wulabing.com):" domain
|
||||
domain_ip=$(ping "${domain}" -c 1 | sed '1{s/[^(]*(//;s/).*//;q}')
|
||||
print_ok "正在获取 公网ip 信息,请耐心等待"
|
||||
print_ok "正在获取 IP 地址信息,请耐心等待"
|
||||
local_ip=$(curl https://api-ipv4.ip.sb/ip)
|
||||
echo -e "域名dns解析IP:${domain_ip}"
|
||||
echo -e "本机IP: ${local_ip}"
|
||||
echo -e "域名通过 DNS 解析的 IP 地址:${domain_ip}"
|
||||
echo -e "本机公网 IP 地址: ${local_ip}"
|
||||
sleep 2
|
||||
if [[ ${domain_ip} == "${local_ip}" ]]; then
|
||||
print_ok "域名dns解析IP 与 本机IP 匹配"
|
||||
print_ok "域名通过 DNS 解析的 IP 地址与 本机 IP 地址匹配"
|
||||
sleep 2
|
||||
else
|
||||
print_error "请确保域名添加了正确的 A 记录,否则将无法正常使用 xray"
|
||||
print_error "域名dns解析IP 与 本机IP 不匹配 是否继续安装?(y/n)" && read -r install
|
||||
print_error "域名通过 DNS 解析的 IP 地址与 本机 IP 地址不匹配,是否继续安装?(y/n)" && read -r install
|
||||
case $install in
|
||||
[yY][eE][sS] | [yY])
|
||||
print_ok "继续安装"
|
||||
|
@ -264,8 +264,8 @@ function configure_nginx() {
|
|||
}
|
||||
|
||||
function tls_type() {
|
||||
echo "请选择支持的 TLS 版本(default:3):"
|
||||
echo "1: TLS1.1 TLS1.2 and TLS1.3(兼容模式)"
|
||||
echo "请选择支持的 TLS 版本(默认:TLS1.3 only):"
|
||||
echo "1: TLS1.1, TLS1.2 and TLS1.3(兼容模式)"
|
||||
echo "2: TLS1.2 and TLS1.3 (兼容模式)"
|
||||
echo "3: TLS1.3 only"
|
||||
read -rp "请输入:" tls_version
|
||||
|
@ -280,10 +280,10 @@ function tls_type() {
|
|||
}
|
||||
|
||||
function modify_port() {
|
||||
read -rp "请输入端口号(default:443):" PORT
|
||||
read -rp "请输入端口号(默认:443):" PORT
|
||||
[ -z "$PORT" ] && PORT="443"
|
||||
if [[ $PORT -le 0 ]] || [[ $PORT -gt 65535 ]]; then
|
||||
print_error "请输入0-65535之间的值"
|
||||
print_error "请输入 0-65535 之间的值"
|
||||
exit 1
|
||||
fi
|
||||
port_exist_check $PORT
|
||||
|
@ -423,10 +423,10 @@ function vless_xtls-rprx-direct_link() {
|
|||
FLOW=$(cat ${xray_conf_dir}/config.json | jq .inbounds[0].settings.clients[0].flow | tr -d '"')
|
||||
DOMAIN=$(cat ${domain_tmp_dir}/domain)
|
||||
|
||||
print_ok "URL 链接(V2RayN/NG)"
|
||||
print_ok "URL 链接(V2RayN/V2RayNG)"
|
||||
print_ok "vless://$UUID@$DOMAIN:$PORT?security=xtls&flow=$FLOW#wulabing-$DOMAIN"
|
||||
|
||||
print_ok "URL 二维码(V2RayN/NG)(请在浏览器中访问)"
|
||||
print_ok "URL 二维码(V2RayN/V2RayNG)(请在浏览器中访问)"
|
||||
print_ok "https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless://$UUID@$DOMAIN:$PORT?security=xtls%26flow=$FLOW%23wulabing-$DOMAIN"
|
||||
}
|
||||
|
||||
|
@ -439,7 +439,7 @@ function vless_xtls-rprx-direct_information() {
|
|||
echo -e "${Red} xray 配置信息 ${Font}"
|
||||
echo -e "${Red} 地址(address):${Font} $DOMAIN"
|
||||
echo -e "${Red} 端口(port):${Font} $PORT"
|
||||
echo -e "${Red} 用户id(UUID):${Font} $UUID"
|
||||
echo -e "${Red} 用户 ID(UUID):${Font} $UUID"
|
||||
echo -e "${Red} 流控(flow):${Font} $FLOW"
|
||||
echo -e "${Red} 加密方式(security):${Font} none "
|
||||
echo -e "${Red} 传输协议(network):${Font} tcp "
|
||||
|
@ -447,7 +447,7 @@ function vless_xtls-rprx-direct_information() {
|
|||
echo -e "${Red} 底层传输安全:${Font} xtls "
|
||||
}
|
||||
function basic_information() {
|
||||
print_ok "vless+tcp+xtls+nginx 安装成功"
|
||||
print_ok "VLESS+tcp+xtls+nginx 安装成功"
|
||||
vless_xtls-rprx-direct_information
|
||||
vless_xtls-rprx-direct_link
|
||||
}
|
||||
|
@ -496,7 +496,7 @@ menu() {
|
|||
|
||||
echo -e "—————————————— 安装向导 ——————————————"""
|
||||
echo -e "${Green}0.${Font} 升级 脚本"
|
||||
echo -e "${Green}1.${Font} 安装 xray (vless+tcp+xtls+nginx)"
|
||||
echo -e "${Green}1.${Font} 安装 xray (VLESS+tcp+xtls+nginx)"
|
||||
echo -e "—————————————— 配置变更 ——————————————"
|
||||
echo -e "${Green}11.${Font} 变更 UUID"
|
||||
echo -e "${Green}12.${Font} 变更 TLS 最低适配版本"
|
||||
|
@ -507,8 +507,8 @@ menu() {
|
|||
echo -e "${Green}23.${Font} 查看 xray 配置链接"
|
||||
# echo -e "${Green}23.${Font} 查看 V2Ray 配置信息"
|
||||
echo -e "—————————————— 其他选项 ——————————————"
|
||||
echo -e "${Green}31.${Font} 安装 4合1 bbr 锐速安装脚本"
|
||||
echo -e "${Green}32.${Font} 安装 MTproxy(支持TLS混淆)"
|
||||
echo -e "${Green}31.${Font} 安装 4 合 1 BBR、锐速安装脚本"
|
||||
echo -e "${Green}32.${Font} 安装 MTproxy(支持 TLS 混淆)"
|
||||
echo -e "${Green}33.${Font} 卸载 xray"
|
||||
|
||||
read -rp "请输入数字:" menu_num
|
||||
|
|
Loading…
Reference in New Issue