From d23210583cb6219910fa5ae531bf323ecdb2c51d Mon Sep 17 00:00:00 2001 From: wulabing <91d$5gKrmVShheJf> Date: Thu, 26 Dec 2019 14:11:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4=E9=85=8D=E7=BD=AE=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=98=BE=E7=A4=BA=E6=93=8D=E4=BD=9C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 53 ++++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/install.sh b/install.sh index 49a8ad9..4bf5ffe 100644 --- a/install.sh +++ b/install.sh @@ -33,6 +33,7 @@ nginx_dir="/etc/nginx" web_dir="/home/wwwroot" nginx_openssl_src="/usr/local/src" v2ray_bin_file="/usr/bin/v2ray" +v2ray_info_file="~/v2ray_info.inf" nginx_systemd_file="/etc/systemd/system/nginx.service" v2ray_systemd_file="/etc/systemd/system/v2ray.service" v2ray_access_log="/var/log/v2ray/access.log" @@ -513,11 +514,6 @@ vmess_qr_config_tls_ws(){ "tls": "tls" } EOF - - vmess_link="vmess://$(cat /etc/v2ray/vmess_qr.json | base64 -w 0)" - echo -e "${Red} URL导入链接:${vmess_link} ${Font}" >>./v2ray_info.txt - echo -e "${Red} 二维码: ${Font}" >>./v2ray_info.txt - echo -n "${vmess_link}"| qrencode -o - -t utf8 >>./v2ray_info.txt } vmess_qr_config_h2(){ @@ -535,31 +531,30 @@ vmess_qr_config_h2(){ "tls": "tls" } EOF - - vmess_link="vmess://$(cat /etc/v2ray/vmess_qr.json | base64 -w 0)" - echo -e "${Red} URL导入链接:${vmess_link} ${Font}" >>./v2ray_info.txt - echo -e "${Red} 二维码: ${Font}" >>./v2ray_info.txt - echo -n "${vmess_link}"| qrencode -o - -t utf8 >>./v2ray_info.txt } +vmess_qr_link_image(){ + vmess_link="vmess://$(cat /etc/v2ray/vmess_qr.json | base64 -w 0)" + echo -e "${Red} URL导入链接:${vmess_link} ${Font}" >> ${v2ray_info_file} + echo -e "${Red} 二维码: ${Font}" >> ${v2ray_info_file} + echo -n "${vmess_link}"| qrencode -o - -t utf8 >> ${v2ray_info_file} +} + +basic_information(){ + echo -e "${OK} ${Green} V2ray+ws+tls 安装成功" >> ${v2ray_info_file} + echo -e "${Red} V2ray 配置信息 ${Font}" >> ${v2ray_info_file} + echo -e "${Red} 地址(address):${Font} ${domain} " >> ${v2ray_info_file} + echo -e "${Red} 端口(port):${Font} ${port} " >> ${v2ray_info_file} + echo -e "${Red} 用户id(UUID):${Font} ${UUID}" >> ${v2ray_info_file} + echo -e "${Red} 额外id(alterId):${Font} ${alterID}" >> ${v2ray_info_file} + echo -e "${Red} 加密方式(security):${Font} 自适应 " >> ${v2ray_info_file} + echo -e "${Red} 传输协议(network):${Font} ws " >> ${v2ray_info_file} + echo -e "${Red} 伪装类型(type):${Font} none " >> ${v2ray_info_file} + echo -e "${Red} 路径(不要落下/):${Font} /${camouflage}/ " >> ${v2ray_info_file} + echo -e "${Red} 底层传输安全:${Font} tls " >> ${v2ray_info_file} +} show_information(){ - clear - cd ~ - - echo -e "${OK} ${Green} V2ray+ws+tls 安装成功" >./v2ray_info.txt - echo -e "${Red} V2ray 配置信息 ${Font}" >>./v2ray_info.txt - echo -e "${Red} 地址(address):${Font} ${domain} " >>./v2ray_info.txt - echo -e "${Red} 端口(port):${Font} ${port} " >>./v2ray_info.txt - echo -e "${Red} 用户id(UUID):${Font} ${UUID}" >>./v2ray_info.txt - echo -e "${Red} 额外id(alterId):${Font} ${alterID}" >>./v2ray_info.txt - echo -e "${Red} 加密方式(security):${Font} 自适应 " >>./v2ray_info.txt - echo -e "${Red} 传输协议(network):${Font} ws " >>./v2ray_info.txt - echo -e "${Red} 伪装类型(type):${Font} none " >>./v2ray_info.txt - echo -e "${Red} 路径(不要落下/):${Font} /${camouflage}/ " >>./v2ray_info.txt - echo -e "${Red} 底层传输安全:${Font} tls " >>./v2ray_info.txt - - cat ./v2ray_info.txt - + cat ${v2ray_info_file} } ssl_judge_and_install(){ if [[ -f "/data/v2ray.key" && -f "/data/v2ray.crt" ]];then @@ -661,6 +656,8 @@ install_v2ray_ws_tls(){ ssl_judge_and_install nginx_systemd vmess_qr_config_tls_ws + vmess_qr_link_image + basic_information show_information start_process_systemd enable_process_systemd @@ -682,6 +679,8 @@ install_v2_h2(){ ssl_judge_and_install nginx_systemd vmess_qr_config_h2 + vmess_qr_link_image + basic_information show_information start_process_systemd enable_process_systemd