7 Commits
v2.14 ... v2.21

Author SHA1 Message Date
233boy
351cc96c5c [fix] dynamic port issues 2018-05-06 17:46:07 +08:00
233boy
01a3083312 bug fix 2018-05-06 00:10:49 +08:00
233boy
a5a67f68b3 [add] v2ray reinstall 2018-05-05 23:41:26 +08:00
233boy
1268ebbd1e skip cache 2018-05-05 23:29:38 +08:00
233boy
3abdf6aa44 bug fix 2018-05-05 23:16:48 +08:00
233boy
e0be1f6587 update download config filename 2018-05-05 22:42:17 +08:00
233boy
90b5dc024e [fix] h2 path issues 2018-05-05 12:12:06 +08:00
2 changed files with 40 additions and 34 deletions

View File

@@ -1281,7 +1281,7 @@ config() {
backup_config() {
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
fi
if [ $shadowsocks ]; then
@@ -1336,9 +1336,9 @@ do_service() {
show_config_info() {
local header="none"
if [[ $path ]]; then
local host=$domain
local _path="/$path"
else
local host=""
local _path="/"
fi
case $v2ray_transport_opt in
@@ -1394,8 +1394,8 @@ show_config_info() {
"aid": "233",
"net": "${net}",
"type": "none",
"host": "${host}",
"path": "/$path",
"host": "${domain}",
"path": "$_path",
"tls": "tls"
}
EOF
@@ -1453,12 +1453,10 @@ show_config_info() {
echo
echo -e "$yellow 伪装类型 (header type) = ${cyan}${header}$none"
echo
echo -e "$yellow 伪装域名 (host) = ${cyan}${host}$none"
echo -e "$yellow 伪装域名 (host) = ${cyan}${domain}$none"
echo
echo -e "$yellow 路径 (path) = ${cyan}${_path}$none"
echo
if [[ $path ]]; then
echo -e "$yellow 路径 (path) = ${cyan}/${path}$none"
echo
fi
echo -e "$yellow TLS (Enable TLS) = ${cyan}打开$none"
echo
# echo -e " 请将 Obfs 设置为 $obfs ...并忽略 传输协议... (如果你使用 Pepi / ShadowRay) "

View File

@@ -10,7 +10,7 @@ none='\e[0m'
# Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1
_version="v2.14"
_version="v2.21"
cmd="apt-get"
@@ -69,7 +69,7 @@ fi
if [[ $blocked_ad_status ]]; then
is_blocked_ad=true
fi
if [[ $v2ray_transport -ge 9 ]]; then
if [[ $v2ray_transport -ge 9 && $v2ray_transport -le 15 ]]; then
dynamicPort=true
port_range="${v2ray_dynamicPort_start}-${v2ray_dynamicPort_end}"
fi
@@ -127,9 +127,9 @@ ciphers=(
get_transport_args() {
header="none"
if [[ $is_path ]]; then
host=$domain
_path="/$path"
else
host=""
_path="/"
fi
case $v2ray_transport in
1 | 9)
@@ -189,8 +189,8 @@ create_vmess_URL_config() {
"aid": "${alterId}",
"net": "${net}",
"type": "none",
"host": "${host}",
"path": "/$path",
"host": "${domain}",
"path": "$_path",
"tls": "tls"
}
EOF
@@ -240,10 +240,8 @@ view_v2ray_config_info() {
echo
echo -e "$yellow 伪装域名 (host) = ${cyan}${host}$none"
echo
if [[ $is_path ]]; then
echo -e "$yellow 路径 (path) = ${cyan}/${path}$none"
echo
fi
echo -e "$yellow 路径 (path) = ${cyan}${_path}$none"
echo
echo -e "$yellow TLS (Enable TLS) = ${cyan}打开$none"
echo
# echo -e " 请将 Obfs 设置为 $obfs ...并忽略 传输协议... (如果你使用 Pepi / ShadowRay) "
@@ -2298,6 +2296,7 @@ download_v2ray_config() {
done
}
get_v2ray_config() {
config
echo
echo " 如果你当前使用的 SSH 客户端不是 Xshell 的话...下载 V2Ray 客户端配置文件将会出现卡死情况"
echo
@@ -2311,7 +2310,9 @@ get_v2ray_config() {
echo "开始下载....请选择 V2Ray 客户端配置文件保存位置"
echo
# 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 -e "$green 下载完成咯...$none"
@@ -2330,6 +2331,8 @@ get_v2ray_config() {
fi
fi
done
[[ -f $tmpfile ]] && rm -rf $tmpfile
}
get_v2ray_config_link() {
echo
@@ -2387,12 +2390,10 @@ create_v2ray_config_text() {
echo
echo "伪装类型 (header type) = ${header}"
echo
echo "伪装域名 (host) = ${host}"
echo "伪装域名 (host) = ${domain}"
echo
echo "路径 (path) = ${_path}"
echo
if [[ $is_path ]]; then
echo -e "$yellow 路径 (path) = ${cyan}/${path}$none"
echo
fi
echo "TLS (Enable TLS) = 打开"
echo
# echo -e " 请将 Obfs 设置为 $obfs ...并忽略 传输协议... (如果你使用 Pepi / ShadowRay) "
@@ -2730,7 +2731,7 @@ update_v2ray() {
mkdir -p /tmp/v2ray
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
echo
echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none"
@@ -2765,7 +2766,7 @@ update_v2ray() {
fi
}
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
echo
echo -e "$green 木有发现新版本 $none"
@@ -3140,13 +3141,13 @@ config() {
sed -i "43s/6666/$ssport/; 45s/chacha20-ietf/$ssciphers/; 46s/233blog.com/$sspass/" $v2ray_server_config
;;
9)
sed -i "31s/6666/$ssport/; 33s/chacha20-ietf/$ssciphers/; 34s/233blog.com/$sspass/; 42s/10000-20000/$multi_port/" $v2ray_server_config
sed -i "31s/6666/$ssport/; 33s/chacha20-ietf/$ssciphers/; 34s/233blog.com/$sspass/; 42s/10000-20000/$port_range/" $v2ray_server_config
;;
10)
sed -i "67s/6666/$ssport/; 69s/chacha20-ietf/$ssciphers/; 70s/233blog.com/$sspass/; 78s/10000-20000/$multi_port/" $v2ray_server_config
sed -i "67s/6666/$ssport/; 69s/chacha20-ietf/$ssciphers/; 70s/233blog.com/$sspass/; 78s/10000-20000/$port_range/" $v2ray_server_config
;;
1[1-5])
sed -i "34s/6666/$ssport/; 36s/chacha20-ietf/$ssciphers/; 37s/233blog.com/$sspass/; 45s/10000-20000/$multi_port/" $v2ray_server_config
sed -i "34s/6666/$ssport/; 36s/chacha20-ietf/$ssciphers/; 37s/233blog.com/$sspass/; 45s/10000-20000/$port_range/" $v2ray_server_config
;;
16)
sed -i "46s/6666/$ssport/; 48s/chacha20-ietf/$ssciphers/; 49s/233blog.com/$sspass/" $v2ray_server_config
@@ -3183,13 +3184,13 @@ config() {
else
case $v2ray_transport in
9)
sed -i "31s/10000-20000/$multi_port/" $v2ray_server_config
sed -i "31s/10000-20000/$port_range/" $v2ray_server_config
;;
10)
sed -i "67s/10000-20000/$multi_port/" $v2ray_server_config
sed -i "67s/10000-20000/$port_range/" $v2ray_server_config
;;
1[1-5])
sed -i "34s/10000-20000/$multi_port/" $v2ray_server_config
sed -i "34s/10000-20000/$port_range/" $v2ray_server_config
;;
esac
@@ -3605,6 +3606,13 @@ U | update.sh)
un | uninstall)
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)
_boom_
;;