diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 7365a5b..35bae69 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,3 +1,3 @@ -提问之前,请先查阅:[V2Ray 一键安装脚本疑问集合](https://233v2.com/post/10/) +提问之前,请先查阅:[V2Ray 一键安装脚本疑问集合](https://v2ray6.com/post/10/) 若需要发起提问,请删除这些内容 diff --git a/config/server/include/socks.json b/config/server/include/socks.json index ab38a8a..41aa472 100644 --- a/config/server/include/socks.json +++ b/config/server/include/socks.json @@ -5,7 +5,7 @@ "auth": "password", "accounts": [ { - "user": "233v2.com", + "user": "v2ray66.com", "pass": "233blog.com" } ], diff --git a/install.sh b/install.sh index 5151690..2a8b757 100644 --- a/install.sh +++ b/install.sh @@ -6,11 +6,6 @@ yellow='\e[93m' magenta='\e[95m' cyan='\e[96m' none='\e[0m' -_red() { echo -e ${red}$*${none}; } -_green() { echo -e ${green}$*${none}; } -_yellow() { echo -e ${yellow}$*${none}; } -_magenta() { echo -e ${magenta}$*${none}; } -_cyan() { echo -e ${cyan}$*${none}; } # Root [[ $(id -u) != 0 ]] && echo -e "\n 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}\n" && exit 1 @@ -750,7 +745,7 @@ install_v2ray() { echo echo -e "$red 哎呀呀...安装失败了咯...$none" echo - echo -e " 请确保你有完整的上传 233v2.com 的 V2Ray 一键安装脚本 & 管理脚本到当前 ${green}$(pwd) $none目录下" + echo -e " 请确保你有完整的上传 v2ray6.com 的 V2Ray 一键安装脚本 & 管理脚本到当前 ${green}$(pwd) $none目录下" echo exit 1 fi @@ -758,7 +753,7 @@ install_v2ray() { cp -rf $(pwd)/* /etc/v2ray/233boy/v2ray else pushd /tmp - git clone https://github.com/233boy/v2ray -b "$_gitbranch" /etc/v2ray/233boy/v2ray --depth=1 + git clone https://github.com/233boy/v2ray -b "$_gitbranch" /etc/v2ray/233boy/v2ray popd fi @@ -912,6 +907,20 @@ backup_config() { fi } +try_enable_bbr() { + if [[ $(uname -r | cut -b 1) -eq 4 ]]; then + case $(uname -r | cut -b 3-4) in + 9. | [1-9][0-9]) + sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf + sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf + echo "net.ipv4.tcp_congestion_control = bbr" >>/etc/sysctl.conf + echo "net.core.default_qdisc = fq" >>/etc/sysctl.conf + sysctl -p >/dev/null 2>&1 + ;; + esac + fi +} + get_ip() { ip=$(curl -s https://ipinfo.io/ip) [[ -z $ip ]] && ip=$(curl -s https://api.ip.sb/ip) @@ -971,6 +980,7 @@ install() { blocked_hosts shadowsocks_config install_info + try_enable_bbr # [[ $caddy ]] && domain_check install_v2ray if [[ $caddy || $v2ray_port == "80" ]]; then @@ -983,11 +993,6 @@ install() { fi fi [[ $caddy ]] && install_caddy - - ## bbr - _load bbr.sh - _try_enable_bbr - get_ip config show_config_info @@ -1012,7 +1017,7 @@ uninstall() { echo -e " $red 大胸弟...你貌似毛有安装 V2Ray ....卸载个鸡鸡哦...$none - 备注...仅支持卸载使用我 (233v2.com) 提供的 V2Ray 一键安装脚本 + 备注...仅支持卸载使用我 (v2ray6.com) 提供的 V2Ray 一键安装脚本 " && exit 1 fi @@ -1046,11 +1051,11 @@ esac clear while :; do echo - echo "........... V2Ray 一键安装脚本 & 管理脚本 by 233v2.com .........." + echo "........... V2Ray 一键安装脚本 & 管理脚本 by v2ray6.com .........." echo - echo "帮助说明: https://233v2.com/post/1/" + echo "帮助说明: https://v2ray6.com/post/1/" echo - echo "搭建教程: https://233v2.com/post/2/" + echo "搭建教程: https://v2ray6.com/post/2/" echo echo " 1. 安装" echo diff --git a/src/bbr.sh b/src/bbr.sh deleted file mode 100644 index e51a828..0000000 --- a/src/bbr.sh +++ /dev/null @@ -1,20 +0,0 @@ -_open_bbr() { - sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf - sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf - echo "net.ipv4.tcp_congestion_control = bbr" >>/etc/sysctl.conf - echo "net.core.default_qdisc = fq" >>/etc/sysctl.conf - sysctl -p >/dev/null 2>&1 - echo - _green "..由于你的 VPS 内核支持开启 BBR ...已经为你启用 BBR 优化...." - echo -} - -_try_enable_bbr() { - local _test1=$(uname -r | cut -d\. -f1) - local _test2=$(uname -r | cut -d\. -f2) - if [[ $_test1 -eq 4 && $_test2 -ge 9 ]] || [[ $_test1 -ge 5 ]]; then - _open_bbr - enable_bbr=true - fi -} - diff --git a/src/client_file.sh b/src/client_file.sh index 8bd5ddf..ea2c5cb 100644 --- a/src/client_file.sh +++ b/src/client_file.sh @@ -6,7 +6,7 @@ _get_client_file() { echo echo -e ${cyan}$link${none} echo - echo " V2Ray 客户端使用教程: https://233v2.com/post/4/" + echo " V2Ray 客户端使用教程: https://v2ray6.com/post/4/" echo echo } diff --git a/src/download-caddy.sh b/src/download-caddy.sh index 80a8014..e870808 100644 --- a/src/download-caddy.sh +++ b/src/download-caddy.sh @@ -27,7 +27,6 @@ _install_caddy_service() { if [[ $systemd ]]; then cp -f ${caddy_tmp}init/linux-systemd/caddy.service /lib/systemd/system/ # sed -i "s/www-data/root/g" /lib/systemd/system/caddy.service - sed -i "/on-abnormal/a RestartSec=3" /lib/systemd/system/caddy.service sed -i "s/on-abnormal/always/" /lib/systemd/system/caddy.service systemctl enable caddy else @@ -45,7 +44,4 @@ _install_caddy_service() { chown -R www-data.www-data /etc/ssl/caddy mkdir -p /etc/caddy/ - - ## create sites dir - mkdir -p /etc/caddy/sites -} \ No newline at end of file +} diff --git a/src/download-v2ray.sh b/src/download-v2ray.sh index 4cc285e..b291ddb 100644 --- a/src/download-v2ray.sh +++ b/src/download-v2ray.sh @@ -30,7 +30,6 @@ _download_v2ray_file() { mkdir -p /usr/bin/v2ray cp -f "/tmp/v2ray/v2ray" "/usr/bin/v2ray/v2ray" chmod +x "/usr/bin/v2ray/v2ray" - echo "alias v2ray=$_v2ray_sh" >>/root/.bashrc cp -f "/tmp/v2ray/v2ctl" "/usr/bin/v2ray/v2ctl" chmod +x "/usr/bin/v2ray/v2ctl" } diff --git a/src/init.sh b/src/init.sh index a1077b8..079a9c3 100644 --- a/src/init.sh +++ b/src/init.sh @@ -1,9 +1,3 @@ -_red() { echo -e ${red}$*${none}; } -_green() { echo -e ${green}$*${none}; } -_yellow() { echo -e ${yellow}$*${none}; } -_magenta() { echo -e ${magenta}$*${none}; } -_cyan() { echo -e ${cyan}$*${none}; } - _rm() { rm -rf "$@" } diff --git a/src/qr.sh b/src/qr.sh index 5efcf86..24383a7 100644 --- a/src/qr.sh +++ b/src/qr.sh @@ -10,13 +10,13 @@ _qr_create() { echo -e "$red 友情提醒: 请务必核对扫码结果 (V2RayNG 除外) $none" echo echo - echo " V2Ray 客户端使用教程: https://233v2.com/post/4/" + echo " V2Ray 客户端使用教程: https://v2ray6.com/post/4/" echo echo rm -rf /etc/v2ray/vmess_qr.json } _ss_qr() { - local ss_link="ss://$(echo -n "${ssciphers}:${sspass}@${ip}:${ssport}" | base64 -w 0)#233v2.com_ss_${ip}" + local ss_link="ss://$(echo -n "${ssciphers}:${sspass}@${ip}:${ssport}" | base64 -w 0)#v2ray6.com_ss_${ip}" local link="https://233boy.github.io/tools/qr.html#${ss_link}" echo echo "---------- Shadowsocks 二维码链接 -------------" diff --git a/src/socks-config.sh b/src/socks-config.sh index d6cce16..6a09585 100644 --- a/src/socks-config.sh +++ b/src/socks-config.sh @@ -3,7 +3,7 @@ if [[ $socks ]]; then socks_file="/etc/v2ray/233boy/v2ray/config/server/include/socks.json" socks_file_tmp="/tmp/socks.json.tmp" cp -f $socks_file $socks_file_tmp - sed -i "s/6666/$socks_port/; s/233v2.com/$socks_username/; s/233blog.com/$socks_userpass/" $socks_file_tmp + sed -i "s/6666/$socks_port/; s/v2ray66.com/$socks_username/; s/233blog.com/$socks_userpass/" $socks_file_tmp sed -i "/\/\/include_socks/r $socks_file_tmp" $v2ray_server_config sed -i "s#//include_socks#,#" $v2ray_server_config rm -rf $socks_file_tmp diff --git a/src/ss-info.sh b/src/ss-info.sh index 7d37007..81fb276 100644 --- a/src/ss-info.sh +++ b/src/ss-info.sh @@ -1,6 +1,6 @@ [[ -z $ip ]] && get_ip if [[ $shadowsocks ]]; then - local ss="ss://$(echo -n "${ssciphers}:${sspass}@${ip}:${ssport}" | base64 -w 0)#233v2.com_ss_${ip}" + local ss="ss://$(echo -n "${ssciphers}:${sspass}@${ip}:${ssport}" | base64 -w 0)#v2ray6.com_ss_${ip}" echo echo "---------- Shadowsocks 配置信息 -------------" echo diff --git a/src/uninstall.sh b/src/uninstall.sh index a2e881b..cb3989b 100644 --- a/src/uninstall.sh +++ b/src/uninstall.sh @@ -86,7 +86,6 @@ if [[ $is_uninstall_v2ray && $is_uninstall_caddy ]]; then rm -rf /usr/bin/v2ray rm -rf $_v2ray_sh - sed -i '/alias v2ray=/d' /root/.bashrc rm -rf /etc/v2ray rm -rf /var/log/v2ray @@ -149,7 +148,6 @@ elif [[ $is_uninstall_v2ray ]]; then rm -rf /usr/bin/v2ray rm -rf $_v2ray_sh - sed -i '/alias v2ray=/d' /root/.bashrc rm -rf /etc/v2ray rm -rf /var/log/v2ray if [[ $systemd ]]; then diff --git a/src/v2ray-info.sh b/src/v2ray-info.sh index 43c65f6..8254222 100644 --- a/src/v2ray-info.sh +++ b/src/v2ray-info.sh @@ -77,7 +77,7 @@ _v2_info() { if [[ $v2ray_transport == [45] ]]; then if [[ ! $caddy ]]; then echo - echo -e " $red警告!$none$yellow请自行配置 TLS...教程: https://233v2.com/post/3/$none" + echo -e " $red警告!$none$yellow请自行配置 TLS...教程: https://v2ray6.com/post/3/$none" fi echo echo -e "$yellow 地址 (Address) = $cyan${domain}$none" @@ -129,7 +129,7 @@ _v2_info() { fi echo "---------- END -------------" echo - echo "V2Ray 客户端使用教程: https://233v2.com/post/4/" + echo "V2Ray 客户端使用教程: https://v2ray6.com/post/4/" echo echo -e "提示: 输入$cyan v2ray url $none可生成 vmess URL 链接 / 输入$cyan v2ray qr $none可生成二维码链接" echo diff --git a/templates/socks.json b/templates/socks.json index 5258522..d0d44ee 100644 --- a/templates/socks.json +++ b/templates/socks.json @@ -5,7 +5,7 @@ "auth": "password", "accounts": [ { - "user": "233v2.com", // username + "user": "v2ray66.com", // username "pass": "233blog.com" // passowrd } ], diff --git a/v2ray.sh b/v2ray.sh index 4b18a1a..9460cd4 100644 --- a/v2ray.sh +++ b/v2ray.sh @@ -110,7 +110,7 @@ create_vmess_URL_config() { cat >/etc/v2ray/vmess_qr.json <<-EOF { "v": "2", - "ps": "233v2.com_${domain}", + "ps": "v2ray6.com_${domain}", "add": "${domain}", "port": "443", "id": "${v2ray_id}", @@ -127,7 +127,7 @@ create_vmess_URL_config() { cat >/etc/v2ray/vmess_qr.json <<-EOF { "v": "2", - "ps": "233v2.com_${ip}", + "ps": "v2ray6.com_${ip}", "add": "${ip}", "port": "${v2ray_port}", "id": "${v2ray_id}", @@ -2133,7 +2133,7 @@ get_v2ray_config() { echo echo -e "${yellow} HTTP 监听端口 = ${cyan}6666$none" echo - echo "V2Ray 客户端使用教程: https://233v2.com/post/4/" + echo "V2Ray 客户端使用教程: https://v2ray6.com/post/4/" echo break else @@ -2158,7 +2158,7 @@ create_v2ray_config_text() { if [[ $v2ray_transport == [45] ]]; then if [[ ! $caddy ]]; then echo - echo " 警告!请自行配置 TLS...教程: https://233v2.com/post/3/" + echo " 警告!请自行配置 TLS...教程: https://v2ray6.com/post/3/" fi echo echo "地址 (Address) = ${domain}" @@ -2211,7 +2211,7 @@ create_v2ray_config_text() { fi echo "---------- END -------------" echo - echo "V2Ray 客户端使用教程: https://233v2.com/post/4/" + echo "V2Ray 客户端使用教程: https://v2ray6.com/post/4/" echo } get_v2ray_config_info_link() { @@ -2220,14 +2220,14 @@ get_v2ray_config_info_link() { echo create_v2ray_config_text >/tmp/233blog_v2ray.txt local random=$(echo $RANDOM-$RANDOM-$RANDOM | base64 -w 0) - local link=$(curl -s --upload-file /tmp/233blog_v2ray.txt "https://transfer.sh/${random}_233v2_v2ray.txt") + local link=$(curl -s --upload-file /tmp/233blog_v2ray.txt "https://transfer.sh/${random}_v2ray6_v2ray.txt") if [[ $link ]]; then echo echo "---------- V2Ray 配置信息链接-------------" echo echo -e "$yellow 链接 = $cyan$link$none" echo - echo -e " V2Ray 客户端使用教程: https://233v2.com/post/4/" + echo -e " V2Ray 客户端使用教程: https://v2ray6.com/post/4/" echo echo "备注...链接将在 14 天后失效..." echo @@ -2293,14 +2293,33 @@ other() { install_bbr() { local test1=$(sed -n '/net.ipv4.tcp_congestion_control/p' /etc/sysctl.conf) local test2=$(sed -n '/net.core.default_qdisc/p' /etc/sysctl.conf) - if [[ $test1 == "net.ipv4.tcp_congestion_control = bbr" && $test2 == "net.core.default_qdisc = fq" ]]; then + if [[ $(uname -r | cut -b 1) -eq 4 ]]; then + case $(uname -r | cut -b 3-4) in + 9. | [1-9][0-9]) + if [[ $test1 == "net.ipv4.tcp_congestion_control = bbr" && $test2 == "net.core.default_qdisc = fq" ]]; then + local is_bbr=true + else + local try_enable_bbr=true + fi + ;; + esac + fi + if [[ $is_bbr ]]; then echo echo -e "$green BBR 已经启用啦...无需再安装$none" echo + elif [[ $try_enable_bbr ]]; then + sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf + sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf + echo "net.ipv4.tcp_congestion_control = bbr" >>/etc/sysctl.conf + echo "net.core.default_qdisc = fq" >>/etc/sysctl.conf + sysctl -p >/dev/null 2>&1 + echo + echo -e "$green ..由于你的 VPS 内核支持开启 BBR ...已经为你启用 BBR 优化....$none" + echo else - _load bbr.sh - _try_enable_bbr - [[ ! $enable_bbr ]] && bash <(curl -s -L https://github.com/teddysun/across/raw/master/bbr.sh) + # https://teddysun.com/489.html + bash <(curl -s -L https://github.com/teddysun/across/raw/master/bbr.sh) fi } install_lotserver() { @@ -2604,7 +2623,7 @@ do_service() { } _help() { echo - echo "........... V2Ray 管理脚本帮助信息 by 233v2.com .........." + echo "........... V2Ray 管理脚本帮助信息 by v2ray6.com .........." echo -e " ${green}v2ray menu $none管理 V2Ray (同等于直接输入 v2ray) @@ -2645,17 +2664,17 @@ menu() { clear while :; do echo - echo "........... V2Ray 管理脚本 $_version by 233v2.com .........." + echo "........... V2Ray 管理脚本 $_version by v2ray6.com .........." echo echo -e "## V2Ray 版本: $cyan$v2ray_ver$none / V2Ray 状态: $v2ray_status ##" echo - echo "帮助说明: https://233v2.com/post/1/" + echo "帮助说明: https://v2ray6.com/post/1/" echo echo "反馈问题: https://github.com/233boy/v2ray/issues" echo echo "TG 群组: https://t.me/blog233" echo - echo "捐赠脚本作者: https://233v2.com/donate/" + echo "捐赠脚本作者: https://v2ray6.com/donate/" echo echo "捐助 V2Ray: https://www.v2ray.com/chapter_00/02_donate.html" echo