Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tbblgm119
lede
提交
c26e558b
L
lede
项目概览
tbblgm119
/
lede
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
lede
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c26e558b
编写于
3月 18, 2020
作者:
L
lean
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "luci-app-ssr-plus: fix ssrp alwawys start two server (#3875)"
This reverts commit
033b0ec1
.
上级
94b0ae01
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
27 deletion
+22
-27
package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
+21
-24
package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules
package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules
+1
-3
未找到文件。
package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
浏览文件 @
c26e558b
...
...
@@ -223,7 +223,7 @@ start_rules() {
else
proxyport
=
"-m multiport --dports 22,53,587,465,995,993,143,80,443"
fi
if
[
"
$NETFLIX_SERVER
"
!=
"
$GLOBAL_SERVER
"
]
;
then
if
[
"
$NETFLIX_SERVER
"
!=
"
same
"
]
;
then
netflix
=
"1"
else
netflix
=
"0"
...
...
@@ -398,7 +398,7 @@ start_redir() {
echo
"
$(
date
"+%Y-%m-%d %H:%M:%S"
)
Network Tunnel REDIRECT
$threads
Threads Started!"
>>
/tmp/ssrplus.log
fi
if
[
"
$NETFLIX_SERVER
"
!=
"
$GLOBAL_SERVER
"
]
;
then
if
[
"
$NETFLIX_SERVER
"
!=
"
same
"
]
;
then
if
[
"
$ntype
"
==
"ss"
-o
"
$ntype
"
==
"ssr"
]
;
then
gen_config_file
$NETFLIX_SERVER
2 4321
gen_config_file
$NETFLIX_SERVER
3 1088
...
...
@@ -592,7 +592,7 @@ rules() {
[
"
$GLOBAL_SERVER
"
==
"nil"
]
&&
return
1
mkdir
-p
/var/run /var/etc
UDP_RELAY_SERVER
=
$(
uci_get_by_type global udp_relay_server
)
[
"
$UDP_RELAY_SERVER
"
==
"
$GLOBAL_SERVER
"
]
&&
UDP_RELAY_SERVER
=
$GLOBAL_SERVER
[
"
$UDP_RELAY_SERVER
"
==
"
same
"
]
&&
UDP_RELAY_SERVER
=
$GLOBAL_SERVER
if
start_rules
;
then
return
0
else
...
...
@@ -629,27 +629,25 @@ start() {
rm
-f
/tmp/dnsmasq.ssr/ad.conf
fi
/usr/share/shadowsocksr/gfw2ipset.sh
if
[
"
$NETFLIX_SERVER
"
!=
"same"
]
;
then
cat
/etc/config/netflix.list |
while
read
line
||
[
-n
"
$line
"
]
;
do
sed
-i
"/
$line
/d"
/tmp/dnsmasq.ssr/gfw_list.conf
done
awk
'!/^$/&&!/^#/{printf("ipset=/.%s/'
"netflix"
'\n",$0)}'
/etc/config/netflix.list
>
/tmp/dnsmasq.ssr/netflix_forward.conf
awk
'!/^$/&&!/^#/{printf("server=/.%s/'
"127.0.0.1#5555"
'\n",$0)}'
/etc/config/netflix.list
>>
/tmp/dnsmasq.ssr/netflix_forward.conf
ipset
-N
netflix
hash
:net 2>/dev/null
cat
/etc/config/netflixip.list |
while
read
nip
||
[
-n
"
$nip
"
]
;
do
ipset add netflix
$nip
2>/dev/null
done
if
[
"
$NETFLIX_SERVER
"
!=
"
$GLOBAL_SERVER
"
]
;
then
cat
/etc/config/netflix.list |
while
read
line
||
[
-n
"
$line
"
]
;
do
sed
-i
"/
$line
/d"
/tmp/dnsmasq.ssr/gfw_list.conf
done
awk
'!/^$/&&!/^#/{printf("ipset=/.%s/'
"netflix"
'\n",$0)}'
/etc/config/netflix.list
>
/tmp/dnsmasq.ssr/netflix_forward.conf
awk
'!/^$/&&!/^#/{printf("server=/.%s/'
"127.0.0.1#5555"
'\n",$0)}'
/etc/config/netflix.list
>>
/tmp/dnsmasq.ssr/netflix_forward.conf
ipset add ss_spec_wan_ac
$(
check_host
$(
uci_get_by_name
$NETFLIX_SERVER
server
))
2>/dev/null
else
awk
'!/^$/&&!/^#/{printf("ipset=/.%s/'
"netflix"
'\n",$0)}'
/etc/config/netflix.list
>
/tmp/dnsmasq.ssr/netflix_forward.conf
awk
'!/^$/&&!/^#/{printf("server=/.%s/'
"127.0.0.1#5335"
'\n",$0)}'
/etc/config/netflix.list
>>
/tmp/dnsmasq.ssr/netflix_forward.conf
fi
ipset
-N
netflix
hash
:net 2>/dev/null
cat
/etc/config/netflixip.list |
while
read
nip
||
[
-n
"
$nip
"
]
;
do
ipset add netflix
$nip
2>/dev/null
done
ipset add ss_spec_wan_ac
$(
check_host
$(
uci_get_by_name
$NETFLIX_SERVER
server
))
2>/dev/null
else
rm
-f
/tmp/dnsmasq.ssr/netflix_forward.conf
fi
/etc/init.d/dnsmasq restart
>
/dev/null 2>&1
fi
...
...
@@ -725,4 +723,3 @@ stop() {
fi
del_cron
}
package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules
浏览文件 @
c26e558b
...
...
@@ -121,9 +121,7 @@ ipset_r() {
for
ip
in
$WAN_FW_IP
;
do
ipset -! add blacklist
$ip
;
done
if
[
"
$NETFLIX
"
==
"1"
]
;
then
$IPT
-I
SS_SPEC_WAN_AC
-p
tcp
-m
set
--match-set
netflix dst
-j
REDIRECT
--to-ports
4321
else
$IPT
-I
SS_SPEC_WAN_AC
-p
tcp
-m
set
--match-set
netflix dst
-j
REDIRECT
--to-ports
$local_port
$IPT
-I
SS_SPEC_WAN_AC
-p
tcp
-m
set
--match-set
netflix dst
-j
REDIRECT
--to-ports
4321
fi
return
$?
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录