Skip to content

Commit

Permalink
Remove fast-open option
Browse files Browse the repository at this point in the history
  • Loading branch information
loyess committed May 11, 2020
1 parent 508e9e7 commit 6977061
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 67 deletions.
36 changes: 2 additions & 34 deletions ss-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export PATH

# shell version
# ====================
SHELL_VERSION="2.4.9"
SHELL_VERSION="2.5.0"
# ====================


Expand Down Expand Up @@ -435,32 +435,6 @@ check_sys(){
fi
}

check_kernel_version(){
local kernel_version=$(uname -r | cut -d- -f1)
if version_gt ${kernel_version} 3.7.0; then
return 0
else
return 1
fi
}

check_kernel_headers(){
if check_sys packageManager yum; then
if rpm -qa | grep -q headers-$(uname -r); then
return 0
else
return 1
fi
elif check_sys packageManager apt; then
if dpkg -s linux-headers-$(uname -r) > /dev/null 2>&1; then
return 0
else
return 1
fi
fi
return 1
}

check_latest_version(){
local current_v=$1
local latest_v=$2
Expand Down Expand Up @@ -1005,14 +979,8 @@ install_mbedtls(){
}

config_ss(){

if check_kernel_version && check_kernel_headers; then
fast_open="true"
else
fast_open="false"
fi

local server_value="\"0.0.0.0\""

if get_ipv6; then
local V=${SS_VERSION}
local N=${plugin_num}
Expand Down
16 changes: 0 additions & 16 deletions templates/config_file_templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ ss_config_standalone(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp"
}
Expand All @@ -25,7 +24,6 @@ ss_v2ray_ws_http_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp",
"plugin":"v2ray-plugin",
Expand All @@ -43,7 +41,6 @@ ss_v2ray_ws_tls_cdn_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp",
"plugin":"v2ray-plugin",
Expand All @@ -62,7 +59,6 @@ ss_v2ray_quic_tls_cdn_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_only",
"plugin":"v2ray-plugin",
Expand All @@ -80,7 +76,6 @@ ss_v2ray_ws_tls_web_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp",
"plugin":"v2ray-plugin",
Expand Down Expand Up @@ -115,7 +110,6 @@ ss_v2ray_ws_tls_web_cdn_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp",
"plugin":"v2ray-plugin",
Expand Down Expand Up @@ -234,7 +228,6 @@ ss_obfs_http_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp",
"plugin":"obfs-server",
Expand All @@ -252,7 +245,6 @@ ss_obfs_tls_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp",
"plugin":"obfs-server",
Expand All @@ -271,7 +263,6 @@ ss_goquiet_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp",
"plugin":"gq-server",
Expand Down Expand Up @@ -324,7 +315,6 @@ ss_mtt_tls_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_only",
"plugin":"mtt-server",
Expand All @@ -342,7 +332,6 @@ ss_mtt_tls_dns_only_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_only",
"plugin":"mtt-server",
Expand All @@ -360,7 +349,6 @@ ss_mtt_wss_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_only",
"plugin":"mtt-server",
Expand All @@ -378,7 +366,6 @@ ss_mtt_wss_dns_only_or_cdn_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_only",
"plugin":"mtt-server",
Expand All @@ -396,7 +383,6 @@ ss_mtt_wss_dns_only_or_cdn_web_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_only",
"plugin":"mtt-server",
Expand Down Expand Up @@ -426,7 +412,6 @@ ss_simple_tls_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_only",
"plugin":"simple-tls",
Expand All @@ -444,7 +429,6 @@ ss_simple_tls_wss_config(){
"timeout":300,
"user":"nobody",
"method":"${shadowsockscipher}",
"fast_open":${fast_open},
"nameserver":"8.8.8.8",
"mode":"tcp_only",
"plugin":"simple-tls",
Expand Down
34 changes: 17 additions & 17 deletions templates/terminal_config_templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ss_v2ray_ws_http_show(){
echo -e " 加密 : ${Red}${shadowsockscipher}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件程序 : ${Red}${plugin_client_name}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件选项 : ${Red}host=${domain};path=${path};mux=${mux}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand All @@ -46,7 +46,7 @@ ss_v2ray_ws_tls_cdn_show(){
echo -e " 加密 : ${Red}${shadowsockscipher}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件程序 : ${Red}${plugin_client_name}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件选项 : ${Red}tls;host=${domain};path=${path};mux=${mux}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand All @@ -68,7 +68,7 @@ ss_v2ray_quic_tls_cdn_show(){
echo -e " 加密 : ${Red}${shadowsockscipher}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件程序 : ${Red}${plugin_client_name}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件选项 : ${Red}mode=quic;host=${domain}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand All @@ -90,7 +90,7 @@ ss_v2ray_ws_tls_web_show(){
echo -e " 加密 : ${Red}${shadowsockscipher}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件程序 : ${Red}${plugin_client_name}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件选项 : ${Red}tls;host=${domain};path=${path};mux=${mux}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand All @@ -112,7 +112,7 @@ ss_v2ray_ws_tls_web_cdn_show(){
echo -e " 加密 : ${Red}${shadowsockscipher}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件程序 : ${Red}${plugin_client_name}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件选项 : ${Red}tls;host=${domain};path=${path};mux=${mux}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand Down Expand Up @@ -170,7 +170,7 @@ ss_obfs_http_show(){
echo -e " 加密 : ${Red}${shadowsockscipher}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件程序 : ${Red}${plugin_client_name}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件选项 : ${Red}obfs=${shadowsocklibev_obfs}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : ${Red}obfs-host=${domain};fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : ${Red}obfs-host=${domain}${suffix}" >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand All @@ -192,7 +192,7 @@ ss_obfs_tls_show(){
echo -e " 加密 : ${Red}${shadowsockscipher}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件程序 : ${Red}${plugin_client_name}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件选项 : ${Red}obfs=${shadowsocklibev_obfs}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : ${Red}obfs-host=${domain};fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : ${Red}obfs-host=${domain}${suffix}" >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand All @@ -215,7 +215,7 @@ ss_goquiet_show(){
echo -e " 加密 : ${Red}${shadowsockscipher}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件程序 : ${Red}${plugin_client_name}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件选项 : ${Red}ServerName=${domain};Key=${gqkey};TicketTimeHint=3600;Browser=chrome${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand All @@ -240,7 +240,7 @@ ss_cloak_show_new(){
echo -e " 加密 : ${Red}${shadowsockscipher}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件程序 : ${Red}${plugin_client_name}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件选项 : ${Red}Transport=direct;ProxyMethod=shadowsocks;EncryptionMethod=${encryptionMethod};UID=${ckauid};PublicKey=${ckpub};ServerName=${domain};NumConn=4;BrowserSig=chrome;StreamTimeout=300${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " AdminUID : ${ckauid}" >> ${HUMAN_CONFIG}
echo -e " CK 公钥 : ${ckpub}" >> ${HUMAN_CONFIG}
Expand Down Expand Up @@ -271,7 +271,7 @@ ss_mtt_tls_show(){
elif [[ ${isEnable} == enable ]]; then
echo -e " 插件选项 : ${Red}sv;n=${serverName};mux${suffix}" >> ${HUMAN_CONFIG}
fi
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand All @@ -297,7 +297,7 @@ ss_mtt_tls_dns_only_show(){
elif [[ ${isEnable} == enable ]]; then
echo -e " 插件选项 : ${Red}n=${serverName};mux${suffix}" >> ${HUMAN_CONFIG}
fi
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand All @@ -323,7 +323,7 @@ ss_mtt_wss_show(){
elif [[ ${isEnable} == enable ]]; then
echo -e " 插件选项 : ${Red}sv;wss;wss-path=${wssPath};n=${serverName};mux;mux-max-stream=${muxMaxStream}${suffix}" >> ${HUMAN_CONFIG}
fi
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand Down Expand Up @@ -353,7 +353,7 @@ ss_mtt_wss_dns_only_or_cdn_show(){
elif [[ ${isEnable} == enable ]]; then
echo -e " 插件选项 : ${Red}wss;wss-path=${wssPath};n=${serverName};mux;mux-max-stream=${muxMaxStream}${suffix}" >> ${HUMAN_CONFIG}
fi
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand Down Expand Up @@ -383,7 +383,7 @@ ss_mtt_wss_dns_only_or_cdn_web_show(){
elif [[ ${isEnable} == enable ]]; then
echo -e " 插件选项 : ${Red}wss;wss-path=${wssPath};n=${serverName};mux;mux-max-stream=${muxMaxStream}${suffix}" >> ${HUMAN_CONFIG}
fi
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand All @@ -405,7 +405,7 @@ ss_rabbit_tcp_show(){
echo -e " 加密 : ${Red}${shadowsockscipher}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件程序 : ${Red}${plugin_client_name}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件选项 : ${Red}serviceAddr=$(get_ip):${shadowsocksport};password=${rabbitKey};tunnelN=4${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand All @@ -431,7 +431,7 @@ ss_simple_tls_show(){
elif [[ ${domainType} = Other ]]; then
echo -e " 插件选项 : ${Red}n=${serverName};cca=${base64Cert}${suffix}" >> ${HUMAN_CONFIG}
fi
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand Down Expand Up @@ -461,7 +461,7 @@ ss_simple_tls_wss_show(){
elif [[ ${domainType} = Other ]]; then
echo -e " 插件选项 : ${Red}wss;path=${wssPath};n=${serverName};cca=${base64Cert}${suffix}" >> ${HUMAN_CONFIG}
fi
echo -e " 插件参数 : ${Red}fast-open=${fast_open}${suffix}" >> ${HUMAN_CONFIG}
echo -e " 插件参数 : " >> ${HUMAN_CONFIG}
echo >> ${HUMAN_CONFIG}
echo -e " SS 链接 : ${Green}${ss_link}${suffix}" >> ${HUMAN_CONFIG}
echo -e " SS二维码 : ./ss-plugins.sh scan < A link at the beginning of ss:https:// >" >> ${HUMAN_CONFIG}
Expand Down

0 comments on commit 6977061

Please sign in to comment.