mirror of
https://github.com/tsingui/softcenter-1.git
synced 2024-12-23 10:35:17 +00:00
update ss
This commit is contained in:
parent
7784ef2d74
commit
a624e7c2b3
@ -1,8 +1,8 @@
|
||||
{
|
||||
"version":"4.1.7",
|
||||
"md5":"cc7c3e0dd22e83afb228d50739213710",
|
||||
"md5":"3b2d2bef35f194399073209c36e6760b",
|
||||
"home_url":"Main_Ss_Content.asp",
|
||||
"title":"科学上网",
|
||||
"description":"科学上网",
|
||||
"build_date":"2019-03-14_21:34:03"
|
||||
"build_date":"2019-03-26_18:51:03"
|
||||
}
|
||||
|
Binary file not shown.
@ -136,7 +136,7 @@ dbus set softcenter_module_shadowsocks_description="科学上网"
|
||||
dbus set softcenter_module_shadowsocks_home_url="Main_Ss_Content.asp"
|
||||
|
||||
# 设置v2ray 版本号
|
||||
dbus set ss_basic_v2ray_version="v4.6.4"
|
||||
dbus set ss_basic_v2ray_version="v4.13.0"
|
||||
dbus set ss_basic_v2ray_date="20181124"
|
||||
|
||||
echo_date 一点点清理工作...
|
||||
|
38
shadowsocks/shadowsocks/scripts/ss_udp_status.sh
Normal file
38
shadowsocks/shadowsocks/scripts/ss_udp_status.sh
Normal file
@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
# shadowsocks script for AM380 merlin firmware
|
||||
# by sadog (sadoneli@gmail.com) from jffs/softcenter.cn
|
||||
|
||||
eval `dbus export ss`
|
||||
source /jffs/softcenter/scripts/base.sh
|
||||
game_on=`dbus list ss_acl_mode|cut -d "=" -f 2 | grep 3`
|
||||
[ -n "$game_on" ] || [ "$ss_basic_mode" == "3" ] && mangle=1
|
||||
v1=`pidof speederv1`
|
||||
v2=`pidof speederv2`
|
||||
RAW=`pidof udp2raw`
|
||||
[ "$ss_basic_udp2raw_boost_enable" == "1" ] || [ "$ss_basic_udp2_boost_enable" == "1" ] && SPEED_UDP=1
|
||||
|
||||
[ -n "$v1" ] && message1="【UDPspeederV1运行中,pid:$v1】" || message1="【UDPspeederV1未运行】"
|
||||
[ -n "$v2" ] && message2="【UDPspeederV2运行中,pid:$v2】" || message2="【UDPspeederV2未运行】"
|
||||
[ -n "$RAW" ] && message3="【UDP2raw运行中,pid:$RAW】" || message3="【UDP2raw未运行】"
|
||||
|
||||
[ -n "$v1" ] && [ -z "$v2" ] && message2=""
|
||||
[ -z "$v1" ] && [ -n "$v2" ] && message1=""
|
||||
[ -z "$v1" ] && [ -z "$v2" ] && [ -z "$RAW" ] && message1="" && message2="" && message3="" && message1="udp加速未运行"
|
||||
|
||||
[ -n "$v1" ] && [ -n "$RAW" ] && message0="串联模式: "
|
||||
[ -n "$v2" ] && [ -n "$RAW" ] && message0="串联模式: "
|
||||
|
||||
[ -z "$v1" ] && [ -z "$v2" ] && [ -n "$RAW" ] && message0="" && message1="" && message2=""
|
||||
[ -n "$v1" ] && [ -z "$v2" ] && [ -z "$RAW" ] && message3=""
|
||||
[ -n "$v2" ] && [ -z "$v1" ] && [ -z "$RAW" ] && message3=""
|
||||
check_status(){
|
||||
echo $message0 $message1 $message2 $message3
|
||||
}
|
||||
|
||||
if [ "$ss_basic_enable" == "1" ];then
|
||||
check_status > /tmp/ss_udp_status.log 2>&1
|
||||
else
|
||||
echo 插件尚未启用!> /tmp/ss_udp_status.log 2>&1
|
||||
fi
|
||||
echo XU6J03M6 >> /tmp/ss_udp_status.log
|
@ -25,7 +25,7 @@ perpare(){
|
||||
else
|
||||
if [ -n "$IFIP_DNS1" ];then
|
||||
# 运营商DNS1:ISP_DNS1是ip格式
|
||||
FO=`awk -F'[./]' -v ip=$IFIP_DNS1 ' {for (i=1;i<=int($NF/8);i++){a=a$i"."} if (index(ip, a)==1){split( ip, A, ".");b=int($NF/8);if (A[b+1]<($(NF+b-4)+2^(8-$NF%8))&&A[b+1]>=$(NF+b-4)) print ip,"belongs to",$0} a=""}' /koolshare/ss/rules/chnroute.txt`
|
||||
FO=`awk -F'[./]' -v ip=$IFIP_DNS1 ' {for (i=1;i<=int($NF/8);i++){a=a$i"."} if (index(ip, a)==1){split( ip, A, ".");b=int($NF/8);if (A[b+1]<($(NF+b-4)+2^(8-$NF%8))&&A[b+1]>=$(NF+b-4)) print ip,"belongs to",$0} a=""}' /jffs/softcenter/ss/rules/chnroute.txt`
|
||||
if [ -n "$FO" ];then
|
||||
# 运营商DNS1:ISP_DNS1是国内IP
|
||||
CDN1="$IFIP_DNS1"
|
||||
@ -44,7 +44,7 @@ perpare(){
|
||||
else
|
||||
if [ -n "$IFIP_DNS2" ];then
|
||||
# 运营商DNS1:ISP_DNS1是ip格式
|
||||
FO=`awk -F'[./]' -v ip=$IFIP_DNS2 ' {for (i=1;i<=int($NF/8);i++){a=a$i"."} if (index(ip, a)==1){split( ip, A, ".");b=int($NF/8);if (A[b+1]<($(NF+b-4)+2^(8-$NF%8))&&A[b+1]>=$(NF+b-4)) print ip,"belongs to",$0} a=""}' /koolshare/ss/rules/chnroute.txt`
|
||||
FO=`awk -F'[./]' -v ip=$IFIP_DNS2 ' {for (i=1;i<=int($NF/8);i++){a=a$i"."} if (index(ip, a)==1){split( ip, A, ".");b=int($NF/8);if (A[b+1]<($(NF+b-4)+2^(8-$NF%8))&&A[b+1]>=$(NF+b-4)) print ip,"belongs to",$0} a=""}' /jffs/softcenter/ss/rules/chnroute.txt`
|
||||
if [ -n "$FO" ];then
|
||||
# 运营商DNS1:ISP_DNS1是国内IP
|
||||
CDN2="$IFIP_DNS2"
|
||||
|
@ -20,6 +20,7 @@ IFIP_DNS2=`echo $ISP_DNS2|grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:"`
|
||||
lan_ipaddr=$(nvram get lan_ipaddr)
|
||||
ip_prefix_hex=`nvram get lan_ipaddr | awk -F "." '{printf ("0x%02x", $1)} {printf ("%02x", $2)} {printf ("%02x", $3)} {printf ("00/0xffffff00\n")}'`
|
||||
ARG_OBFS=""
|
||||
NAT_START=/jffs/scripts/nat-start
|
||||
|
||||
#-----------------------------------------------
|
||||
get_config(){
|
||||
@ -270,23 +271,42 @@ kill_process(){
|
||||
if [ -n "$ssredir" ];then
|
||||
echo_date 关闭ss-redir进程...
|
||||
killall ss-redir >/dev/null 2>&1
|
||||
kill -9 "$ssredir" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
rssredir=`pidof rss-redir`
|
||||
if [ -n "$rssredir" ];then
|
||||
echo_date 关闭ssr-redir进程...
|
||||
killall rss-redir >/dev/null 2>&1
|
||||
fi
|
||||
sslocal=`ps | grep -w ss-local | grep -v "grep" | grep -w "23456" | awk '{print $1}'`
|
||||
if [ -n "$sslocal" ];then
|
||||
echo_date 关闭ss-local进程:23456端口...
|
||||
kill $sslocal >/dev/null 2>&1
|
||||
kill -9 "$rssredir" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
ssrlocal=`ps | grep -w rss-local | grep -v "grep" | grep -w "23456" | awk '{print $1}'`
|
||||
if [ -n "$ssrlocal" ];then
|
||||
#sslocal=`ps | grep -w ss-local | grep -v "grep" | grep -w "23456" | awk '{print $1}'`
|
||||
#if [ -n "$sslocal" ];then
|
||||
# echo_date 关闭ss-local进程:23456端口...
|
||||
# kill $sslocal >/dev/null 2>&1
|
||||
#fi
|
||||
|
||||
sslocal=`pidof ss-local`
|
||||
if [ -n "$sslocal" ];then
|
||||
echo_date 关闭ss-local进程:23456端口...
|
||||
killall ss-local >/dev/null 2>&1
|
||||
kill -9 "$sslocal" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
#ssrlocal=`ps | grep -w rss-local | grep -v "grep" | grep -w "23456" | awk '{print $1}'`
|
||||
#if [ -n "$ssrlocal" ];then
|
||||
# echo_date 关闭ssr-local进程:23456端口...
|
||||
# kill rss-local >/dev/null 2>&1
|
||||
# ssrlocal_process=`pidof ssr-local`
|
||||
# kill -9 "$ssrlocal_process" >/dev/null 2>&1
|
||||
#fi
|
||||
|
||||
rsslocal=`pidof rss-local`
|
||||
if [ -n "$rsslocal" ];then
|
||||
echo_date 关闭ssr-local进程:23456端口...
|
||||
kill $ssrlocal >/dev/null 2>&1
|
||||
killall rss-local >/dev/null 2>&1
|
||||
kill -9 "$rsslocal" >/dev/null 2>&1
|
||||
fi
|
||||
sstunnel=`pidof ss-tunnel`
|
||||
if [ -n "$sstunnel" ];then
|
||||
@ -317,6 +337,8 @@ kill_process(){
|
||||
if [ -n "$dns2socks_process" ];then
|
||||
echo_date 关闭dns2socks进程...
|
||||
killall dns2socks >/dev/null 2>&1
|
||||
kill -9 "$dns2socks_process" >/dev/null 2>&1
|
||||
|
||||
fi
|
||||
koolgame_process=`pidof koolgame`
|
||||
if [ -n "$koolgame_process" ];then
|
||||
@ -923,7 +945,28 @@ auto_start(){
|
||||
[ ! -e "/jffs/softcenter/init.d/S99shadowsocks.sh" ] && cp -rf /jffs/softcenter/ss/ssconfig.sh /jffs/softcenter/init.d/S99shadowsocks.sh
|
||||
[ ! -e "/jffs/softcenter/init.d/N99shadowsocks.sh" ] && cp -rf /jffs/softcenter/ss/ssconfig.sh /jffs/softcenter/init.d/N99shadowsocks.sh
|
||||
}
|
||||
write_nat_start(){
|
||||
echo_date 添加nat-start触发事件...
|
||||
if [ ! -f $NAT_START ]; then
|
||||
cat > $NAT_START <<-EOF
|
||||
#!/bin/sh
|
||||
EOF
|
||||
fi
|
||||
|
||||
fire_rule=$(cat $NAT_START | grep ssconfig)
|
||||
if [ -z "$fire_rule" ];then
|
||||
cat >> $NAT_START <<-EOF
|
||||
/bin/sh /jffs/softcenter/ss/ssconfig.sh
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
remove_nat_start(){
|
||||
fire_rule=$(cat $NAT_START | grep ssconfig)
|
||||
if [ ! -z "$fire_rule" ];then
|
||||
sed -i '/ssconfig/d' $NAT_START >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
start_kcp(){
|
||||
# Start kcp
|
||||
if [ "$ss_basic_use_kcp" == "1" ];then
|
||||
@ -1397,7 +1440,7 @@ creat_v2ray_json(){
|
||||
"users": [
|
||||
{
|
||||
"id": "$ss_basic_v2ray_uuid",
|
||||
"alterId": "$ss_basic_v2ray_alterid",
|
||||
"alterId": $ss_basic_v2ray_alterid,
|
||||
"security": "$ss_basic_v2ray_security"
|
||||
}
|
||||
]
|
||||
@ -2114,21 +2157,21 @@ detect(){
|
||||
close_in_five
|
||||
fi
|
||||
#检测v2ray模式下是否启用虚拟内存
|
||||
if [ "$ss_basic_type" == "3" -a -z "$WAN_ACTION" ];then
|
||||
if [ "$MODEL" != "BLUECAVE" ];then
|
||||
SWAPSTATUS=`free|grep Swap|awk '{print $2}'`
|
||||
if [ "$SWAPSTATUS" != "0" ];then
|
||||
echo_date "你选择了v2ray节点,当前系统已经启用虚拟内存!!符合启动条件!"
|
||||
else
|
||||
echo_date "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
echo_date "+ 你选择了v2ray节点,而当前系统未启用虚拟内存! +"
|
||||
echo_date "+ v2ray程序对路由器开销极大,请挂载虚拟内存后再开启! +"
|
||||
echo_date "+ 如果使用 ws + tls + web 方案,建议1G虚拟内存,以保证稳定! +"
|
||||
echo_date "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
close_in_five
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
#if [ "$ss_basic_type" == "3" -a -z "$WAN_ACTION" ];then
|
||||
# if [ "$MODEL" != "BLUECAVE" ];then
|
||||
#SWAPSTATUS=`free|grep Swap|awk '{print $2}'`
|
||||
#if [ "$SWAPSTATUS" != "0" ];then
|
||||
# echo_date "你选择了v2ray节点,当前系统已经启用虚拟内存!!符合启动条件!"
|
||||
#else
|
||||
# echo_date "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
# echo_date "+ 你选择了v2ray节点,而当前系统未启用虚拟内存! +"
|
||||
# echo_date "+ v2ray程序对路由器开销极大,请挂载虚拟内存后再开启! +"
|
||||
# echo_date "+ 如果使用 ws + tls + web 方案,建议1G虚拟内存,以保证稳定! +"
|
||||
# echo_date "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
# close_in_five
|
||||
#fi
|
||||
# fi
|
||||
#fi
|
||||
|
||||
# 检测是否在lan设置中是否自定义过dns,如果有给干掉
|
||||
if [ -n "`nvram get dhcp_dns1_x`" ];then
|
||||
@ -2247,6 +2290,7 @@ apply_ss(){
|
||||
remove_ss_trigger_job
|
||||
remove_ss_reboot_job
|
||||
restore_conf
|
||||
remove_nat_start
|
||||
# restart dnsmasq when ss server is not ip or on router boot
|
||||
restart_dnsmasq
|
||||
flush_nat
|
||||
@ -2262,6 +2306,7 @@ apply_ss(){
|
||||
ss_arg
|
||||
load_module
|
||||
creat_ipset
|
||||
write_nat_start
|
||||
create_dnsmasq_conf
|
||||
# do not re generate json on router start, use old one
|
||||
[ -z "$WAN_ACTION" ] && [ "$ss_basic_type" != "3" ] && creat_ss_json
|
||||
@ -2332,6 +2377,7 @@ start)
|
||||
;;
|
||||
stop)
|
||||
set_lock
|
||||
remove_nat_start
|
||||
disable_ss
|
||||
echo_date
|
||||
echo_date 你已经成功关闭科学上网服务~
|
||||
|
@ -1,2 +1,2 @@
|
||||
4.1.7
|
||||
cc7c3e0dd22e83afb228d50739213710
|
||||
3b2d2bef35f194399073209c36e6760b
|
||||
|
@ -11,10 +11,10 @@
|
||||
"version": "0.2.3"
|
||||
},
|
||||
{
|
||||
"build_date": "2019-03-14_21:34:03",
|
||||
"build_date": "2019-03-26_18:51:03",
|
||||
"description": "科学上网",
|
||||
"home_url": "Main_Ss_Content.asp",
|
||||
"md5": "cc7c3e0dd22e83afb228d50739213710",
|
||||
"md5": "3b2d2bef35f194399073209c36e6760b",
|
||||
"name": "shadowsocks",
|
||||
"tar_url": "shadowsocks/shadowsocks.tar.gz",
|
||||
"title": "科学上网",
|
||||
|
Loading…
Reference in New Issue
Block a user