Skip to content

Commit

Permalink
facnyss_hnd 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hq450 committed Dec 25, 2018
1 parent b2aa1e3 commit b3f6f05
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 46 deletions.
2 changes: 1 addition & 1 deletion fancyss_hnd/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fancyss_hnd Changelog
===========================================
1.5.1
1.5.1 - 1.5.2
- update ss/ssr现在支持调用多核心,在【附加功能】-【ss/ssr多核心支持】处启用;
- fix 现在负载均衡节点如果是域名且解析失败,不会添加到负载均衡列表,以免haproxy无法运行;
- fix 修复插件页面显示裂图的问题;
Expand Down
6 changes: 3 additions & 3 deletions fancyss_hnd/config.json.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"build_date":"2018-12-25_14:12:40",
"build_date":"2018-12-25_14:32:39",
"description":"科学上网",
"home_url":"Module_shadowsocks.asp",
"md5":"30b11696c38061106ac52541e2534d5f",
"md5":"819da4fa3226c9ebb2494af3b2e7105b",
"name":"shadowsocks",
"tar_url": "https://raw.githubusercontent.com/hq450/fancyss/master/fancyss_hnd/shadowsocks.tar.gz",
"title":"科学上网",
"version":"1.5.1"
"version":"1.5.2"
}
Binary file modified fancyss_hnd/shadowsocks.tar.gz
Binary file not shown.
55 changes: 16 additions & 39 deletions fancyss_hnd/shadowsocks/scripts/ss_lb_config.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/sh
# 导入skipd数据
eval `dbus export ss`
ss_basic_dnslookup_server="114.114.114.114"
# 引用环境变量等
source /koolshare/scripts/base.sh
username=`nvram get http_username`
Expand Down Expand Up @@ -100,28 +99,17 @@ if [ "$ss_lb_heartbeat" == "1" ];then
server=`dbus get ssconf_basic_server_$node`
IFIP=`echo $server|grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:"`
if [ -z "$IFIP" ];then
echo_date 检测到【"$nick_name"】节点域名格式,将尝试进行解析...
echo_date 使用nslookup方式解析SS服务器的ip地址,解析DNS:$(get_server_resolver)
server=`nslookup "$server" $(get_server_resolver) | sed '1,4d' | awk '{print $3}' | grep -v :|awk 'NR==1{print}'`
if [ "$?" == "0" ];then
server=`echo $server|grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:"`
echo_date "检测到【"$nick_name"】节点域名格式,将尝试进行解析..."
echo_date "使用nslookup方式解析SS服务器的ip地址,解析DNS:$(get_server_resolver)"
server=`nslookup "$server" $(get_server_resolver) | sed '1,4d' | awk '{print $3}' | grep -v : | awk 'NR==1{print}' | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:" 2>/dev/null`
if [ -n "$server" ];then
echo_date ""$nick_name"】节点ip地址解析成功:$server"
else
echo_date 域名【"$nick_name"】解析失败!
echo_date 尝试用resolveip方式解析,DNS:系统
server=`resolveip -4 -t 2 $server|awk 'NR==1{print}'`
if [ "$?" == "0" ];then
server=`echo $server|grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:"`
fi
fi

if [ ! -z "$server" ];then
echo_date 【"$nick_name"】节点ip地址解析成功:$server
else
echo_date【警告】:【"$nick_name"】节点ip解析失败,将由haproxy自己尝试解析.
server=`dbus get ssconf_basic_server_$node`
echo_date "【警告】:【"$nick_name"】节点ip解析失败,将不会添加到负载均衡列表!"
continue
fi
else
echo_date 检测到【"$nick_name"】节点已经是IP格式,跳过解析...
echo_date "检测到【"$nick_name"】节点已经是IP格式,跳过解析... "
fi
fi
weight=`dbus get ssconf_basic_weight_$node`
Expand Down Expand Up @@ -169,28 +157,17 @@ else
server=`dbus get ssconf_basic_server_$node`
IFIP=`echo $server|grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:"`
if [ -z "$IFIP" ];then
echo_date 检测到【"$nick_name"】节点域名格式,将尝试进行解析...
echo_date 使用nslookup方式解析SS服务器的ip地址,解析DNS:$(get_server_resolver)
server=`nslookup "$server" $(get_server_resolver) | sed '1,4d' | awk '{print $3}' | grep -v :|awk 'NR==1{print}'`
if [ "$?" == "0" ];then
server=`echo $server|grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:"`
else
echo_date 域名【"$nick_name"】解析失败!
echo_date 尝试用resolveip方式解析,DNS:系统
server=`resolveip -4 -t 2 $server|awk 'NR==1{print}'`
if [ "$?" == "0" ];then
server=`echo $server|grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:"`
fi
fi

if [ ! -z "$server" ];then
echo_date 【"$nick_name"】节点ip地址解析成功:$server
echo_date "检测到【"$nick_name"】节点域名格式,将尝试进行解析..."
echo_date "使用nslookup方式解析SS服务器的ip地址,解析DNS:$(get_server_resolver)"
server=`nslookup "$server" $(get_server_resolver) | sed '1,4d' | awk '{print $3}' | grep -v : | awk 'NR==1{print}' | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:" 2>/dev/null`
if [ -n "$server" ];then
echo_date ""$nick_name"】节点ip地址解析成功:$server"
else
echo_date "$nick_name"】节点ip解析失败,将由haproxy自己尝试解析...
server=`dbus get ssconf_basic_server_$node`
echo_date "【警告】:【"$nick_name"】节点ip解析失败,将不会添加到负载均衡列表!"
continue
fi
else
echo_date 检测到【"$nick_name"】节点已经是IP格式,跳过解析...
echo_date "检测到【"$nick_name"】节点已经是IP格式,跳过解析... "
fi
fi
port=`dbus get ssconf_basic_port_$node`
Expand Down
2 changes: 1 addition & 1 deletion fancyss_hnd/shadowsocks/ss/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.1
1.5.2
4 changes: 2 additions & 2 deletions fancyss_hnd/version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1.5.1
30b11696c38061106ac52541e2534d5f
1.5.2
819da4fa3226c9ebb2494af3b2e7105b

0 comments on commit b3f6f05

Please sign in to comment.