浏览代码

更新ss-lbev极速安装脚本,ipv6 BBR参数开启

hongwenjun 6 年之前
父节点
当前提交
2f5a4c4bbc

+ 1 - 4
Wireguard/wgmtu.sh

@@ -163,7 +163,6 @@ ss_kcp_udp2raw_wg_speed(){
 
 # 常用工具和配置
 get_tools_conf(){
-    apt update
     apt install -y htop tmux screen iperf3  >/dev/null 2>&1
     yum install -y vim htop tmux screen iperf3  >/dev/null 2>&1
     wget -O .vimrc      --no-check-certificate https://raw.githubusercontent.com/hongwenjun/srgb/master/vim/_vimrc
@@ -184,9 +183,7 @@ scp_conf(){
     wg-quick up wg0     >/dev/null 2>&1
     echo -e "${RedBG}    我真不知道WG服务器端是否已经使用源vps的配置启动!    ${Font}"
 
-    if [ ! -e '/root/.tmux.conf' ]; then
-        get_tools_conf
-    fi
+    get_tools_conf
 }
 
 # 定义文字颜色

+ 2 - 2
debian_wg_vpn.sh

@@ -125,9 +125,9 @@ chmod 777 -R /etc/wireguard
 
 sysctl_config() {
     sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf
-    sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf
+    sed -i '/net.all.tcp_congestion_control/d' /etc/sysctl.conf
     echo "net.core.default_qdisc = fq" >> /etc/sysctl.conf
-    echo "net.ipv4.tcp_congestion_control = bbr" >> /etc/sysctl.conf
+    echo "net.all.tcp_congestion_control = bbr" >> /etc/sysctl.conf
     sysctl -p >/dev/null 2>&1
 }
 

+ 1 - 1
golang_install.sh

@@ -4,7 +4,7 @@
 
 # 下载释放go语言安装包
 
-go_tar_gz="go1.12.linux-amd64.tar.gz"
+go_tar_gz="go1.12.7.linux-amd64.tar.gz"
 
 go_url="https://dl.google.com/go/${go_tar_gz}"
 

+ 2 - 5
shadowsocks/README.md

@@ -1,14 +1,11 @@
 - [蘭雅sRGB![](https://raw.githubusercontent.com/hongwenjun/vps_setup/master/img/youtube.png)频道](https://www.youtube.com/channel/UCupRwki_4n87nrwP0GIBUXA/videos)    可以观看相关脚本工具的演示视频!
 
-# 一键安装shadowsocks-libev脚本 For Debian_9  Ubuntu  Centos_7
+### 一键安装shadowsocks-libev脚本 For Linux X64 (Debian 8/9/10 Ubuntu 16/18/19 Centos 7)
 ```
 #  极速安装脚本,纯净编译支持多种Linux系统
-wget -qO- git.io/ss.inst | bash
-
-# 一键安装shadowsocks-libev
 wget -qO- git.io/fhExJ | bash
 
-# 纯净编译脚本 For Debian / Ubuntu
+# 纯净编译脚本 For Debian / Ubuntu / Centos
 https://git.io/ss.ss
 ```
 

+ 17 - 5
shadowsocks/install_ss-server.sh

@@ -3,16 +3,27 @@
 # 定义文字颜色
 Green="\033[32m"  && Red="\033[31m" && GreenBG="\033[42;37m" && RedBG="\033[41;37m" && Font="\033[0m"
 
-echo -e "${Green}:: Quick install Shadowsocks-libev  For Debian_9 Centos_7 Ubuntu_18 ${Font}"
+echo -e "${Green}:: Quick install Shadowsocks-libev For Linux X64 (Debian 8/9/10 Ubuntu 16/18/19 Centos 7) ${Font}"
 echo -e "${Green}:: Compile/Update: ${RedBG} bash <(curl -L -s git.io/fhExJ) update ${Font}"
 
 def_install(){
+    # Download the binary release of Pure Compilation.
+    wget -O /tmp/ss.tgz https://git.io/ss.tgz
+    tar xvf  /tmp/ss.tgz -C /
+
+    echo "/usr/local/lib" > /etc/ld.so.conf.d/ss-libev.conf
+    ldconfig
+    export PATH=$PATH:/usr/local/bin
+    rm /tmp/ss.tgz
+}
+
+old_def_install(){
     if [[ ${release} == "centos" ]]; then
-        # 安装所需运行库 Centos
+        # 安装所需运行库 Centos 7
         yum update -y
         yum install -y  libev-devel c-ares-devel  mbedtls-devel libsodium-devel
     else
-        # 安装所需运行库 Debian 9 & Ubuntu
+        # 安装所需运行库 Debian 9 & Ubuntu 18
         apt update
         apt install -y  libev-dev libc-ares-dev  libmbedtls-dev libsodium-dev
     fi
@@ -31,6 +42,7 @@ debian_ubuntu_dev(){
 centos7_dev(){
     # Cetons 安装编译环境和运行库
     yum install epel-release git -y
+    yum groupinstall "Development Tools" -y
     yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto c-ares-devel libev-devel libsodium-devel mbedtls-devel -y
 }
 
@@ -71,9 +83,9 @@ check_sys(){
 
 sysctl_config() {
     sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf
-    sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf
+    sed -i '/net.all.tcp_congestion_control/d' /etc/sysctl.conf
     echo "net.core.default_qdisc = fq" >> /etc/sysctl.conf
-    echo "net.ipv4.tcp_congestion_control = bbr" >> /etc/sysctl.conf
+    echo "net.all.tcp_congestion_control = bbr" >> /etc/sysctl.conf
     sysctl -p >/dev/null 2>&1
 }
 

+ 2 - 2
ubuntu_wireguard_install.sh

@@ -113,9 +113,9 @@ chmod 777 -R /etc/wireguard
 
 sysctl_config() {
     sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf
-    sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf
+    sed -i '/net.all.tcp_congestion_control/d' /etc/sysctl.conf
     echo "net.core.default_qdisc = fq" >> /etc/sysctl.conf
-    echo "net.ipv4.tcp_congestion_control = bbr" >> /etc/sysctl.conf
+    echo "net.all.tcp_congestion_control = bbr" >> /etc/sysctl.conf
     sysctl -p >/dev/null 2>&1
 }
 

+ 7 - 7
udp2raw_kcptun_ss_for_debian9.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-PASSWORD=srgb.xyz
+PASSWORD=$(date | md5sum  | head -c 6)
 
 # 客户端配置参考(前两个可以路由运行,但是最后一个最好不要,路由性能有限,会让你觉得网络卡炸的.)
 # 在本地windows 运行udp2raw 和 kcp-client,假设server ip是144.202.95.95:
@@ -35,13 +35,13 @@ git submodule update --init --recursive
 make
 make install
 cd ..
-rm shadowsocks-libev -rf
+# rm shadowsocks-libev -rf
 
 #下载KCPTUN
 wget https://github.com/xtaci/kcptun/releases/download/v20190109/kcptun-linux-amd64-20190109.tar.gz
-tar xf kcptun-linux-amd64-20190109.tar.gz 
+tar xf kcptun-linux-amd64-20190109.tar.gz
 mv server_linux_amd64 /usr/bin/kcp-server
-rm kcptun-linux-amd64-20190109.tar.gz 
+rm kcptun-linux-amd64-20190109.tar.gz
 rm client_linux_amd64
 rm server_linux_amd64
 
@@ -55,9 +55,9 @@ rm version.txt
 
 sysctl_config() {
     sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf
-    sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf
+    sed -i '/net.all.tcp_congestion_control/d' /etc/sysctl.conf
     echo "net.core.default_qdisc = fq" >> /etc/sysctl.conf
-    echo "net.ipv4.tcp_congestion_control = bbr" >> /etc/sysctl.conf
+    echo "net.all.tcp_congestion_control = bbr" >> /etc/sysctl.conf
     sysctl -p >/dev/null 2>&1
 }
 
@@ -83,7 +83,7 @@ cat <<EOF >/etc/rc.local
 # By default this script does nothing.
 
 #  SS+KCP+UDP2RAW 加速  端口  8855
-ss-server -s 127.0.0.1 -p 40000 -k ${PASSWORD} -m aes-256-gcm -t 300 >> /var/log/ss-server.log &
+ss-server -s 127.0.0.1 -p 40000 -k ${PASSWORD} -m aes-256-gcm -t 300  -s ::0 >> /var/log/ss-server.log &
 kcp-server -t "127.0.0.1:40000" -l ":4000" -mode fast2 -mtu 1300  >> /var/log/kcp-server.log &
 udp2raw -s -l0.0.0.0:8855 -r 127.0.0.1:4000 -k "passwd" --raw-mode faketcp  >> /var/log/udp2raw.log &
 

+ 166 - 166
v2ray/NewServerConfigDynamicPort.json

@@ -1,167 +1,167 @@
-{
-    "log": {
-        "loglevel": "warning"
-    },
-    "inbounds": [
-        {
-            "tags": "TCP",
-            "port": 10086,
-            "protocol": "vmess",
-            "settings": {
-                "clients": [
-                    {
-                        "id": "换上你自己的uuid",
-                        "alterId": 64
-                    }
-                ],
-                "detour": {
-                    "to": "DynamicPortTCP"
-                }
-            },
-            "sniffing": {
-                "enabled": true,
-                "destOverride": [
-                    "http",
-                    "tls"
-                ]
-            }
-        },
-        {
-            "tag": "mKCP",
-            "port": 10010,
-            "protocol": "vmess",
-            "settings": {
-                "clients": [
-                    {
-                        "id": "换上你自己的uuid,建议别与上面那个一样",
-                        "alterId": 64
-                    }
-                ],
-                "detour": {
-                    "to": "DynamicPortUDP"
-                }
-            },
-            "sniffing": {
-                "enabled": true,
-                "destOverride": [
-                    "http",
-                    "tls"
-                ]
-            },
-            "streamSettings": {
-                "network": "mkcp",
-                "kcpSettings": {
-                    "mtu": 1350,
-                    "tti": 20,
-                    "uplinkCapacity": 100,
-                    "downlinkCapacity": 100,
-                    "congestion": true,
-                    "readBufferSize": 1,
-                    "writeBufferSize": 1,
-                    "header": {
-                        "type": "none"
-                    }
-                }
-            }
-        },
-        {
-            "tag": "shadowsocks",
-            "port": 10000,
-            "protocol": "shadowsocks",
-            "settings": {
-                "method": "aes-128-gcm",
-                "udp": true,
-                "password": "建议拿一个uuid做ss协议的密码,还有,这个协议没有动态端口支持"
-            },
-            "sniffing": {
-                "enabled": true,
-                "destOverride": [
-                    "http",
-                    "tls"
-                ]
-            }
-        },
-        {
-            "tag": "DynamicPortTCP",
-            "protocol": "vmess",
-            "port": "12000-13000",
-            "settings": {
-                "default": {
-                    "alterId": 64
-                }
-            },
-            "sniffing": {
-                "enabled": true,
-                "destOverride": [
-                    "http",
-                    "tls"
-                ]
-            },
-            "allocate": {
-                "strategy": "random",
-                "concurrency": 2,
-                "refresh": 30
-            }
-        },
-        {
-            "tag": "DynamicPortUDP",
-            "protocol": "vmess",
-            "port": "14000-15980",
-            "settings": {
-                "default": {
-                    "alterId": 64
-                }
-            },
-            "sniffing": {
-                "enabled": true,
-                "destOverride": [
-                    "http",
-                    "tls"
-                ]
-            },
-            "allocate": {
-                "strategy": "random",
-                "concurrency": 2,
-                "refresh": 30
-            },
-            "streamSettings": {
-                "network": "kcp"
-            }
-        }
-    ],
-    "outbounds": [
-        {
-            "tag": "freedom",
-            "protocol": "freedom",
-            "settings": {}
-        },
-        {
-            "tag": "blocked",
-            "protocol": "blackhole",
-            "settings": {},
-            "response": {
-                "type": "http"
-            }
-        }
-    ],
-    "routing": {
-        "strategy": "rules",
-        "settings": {
-            "rules": [
-                {
-                    "type": "field",
-                    "protocol": [
-                        "bittorrent"
-                    ],
-                    "ip": [
-                        "geoip:private"
-                    ],
-                    "domain": [
-                        "geosite:category-ads"
-                    ],
-                    "outboundTag": "blocked"
-                }
-            ]
-        }
-    }
+{
+    "log": {
+        "loglevel": "warning"
+    },
+    "inbounds": [
+        {
+            "tags": "TCP",
+            "port": 10086,
+            "protocol": "vmess",
+            "settings": {
+                "clients": [
+                    {
+                        "id": "换上你自己的uuid",
+                        "alterId": 64
+                    }
+                ],
+                "detour": {
+                    "to": "DynamicPortTCP"
+                }
+            },
+            "sniffing": {
+                "enabled": true,
+                "destOverride": [
+                    "http",
+                    "tls"
+                ]
+            }
+        },
+        {
+            "tag": "mKCP",
+            "port": 10010,
+            "protocol": "vmess",
+            "settings": {
+                "clients": [
+                    {
+                        "id": "换上你自己的uuid,建议别与上面那个一样",
+                        "alterId": 64
+                    }
+                ],
+                "detour": {
+                    "to": "DynamicPortUDP"
+                }
+            },
+            "sniffing": {
+                "enabled": true,
+                "destOverride": [
+                    "http",
+                    "tls"
+                ]
+            },
+            "streamSettings": {
+                "network": "mkcp",
+                "kcpSettings": {
+                    "mtu": 1350,
+                    "tti": 20,
+                    "uplinkCapacity": 100,
+                    "downlinkCapacity": 100,
+                    "congestion": true,
+                    "readBufferSize": 1,
+                    "writeBufferSize": 1,
+                    "header": {
+                        "type": "none"
+                    }
+                }
+            }
+        },
+        {
+            "tag": "shadowsocks",
+            "port": 10000,
+            "protocol": "shadowsocks",
+            "settings": {
+                "method": "aes-128-gcm",
+                "udp": true,
+                "password": "建议拿一个uuid做ss协议的密码,还有,这个协议没有动态端口支持"
+            },
+            "sniffing": {
+                "enabled": true,
+                "destOverride": [
+                    "http",
+                    "tls"
+                ]
+            }
+        },
+        {
+            "tag": "DynamicPortTCP",
+            "protocol": "vmess",
+            "port": "12000-13000",
+            "settings": {
+                "default": {
+                    "alterId": 64
+                }
+            },
+            "sniffing": {
+                "enabled": true,
+                "destOverride": [
+                    "http",
+                    "tls"
+                ]
+            },
+            "allocate": {
+                "strategy": "random",
+                "concurrency": 2,
+                "refresh": 30
+            }
+        },
+        {
+            "tag": "DynamicPortUDP",
+            "protocol": "vmess",
+            "port": "14000-15980",
+            "settings": {
+                "default": {
+                    "alterId": 64
+                }
+            },
+            "sniffing": {
+                "enabled": true,
+                "destOverride": [
+                    "http",
+                    "tls"
+                ]
+            },
+            "allocate": {
+                "strategy": "random",
+                "concurrency": 2,
+                "refresh": 30
+            },
+            "streamSettings": {
+                "network": "kcp"
+            }
+        }
+    ],
+    "outbounds": [
+        {
+            "tag": "freedom",
+            "protocol": "freedom",
+            "settings": {}
+        },
+        {
+            "tag": "blocked",
+            "protocol": "blackhole",
+            "settings": {},
+            "response": {
+                "type": "http"
+            }
+        }
+    ],
+    "routing": {
+        "strategy": "rules",
+        "settings": {
+            "rules": [
+                {
+                    "type": "field",
+                    "protocol": [
+                        "bittorrent"
+                    ],
+                    "ip": [
+                        "geoip:private"
+                    ],
+                    "domain": [
+                        "geosite:category-ads"
+                    ],
+                    "outboundTag": "blocked"
+                }
+            ]
+        }
+    }
 }

+ 3 - 3
v2ray_ss_conf.sh

@@ -6,7 +6,7 @@
 let v2ray_port=$RANDOM+9999
 UUID=$(cat /proc/sys/kernel/random/uuid)
 
-let ss_port=$RANDOM+8888
+ss_port=40000
 ss_passwd=$(date | md5sum  | head -c 6)
 cur_dir=$(pwd)
 
@@ -28,9 +28,9 @@ setport(){
 # debian 9 bbr 设置打开
 sysctl_config() {
     sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf
-    sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf
+    sed -i '/net.all.tcp_congestion_control/d' /etc/sysctl.conf
     echo "net.core.default_qdisc = fq" >> /etc/sysctl.conf
-    echo "net.ipv4.tcp_congestion_control = bbr" >> /etc/sysctl.conf
+    echo "net.all.tcp_congestion_control = bbr" >> /etc/sysctl.conf
     sysctl -p >/dev/null 2>&1
 }