luci-app-ssr-plus:Fix SS running status (#4289)

* luci-app-ssr-plus:Code optimization and Fix Bug

* luci-app-ssr-plus:Adjust reference data location

* luci-app-ssr-plus:revert subscribe.lua

* luci-app-ssr-plus:Fix SS running status

* luci-app-ssr-plus:Updated version

* luci-app-ssr-plus:Revised interpretation
This commit is contained in:
Mattraks 2020-04-13 01:44:03 +08:00 committed by GitHub
parent 66e6e853be
commit b97c4e8bb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=176
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

View File

@ -79,9 +79,9 @@ if luci.sys.call("busybox ps -w | grep ssr-server | grep -v grep >/dev/null") ==
server_run=1
end
if luci.sys.call("busybox ps -w | grep ssr-tunnel |grep -v grep >/dev/null") == 0 then
tunnel_run=1
end
-- if luci.sys.call("busybox ps -w | grep ssr-tunnel |grep -v grep >/dev/null") == 0 then
-- tunnel_run=1
-- end
if luci.sys.call("pidof pdnsd >/dev/null") == 0 or (luci.sys.call("busybox ps -w | grep ssr-dns |grep -v grep >/dev/null") == 0 and luci.sys.call("pidof dns2socks >/dev/null") == 0)then
pdnsd_run=1

View File

@ -337,7 +337,7 @@ start_redir_tcp() {
local name="Shadowsocks"
[ "$type" == "ssr" ] && name="ShadowsocksR"
for i in $(seq 1 $threads); do
$bin -c $CONFIG_FILE $ARG_OTA -f /var/run/$type-retcp_$i.pid >/dev/null 2>&1
$bin -c $CONFIG_FILE $ARG_OTA -f /var/run/ssr-retcp_$i.pid >/dev/null 2>&1
done
echo "$(date "+%Y-%m-%d %H:%M:%S") Master node:$name $threads Threads Started!" >>/tmp/ssrplus.log
;;
@ -386,7 +386,7 @@ start_redir_udp() {
[ "$type" == "ssr" ] && name="ShadowsocksR"
gen_config_file $UDP_RELAY_SERVER 1 $(uci_get_by_name $UDP_RELAY_SERVER local_port 1234)
last_config_file=$CONFIG_UDP_FILE
$bin -c $last_config_file $ARG_OTA -U -f /var/run/$type-reudp.pid >/dev/null 2>&1
$bin -c $last_config_file $ARG_OTA -U -f /var/run/ssr-reudp.pid >/dev/null 2>&1
echo "$(date "+%Y-%m-%d %H:%M:%S") UDP TPROXY Relay:$name Started!" >>/tmp/ssrplus.log
;;
v2ray)
@ -418,7 +418,7 @@ start_redir_udp() {
return 0
}
start_Bypass() {
start_shunt() {
if [ "$NETFLIX_SERVER" != "nil" ] && [ "$NETFLIX_SERVER" != "$GLOBAL_SERVER" ]; then
local type=$(uci_get_by_name $NETFLIX_SERVER type)
local bin=$(find_bin $type)
@ -431,8 +431,8 @@ start_Bypass() {
[ "$type" == "ssr" ] && name="ShadowsocksR"
gen_config_file $NETFLIX_SERVER 2 4321
gen_config_file $NETFLIX_SERVER 3 1088
$bin -c /var/etc/shadowsocksr_n.json $ARG_OTA -f /var/run/$type-netflix.pid >/dev/null 2>&1
$bin2 -c /var/etc/shadowsocksr_s.json $ARG_OTA -f /var/run/$type-socksdns.pid >/dev/null 2>&1
$bin -c /var/etc/shadowsocksr_n.json $ARG_OTA -f /var/run/ssr-netflix.pid >/dev/null 2>&1
$bin2 -c /var/etc/shadowsocksr_s.json $ARG_OTA -f /var/run/ssr-socksdns.pid >/dev/null 2>&1
dns2socks 127.0.0.1:1088 8.8.8.8:53 127.0.0.1:5555 -q >/dev/null 2>&1 &
echo "$(date "+%Y-%m-%d %H:%M:%S") Netflix Bypass:$name Started!" >>/tmp/ssrplus.log
;;
@ -487,7 +487,7 @@ start_local() {
[ ! -f "$bin" ] && echo "$(date "+%Y-%m-%d %H:%M:%S") Can't find $bin program, can't start!" >>/tmp/ssrplus.log && return 1
[ "$type" == "ssr" ] && name="ShadowsocksR"
gen_config_file $local_server 3 $(uci_get_by_type socks5_proxy local_port 1080)
$bin -c $CONFIG_SOCK5_FILE -u -f /var/run/$type-local.pid >/dev/null 2>&1
$bin -c $CONFIG_SOCK5_FILE -u -f /var/run/ssr-local.pid >/dev/null 2>&1
echo "$(date "+%Y-%m-%d %H:%M:%S") Global_Socks5:$name Started!" >>/tmp/ssrplus.log
;;
v2ray)
@ -694,7 +694,7 @@ start() {
if rules; then
if start_redir_tcp; then
start_redir_udp
start_Bypass
start_shunt
start_switch
start_dns
add_cron