修改自用

pull/73/head
jamesmarc2016 7 years ago
parent 0054b7bdef
commit 78757a16c4
  1. 288
      install.sh

@ -41,10 +41,10 @@ else
fi
uuid=$(cat /proc/sys/kernel/random/uuid)
old_id="23332333-2333-2333-2333-233boy233boy"
old_id="fea41d6f-9764-4822-9289-f007409ff55b"
v2ray_server_config="/etc/v2ray/config.json"
v2ray_client_config="/etc/v2ray/233blog_v2ray_config.json"
backup="/etc/v2ray/233blog_v2ray_backup.txt"
v2ray_client_config="/etc/v2ray/jamesmarc_v2ray_config.json"
backup="/etc/v2ray/amesmarc_v2ray_backup.txt"
transport=(
TCP
@ -116,8 +116,8 @@ v2ray_port_config() {
if [[ $v2ray_transport_opt -ne 4 && $v2ray_transport_opt -lt 9 ]]; then
while :; do
echo -e "请输入 "$yellow"V2Ray"$none" 端口 ["$magenta"1-65535"$none"]"
read -p "$(echo -e "(默认端口: ${cyan}2333$none):")" v2ray_port
[ -z "$v2ray_port" ] && v2ray_port="2333"
read -p "$(echo -e "(默认端口: ${cyan}80$none):")" v2ray_port
[ -z "$v2ray_port" ] && v2ray_port="80"
case $v2ray_port in
[1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | [1-6][0-5][0-5][0-3][0-5])
echo
@ -150,8 +150,8 @@ v2ray_dynamic_port_config() {
while :; do
echo -e "请输入 "$yellow"V2Ray"$none" 端口 ["$magenta"1-65535"$none"]"
read -p "$(echo -e "(默认端口: ${cyan}2333$none):")" v2ray_port
[ -z "$v2ray_port" ] && v2ray_port="2333"
read -p "$(echo -e "(默认端口: ${cyan}80$none):")" v2ray_port
[ -z "$v2ray_port" ] && v2ray_port="80"
case $v2ray_port in
[1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | [1-6][0-5][0-5][0-3][0-5])
echo
@ -244,8 +244,8 @@ ws_config() {
while :; do
echo -e "请输入 "$yellow"V2Ray"$none" 端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 端口"
read -p "$(echo -e "(默认端口: ${cyan}2333$none):")" v2ray_port
[ -z "$v2ray_port" ] && v2ray_port="2333"
read -p "$(echo -e "(默认端口: ${cyan}8888$none):")" v2ray_port
[ -z "$v2ray_port" ] && v2ray_port="8888"
case $v2ray_port in
80)
echo
@ -274,7 +274,7 @@ ws_config() {
while :; do
echo
echo -e "请输入一个 $magenta正确的域名$none,一定一定一定要正确,不!能!出!错!"
read -p "(例如:233blog.com): " domain
read -p "(例如:yun.cloudtang.cf): " domain
[ -z "$domain" ] && error && continue
echo
echo
@ -388,9 +388,9 @@ ws_path_config_ask() {
ws_path_config() {
echo
while :; do
echo -e "请输入想要 ${magenta}用来分流的路径$none , 例如 /233blog , 那么只需要输入 233blog 即可"
read -p "$(echo -e "(默认: [${cyan}233blog$none]):")" ws_path
[[ -z $ws_path ]] && ws_path="233blog"
echo -e "请输入想要 ${magenta}用来分流的路径$none , 例如 /jamesmarc , 那么只需要输入 jamesmarc 即可"
read -p "$(echo -e "(默认: [${cyan}jamesmarc$none]):")" ws_path
[[ -z $ws_path ]] && ws_path="jamesmarc"
case $ws_path in
*/*)
@ -439,8 +439,8 @@ blocked_hosts() {
echo
while :; do
echo -e "是否开启广告拦截 [${magenta}Y/N$none]"
read -p "$(echo -e "(默认 [${cyan}N$none]):")" blocked_ad
[[ -z $blocked_ad ]] && blocked_ad="n"
read -p "$(echo -e "(默认 [${cyan}Y$none]):")" blocked_ad
[[ -z $blocked_ad ]] && blocked_ad="y"
case $blocked_ad in
Y | y)
@ -541,8 +541,8 @@ shadowsocks_password_config() {
while :; do
echo -e "请输入 "$yellow"Shadowsocks"$none" 密码"
read -p "$(echo -e "(默认密码: ${cyan}233blog.com$none)"): " sspass
[ -z "$sspass" ] && sspass="233blog.com"
read -p "$(echo -e "(默认密码: ${cyan}jamesmarc2016$none)"): " sspass
[ -z "$sspass" ] && sspass="jamesmarc2016"
case $sspass in
*/*)
echo
@ -769,7 +769,7 @@ install_v2ray() {
if ! wget --no-check-certificate -O "$v2ray_tmp_file" $v2ray_download_link; then
echo -e "
$red 下载 V2Ray 失败啦..可能是你的小鸡的网络太辣鸡了...重新安装也许能解决$none
$red 下载 V2Ray 失败啦..可能是你的小鸡的网络太辣鸡了...重新安装也许能解决$none
" && exit 1
fi
@ -796,89 +796,89 @@ install_v2ray() {
rm -rf /tmp/v2ray
if [[ $local_install ]]; then
mkdir -p /etc/v2ray/233boy/v2ray
cp -rf $(pwd)/* /etc/v2ray/233boy/v2ray
mkdir -p /etc/v2ray/jamesmarc/v2ray
cp -rf $(pwd)/* /etc/v2ray/jamesmarc/v2ray
else
git clone https://github.com/233boy/v2ray /etc/v2ray/233boy/v2ray
git clone https://github.com/jamesmarc2016/v2ray /etc/v2ray/jamesmarc/v2ray
fi
if [ $shadowsocks ]; then
if [[ $is_blocked_ad ]]; then
case $v2ray_transport_opt in
1)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/tcp_ss.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/tcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/tcp_ss.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/tcp.json"
;;
2)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/http_ss.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/http.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/http_ss.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/http.json"
;;
3)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/ws_ss.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/ws.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/ws_ss.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/ws.json"
;;
4)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/ws_ss.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/ws_tls.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/ws_ss.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/ws_tls.json"
;;
5 | 6 | 7 | 8)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/kcp_ss.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/kcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/kcp_ss.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/kcp.json"
;;
9)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/tcp_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/tcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/tcp_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/tcp.json"
;;
10)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/http_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/http.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/http_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/http.json"
;;
11)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/ws_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/ws.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/ws_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/ws.json"
;;
12 | 13 | 14 | 15)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/kcp_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/kcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/kcp_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/kcp.json"
;;
esac
else
case $v2ray_transport_opt in
1)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/tcp_ss.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/tcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/tcp_ss.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/tcp.json"
;;
2)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/http_ss.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/http.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/http_ss.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/http.json"
;;
3)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/ws_ss.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/ws.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/ws_ss.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/ws.json"
;;
4)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/ws_ss.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/ws_tls.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/ws_ss.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/ws_tls.json"
;;
5 | 6 | 7 | 8)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/kcp_ss.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/kcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/kcp_ss.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/kcp.json"
;;
9)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/tcp_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/tcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/tcp_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/tcp.json"
;;
10)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/http_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/http.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/http_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/http.json"
;;
11)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/ws_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/ws.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/ws_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/ws.json"
;;
12 | 13 | 14 | 15)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/kcp_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/kcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/kcp_ss_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/kcp.json"
;;
esac
fi
@ -886,79 +886,79 @@ install_v2ray() {
if [[ $is_blocked_ad ]]; then
case $v2ray_transport_opt in
1)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/tcp.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/tcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/tcp.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/tcp.json"
;;
2)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/http.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/http.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/http.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/http.json"
;;
3)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/ws.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/ws.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/ws.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/ws.json"
;;
4)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/ws.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/ws_tls.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/ws.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/ws_tls.json"
;;
5 | 6 | 7 | 8)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/kcp.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/kcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/kcp.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/kcp.json"
;;
9)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/sblocked_hosts/erver/tcp_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/tcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/sblocked_hosts/erver/tcp_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/tcp.json"
;;
10)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/http_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/http.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/http_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/http.json"
;;
11)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/ws_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/ws.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/ws_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/ws.json"
;;
12 | 13 | 14 | 15)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/blocked_hosts/server/kcp_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/kcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/blocked_hosts/server/kcp_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/kcp.json"
;;
esac
else
case $v2ray_transport_opt in
1)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/tcp.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/tcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/tcp.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/tcp.json"
;;
2)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/http.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/http.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/http.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/http.json"
;;
3)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/ws.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/ws.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/ws.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/ws.json"
;;
4)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/ws.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/ws_tls.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/ws.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/ws_tls.json"
;;
5 | 6 | 7 | 8)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/kcp.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/kcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/kcp.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/kcp.json"
;;
9)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/tcp_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/tcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/tcp_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/tcp.json"
;;
10)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/http_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/http.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/http_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/http.json"
;;
11)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/ws_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/ws.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/ws_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/ws.json"
;;
12 | 13 | 14 | 15)
v2ray_server_config_file="/etc/v2ray/233boy/v2ray/config/server/kcp_dynamic.json"
v2ray_client_config_file="/etc/v2ray/233boy/v2ray/config/client/kcp.json"
v2ray_server_config_file="/etc/v2ray/jamesmarc/v2ray/config/server/kcp_dynamic.json"
v2ray_client_config_file="/etc/v2ray/jamesmarc/v2ray/config/client/kcp.json"
;;
esac
fi
@ -1043,34 +1043,34 @@ del_port() {
config() {
cp -f $v2ray_server_config_file $v2ray_server_config
cp -f $v2ray_client_config_file $v2ray_client_config
cp -f /etc/v2ray/233boy/v2ray/config/backup.txt $backup
cp -f /etc/v2ray/233boy/v2ray/v2ray.sh /usr/local/bin/v2ray
cp -f /etc/v2ray/jamesmarc/v2ray/config/backup.txt $backup
cp -f /etc/v2ray/jamesmarc/v2ray/v2ray.sh /usr/local/bin/v2ray
chmod +x /usr/local/bin/v2ray
local multi_port="${v2ray_dynamic_port_start_input}-${v2ray_dynamic_port_end_input}"
if [ $shadowsocks ]; then
case $v2ray_transport_opt in
1)
sed -i "28s/6666/$ssport/; 30s/chacha20-ietf/$ssciphers/; 31s/233blog.com/$sspass/" $v2ray_server_config
sed -i "28s/6666/$ssport/; 30s/chacha20-ietf/$ssciphers/; 31s/jamesmarc2016/$sspass/" $v2ray_server_config
;;
2)
sed -i "50s/6666/$ssport/; 52s/chacha20-ietf/$ssciphers/; 53s/233blog.com/$sspass/" $v2ray_server_config
sed -i "50s/6666/$ssport/; 52s/chacha20-ietf/$ssciphers/; 53s/jamesmarc2016/$sspass/" $v2ray_server_config
;;
3 | 4)
sed -i "31s/6666/$ssport/; 33s/chacha20-ietf/$ssciphers/; 34s/233blog.com/$sspass/" $v2ray_server_config
sed -i "31s/6666/$ssport/; 33s/chacha20-ietf/$ssciphers/; 34s/jamesmarc2016/$sspass/" $v2ray_server_config
;;
5 | 6 | 7 | 8)
sed -i "43s/6666/$ssport/; 45s/chacha20-ietf/$ssciphers/; 46s/233blog.com/$sspass/" $v2ray_server_config
sed -i "43s/6666/$ssport/; 45s/chacha20-ietf/$ssciphers/; 46s/jamesmarc2016/$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/jamesmarc2016/$sspass/; 42s/10000-20000/$multi_port/" $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/jamesmarc2016/$sspass/; 78s/10000-20000/$multi_port/" $v2ray_server_config
;;
*)
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/jamesmarc2016/$sspass/; 45s/10000-20000/$multi_port/" $v2ray_server_config
;;
esac
@ -1143,20 +1143,20 @@ config() {
fi
sed -i "8s/2333/$v2ray_port/; 14s/$old_id/fea41d6f-9764-4822-9289-f007409ff55b/" $v2ray_server_config
sed -i "8s/80/$v2ray_port/; 14s/$old_id/fea41d6f-9764-4822-9289-f007409ff55b/" $v2ray_server_config
if [[ $v2ray_transport_opt -eq 4 ]]; then
sed -i "s/233blog.com/$domain/; 22s/2333/443/; 25s/$old_id/fea41d6f-9764-4822-9289-f007409ff55b/" $v2ray_client_config
sed -i "s/jamesmarc2016/$domain/; 22s/80/443/; 25s/$old_id/fea41d6f-9764-4822-9289-f007409ff55b/" $v2ray_client_config
if [[ $ws_path ]]; then
sed -i "41s/233blog/$ws_path/" $v2ray_client_config
sed -i "41s/jamesmarc/$ws_path/" $v2ray_client_config
else
sed -i "41s/233blog//" $v2ray_client_config
sed -i "41s/jamesmarc//" $v2ray_client_config
fi
else
sed -i "s/233blog.com/$ip/; 22s/2333/$v2ray_port/; 25s/$old_id/fea41d6f-9764-4822-9289-f007409ff55b/" $v2ray_client_config
sed -i "s/jamesmarc2016/$ip/; 22s/80/$v2ray_port/; 25s/$old_id/fea41d6f-9764-4822-9289-f007409ff55b/" $v2ray_client_config
fi
zip -q -r -j --password "233blog.com" /etc/v2ray/233blog_v2ray.zip $v2ray_client_config
zip -q -r -j --password "jamesmarc2016" /etc/v2ray/jamesmarc_v2ray.zip $v2ray_client_config
if [[ $cmd == "apt-get" ]]; then
cat >/etc/network/if-pre-up.d/iptables <<-EOF
@ -1193,18 +1193,18 @@ config() {
}
backup_config() {
sed -i "17s/1/$v2ray_transport_opt/; 19s/2333/$v2ray_port/; 21s/$old_id/fea41d6f-9764-4822-9289-f007409ff55b/;" $backup
sed -i "17s/1/$v2ray_transport_opt/; 19s/80/$v2ray_port/; 21s/$old_id/fea41d6f-9764-4822-9289-f007409ff55b/;" $backup
if [ $v2ray_transport_opt -ge 9 ]; then
sed -i "23s/10000/$v2ray_dynamic_port_start_input/; 25s/20000/$v2ray_dynamic_port_end_input/" $backup
fi
if [ $shadowsocks ]; then
sed -i "31s/false/true/; 33s/6666/$ssport/; 35s/233blog.com/$sspass/; 37s/chacha20-ietf/$ssciphers/" $backup
sed -i "31s/false/true/; 33s/6666/$ssport/; 35s/yun.cloudtang.cf/$sspass/; 37s/chacha20-ietf/$ssciphers/" $backup
fi
[ $v2ray_transport_opt == "4" ] && sed -i "27s/233blog.com/$domain/" $backup
[ $v2ray_transport_opt == "4" ] && sed -i "27s/jamesmarc.com/$domain/" $backup
[ $caddy ] && sed -i "29s/false/true/" $backup
[ $is_blocked_ad ] && sed -i "39s/false/true/" $backup
if [[ $ws_path ]]; then
sed -i "41s/false/true/; 43s/233blog/$ws_path/; $ d" $backup
sed -i "41s/false/true/; 43s/jamesmarc/$ws_path/; $ d" $backup
echo "$proxy_site" >>$backup
fi
@ -1295,11 +1295,11 @@ show_config_info() {
if [[ $v2ray_transport_opt == "4" ]]; then
cat >/etc/v2ray/vmess_qr.json <<-EOF
{
"ps": "233blog_v2ray_${domain}",
"ps": "jamesmarc_v2ray_${domain}",
"add": "${domain}",
"port": "443",
"id": "${uuid}",
"aid": "233",
"aid": "255",
"net": "${net}",
"type": "none",
"host": "${host}",
@ -1309,7 +1309,7 @@ show_config_info() {
else
cat >/etc/v2ray/vmess_qr.json <<-EOF
{
"ps": "233blog_v2ray_${ip}",
"ps": "jamesmarc_v2ray_${ip}",
"add": "${ip}",
"port": "${v2ray_port}",
"id": "${uuid}",
@ -1327,7 +1327,7 @@ show_config_info() {
else
ip_or_domain=$ip
fi
local shadowray_qr="vmess://$(echo -n "aes-128-cfb:${uuid}@${ip_or_domain}:${v2ray_port}" | base64)?remarks=233blog_v2ray_${ip_or_domain}&obfs=${obfs}"
local shadowray_qr="vmess://$(echo -n "aes-128-cfb:${uuid}@${ip_or_domain}:${v2ray_port}" | base64)?remarks=jamesmarc_v2ray_${ip_or_domain}&obfs=${obfs}"
echo "${shadowray_qr}" >/etc/v2ray/shadowray_qr.txt
sed -i 'N;s/\n//' /etc/v2ray/shadowray_qr.txt
fi
@ -1337,10 +1337,10 @@ show_config_info() {
echo
echo -e " $yellow输入 ${cyan}v2ray${none} $yellow即可管理 V2Ray${none}"
echo
echo -e " ${yellow}V2Ray 客户端使用教程: https://233blog.com/post/20/$none"
echo -e " ${yellow}V2Ray 客户端使用教程"
echo
if [[ $v2ray_transport_opt == "4" && ! $caddy ]]; then
echo -e " $red警告$none$yellow请自行配置 TLS...教程: https://233blog.com/post/19/$none"
echo -e " $red警告$none$yellow请自行配置 TLS...教程"
echo
fi
echo "---------- V2Ray 配置信息 -------------"
@ -1348,11 +1348,11 @@ show_config_info() {
echo
echo -e "$yellow 地址 (Address) = $cyan${domain}$none"
echo
echo -e "$yellow 端口 (Port) = ${cyan}443${none}"
echo -e "$yellow 端口 (Port) = ${cyan}80${none}"
echo
echo -e "$yellow 用户ID (User ID / UUID) = $cyan${uuid}$none"
echo
echo -e "$yellow 额外ID (Alter Id) = ${cyan}233${none}"
echo -e "$yellow 额外ID (Alter Id) = ${cyan}255${none}"
echo
echo -e "$yellow 传输协议 (Network) = ${cyan}${network}$none"
echo
@ -1375,7 +1375,7 @@ show_config_info() {
echo
echo -e "$yellow 用户ID (User ID / UUID) = $cyan${uuid}$none"
echo
echo -e "$yellow 额外ID (Alter Id) = ${cyan}233${none}"
echo -e "$yellow 额外ID (Alter Id) = ${cyan}255${none}"
echo
echo -e "$yellow 传输协议 (Network) = ${cyan}${net}$none"
echo
@ -1400,7 +1400,7 @@ show_config_info() {
echo
fi
if [ $shadowsocks ]; then
local ss="ss://$(echo -n "${ssciphers}:${sspass}@${ip}:${ssport}" | base64)#233blog_ss_${ip}"
local ss="ss://$(echo -n "${ssciphers}:${sspass}@${ip}:${ssport}" | base64)#jamesmarc_ss_${ip}"
echo
echo "---------- Shadowsocks 配置信息 -------------"
echo
@ -1466,22 +1466,22 @@ get_qr_link() {
[1-4] | 9 | 10 | 11)
local ios_qr=true
local random3=$(echo $RANDOM-$RANDOM-$RANDOM | base64)
cat /etc/v2ray/shadowray_qr.txt | qrencode -s 50 -o /tmp/233blog_shadowray_qr.png
local link3=$(curl -s --upload-file /tmp/233blog_shadowray_qr.png "https://transfer.sh/${random3}_233blog_v2ray.png")
cat /etc/v2ray/shadowray_qr.txt | qrencode -s 50 -o /tmp/jamesmarc_shadowray_qr.png
local link3=$(curl -s --upload-file /tmp/jamesmarc_shadowray_qr.png "https://transfer.sh/${random3}_jamesmarc_v2ray.png")
;;
esac
if [[ $1 ]]; then
local vmess="vmess://$(cat /etc/v2ray/vmess_qr.json | base64)"
echo $vmess >/etc/v2ray/vmess.txt
cat /etc/v2ray/vmess.txt | qrencode -s 50 -o /tmp/233blog_v2ray.png
local ss="ss://$(echo -n "${ssciphers}:${sspass}@${ip}:${ssport}" | base64)#233blog_ss_${ip}"
echo "${ss}" >/tmp/233blog_shadowsocks.txt
cat /tmp/233blog_shadowsocks.txt | qrencode -s 50 -o /tmp/233blog_shadowsocks.png
cat /etc/v2ray/vmess.txt | qrencode -s 50 -o /tmp/jamesmarc_v2ray.png
local ss="ss://$(echo -n "${ssciphers}:${sspass}@${ip}:${ssport}" | base64)#jamesmarc_ss_${ip}"
echo "${ss}" >/tmp/jamesmarc_shadowsocks.txt
cat /tmp/jamesmarc_shadowsocks.txt | qrencode -s 50 -o /tmp/jamesmarc_shadowsocks.png
local random1=$(echo $RANDOM-$RANDOM-$RANDOM | base64)
local random2=$(echo $RANDOM-$RANDOM-$RANDOM | base64)
local link1=$(curl -s --upload-file /tmp/233blog_v2ray.png "https://transfer.sh/${random1}_233blog_v2ray.png")
local link2=$(curl -s --upload-file /tmp/233blog_shadowsocks.png "https://transfer.sh/${random2}_233blog_shadowsocks.png")
local link1=$(curl -s --upload-file /tmp/jamesmarc_v2ray.png "https://transfer.sh/${random1}_jamesmarc_v2ray.png")
local link2=$(curl -s --upload-file /tmp/jamesmarc_shadowsocks.png "https://transfer.sh/${random2}_jamesmarc_shadowsocks.png")
if [[ $link1 && $link2 ]]; then
echo
echo "---------- V2Ray 二维码链接 -------------"
@ -1491,7 +1491,7 @@ get_qr_link() {
if [[ $ios_qr && $link3 ]]; then
echo -e "$yellow 适用于 Pepi / ShadowRay = $cyan${link3}$none"
echo
echo " 请在 Pepi / ShadowRay 配置界面将 Alter Id 设置为 233 (如果你使用 Pepi / ShadowRay)"
echo " 请在 Pepi / ShadowRay 配置界面将 Alter Id 设置为 255 (如果你使用 Pepi / ShadowRay)"
if [[ $v2ray_transport_opt == 4 ]]; then
echo
echo " 请在 Pepi / ShadowRay 配置界面打开 TLS (Enable TLS) (如果你使用 Pepi / ShadowRay)"
@ -1530,14 +1530,14 @@ get_qr_link() {
echo
fi
rm -rf /tmp/233blog_shadowsocks.png
rm -rf /tmp/233blog_shadowsocks.txt
rm -rf /tmp/jamesmarc_shadowsocks.png
rm -rf /tmp/jamesmarc_shadowsocks.txt
else
local vmess="vmess://$(cat /etc/v2ray/vmess_qr.json | base64)"
echo $vmess >/etc/v2ray/vmess.txt
cat /etc/v2ray/vmess.txt | qrencode -s 50 -o /tmp/233blog_v2ray.png
cat /etc/v2ray/vmess.txt | qrencode -s 50 -o /tmp/jamesmarc_v2ray.png
local random1=$(echo $RANDOM-$RANDOM-$RANDOM | base64)
local link1=$(curl -s --upload-file /tmp/233blog_v2ray.png "https://transfer.sh/${random1}_233blog_v2ray.png")
local link1=$(curl -s --upload-file /tmp/jamesmarc_v2ray.png "https://transfer.sh/${random1}_jamesmarc_v2ray.png")
if [[ $link1 ]]; then
echo
echo "---------- V2Ray 二维码链接 -------------"
@ -1547,7 +1547,7 @@ get_qr_link() {
if [[ $ios_qr && $link3 ]]; then
echo -e "$yellow 适用于 Pepi / ShadowRay = $cyan${link3}$none"
echo
echo " 请在 Pepi / ShadowRay 配置界面将 Alter Id 设置为 233 (如果你使用 Pepi / ShadowRay)"
echo " 请在 Pepi / ShadowRay 配置界面将 Alter Id 设置为 255 (如果你使用 Pepi / ShadowRay)"
if [[ $v2ray_transport_opt == 4 ]]; then
echo
echo " 请在 Pepi / ShadowRay 配置界面打开 TLS (Enable TLS) (如果你使用 Pepi / ShadowRay)"
@ -1577,11 +1577,11 @@ get_qr_link() {
echo
fi
fi
rm -rf /tmp/233blog_v2ray.png
rm -rf /tmp/jamesmarc_v2ray.png
rm -rf /etc/v2ray/vmess_qr.json
rm -rf /etc/v2ray/vmess.txt
if [[ $ios_qr ]]; then
rm -rf /tmp/233blog_shadowray_qr.png
rm -rf /tmp/jamesmarc_shadowray_qr.png
rm -rf /etc/v2ray/shadowray_qr.txt
fi
@ -1730,7 +1730,7 @@ uninstall() {
echo
echo "如果你觉得这个脚本有哪些地方不够好的话...请告诉我"
echo
echo "反馈问题: https://github.com/233boy/v2ray/issus"
echo "反馈问题"
echo
elif [[ $is_uninstall_v2ray ]]; then
@ -1779,7 +1779,7 @@ uninstall() {
echo
echo "如果你觉得这个脚本有哪些地方不够好的话...请告诉我"
echo
echo "反馈问题: https://github.com/233boy/v2ray/issus"
echo "反馈问题"
echo
fi
@ -1787,7 +1787,7 @@ uninstall() {
echo -e "
$red 大胸弟...你貌似毛有安装 V2Ray ....卸载个鸡鸡哦...$none
备注...仅支持卸载使用我(233blog.com)提供的 V2Ray 一键安装脚本
备注...仅支持卸载使用我提供的 V2Ray 一键安装脚本
" && exit 1
fi
@ -1819,11 +1819,7 @@ esac
clear
while :; do
echo
echo "........... V2Ray 一键安装脚本 & 管理脚本 by 233blog.com .........."
echo
echo "帮助说明: https://233blog.com/post/16/"
echo
echo "搭建教程: https://233blog.com/post/17/"
echo "........... V2Ray 一键安装脚本 & 管理脚本 by .........."
echo
echo " 1. 安装"
echo

Loading…
Cancel
Save