Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
233boy committed Apr 1, 2018
1 parent 63cb713 commit fa9fd18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ v2ray_config() {
# clear
echo
while :; do
echo -e "请选择 "$yellow"V2Ray"$none" 传输协议 [${magenta}1-15$none]"
echo -e "请选择 "$yellow"V2Ray"$none" 传输协议 [${magenta}1-${#transport[*]}$none]"
echo
for ((i = 1; i <= ${#transport[*]}; i++)); do
Stream="${transport[$i - 1]}"
Expand Down Expand Up @@ -567,7 +567,7 @@ shadowsocks_password_config() {
shadowsocks_ciphers_config() {

while :; do
echo -e "请选择 "$yellow"Shadowsocks"$none" 加密协议 [${magenta}1-8$none]"
echo -e "请选择 "$yellow"Shadowsocks"$none" 加密协议 [${magenta}1-${#ciphers[*]}$none]"
for ((i = 1; i <= ${#ciphers[*]}; i++)); do
ciphers_show="${ciphers[$i - 1]}"
echo
Expand Down Expand Up @@ -666,7 +666,7 @@ domain_check() {
# $cmd install dnsutils -y
# fi
# test_domain=$(dig $domain +short)
test_domain=$(ping $domain -c 1 | grep -oP -m1 "([\d.]+){4}\d")
test_domain=$(ping $domain -c 1 | grep -oP -m1 "(\d+\.){3}\d+")
if [[ $test_domain != $ip ]]; then
echo
echo -e "$red 检测域名解析错误....$none"
Expand Down
8 changes: 4 additions & 4 deletions v2ray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ none='\e[0m'
# Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1

_version="v1.55"
_version="v1.56"

cmd="apt-get"

Expand Down Expand Up @@ -680,7 +680,7 @@ change_shadowsocks_password() {
change_shadowsocks_ciphers() {
echo
while :; do
echo -e "请选择 "$yellow"Shadowsocks"$none" 加密协议 [${magenta}1-8$none]"
echo -e "请选择 "$yellow"Shadowsocks"$none" 加密协议 [${magenta}1-${#ciphers[*]}$none]"
for ((i = 1; i <= ${#ciphers[*]}; i++)); do
ciphers_show="${ciphers[$i - 1]}"
echo
Expand Down Expand Up @@ -923,7 +923,7 @@ change_v2ray_transport_ask() {
change_v2ray_transport() {
echo
while :; do
echo -e "请选择 "$yellow"V2Ray"$none" 传输协议 [${magenta}1-15$none]"
echo -e "请选择 "$yellow"V2Ray"$none" 传输协议 [${magenta}1-${#transport[*]}$none]"
echo
for ((i = 1; i <= ${#transport[*]}; i++)); do
Stream="${transport[$i - 1]}"
Expand Down Expand Up @@ -1838,7 +1838,7 @@ change_proxy_site_config() {
}
domain_check() {
# test_domain=$(dig $new_domain +short)
test_domain=$(ping $new_domain -c 1 | grep -oP -m1 "([\d.]+){4}\d")
test_domain=$(ping $new_domain -c 1 | grep -oP -m1 "(\d+\.){3}\d+")
if [[ $test_domain != $ip ]]; then
echo
echo -e "$red 检测域名解析错误....$none"
Expand Down

0 comments on commit fa9fd18

Please sign in to comment.