Skip to content

Commit

Permalink
v4.37.6
Browse files Browse the repository at this point in the history
  • Loading branch information
cary-sas committed Dec 18, 2023
1 parent 707f293 commit b64f057
Show file tree
Hide file tree
Showing 21 changed files with 4,218 additions and 6,880 deletions.
1 change: 1 addition & 0 deletions 380_armv5_packge/4.37.6/md5sum.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d2a4e82fb2e057634b2f33a4ab21df30
Binary file added 380_armv5_packge/4.37.6/shadowsocks.tar.gz
Binary file not shown.
8 changes: 4 additions & 4 deletions 380_armv5_packge/config.json.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"build_date":"2023-08-13_00:18:47",
"build_date":"2023-12-18_22:19:55",
"description":"科学上网",
"home_url":"Main_Ss_Content.asp",
"md5":"b63cb08614ccba29fed2126b1d0ab1c9",
"md5":"d2a4e82fb2e057634b2f33a4ab21df30",
"name":"shadowsocks",
"tar_url": "https://github.com/cary-sas/v2ray_bin/raw/main/380_armv5_packge/4.37.5/shadowsocks.tar.gz",
"version":"4.37.5"
"tar_url": "https://github.com/cary-sas/v2ray_bin/raw/main/380_armv5_packge/4.37.6/shadowsocks.tar.gz",
"version":"4.37.6"
}
2 changes: 1 addition & 1 deletion 380_armv5_packge/latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.37.5
4.37.6
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ fixed many historical legacy issues

除插件原有功能外,另外

* 支持xray, vless, xtls, reality, trojan, trojan-go, NaiveProxy 等协议及更新,
* 支持xray, vless, xtls, reality, trojan, trojan-go, NaiveProxy, Hysteria2 等协议及更新,
* 支持ss + v2ray plugin,
* 支持混合节点订阅,
* 支持同时订阅多个链接,回车隔开,
* 支持ss:// vless:// trojan:// trojan-go://格式订阅和导入,
* 支持smartDNS (不熟悉配置请勿选择),
* 支持ss:// vless:// trojan:// trojan-go:// hysteria2:// 格式订阅和导入,
* 支持smartDNS (不熟悉配置请勿选择),ChinaDNS-NG
* 支持在线更新

目前xray已经可以完全替代v2ray了,xray支持vmess,vless和trojan。
Expand Down
Binary file added shadowsocks/bin/hysteria
Binary file not shown.
Binary file modified shadowsocks/bin/smartdns
Binary file not shown.
2 changes: 1 addition & 1 deletion shadowsocks/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if [ -n "$MOUNTED" ];then
fi

