Merge Lean's source

This commit is contained in:
CN_SZTL 2020-03-07 00:48:44 +08:00
parent c6b5d3bbe3
commit 60deaee533
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
10 changed files with 35 additions and 14 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=UnblockNeteaseMusic-Go
PKG_VERSION:=0.1.6
PKG_RELEASE:=6
PKG_RELEASE:=7
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/cnsilvan/UnblockNeteaseMusic.git
@ -10,7 +10,7 @@ PKG_SOURCE_VERSION:=e38035e92a4ecca6c827ec2d572aaf8528ec3cb5
PKG_MAINTAINER:=Silvan <cnsilvan@gmail.com>
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(PKG_VERSION).tar.gz
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_BUILD_DEPENDS:=golang/host

View File

@ -521,6 +521,9 @@ start() {
else
echo "conf-dir=/tmp/dnsmasq.oversea" > /tmp/dnsmasq.d/dnsmasq-ssr.conf
fi
if [ -e "/tmp/dnsmasq.d/ad.conf" ]; then
rm -f /tmp/dnsmasq.d/ad.conf
fi
if [ $(uci_get_by_type global adblock 0) == "0" ] ;then
rm -f /tmp/dnsmasq.ssr/ad.conf
fi
@ -573,9 +576,14 @@ stop() {
killall -q -9 dns2socks
killall -q -9 microsocks
killall -q -9 redsocks2
if [ $(uci_get_by_type global adblock 0) == "0" ]; then
rm -f /tmp/dnsmasq.d/ad.conf
else
cp -f /etc/dnsmasq.ssr/ad.conf /tmp/dnsmasq.d/ad.conf
fi
if [ -f "/tmp/dnsmasq.d/dnsmasq-ssr.conf" ]; then
rm -f /tmp/dnsmasq.d/dnsmasq-ssr.conf
/etc/init.d/dnsmasq restart >/dev/null 2>&1
fi
/etc/init.d/dnsmasq restart >/dev/null 2>&1
del_cron
}

View File

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-unblockmusic
PKG_VERSION:=2.3.1
PKG_RELEASE:=33
PKG_RELEASE:=36
PKG_CONFIG_DEPENDS := \
CONFIG_UnblockNeteaseMusic_Go \

View File

@ -2,6 +2,5 @@
[ "$ACTION" = ifup ] || exit 0
ipset -! -N music hash:ip
sleep 10
wget-ssl -q -t 99 -T 10 http://httpdns.n.netease.com/httpdns/v2/d?domain=music.163.com,interface.music.163.com,interface3.music.163.com,apm.music.163.com,apm3.music.163.com,clientlog.music.163.com,clientlog3.music.163.com -O- | grep -Eo '[0-9]+?\.[0-9]+?\.[0-9]+?\.[0-9]+?' | sort | uniq | awk '{print "ipset -! add music "$1}' | sh
/usr/share/UnblockNeteaseMusic/getmusicip.sh

View File

@ -176,7 +176,7 @@ start()
UnblockNeteaseMusic -p 5200 -sp 5201 -c /usr/share/UnblockNeteaseMusicGo/server.crt -k /usr/share/UnblockNeteaseMusicGo/server.key -m 0 -e >>/tmp/unblockmusic.log 2>&1 &
echo "$(date -R) # UnblockNeteaseMusic Golang Version (http:5200, https:5201)" >>/tmp/unblockmusic.log
else
kill -9 $(busybox ps -w | grep 'sleep 60m' | grep -v grep | awk '{print $1}') >/dev/null 2>&1
kill -9 $(busybox ps -w | grep 'sleep 29s' | grep -v grep | awk '{print $1}') >/dev/null 2>&1
/usr/bin/UnblockNeteaseMusicCloud >/dev/null 2>&1 &
echo "$(date -R) # UnblockNeteaseMusic Cloud Version - Server: $cloudip (http:$cloudhttp, https:$cloudhttp)" >>/tmp/unblockmusic.log
fi

View File

@ -0,0 +1,4 @@
#!/bin/sh
ipset -! -N music hash:ip
wget-ssl -q -t 99 -T 10 http://httpdns.n.netease.com/httpdns/v2/d?domain=music.163.com,interface.music.163.com,interface3.music.163.com,apm.music.163.com,apm3.music.163.com,clientlog.music.163.com,clientlog3.music.163.com -O- | grep -Eo '[0-9]+?\.[0-9]+?\.[0-9]+?\.[0-9]+?' | sort | uniq | awk '{print "ipset -! add music "$1}' | sh

View File

@ -4,14 +4,17 @@ log_max_size=100
log_file="/tmp/unblockmusic.log"
log_size=0
/usr/share/UnblockNeteaseMusic/getmusicip.sh
sleep 29s
while true
do
ipset -! -N music hash:ip
sleep 10s
wget-ssl -q -t 99 -T 10 http://httpdns.n.netease.com/httpdns/v2/d?domain=music.163.com,interface.music.163.com,interface3.music.163.com,apm.music.163.com,apm3.music.163.com,clientlog.music.163.com,clientlog3.music.163.com -O- | grep -Eo '[0-9]+?\.[0-9]+?\.[0-9]+?\.[0-9]+?' | sort | uniq | awk '{print "ipset -! add music "$1}' | sh
icount=`busybox ps -w | grep UnblockNeteaseMusic | grep -v grep | grep -v logcheck.sh`
[ -z "$icount" ] && /etc/init.d/unblockmusic restart
icount=`busybox ps -w | grep UnblockNeteaseMusic | grep -v grep | grep -v logcheck.sh`
if [ -z "$icount" ]; then
/usr/share/UnblockNeteaseMusic/getmusicip.sh
/etc/init.d/unblockmusic restart
fi
log_size=$(expr $(ls -l $log_file | awk '{print $5}') / 1024)
[ $log_size -ge $log_max_size ] && echo "$(date -R) # Start UnblockNeteaseMusic" >/tmp/unblockmusic.log
sleep 30s
sleep 29s
done

View File

@ -21,4 +21,7 @@ o.placeholder = "8886"
o.default = "8886"
o.rmempty = false
o = s:option(Value, "profile", translate("Store configuration files in the Path"))
o.default = '/etc/verysync/'
return m

View File

@ -6,3 +6,6 @@ msgstr "简单易用的多平台文件同步软件, 惊人的传输速度是不
msgid "Open Verysync page"
msgstr "打开微力同步页面"
msgid "Store configuration files in the Path"
msgstr "配置文件存放路径"

View File

@ -6,10 +6,11 @@ STOP=10
start() {
local enabled="$(uci get verysync.config.enabled)"
local port="$(uci get verysync.config.port)"
local profile="$(uci get verysync.config.profile)"
stop
[ "${enabled}" == "1" ] || exit 0
export HOME="/root/"
verysync -gui-address="0.0.0.0:${port}" -logfile="/var/log/verysync.log" -home="/etc/verysync/" -no-browser >/dev/null 2>&1 &
verysync -gui-address="0.0.0.0:${port}" -logfile="/var/log/verysync.log" -home="${profile}" -no-browser >/dev/null 2>&1 &
}
stop() {