Merge pull request #1 from 233boy/master

v2ray脚本更新
pull/600/head
qswx2007 7 years ago committed by GitHub
commit 223ee0fe68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      install.sh
  2. 20
      v2ray.sh

@ -1281,7 +1281,7 @@ config() {
backup_config() { backup_config() {
sed -i "18s/=1/=$v2ray_transport_opt/; 21s/=2333/=$v2ray_port/; 24s/=$old_id/=$uuid/" $backup sed -i "18s/=1/=$v2ray_transport_opt/; 21s/=2333/=$v2ray_port/; 24s/=$old_id/=$uuid/" $backup
if [ $v2ray_transport_opt -ge 9 && $v2ray_transport_opt -le 15 ]; then if [[ $v2ray_transport_opt -ge 9 && $v2ray_transport_opt -le 15 ]]; then
sed -i "30s/=10000/=$v2ray_dynamic_port_start_input/; 33s/=20000/=$v2ray_dynamic_port_end_input/" $backup sed -i "30s/=10000/=$v2ray_dynamic_port_start_input/; 33s/=20000/=$v2ray_dynamic_port_end_input/" $backup
fi fi
if [ $shadowsocks ]; then if [ $shadowsocks ]; then

@ -10,7 +10,7 @@ none='\e[0m'
# Root # Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 [[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1
_version="v2.15" _version="v2.20"
cmd="apt-get" cmd="apt-get"
@ -2296,6 +2296,7 @@ download_v2ray_config() {
done done
} }
get_v2ray_config() { get_v2ray_config() {
config
echo echo
echo " 如果你当前使用的 SSH 客户端不是 Xshell 的话...下载 V2Ray 客户端配置文件将会出现卡死情况" echo " 如果你当前使用的 SSH 客户端不是 Xshell 的话...下载 V2Ray 客户端配置文件将会出现卡死情况"
echo echo
@ -2309,7 +2310,9 @@ get_v2ray_config() {
echo "开始下载....请选择 V2Ray 客户端配置文件保存位置" echo "开始下载....请选择 V2Ray 客户端配置文件保存位置"
echo echo
# sz /etc/v2ray/233blog_v2ray.zip # sz /etc/v2ray/233blog_v2ray.zip
sz $v2ray_client_config local tmpfile="/tmp/233blog_v2ray_config_$RANDOM.json"
cp -f $v2ray_client_config $tmpfile
sz $tmpfile
echo echo
echo echo
echo -e "$green 下载完成咯...$none" echo -e "$green 下载完成咯...$none"
@ -2328,6 +2331,8 @@ get_v2ray_config() {
fi fi
fi fi
done done
[[ -f $tmpfile ]] && rm -rf $tmpfile
} }
get_v2ray_config_link() { get_v2ray_config_link() {
echo echo
@ -2726,7 +2731,7 @@ update_v2ray() {
mkdir -p /tmp/v2ray mkdir -p /tmp/v2ray
v2ray_tmp_file="/tmp/v2ray/v2ray.zip" v2ray_tmp_file="/tmp/v2ray/v2ray.zip"
v2ray_latest_ver="$(curl -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" v2ray_latest_ver="$(curl -s "https://api.github.com/repos/v2ray/v2ray-core/releases/latest?r=$RANDOM" | grep 'tag_name' | cut -d\" -f4)"
if [[ $v2ray_ver != $v2ray_latest_ver ]]; then if [[ $v2ray_ver != $v2ray_latest_ver ]]; then
echo echo
echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none" echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none"
@ -2761,7 +2766,7 @@ update_v2ray() {
fi fi
} }
update_v2ray.sh() { update_v2ray.sh() {
local latest_version=$(curl -s -L https://raw.githubusercontent.com/233boy/v2ray/master/v2ray.sh | grep '_version' -m1 | cut -d\" -f2) local latest_version=$(curl -s -L "https://raw.githubusercontent.com/233boy/v2ray/master/v2ray.sh?r=$RANDOM" | grep '_version' -m1 | cut -d\" -f2)
if [[ $latest_version == $_version ]]; then if [[ $latest_version == $_version ]]; then
echo echo
echo -e "$green 木有发现新版本 $none" echo -e "$green 木有发现新版本 $none"
@ -3601,6 +3606,13 @@ U | update.sh)
un | uninstall) un | uninstall)
uninstall_v2ray uninstall_v2ray
;; ;;
reinstall)
uninstall_v2ray
if [[ $is_uninstall_v2ray ]]; then
cd; cd - >/dev/null 2>&1
bash <(curl -s -L https://233blog.com/v2ray.sh)
fi
;;
233 | 2333 | 233boy | 233blog | 233blog.com) 233 | 2333 | 233boy | 233blog | 233blog.com)
_boom_ _boom_
;; ;;

Loading…
Cancel
Save