echo_date 清理旧文件
TARGET_BIN="base64_encode cdns chinadns chinadns1 chinadns-ng client_linux_arm5 dns2socks dnsmasq haproxy haveged httping https_dns_proxy jq koolbox koolgame pdu resolveip rss-local rss-redir smartdns speederv1 speederv2 ss-local ss-redir ss-tunnel trojan-go naive udp2raw v2ray v2ray-plugin obfs-local xray"
TARGET_BIN="base64_encode cdns chinadns chinadns1 chinadns-ng client_linux_arm5 dns2socks dnsmasq haproxy haveged hysteria httping https_dns_proxy jq koolbox koolgame pdu resolveip rss-local rss-redir smartdns speederv1 speederv2 ss-local ss-redir ss-tunnel trojan-go naive udp2raw v2ray v2ray-plugin obfs-local xray"
rm -rf /koolshare/ss/*
rm -rf /koolshare/scripts/ss_*
rm -rf /koolshare/webs/Main_Ss*
Expand Down
137 changes: 129 additions & 8 deletions shadowsocks/scripts/ss_online_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,122 @@ update_trojan_config(){
}


##################################################################################################
# Hysteria2 节点添加解析并更新
##################################################################################################
get_hysteria2_config(){
decode_link="$1"
if [ -z "$decode_link" ];then
echo_date "解析失败!!!"
return 1
fi

group="$2"

if [ -n "$(echo -n "$decode_link" | grep "#")" ];then
remarks=$(echo -n $decode_link | awk -F'#' '{print $2}')
decode_link=$(echo -n $decode_link | awk -F'#' '{print $1}')
else
remarks="$remarks"
fi

server=$(echo "$decode_link" |awk -F':' '{print $1}'|awk -F'@' '{print $2}')
server_port=$(echo "$decode_link" |awk -F':' '{print $2}' | awk -F'\\/\\?' '{print $1}')
password=$(echo "$decode_link" |awk -F':' '{print $1}'|awk -F'@' '{print $1}')
password=`echo $password|base64_encode`
#20201024+++
sni=$(echo "$decode_link" | tr '?#&' '\n' | grep 'sni=' | awk -F'=' '{print $2}')
insecure=$(echo "$decode_link" | tr '?#&' '\n' | grep 'insecure=' | awk -F'=' '{print $2}')
v2ray_net=0
binary="Hysteria2"
# echo_date "服务器:$server" >> $LOG_FILE
# echo_date "端口:$server_port" >> $LOG_FILE
# echo_date "密码:$password" >> $LOG_FILE
# echo_date "sni:$sni" >> $LOG_FILE
#20201024---


[ -n "$group" ] && group_base64=`echo $group | base64_encode | sed 's/ -//g'`
[ -n "$server" ] && server_base64=`echo $server | base64_encode | sed 's/ -//g'`
[ -n "$remarks" ] && remarks_base64=`echo $remarks | base64_encode | sed 's/ -//g'`

[ -n "$node_regexp" ] && incNY=`echo $remarks $server | sed -n "$node_regexp"` || incNY="Y"

#把全部服务器节点写入文件 /usr/share/shadowsocks/serverconfig/all_onlineservers
[ -n "$incNY" ] && [ -n "$group" ] && [ -n "$server" ] && echo $server_base64 $group_base64 $remarks_base64 >> /tmp/all_onlineservers
#echo ------
#echo group: $group
#echo remarks: $remarks
#echo server: $server
#echo server_port: $server_port
#echo password: $password
#echo ------
[ -n "$incNY" ] && echo "$group" >> /tmp/all_group_info.txt || return 2
[ -n "$group" ] && return 0 || return 1
}

add_hysteria2_servers(){
[[ $1 -ge 1000 ]] && local group_index=$1
hysteria2index_x=$(($(dbus list ssconf_basic_|grep _name_ |awk -v group_index=$((group_index+1000)) -F'[_=]' '{if($4<group_index)print$4}' |sort -rn|head -n1)+1))
[[ $hysteria2index_x -gt 1000 ]] && hysteria2index_x=$((hysteria2index_x%1000))
hysteria2index=$((hysteria2index_x+group_index))
# echo_date "添加 Hysteria2 节点:$remarks"
[[ $1 -ge 1000 ]] && dbus set ssconf_basic_group_$hysteria2index=$group
dbus set ssconf_basic_name_$hysteria2index=$remarks
dbus set ssconf_basic_mode_$hysteria2index=$ssr_subscribe_mode
dbus set ssconf_basic_server_$hysteria2index=$server
dbus set ssconf_basic_port_$hysteria2index=$server_port
dbus set ssconf_basic_password_$hysteria2index=$password
dbus set ssconf_basic_type_$hysteria2index="4"
dbus set ssconf_basic_trojan_binary_$hysteria2index=$binary
dbus set ssconf_basic_trojan_sni_$hysteria2index=$sni
dbus set ssconf_basic_trojan_network_$hysteria2index=$v2ray_net
dbus set ssconf_basic_allowinsecure_$hysteria2index=$insecure

echo_date "Hysteria2 节点:新增加 【$remarks】 到节点列表第 $hysteria2index_x 位。"
}

update_hysteria2_config(){
isadded_server=$(</tmp/all_localservers grep -w $group_base64 | awk '{print $1 , $4}' | grep -c "${server_base64} ${remarks_base64}"|head -n1)
if [ "$isadded_server" == "0" ]; then
add_hysteria2_servers $1
let addnum7+=1
let addnum+=1
else
# 如果在本地的订阅节点中已经有该节点(用group, remarks和server去判断),检测下配置是否更改,如果更改,则更新配置
local index=$(</tmp/all_localservers grep $group_base64 | awk '{print $1 , $4, $3}' | grep "${server_base64} ${remarks_base64}" |awk '{print $3}'|head -n1)

local i=0
dbus set ssconf_basic_mode_$index="$ssr_subscribe_mode"
local_remarks=$(dbus get ssconf_basic_name_$index)
[ "$local_remarks" != "$remarks" ] && dbus set ssconf_basic_name_$index=$remarks && let i+=1
local_server=$(dbus get ssconf_basic_server_$index)
[ "$local_server" != "$server" ] && dbus set ssconf_basic_server_$index=$server && let i+=1
local_server_port=$(dbus get ssconf_basic_port_$index)
[ "$local_server_port" != "$server_port" ] && dbus set ssconf_basic_port_$index=$server_port && let i+=1
local_password=$(dbus get ssconf_basic_password_$index)
[ "$local_password" != "$password" ] && dbus set ssconf_basic_password_$index=$password && let i+=1

local_binary=$(dbus get ssconf_basic_trojan_binary_$index)
[ "$local_binary" != "$binary" ] && dbus set ssconf_basic_trojan_binary_$index=$binary && let i+=1

local_v2ray_net=$(dbus get ssconf_basic_trojan_network_$index)
[ "$local_v2ray_net" != "$v2ray_net" ] && dbus set ssconf_basic_trojan_network_$index=$v2ray_net && let i+=1

local_sni=$(dbus get ssconf_basic_trojan_sni_$index)
[ "$local_sni" != "$sni" ] && dbus set ssconf_basic_trojan_sni_$index=$sni && let i+=1

local_insecure=$(dbus get ssconf_basic_allowinsecure_$index)
[ "$local_insecure" != "$insecure" ] && dbus set ssconf_basic_allowinsecure_$index=$insecure && let i+=1

if [ "$i" -gt "0" ];then
echo_date "修改 Hysteria2 节点:【$remarks" && let updatenum7+=1 && let updatenum+=1
else
echo_date "Hysteria2 节点:【$remarks】 参数未发生变化,跳过!"
fi
fi
}

##################################################################################################
# vless 节点添加解析并更新
##################################################################################################
Expand Down Expand Up @@ -1315,6 +1431,8 @@ del_none_exist(){
let delnum4+=1
elif [ "`dbus get ssconf_basic_type_$localindex`" = "4" ] && [ "`dbus get ssconf_basic_trojan_binary_$localindex`" = "Trojan-Go" ];then #trojan go
let delnum6+=1
elif [ "`dbus get ssconf_basic_type_$localindex`" = "4" ] && [ "`dbus get ssconf_basic_trojan_binary_$localindex`" = "Hysteria2" ];then #Hysteria2
let delnum7+=1
fi

dbus remove ssconf_basic_group_$localindex
Expand Down Expand Up @@ -1526,7 +1644,7 @@ get_oneline_rule_now(){

if [ "$ss_basic_online_links_goss" == "1" ];then
open_socks_23456
socksopen_b=`netstat -nlp|grep -w 23456|grep -E "local|v2ray|xray|trojan-go|naive"`
socksopen_b=`netstat -nlp|grep -w 23456|grep -E "local|v2ray|xray|trojan-go|naive|hysteria"`
if [ -n "$socksopen_b" ];then
echo_date "使用$(get_type_name $ss_basic_type)提供的socks代理网络下载..."
curl -k --connect-timeout 8 -s -L --socks5-hostname 127.0.0.1:23456 $ssr_subscribe_link > /tmp/ssr_subscribe_file.txt
Expand Down Expand Up @@ -1579,7 +1697,7 @@ get_oneline_rule_now(){
fi


NODE_NU_online=$(</tmp/ssr_subscribe_file_temp1.txt grep -cE '^ss://|^ssr://|^vmess://|^trojan://|^vless://|^trojan-go://')
NODE_NU_online=$(</tmp/ssr_subscribe_file_temp1.txt grep -cE '^ss://|^ssr://|^vmess://|^trojan://|^vless://|^trojan-go://|^hysteria2://')
echo_date "检测到ShadowSocks节点格式,共计${NODE_NU_online}个节点..."

if [ "$NODE_NU_online" = "0" ] ; then
Expand All @@ -1595,9 +1713,9 @@ get_oneline_rule_now(){
remarks='AutoSuB'
group_index=$((url_count*1000))
# 提取节点
grep -E '^ss://|^ssr://|^vmess://|^trojan://|^vless://|^trojan-go://' /tmp/ssr_subscribe_file_temp1.txt > /tmp/ssr_subscribe_file_temp2.txt && mv /tmp/ssr_subscribe_file_temp2.txt /tmp/ssr_subscribe_file_temp1.txt
grep -E '^ss://|^ssr://|^vmess://|^trojan://|^vless://|^trojan-go://|^hysteria2://' /tmp/ssr_subscribe_file_temp1.txt > /tmp/ssr_subscribe_file_temp2.txt && mv /tmp/ssr_subscribe_file_temp2.txt /tmp/ssr_subscribe_file_temp1.txt

# 检测ss ssr vmess trojan vless trojan-go
# 检测ss ssr vmess trojan vless trojan-go hysteria2
while read -r line
do
link=""
Expand Down Expand Up @@ -1643,9 +1761,12 @@ get_oneline_rule_now(){
if [ "${addnum5}${updatenum5}${delnum5}" != "000" ];then
echo_date " 新增VLESS节点 $addnum5 个,修改 $updatenum5 个,删除 $delnum5 个;"
fi
if [ "${addnum6}${updatenum5}${delnum6}" != "000" ];then
if [ "${addnum6}${updatenum6}${delnum6}" != "000" ];then
echo_date " 新增Trojan-Go节点 $addnum6 个,修改 $updatenum6 个,删除 $delnum6 个;"
fi
if [ "${addnum7}${updatenum7}${delnum7}" != "000" ];then
echo_date " 新增Hysteria2节点 $addnum7 个,修改 $updatenum7 个,删除 $delnum7 个;"
fi
echo_date "现共有手动添加的ShadowSocks节点:$USER_ADD 个;"
echo_date "现共有来自订阅的ShadowSocks节点:$ONLINE_GET 个;"
echo_date "在线订阅列表更新完成!"
Expand Down Expand Up @@ -1689,9 +1810,9 @@ start_update(){
echo_date " 服务器订阅程序(Shell by stones & sadog)"
echo_date "==================================================================="
echo_date "$url 获取订阅..."
addnum=0 ; addnum1=0 ; addnum2=0 ; addnum3=0 ; addnum4=0 ; addnum5=0; addnum6=0
updatenum=0 ; updatenum1=0 ; updatenum2=0 ; updatenum3=0 ; updatenum4=0 ; updatenum5=0;updatenum6=0
delnum=0 ; delnum1=0 ; delnum2=0 ; delnum3=0 ; delnum4=0 ; delnum5=0; delnum6=0
addnum=0 ; addnum1=0 ; addnum2=0 ; addnum3=0 ; addnum4=0 ; addnum5=0; addnum6=0; addnum7=0
updatenum=0 ; updatenum1=0 ; updatenum2=0 ; updatenum3=0 ; updatenum4=0 ; updatenum5=0; updatenum6=0; updatenum7=0
delnum=0 ; delnum1=0 ; delnum2=0 ; delnum3=0 ; delnum4=0 ; delnum5=0; delnum6=0; delnum7=0

get_oneline_rule_now "$url"

Expand Down
2 changes: 1 addition & 1 deletion shadowsocks/scripts/ss_pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mkdir shadowsocks/webs
mkdir shadowsocks/res

TARGET_FOLDER=/tmp/shadowsocks
TARGET_BIN="base64_encode cdns chinadns chinadns1 chinadns-ng client_linux_arm5 dns2socks dnsmasq haproxy haveged httping https_dns_proxy jq koolbox koolgame pdu resolveip rss-local rss-redir smartdns speederv1 speederv2 ss-local ss-redir ss-tunnel trojan-go naive udp2raw v2ray v2ray-plugin obfs-local xray"
TARGET_BIN="base64_encode cdns chinadns chinadns1 chinadns-ng client_linux_arm5 dns2socks dnsmasq haproxy haveged httping https_dns_proxy jq koolbox koolgame pdu resolveip rss-local rss-redir smartdns speederv1 speederv2 ss-local ss-redir ss-tunnel trojan-go naive hysteria udp2raw v2ray v2ray-plugin obfs-local xray"
cp /koolshare/scripts/ss_install.sh $TARGET_FOLDER/install.sh
cp /koolshare/scripts/uninstall_shadowsocks.sh $TARGET_FOLDER/uninstall.sh
cp /koolshare/scripts/ss_* $TARGET_FOLDER/scripts/
Expand Down
14 changes: 14 additions & 0 deletions shadowsocks/scripts/ss_proc_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,17 @@ echo_version(){
fi
fi

##---------------------------hysteria-----------------------
if [ -z "$ss_basic_hysteria_version" ];then
ss_basic_hysteria_version_tmp=`/koolshare/bin/hysteria version | grep 'Version:' | awk -F'[[:space:]]+' '{print $2}'`
if [ -n "$ss_basic_hysteria_version_tmp" ];then
ss_basic_hysteria_version="$ss_basic_hysteria_version_tmp"
dbus set ss_basic_hysteria_version="$ss_basic_hysteria_version_tmp"
else
ss_basic_hysteria_version="null"
fi
fi

echo ① 程序版本(插件版本:$SOFVERSION):
echo -----------------------------------------------------------
echo "程序 版本 备注"
Expand All @@ -155,6 +166,7 @@ echo_version(){
echo "xray $ss_basic_xray_version "
echo "trojan-go $ss_basic_trojango_version 2022年12月29日编译"
echo "naive $ss_basic_naive_version "
echo "hysteria $ss_basic_hysteria_version "
echo -----------------------------------------------------------
}

Expand All @@ -180,6 +192,7 @@ check_status(){
XRAY=`pidof xray`
TROJANGO=`pidof trojan-go`
NAIVE=`pidof naive`
HYSTERIA=`pidof hysteria`
HDP=`pidof https_dns_proxy`
DMQ=`pidof dnsmasq`
SMD=$(pidof smartdns)
Expand Down Expand Up @@ -224,6 +237,7 @@ check_status(){
echo "程序 状态 PID"
[ -n "$XRAY" ] && echo "xray 工作中 pid:$XRAY" || echo "xray 未运行"
[ -n "$TROJANGO" ] && echo "trojan-go 工作中 pid:$TROJANGO" || echo "trojan-go 未运行"
[ -n "$HYSTERIA" ] && echo "Hysteria2 工作中 pid:$HYSTERIA" || echo "Hysteria2 未运行"
elif [ "$ss_basic_type" == "5" ];then
echo_version
echo
Expand Down
29 changes: 20 additions & 9 deletions shadowsocks/scripts/ss_v2ray_xray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,27 @@ case $ss_binary_update in
3)
v2ray_xray="naive"
;;
4)
v2ray_xray="hysteria"
;;
esac

get_bin_version() {
if [ "$v2ray_xray" = "hysteria" ]; then
/koolshare/bin/hysteria version | grep 'Version:' | awk -F'[[:space:]]+' '{print $2}'| sed 's/v//g'
else
${v2ray_xray} -version 2>/dev/null | head -n 1 | cut -d " " -f2 | sed 's/v//g'
fi
}

V2RAY_CONFIG_FILE="/koolshare/ss/v2ray.json"
NAIVE_CONFIG_FILE="/koolshare/ss/naive.json"
NAIVE2_CONFIG_FILE="/koolshare/ss/naive2.json"
HY2_CONFIG_FILE="/koolshare/ss/hysteria.json"

url_main="https://raw.githubusercontent.com/cary-sas/v2ray_bin/main/380_armv5/$v2ray_xray"
url_back=""
socksopen_b=`netstat -nlp|grep -w 23456|grep -E "local|v2ray|xray|trojan-go|naive"`
socksopen_b=`netstat -nlp|grep -w 23456|grep -E "local|v2ray|xray|trojan-go|naive|hysteria"`
if [ -n "$socksopen_b" ] && [ "$ss_basic_online_links_goss" == "1" ];then
echo_date "代理有开启,将使用代理网络..."
alias curlxx='curl --connect-timeout 8 -k --socks5-hostname 127.0.0.1:23456 '
Expand Down Expand Up @@ -54,18 +66,16 @@ get_latest_version(){
echo_date "${v2ray_xray}安装文件丢失!重新下载!"
CUR_VER="0"
else
CUR_VER=`${v2ray_xray} -version 2>/dev/null | head -n 1 | cut -d " " -f2 | sed 's/v//g'` || 0
CUR_VER=$(get_bin_version) || 0
echo_date "当前已安装${v2ray_xray}版本:v$CUR_VER"
fi
COMP=`versioncmp $CUR_VER $V2VERSION_BASE`
if [ "$COMP" == "1" ];then
[ "$CUR_VER" != "0" ] && echo_date "${v2ray_xray}已安装版本号低于最新版本,开始更新程序..."
update_now v$V2VERSION
else
V2RAY_LOCAL_VER=`/koolshare/bin/${v2ray_xray} -version 2>/dev/null | head -n 1 | cut -d " " -f2`
V2RAY_LOCAL_DATE=`/koolshare/bin/${v2ray_xray} -version 2>/dev/null | head -n 1 | cut -d " " -f5`
V2RAY_LOCAL_VER=$(get_bin_version)
[ -n "$V2RAY_LOCAL_VER" ] && dbus set ss_basic_${v2ray_xray}_version="$V2RAY_LOCAL_VER"
[ -n "$V2RAY_LOCAL_DATE" ] && dbus set ss_basic_${v2ray_xray}_date="$V2RAY_LOCAL_DATE"
echo_date "${v2ray_xray}已安装版本已经是最新,退出更新程序!"
fi
[ -f "/tmp/${v2ray_xray}" ] && rm -rf /tmp/${v2ray_xray}
Expand Down Expand Up @@ -109,7 +119,7 @@ update_now(){
echo_date "${v2ray_xray}程序下载成功..."
fi

if [ "$md5sum_ok=1" ] && [ "$v2ray_ok=1" ];then
if [ "$md5sum_ok" -eq 1 ] && [ "$v2ray_ok" -eq 1 ];then
check_md5sum
else
echo_date "下载失败,请检查你的网络!"
Expand Down Expand Up @@ -153,10 +163,8 @@ move_binary(){
echo_date "开始替换${v2ray_xray}二进制文件... "
mv /tmp/${v2ray_xray}/${v2ray_xray} /koolshare/bin/${v2ray_xray}
chmod +x /koolshare/bin/${v2ray_xray}
V2RAY_LOCAL_VER=`/koolshare/bin/${v2ray_xray} -version 2>/dev/null | head -n 1 | cut -d " " -f2`
V2RAY_LOCAL_DATE=`/koolshare/bin/${v2ray_xray} -version 2>/dev/null | head -n 1 | cut -d " " -f5`
V2RAY_LOCAL_VER=$(get_bin_version)
[ -n "$V2RAY_LOCAL_VER" ] && dbus set ss_basic_${v2ray_xray}_version="$V2RAY_LOCAL_VER"
[ -n "$V2RAY_LOCAL_DATE" ] && dbus set ss_basic_${v2ray_xray}_date="$V2RAY_LOCAL_DATE"
echo_date "${v2ray_xray}二进制文件替换成功... "
}

Expand All @@ -168,6 +176,9 @@ start_v2ray(){
if [ "$v2ray_xray" == "naive" ];then
${v2ray_xray} $NAIVE_CONFIG_FILE >/dev/null 2>&1 &
${v2ray_xray} $NAIVE2_CONFIG_FILE >/dev/null 2>&1 &
elif [ "$v2ray_xray" == "hysteria" ];then
export QUIC_GO_DISABLE_ECN=true
${v2ray_xray} -c $HY2_CONFIG_FILE -l error --disable-update-check >/dev/null 2>&1 &
else
${v2ray_xray} --config=${V2RAY_CONFIG_FILE} >/dev/null 2>&1 &
fi
Expand Down
Loading

0 comments on commit b64f057

Please sign in to comment.