Merge Mainline
This commit is contained in:
commit
7e654c67ed
@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
|
||||
include $(INCLUDE_DIR)/feeds.mk
|
||||
|
||||
PKG_NAME:=base-files
|
||||
PKG_RELEASE:=210
|
||||
PKG_RELEASE:=211
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||
|
||||
@ -62,20 +62,24 @@ depends() {
|
||||
return 0
|
||||
}
|
||||
|
||||
EXTRA_HELP=""
|
||||
EXTRA_COMMANDS="boot shutdown depends"
|
||||
extra_command() {
|
||||
local cmd="$1"
|
||||
local help="$2"
|
||||
|
||||
local extra="$(printf "%-16s%s" "${cmd}" "${help}")"
|
||||
EXTRA_HELP="${EXTRA_HELP}\t${extra}\n"
|
||||
EXTRA_COMMANDS="${EXTRA_COMMANDS} ${cmd}"
|
||||
}
|
||||
|
||||
help() {
|
||||
cat <<EOF
|
||||
Syntax: $initscript [command]
|
||||
|
||||
Available commands:
|
||||
start Start the service
|
||||
stop Stop the service
|
||||
restart Restart the service
|
||||
reload Reload configuration files (or restart if service does not implement reload)
|
||||
enable Enable service autostart
|
||||
disable Disable service autostart
|
||||
enabled Check if service is started on boot
|
||||
$EXTRA_HELP
|
||||
EOF
|
||||
echo -e "$EXTRA_HELP"
|
||||
}
|
||||
|
||||
# for procd
|
||||
@ -103,14 +107,20 @@ service_running() {
|
||||
|
||||
${INIT_TRACE:+set -x}
|
||||
|
||||
extra_command "start" "Start the service"
|
||||
extra_command "stop" "Stop the service"
|
||||
extra_command "restart" "Restart the service"
|
||||
extra_command "reload" "Reload configuration files (or restart if service does not implement reload)"
|
||||
extra_command "enable" "Enable service autostart"
|
||||
extra_command "disable" "Disable service autostart"
|
||||
extra_command "enabled" "Check if service is started on boot"
|
||||
|
||||
. "$initscript"
|
||||
|
||||
[ -n "$USE_PROCD" ] && {
|
||||
EXTRA_COMMANDS="${EXTRA_COMMANDS} running status trace"
|
||||
EXTRA_HELP="\
|
||||
running Check if service is running
|
||||
status Service status
|
||||
${EXTRA_HELP}"
|
||||
extra_command "running" "Check if service is running"
|
||||
extra_command "status" "Service status"
|
||||
extra_command "trace" "Start with syscall trace"
|
||||
|
||||
. $IPKG_INSTROOT/lib/functions/procd.sh
|
||||
basescript=$(readlink "$initscript")
|
||||
@ -165,6 +175,6 @@ ${EXTRA_HELP}"
|
||||
}
|
||||
}
|
||||
|
||||
ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}"
|
||||
ALL_COMMANDS="${EXTRA_COMMANDS}"
|
||||
list_contains ALL_COMMANDS "$action" || action=help
|
||||
$action "$@"
|
||||
|
||||
@ -5,8 +5,7 @@ STOP=90
|
||||
|
||||
BOOT_IMAGE=/boot/vmlinuz
|
||||
|
||||
EXTRA_COMMANDS="status"
|
||||
EXTRA_HELP=" status Print crashkernel status"
|
||||
extra_command "status" "Print crashkernel status"
|
||||
|
||||
verify_kdump() {
|
||||
local cfg="$1"
|
||||
|
||||
@ -58,7 +58,7 @@ endef
|
||||
|
||||
ifeq ($(CONFIG_ANNIE_COMPRESS_GOPROXY),y)
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.cn
|
||||
export GOPROXY=https://goproxy.io
|
||||
endif
|
||||
|
||||
define Build/Prepare
|
||||
@ -83,4 +83,4 @@ define Package/annie/install
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,annie))
|
||||
$(eval $(call BuildPackage,annie))
|
||||
$(eval $(call BuildPackage,annie))
|
||||
|
||||
@ -63,7 +63,7 @@ endef
|
||||
|
||||
ifeq ($(CONFIG_FILEBROWSER_COMPRESS_GOPROXY),y)
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.cn
|
||||
export GOPROXY=https://goproxy.io
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
|
||||
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-adguardhome
|
||||
PKG_VERSION:=1.8
|
||||
PKG_RELEASE:=11
|
||||
PKG_RELEASE:=12
|
||||
PKG_MAINTAINER:=<https://github.com/rufengsuixing/luci-app-adguardhome>
|
||||
|
||||
LUCI_TITLE:=LuCI app for AdGuardHome
|
||||
|
||||
@ -7,12 +7,13 @@ STOP=01
|
||||
|
||||
CONFIGURATION=AdGuardHome
|
||||
CRON_FILE=/etc/crontabs/root
|
||||
EXTRA_COMMANDS="do_redirect testbackup test_crontab force_reload isrunning"
|
||||
EXTRA_HELP=" do_redirect 0 or 1\
|
||||
testbackup backup or restore\
|
||||
test_crontab
|
||||
force_reload
|
||||
isrunning"
|
||||
|
||||
extra_command "do_redirect" "0 or 1"
|
||||
extra_command "testbackup" "backup or restore"
|
||||
extra_command "test_crontab"
|
||||
extra_command "force_reload"
|
||||
extra_command "isrunning"
|
||||
|
||||
set_forward_dnsmasq()
|
||||
{
|
||||
local PORT="$1"
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
|
||||
START=99
|
||||
STOP=01
|
||||
|
||||
extra_command "test_crontab" "test_crontab"
|
||||
|
||||
CRON_FILE=/etc/crontabs/root
|
||||
CONFIGURATION=autoipsetadder
|
||||
EXTRA_COMMANDS="test_crontab"
|
||||
EXTRA_HELP="
|
||||
test_crontab"
|
||||
|
||||
set_dnsmasq_log()
|
||||
{
|
||||
sed -i '/log-facility/d' /etc/dnsmasq.conf
|
||||
|
||||
@ -1,67 +1,20 @@
|
||||
#
|
||||
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
|
||||
# Copyright (C) 2006-2017 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=luci-app-jd-dailybonus
|
||||
|
||||
LUCI_TITLE:=Luci for JD dailybonus Script
|
||||
LUCI_DEPENDS:=+node +node-request +coreutils +coreutils-nohup +wget
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=0.8.6
|
||||
PKG_RELEASE:=20201021
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
PKG_NAME:=luci-app-jd-dailybonus
|
||||
PKG_VERSION:=0.8.7
|
||||
PKG_RELEASE:=20201031
|
||||
|
||||
define Package/luci-app-jd-dailybonus
|
||||
SECTION:=luci
|
||||
CATEGORY:=LuCI
|
||||
SUBMENU:=3. Applications
|
||||
TITLE:=Luci for JD dailybonus Script
|
||||
PKGARCH:=all
|
||||
DEPENDS:=+node +node-request +coreutils +coreutils-nohup +wget
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/luci-app-define Package/jd-dailybonus/conffiles
|
||||
|
||||
endef
|
||||
|
||||
define Package/luci-app-jd-dailybonus/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci
|
||||
cp -pR ./luasrc/* $(1)/usr/lib/lua/luci
|
||||
$(INSTALL_DIR) $(1)/
|
||||
cp -pR ./root/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
|
||||
po2lmo ./po/zh-cn/jd-dailybonus.po $(1)/usr/lib/lua/luci/i18n/jd-dailybonus.zh-cn.lmo
|
||||
endef
|
||||
|
||||
define Package/luci-app-jd-dailybonus/postinst
|
||||
#!/bin/sh
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
( . /etc/uci-defaults/luci-jd-dailybonus ) && rm -f /etc/uci-defaults/luci-jd-dailybonus
|
||||
rm -rf /tmp/luci-indexcache
|
||||
rm -rf /tmp/luci-modulecache/*
|
||||
chmod +x /etc/init.d/jd-dailybonus >/dev/null 2>&1
|
||||
chmod +x /usr/share/jd-dailybonus/newapp.sh >/dev/null 2>&1
|
||||
/etc/init.d/jd-dailybonus enable >/dev/null 2>&1
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/luci-app-jd-dailybonus/prerm
|
||||
#!/bin/sh
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
/etc/init.d/jd-dailybonus disable
|
||||
/etc/init.d/jd-dailybonus stop
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,luci-app-jd-dailybonus))
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
config global
|
||||
option version '1.47'
|
||||
option version '1.79'
|
||||
option auto_run_time '1'
|
||||
option auto_run '1'
|
||||
option auto_update_time '1'
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -86,7 +86,7 @@ local_ver=$(uci_get_by_type global version)
|
||||
|
||||
add_cron() {
|
||||
sed -i '/jd-dailybonus/d' $CRON_FILE
|
||||
[ $(uci_get_by_type global auto_run 0) -eq 1 ] && echo '5 '$(uci_get_by_type global auto_run_time)' * * * /bin/bash -c "sleep $[RANDOM % 180]s"; /usr/share/jd-dailybonus/newapp.sh -w' >>$CRON_FILE
|
||||
[ $(uci_get_by_type global auto_run 0) -eq 1 ] && echo '5 '$(uci_get_by_type global auto_run_time)' * * * sleep '$(expr $(head -n 128 /dev/urandom | tr -dc "0123456789" | head -c4) % 180)'s; /usr/share/jd-dailybonus/newapp.sh -w' >>$CRON_FILE
|
||||
[ $(uci_get_by_type global auto_update 0) -eq 1 ] && echo '1 '$(uci_get_by_type global auto_update_time)' * * * /usr/share/jd-dailybonus/newapp.sh -u' >>$CRON_FILE
|
||||
crontab $CRON_FILE
|
||||
}
|
||||
@ -118,12 +118,14 @@ serverchan() {
|
||||
run() {
|
||||
fill_cookie
|
||||
echo -e $(date '+%Y-%m-%d %H:%M:%S %A') >$LOG_HTM 2>/dev/null
|
||||
nohup node $JD_SCRIPT >>$LOG_HTM 2>/dev/null &
|
||||
[ ! -f "/usr/bin/node" ] && echo "未安装node,请安装后再试!">>$LOG_HTM && exit 1
|
||||
node $JD_SCRIPT >>$LOG_HTM 2>&1 &
|
||||
}
|
||||
|
||||
back_run() {
|
||||
fill_cookie
|
||||
echo -e $(date '+%Y-%m-%d %H:%M:%S %A') >$LOG_HTM 2>/dev/null
|
||||
[ ! -f "/usr/bin/node" ] && echo "未安装node,请安装后再试!">>$LOG_HTM && exit 1
|
||||
node $JD_SCRIPT >>$LOG_HTM 2>/dev/null
|
||||
serverchan
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-serverchan
|
||||
PKG_VERSION:=1.79
|
||||
PKG_VERSION:=1.80
|
||||
PKG_RELEASE:=8
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -64,12 +64,13 @@ a:value("",translate("关闭"))
|
||||
a:value("1",translate("简化版"))
|
||||
a:value("2",translate("完整版"))
|
||||
a:value("3",translate("网络查询"))
|
||||
a.description = translate("原始数据大小为 4.36m,处理后的完整版约 1.2M,简化版约 250kb <br/>若无梯子,请勿使用网络查询")
|
||||
a.description = translate("需下载 4.36m 原始数据,处理后完整版约 1.2M,简化版约 250kb <br/>若无梯子,请勿使用网络查询")
|
||||
|
||||
a=s:taboption("basic", Flag,"oui_dir",translate("下载到内存"))
|
||||
a.rmempty = true
|
||||
a:depends("oui_data","1")
|
||||
a:depends("oui_data","2")
|
||||
a.description = translate("懒得做自动更新了,下载到内存中,重启会重新下载 <br/>若无梯子,还是下到机身吧")
|
||||
|
||||
a=s:taboption("basic", Flag,"debuglevel",translate("开启日志"))
|
||||
a.rmempty = true
|
||||
|
||||
@ -44,6 +44,7 @@ function serverchan_init(){
|
||||
[ -z `eval echo '$'$read_str` ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】依赖项 iputils-arping、curl 未安装,请确认插件是否正常运行" >> ${logfile}
|
||||
done
|
||||
[ -z "$sckey" ] && [ -z "$sctkey" ] && [ -z "$tgtoken" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】请填写正确的 sckey " >> ${logfile} && return 1
|
||||
local interfacelist=`getinterfacelist` && [ -z "$interfacelist" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】无法正确获取接口信息,请确认插件是否正常运行" >> ${logfile}
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -88,14 +89,16 @@ function enable_detection(){
|
||||
function getip(){
|
||||
[ ! "$1" ] && return
|
||||
if [ $1 == "wanipv4" ] ;then
|
||||
[ ! -z "$ipv4_interface" ] && local wanIP=$(/sbin/ifconfig ${ipv4_interface}|awk '/inet addr/ {print $2}'|awk -F: '{print $2}'|grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}') || local wanIP=$(ubus call network.interface.wan status|grep '\"address\"'|grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')
|
||||
[ ! -z "$ipv4_interface" ] && local wanIP=$(/sbin/ifconfig ${ipv4_interface}|awk '/inet addr/ {print $2}'|awk -F: '{print $2}'|grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')
|
||||
[ -z "$ipv4_interface" ] && local wanIP=$(getinterfacelist|grep '\"address\"'|grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')
|
||||
echo "$wanIP"
|
||||
elif [ $1 == "hostipv4" ] ;then
|
||||
[ -z "$ipv4_URL" ] && local ipv4_URL="members.3322.org/dyndns/getip"
|
||||
[ ! -z "$ipv4_interface" ] && local hostIP=$(curl -k -s -4 --interface ${ipv4_interface} ${ipv4_URL}) || local hostIP=$(curl -k -s -4 ${ipv4_URL})
|
||||
echo "$hostIP"
|
||||
elif [ $1 == "wanipv6" ] ;then
|
||||
[ ! -z "$ipv6_interface" ] && local wanIPv6=$(ip addr show ${ipv6_interface}|grep -v deprecated|grep -A1 'inet6 [^f:]'|sed -nr ':a;N;s#^ +inet6 ([a-f0-9:]+)/.+? scope global .*? valid_lft ([0-9]+sec) .*#\2 \1#p;ta'|sort -nr|head -n1|awk '{print $2}') || local wanIPv6=$(ip addr show|grep -v deprecated|grep -A1 'inet6 [^f:]'|sed -nr ':a;N;s#^ +inet6 ([a-f0-9:]+)/.+? scope global .*? valid_lft ([0-9]+sec) .*#\2 \1#p;ta'|sort -nr|head -n1|awk '{print $2}')
|
||||
[ ! -z "$ipv6_interface" ] && local wanIPv6=$(ip addr show ${ipv6_interface}|grep -v deprecated|grep -A1 'inet6 [^f:]'|sed -nr ':a;N;s#^ +inet6 ([a-f0-9:]+)/.+? scope global .*? valid_lft ([0-9]+sec) .*#\2 \1#p;ta'|sort -nr|head -n1|awk '{print $2}')
|
||||
[ -z "$ipv6_interface" ] && local wanIPv6=$(ip addr show|grep -v deprecated|grep -A1 'inet6 [^f:]'|sed -nr ':a;N;s#^ +inet6 ([a-f0-9:]+)/.+? scope global .*? valid_lft ([0-9]+sec) .*#\2 \1#p;ta'|sort -nr|head -n1|awk '{print $2}')
|
||||
echo "$wanIPv6"
|
||||
elif [ $1 == "hostipv6" ] ;then
|
||||
[ -z "$ipv6_URL" ] && local ipv6_URL="v6.ip.zxinc.org/getip"
|
||||
@ -104,6 +107,17 @@ function getip(){
|
||||
fi
|
||||
}
|
||||
|
||||
# 获取接口信息
|
||||
function getinterfacelist(){
|
||||
[ `ubus list|grep -w -i "network.interface.wan"|wc -l` -ge "1" ] && ubus call network.interface.wan status && return
|
||||
[ `ubus list|grep -i "network.interface."|grep -v "loopback"|grep -v "wan6"|wc -l` -eq "1" ] && ubus call `ubus list|grep "network.interface."|grep -v "loopback"` status && return
|
||||
}
|
||||
|
||||
# 获取接口在线时间
|
||||
function getinterfaceuptime(){
|
||||
getinterfacelist|grep \"uptime\"|sed $'s/\"uptime": //g'|sed $'s/\,//g'
|
||||
}
|
||||
|
||||
# 查询 mac 地址
|
||||
function getmac(){
|
||||
( echo "$tmp_mac"|grep -q "unknown" ) && unset tmp_mac # 为unknown时重新读取
|
||||
@ -195,7 +209,7 @@ function usage(){
|
||||
[ -z "$tmptotal" ] && local tmptotal="0"
|
||||
[ ! "$3" ] && echo `bytes_for_humans ${tmptotal}` || echo "$tmptotal"
|
||||
elif [ $1 == "down" ] ;then
|
||||
[ "$2" ] && sed -i "/${2}/d" ${dir}usage.db 2>/dev/null
|
||||
[ "$2" ] && sed -i "/,${2},/d" ${dir}usage.db 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
@ -466,11 +480,12 @@ function unattended(){
|
||||
geterrdevicealiases;[ $? -eq "1" ] && return
|
||||
|
||||
if [ ! -z "$system_time_event" ]; then
|
||||
local interfaceuptime=`getinterfaceuptime`
|
||||
if [ ! -z "$autoreboot_time" ] && [ `cat /proc/uptime|awk -F. '{run_hour=$1/3600;printf("%d",run_hour)}'` -ge "$autoreboot_time" ] && [ "$system_time_event" -eq "1" ]; then
|
||||
echo "`date "+%Y-%m-%d %H:%M:%S"` 【无人值守任务】重启路由器咯" >> ${logfile}
|
||||
cat ${logfile} > /usr/bin/serverchan/errlog
|
||||
sleep 2 && reboot && exit
|
||||
elif [ ! -z "$network_restart_time" ] && [ `ubus call network.interface.wan status|grep \"uptime\"|sed $'s/\"uptime": //g'|sed $'s/\,//g'|awk -F. '{run_hour=$1/3600;printf("%d",run_hour)}'` -ge "$network_restart_time" ] && [ "$system_time_event" -eq "2" ]; then
|
||||
elif [ ! -z "$network_restart_time" ] && [ ! -z "$interfaceuptime" ] && [ `echo "$interfaceuptime"|awk -F. '{run_hour=$1/3600;printf("%d",run_hour)}'` -ge "$network_restart_time" ] && [ "$system_time_event" -eq "2" ]; then
|
||||
echo "`date "+%Y-%m-%d %H:%M:%S"` 【无人值守任务】重新拨号咯" >> ${logfile}
|
||||
ifup wan >/dev/null 2>&1
|
||||
sleep 60
|
||||
@ -652,12 +667,12 @@ function up(){
|
||||
getping ${1} ${up_timeout} "1";local ping_online=$?
|
||||
if [ "$ping_online" -eq "0" ]; then
|
||||
LockFile lock
|
||||
[ -f "${dir}tmp_downlist" ] && local tmp_downip=`cat ${dir}tmp_downlist|grep -w ${1}|awk '{print $2}'|grep -v "^$"|sort -u`
|
||||
[ -f "${dir}tmp_downlist" ] && local tmp_downip=`cat ${dir}tmp_downlist|grep -w ${1}|grep -v "^$"|sort -u`
|
||||
if [ ! -z "$tmp_downip" ]; then
|
||||
cat ${dir}tmp_downlist|grep -w ${1}|grep -v "^$"|sort -u >> ${dir}ipAddress
|
||||
sed -i "/$1/d" ${dir}tmp_downlist
|
||||
sed -i "/^${1} /d" ${dir}tmp_downlist
|
||||
else
|
||||
usage down $ip_mac
|
||||
usage down $1
|
||||
local ip_name=`getname ${1} ${ip_mac}`
|
||||
blackwhitelist ${ip_mac};local ip_blackwhite=$?
|
||||
echo "$1 ${ip_mac} ${ip_name} `date +%s` ${ip_interface}" >> ${dir}ipAddress
|
||||
@ -692,14 +707,14 @@ function down(){
|
||||
if [ "$ping_online" -eq "1" ]; then
|
||||
LockFile lock
|
||||
[ ! -f "${dir}send_enable.lock" ] && cat ${dir}ipAddress|grep -w ${1}|grep -v "^$"|sort -u >> ${dir}tmp_downlist
|
||||
sed -i "/$1/d" ${dir}ipAddress
|
||||
sed -i "/^${1} /d" ${dir}ipAddress
|
||||
LockFile unlock
|
||||
else
|
||||
local tmp_name=`cat ${dir}ipAddress|grep -w ${1}|awk '{print $3}'|grep -v "^$"|sort -u`
|
||||
if [ "$ip_name" != "$tmp_name" ]; then
|
||||
LockFile lock
|
||||
local tmp_str=$(echo "$1 ${ip_mac} ${ip_name} `cat ${dir}ipAddress|grep -w ${1}|awk '{print $4}'|grep -v "^$"|sort -u` ${ip_interface}")
|
||||
sed -i "/$1/d" ${dir}ipAddress
|
||||
sed -i "/^${1} /d" ${dir}ipAddress
|
||||
echo "$tmp_str" >> ${dir}ipAddress
|
||||
LockFile unlock
|
||||
fi
|
||||
@ -866,13 +881,13 @@ function send(){
|
||||
local send_content="${send_content}${markdown_linefeed}${markdown_tab}外网v6:${send_hostIPv6}"
|
||||
fi
|
||||
( ! echo "$send_wanIP"|grep -q -w ${send_hostIP} ) && local send_content="${send_content}${markdown_linefeed}${markdown_tab}外网 ip 与接口 ip 不一致,你的 ip 不是公网 ip"
|
||||
local wanstatustime=`ubus call network.interface.wan status|grep \"uptime\"|sed $'s/\"uptime": //g'|sed $'s/\,//g'|awk -F. '{run_days=$1 / 86400;run_hour=($1 % 86400)/3600;run_minute=($1 % 3600)/60;run_second=$1 % 60;printf("在线时间:%d天%d时%d分%d秒",run_days,run_hour,run_minute,run_second)}'`;unset run_days run_hour run_minute run_second
|
||||
local interfaceuptime=`getinterfaceuptime`
|
||||
[ ! -z "$interfaceuptime" ] && local wanstatustime=`getinterfaceuptime|awk -F. '{run_days=$1 / 86400;run_hour=($1 % 86400)/3600;run_minute=($1 % 3600)/60;run_second=$1 % 60;printf("在线时间:%d天%d时%d分%d秒",run_days,run_hour,run_minute,run_second)}'` && unset run_days run_hour run_minute run_second
|
||||
local send_content="${send_content}${markdown_linefeed}${markdown_tab}${wanstatustime}"
|
||||
fi
|
||||
|
||||
if [ ! -z "$client_list" ] && [ "$client_list" -eq "1" ]; then
|
||||
wait
|
||||
|
||||
local IPLIST=`cat ${dir}ipAddress 2>/dev/null|awk '{print $1}'`
|
||||
[ -z "$IPLIST" ] && local send_content="${send_content}${markdown_splitline}#### 当前无在线设备" || local send_content="${send_content}${markdown_splitline}#### 在线设备"
|
||||
for ip in $IPLIST; do
|
||||
|
||||
@ -343,7 +343,7 @@ o.default = 2
|
||||
o.rmempty = true
|
||||
|
||||
o = s:option(Value, 'seed', translate('Seed'))
|
||||
o.depends('transport', 'kcp')
|
||||
o:depends('transport', 'kcp')
|
||||
o.default = ''
|
||||
o.rmempty = true
|
||||
|
||||
|
||||
@ -11,9 +11,10 @@
|
||||
START=90
|
||||
STOP=15
|
||||
|
||||
extra_command "rules"
|
||||
|
||||
SERVICE_DAEMONIZE=1
|
||||
NAME=vssr
|
||||
EXTRA_COMMANDS=rules
|
||||
|
||||
#定义配置文件名称
|
||||
CONFIG_FILE=/var/etc/${NAME}_t.json
|
||||
|
||||
@ -41,8 +41,7 @@ endef
|
||||
|
||||
ifeq ($(CONFIG_$(PKG_NAME)_INCLUDE_GOPROXY),y)
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.cn
|
||||
#export GOPROXY=https://goproxy.io
|
||||
export GOPROXY=https://goproxy.io
|
||||
#export GOPROXY=https://mirrors.aliyun.com/goproxy/
|
||||
endif
|
||||
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gdb
|
||||
PKG_VERSION:=8.3.1
|
||||
PKG_VERSION:=10.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNU/gdb
|
||||
PKG_HASH:=1e55b4d7cdca7b34be12f4ceae651623aa73b2fd640152313f9f66a7149757c4
|
||||
PKG_HASH:=f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
@ -25,7 +25,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/gdb/Default
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
DEPENDS:=+!USE_MUSL:libthread-db +PACKAGE_zlib:zlib
|
||||
DEPENDS:=+!USE_MUSL:libthread-db +zlib
|
||||
URL:=https://www.gnu.org/software/gdb/
|
||||
endef
|
||||
|
||||
@ -55,8 +55,11 @@ endef
|
||||
# XXX: add --disable-werror to prevent build failure with arm
|
||||
CONFIGURE_ARGS+= \
|
||||
--with-system-readline \
|
||||
--with-system-zlib \
|
||||
--without-expat \
|
||||
--without-lzma \
|
||||
--disable-unit-tests \
|
||||
--disable-ubsan \
|
||||
--disable-sim \
|
||||
--disable-werror \
|
||||
--disable-source-highlight
|
||||
@ -72,7 +75,7 @@ define Build/Install
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
CPPFLAGS="$(TARGET_CPPFLAGS)" \
|
||||
install-gdb
|
||||
install-gdb install-gdbserver
|
||||
endef
|
||||
|
||||
define Package/gdb/install
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
See http://sourceware.org/bugzilla/show_bug.cgi?id=14523
|
||||
|
||||
--- a/gdb/common/signals.c
|
||||
+++ b/gdb/common/signals.c
|
||||
--- a/gdbsupport/signals.cc
|
||||
+++ b/gdbsupport/signals.cc
|
||||
@@ -348,6 +348,11 @@ gdb_signal_from_host (int hostsig)
|
||||
else if (64 <= hostsig && hostsig <= 127)
|
||||
return (enum gdb_signal)
|
||||
|
||||
@ -8,9 +8,9 @@
|
||||
#include "defs.h"
|
||||
#include "inferior.h"
|
||||
#include "infrun.h"
|
||||
@@ -72,6 +73,10 @@
|
||||
#define SPUFS_MAGIC 0x23c9b64e
|
||||
#endif
|
||||
@@ -70,6 +71,10 @@
|
||||
#include "gdbsupport/gdb-sigmask.h"
|
||||
#include "debug.h"
|
||||
|
||||
+#ifndef __SIGRTMIN
|
||||
+#define __SIGRTMIN SIGRTMIN
|
||||
@ -39,8 +39,8 @@
|
||||
#include <asm/cputable.h>
|
||||
|
||||
/* This sometimes isn't defined. */
|
||||
--- a/gdb/gdbserver/linux-ppc-low.c
|
||||
+++ b/gdb/gdbserver/linux-ppc-low.c
|
||||
--- a/gdbserver/linux-ppc-low.cc
|
||||
+++ b/gdbserver/linux-ppc-low.cc
|
||||
@@ -23,7 +23,9 @@
|
||||
#include "elf/common.h"
|
||||
#include <sys/uio.h>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1283,13 +1283,13 @@ if test -z "$LD"; then
|
||||
@@ -1302,13 +1302,13 @@ if test -z "$LD"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||
#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
|
||||
@@ -1629,7 +1629,7 @@ AC_ARG_WITH(stage1-ldflags,
|
||||
@@ -1648,7 +1648,7 @@ AC_ARG_WITH(stage1-ldflags,
|
||||
# trust that they are doing what they want.
|
||||
if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \
|
||||
-a "$have_static_libs" = yes; then
|
||||
@ -26,7 +26,7 @@
|
||||
fi])
|
||||
AC_SUBST(stage1_ldflags)
|
||||
|
||||
@@ -1658,7 +1658,7 @@ AC_ARG_WITH(boot-ldflags,
|
||||
@@ -1677,7 +1677,7 @@ AC_ARG_WITH(boot-ldflags,
|
||||
# statically. But if the user explicitly specified the libraries to
|
||||
# use, trust that they are doing what they want.
|
||||
if test "$poststage1_libs" = ""; then
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5053,14 +5053,14 @@ if test -z "$LD"; then
|
||||
@@ -5075,14 +5075,14 @@ if test -z "$LD"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
@@ -5861,7 +5861,7 @@ else
|
||||
@@ -5883,7 +5883,7 @@ else
|
||||
# trust that they are doing what they want.
|
||||
if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \
|
||||
-a "$have_static_libs" = yes; then
|
||||
@ -65,7 +65,7 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -5897,7 +5897,7 @@ else
|
||||
@@ -5919,7 +5919,7 @@ else
|
||||
# statically. But if the user explicitly specified the libraries to
|
||||
# use, trust that they are doing what they want.
|
||||
if test "$poststage1_libs" = ""; then
|
||||
|
||||
@ -25,14 +25,14 @@ gdb/ChangeLog:
|
||||
gdb/common/signals-state-save-restore.c | 2 +-
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/gdb/common/signals-state-save-restore.c
|
||||
+++ b/gdb/common/signals-state-save-restore.c
|
||||
@@ -41,7 +41,7 @@ save_original_signals_state (bool quiet)
|
||||
--- a/gdbsupport/signals-state-save-restore.cc
|
||||
+++ b/gdbsupport/signals-state-save-restore.cc
|
||||
@@ -38,7 +38,7 @@ save_original_signals_state (bool quiet)
|
||||
int i;
|
||||
int res;
|
||||
|
||||
- res = sigprocmask (0, NULL, &original_signal_mask);
|
||||
+ res = sigprocmask (SIG_BLOCK, NULL, &original_signal_mask);
|
||||
- res = gdb_sigmask (0, NULL, &original_signal_mask);
|
||||
+ res = gdb_sigmask (SIG_BLOCK, NULL, &original_signal_mask);
|
||||
if (res == -1)
|
||||
perror_with_name (("sigprocmask"));
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/gdb/dwarf-index-write.c
|
||||
+++ b/gdb/dwarf-index-write.c
|
||||
@@ -701,7 +701,7 @@ public:
|
||||
--- a/gdb/dwarf2/index-write.c
|
||||
+++ b/gdb/dwarf2/index-write.c
|
||||
@@ -777,7 +777,7 @@ public:
|
||||
gdb_assert (m_abbrev_table.empty ());
|
||||
const size_t name_count = m_name_to_value_set.size ();
|
||||
m_bucket_table.resize
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=linux-firmware
|
||||
PKG_VERSION:=20200918
|
||||
PKG_VERSION:=20201022
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_HASH:=e2787907e0892e0b1a3c06f1def6fd3cdc0eff850b0919c7f21b5bda7563d2d8
|
||||
PKG_HASH:=bf586e0beb4c65f22bf0a79811f259aa0a5a7cc9f70eebecb260525b6914cef7
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
|
||||
@ -2,6 +2,10 @@
|
||||
|
||||
START=60
|
||||
|
||||
extra_command "makeconfig"
|
||||
extra_command "makegfwlist"
|
||||
extra_command "health"
|
||||
|
||||
CRON_FILE=/etc/crontabs/root
|
||||
PID_PATH=/var/run/dnsforwarder
|
||||
PID_FILE=${PID_PATH}/dns.pid
|
||||
@ -51,7 +55,7 @@ health(){
|
||||
}
|
||||
|
||||
|
||||
makegfwlist(){
|
||||
makegfwlist(){
|
||||
local GFW_FILE='/etc/dnsforwarder/gfw.txt'
|
||||
local GFW_TMP_FILE='/tmp/dnsforwarder-gfw.old'
|
||||
local TSTIME=`date '+%Y-%m-%d %H:%M:%S'`
|
||||
@ -62,7 +66,7 @@ makegfwlist(){
|
||||
sort /tmp/edf.ts | uniq > /tmp/edf.ts
|
||||
/usr/share/dnsforwarder/gfwlist.sh -i -l -o /tmp/dnsforwarder-gfw.tmp --extra-domain-file /tmp/edf.ts
|
||||
if [ $? != 0 ]; then
|
||||
echo 'Failed to fetch gfwlist'
|
||||
echo 'Failed to fetch gfwlist'
|
||||
logger -t Failed to fetch gfwlist
|
||||
return 2
|
||||
fi
|
||||
@ -79,7 +83,7 @@ makegfwlist(){
|
||||
cp ${GFW_TMP_FILE} ${GFW_FILE}
|
||||
sed -i "s/TS_BUILD_TIME/${TSTIME}/g" ${GFW_FILE}
|
||||
printf "[\e[33m%s\e[0m]" "PID"
|
||||
restart
|
||||
restart
|
||||
fi
|
||||
}
|
||||
|
||||
@ -88,7 +92,7 @@ makeconfig () {
|
||||
|
||||
local log=$(uci get dnsforwarder.@config[0].log 2>/dev/null)
|
||||
local log_size=$(uci get dnsforwarder.@config[0].log_size 2>/dev/null)
|
||||
|
||||
|
||||
local gfw=$(uci get dnsforwarder.@config[0].gfw 2>/dev/null)
|
||||
|
||||
local udp_local=$(uci -d ',' get dnsforwarder.@config[0].udp_local 2>/dev/null)
|
||||
@ -105,8 +109,8 @@ makeconfig () {
|
||||
local cache=$(uci get dnsforwarder.@config[0].cache 2>/dev/null)
|
||||
local cache_size=$(uci get dnsforwarder.@config[0].cache_size 2>/dev/null)
|
||||
local cache_ignore=$(uci get dnsforwarder.@config[0].cache_ignore 2>/dev/null)
|
||||
local cache_control=$(uci get dnsforwarder.@config[0].cache_control 2>/dev/null)
|
||||
|
||||
local cache_control=$(uci get dnsforwarder.@config[0].cache_control 2>/dev/null)
|
||||
|
||||
local domain_statistic=$(uci get dnsforwarder.@config[0].domain_statistic 2>/dev/null)
|
||||
local udp_local_addr=$(uci get dnsforwarder.@arguments[0].addr 2>/dev/null)
|
||||
udp_local_addr=${udp_local_addr/:/#}
|
||||
@ -118,7 +122,7 @@ makeconfig () {
|
||||
echo "LogFileThresholdLength ${log_size}" >> $DNSFORWARDER_CONF
|
||||
echo "LogFileFolder /var/log" >> $DNSFORWARDER_CONF
|
||||
fi
|
||||
|
||||
|
||||
[ -n "$udp_local" ] && echo "UDPLocal ${udp_local}" >> $DNSFORWARDER_CONF
|
||||
[ -n "$udp_local_addr" ] && eval "makelist 'server=' $udp_local_addr" > /tmp/dnsmasq.dnsforwarder.conf
|
||||
sed -i "s/ //g" /tmp/dnsmasq.dnsforwarder.conf
|
||||
@ -126,7 +130,7 @@ makeconfig () {
|
||||
eval "makelist 'TCPGroup' $tcp_group" >> $DNSFORWARDER_CONF
|
||||
eval "makelist 'UDPGroup' $udp_group" >> $DNSFORWARDER_CONF
|
||||
eval "makelist 'GroupFile' $group_file" >> $DNSFORWARDER_CONF
|
||||
|
||||
|
||||
if [ $gfw = "true" ]; then
|
||||
echo 'GroupFile /etc/dnsforwarder/gfw.txt' >> $DNSFORWARDER_CONF
|
||||
fi
|
||||
@ -136,14 +140,14 @@ makeconfig () {
|
||||
echo "BlockNegativeResponse ${block_negative_resp}" >> $DNSFORWARDER_CONF
|
||||
eval "makelist 'AppendHosts' $append_host" >> $DNSFORWARDER_CONF
|
||||
echo "BlockIpv6WhenIpv4Exists ${block_ipv6}" >> $DNSFORWARDER_CONF
|
||||
|
||||
|
||||
echo "UseCache ${cache}" >> $DNSFORWARDER_CONF
|
||||
if [ $cache = "true" ]; then
|
||||
echo "CacheSize ${cache_size}" >> $DNSFORWARDER_CONF
|
||||
echo "MemoryCache false" >> $DNSFORWARDER_CONF
|
||||
echo "CacheFile /tmp/dnsforwarder.cache" >> $DNSFORWARDER_CONF
|
||||
echo "IgnoreTTL ${cache_ignore}" >> $DNSFORWARDER_CONF
|
||||
eval "makelist 'CacheControl' $cache_control" >> $DNSFORWARDER_CONF
|
||||
eval "makelist 'CacheControl' $cache_control" >> $DNSFORWARDER_CONF
|
||||
echo "ReloadCache true" >> $DNSFORWARDER_CONF
|
||||
echo "OverwriteCache true" >> $DNSFORWARDER_CONF
|
||||
fi
|
||||
@ -168,7 +172,7 @@ start()
|
||||
if [ $vt_enabled = 0 ]; then
|
||||
echo dnsforwarder is not enabled
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
makeconfig
|
||||
fixturboacc
|
||||
dnsforwarder -f $DNSFORWARDER_CONF -d
|
||||
@ -182,14 +186,14 @@ start()
|
||||
local dnsmasq=$(uci get dnsforwarder.@arguments[0].dnsmasq 2>/dev/null)
|
||||
local addr=$(uci get dnsforwarder.@arguments[0].addr 2>/dev/null)
|
||||
[ -n "${addr}" ] && addr=${addr/:/#}
|
||||
|
||||
|
||||
if [ "${dnsmasq}" = "1" ]; then
|
||||
uci delete dhcp.@dnsmasq[0].server 2>/dev/null
|
||||
# uci add_list dhcp.@dnsmasq[0].server=$addr
|
||||
uci delete dhcp.@dnsmasq[0].resolvfile 2>/dev/null
|
||||
uci set dhcp.@dnsmasq[0].noresolv=1
|
||||
uci set dhcp.@dnsmasq[0].serversfile=/tmp/dnsmasq.dnsforwarder.conf
|
||||
uci commit dhcp
|
||||
uci commit dhcp
|
||||
/etc/init.d/dnsmasq restart
|
||||
fi
|
||||
add_cron
|
||||
@ -205,7 +209,7 @@ stop()
|
||||
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto 2>/dev/null
|
||||
uci delete dhcp.@dnsmasq[0].noresolv 2>/dev/null
|
||||
uci delete dhcp.@dnsmasq[0].serversfile 2>/dev/null
|
||||
uci commit dhcp
|
||||
uci commit dhcp
|
||||
/etc/init.d/dnsmasq restart
|
||||
[ -e ${PID_FILE} ] && {
|
||||
pid=$(cat ${PID_FILE})
|
||||
@ -227,18 +231,18 @@ restart()
|
||||
logger -t There is dnsforwarder pid ${pid}
|
||||
stop
|
||||
} || {
|
||||
logger -t Dnsforwarder is not running
|
||||
logger -t Dnsforwarder is not running
|
||||
}
|
||||
sleep 7
|
||||
local vt_enabled=$(uci get dnsforwarder.@arguments[0].enabled 2>/dev/null)
|
||||
echo dnsforwarder status is ${vt_enabled}
|
||||
echo dnsforwarder status is ${vt_enabled}
|
||||
logger -t Dnsforwarder is initializing enabled is ${vt_enabled}
|
||||
if [ ${vt_enabled} = 1 ]; then
|
||||
[ -n "$pid" ] && {
|
||||
logger -t There is dnsforwarder pid ${pid}
|
||||
stop
|
||||
} || {
|
||||
logger -t Dnsforwarder is not running
|
||||
logger -t Dnsforwarder is not running
|
||||
}
|
||||
|
||||
logger -t Restarting dnsforwarder
|
||||
@ -247,5 +251,3 @@ restart()
|
||||
/etc/init.d/dnsforwarder disable
|
||||
fi
|
||||
}
|
||||
|
||||
EXTRA_COMMANDS="makeconfig makegfwlist health"
|
||||
|
||||
@ -3,8 +3,10 @@
|
||||
START=96
|
||||
STOP=10
|
||||
|
||||
extra_command "add_rule"
|
||||
extra_command "del_rule"
|
||||
extra_command "reload_rule"
|
||||
|
||||
EXTRA_COMMANDS="add_rule del_rule reload_rule"
|
||||
PROG_PATH=/usr/share/adbyby
|
||||
DATA_PATH=$PROG_PATH/data
|
||||
WAN_FILE=/var/etc/dnsmasq-adbyby.d/03-adbyby-ipset.conf
|
||||
@ -20,7 +22,7 @@ uci_get_by_name() {
|
||||
uci_get_by_type() {
|
||||
local index=0
|
||||
if [ -n $4 ]; then
|
||||
|
||||
|
||||
index=$4
|
||||
fi
|
||||
local ret=$(uci get $CONFIG.@$1[$index].$2 2>/dev/null)
|
||||
@ -65,7 +67,7 @@ ip_rule()
|
||||
|
||||
ipset -N adbyby_esc hash:ip
|
||||
$ipt_n -A ADBYBY -m set --match-set adbyby_esc dst -j RETURN
|
||||
|
||||
|
||||
local icount=$(uci show adbyby | grep 'filter_mode' | wc -l)
|
||||
let icount=icount-1
|
||||
for i in $(seq 0 $icount)
|
||||
@ -82,9 +84,9 @@ ip_rule()
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case $wan_mode in
|
||||
0)
|
||||
;;
|
||||
@ -96,7 +98,7 @@ ip_rule()
|
||||
$ipt_n -A ADBYBY -j RETURN
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
echo "create blockip hash:net family inet hashsize 1024 maxelem 65536" > /tmp/blockip.ipset
|
||||
awk '!/^$/&&!/^#/{printf("add blockip %s'" "'\n",$0)}' /usr/share/adbyby/blockip.conf >> /tmp/blockip.ipset
|
||||
ipset -! restore < /tmp/blockip.ipset 2>/dev/null
|
||||
@ -113,7 +115,7 @@ add_dns()
|
||||
awk '!/^$/&&!/^#/{printf("address=/%s/'"0.0.0.0"'\n",$0)}' $PROG_PATH/adblack.conf > /var/etc/dnsmasq-adbyby.d/07-dnsmasq.black
|
||||
|
||||
echo 'conf-dir=/var/etc/dnsmasq-adbyby.d' > /tmp/dnsmasq.d/dnsmasq-adbyby.conf
|
||||
|
||||
|
||||
local var=1
|
||||
if [ $wan_mode -eq 1 ]; then
|
||||
awk '!/^$/&&!/^#/{printf("ipset=/%s/'"adbyby_wan"'\n",$0)}' $PROG_PATH/adhost.conf > $WAN_FILE
|
||||
@ -123,14 +125,14 @@ add_dns()
|
||||
cp /usr/share/adbyby/dnsmasq.ads /var/etc/dnsmasq-adbyby.d/05-dnsmasq.ads
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
mkdir -p /tmp/adbyby/rules/data /tmp/adbyby/rules/host
|
||||
rm -f /tmp/adbyby/rules/data/* /tmp/adbyby/rules/host/*
|
||||
cp -a /usr/share/adbyby/rules/data/* /tmp/adbyby/rules/data 2>/dev/null
|
||||
cp -a /usr/share/adbyby/rules/host/* /tmp/adbyby/rules/host 2>/dev/null
|
||||
echo 'addn-hosts=/tmp/adbyby/rules/host/' >> /tmp/dnsmasq.d/dnsmasq-adbyby.conf
|
||||
echo 'conf-dir=/tmp/adbyby/rules/data' >> /tmp/dnsmasq.d/dnsmasq-adbyby.conf
|
||||
|
||||
|
||||
[ $block_ios -eq 1 ] && echo 'address=/mesu.apple.com/0.0.0.0' >> /tmp/dnsmasq.d/dnsmasq-adbyby.conf
|
||||
if [ $block_douyin -eq 1 ]; then
|
||||
cat <<-EOF >/tmp/etc/dnsmasq-adbyby.d/08-dnsmasq.douyin
|
||||
@ -166,7 +168,7 @@ add_rule()
|
||||
fi
|
||||
$ipt_n -A ADBYBY -p tcp -j REDIRECT --to-ports 8118 2>/dev/null
|
||||
$ipt_n -I PREROUTING -p tcp --dport 80 -j ADBYBY 2>/dev/null
|
||||
|
||||
|
||||
mkdir -p /var/etc
|
||||
echo -e "/etc/init.d/adbyby restart" > "/var/etc/adbyby.include"
|
||||
}
|
||||
@ -199,14 +201,14 @@ start()
|
||||
{
|
||||
config_load adbyby
|
||||
config_foreach get_config adbyby
|
||||
|
||||
|
||||
if [ $enable -ne 0 ]; then
|
||||
add_cron
|
||||
[ ! -d "/tmp/adbyby/data" ] && cp -a /usr/share/adbyby /tmp/ && rm -f /tmp/adbyby.updated
|
||||
add_rules
|
||||
|
||||
|
||||
/tmp/adbyby/adbyby >/dev/null 2>&1 &
|
||||
|
||||
|
||||
add_dns
|
||||
add_rule
|
||||
/etc/init.d/dnsmasq restart
|
||||
|
||||
@ -24,11 +24,11 @@ PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/p4gefau1t/trojan-go
|
||||
GO_PKG_TAG:=-tags full
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
$(GO_PKG)/constant.Version=$(PKG_VERSION) \
|
||||
$(GO_PKG)/constant.Commit=$(PKG_SOURCE_VERSION)
|
||||
GO_PKG_TAG:=-tags full
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
@ -60,8 +60,7 @@ endef
|
||||
|
||||
ifeq ($(CONFIG_TROJAN_GO_COMPRESS_GOPROXY),y)
|
||||
export GO111MODULE=on
|
||||
GOPROXY=https://goproxy.cn
|
||||
#export GOPROXY=https://goproxy.io
|
||||
export GOPROXY=https://goproxy.io
|
||||
#export GOPROXY=https://mirrors.aliyun.com/goproxy/
|
||||
endif
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=dsl_cpe_control_danube
|
||||
PKG_VERSION:=3.24.4.4
|
||||
PKG_RELEASE:=8
|
||||
PKG_RELEASE:=9
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/dsl_cpe_control-$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
||||
|
||||
@ -4,9 +4,8 @@
|
||||
START=97
|
||||
USE_PROCD=1
|
||||
|
||||
EXTRA_COMMANDS="dslstat lucistat"
|
||||
EXTRA_HELP=" dslstat Get DSL status information
|
||||
lucistat Get status information in lua friendly format"
|
||||
extra_command "dslstat" "Get DSL status information"
|
||||
extra_command "lucistat" "Get status information in lua friendly format"
|
||||
|
||||
. /lib/functions/lantiq_dsl.sh
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ltq-vdsl-app
|
||||
PKG_VERSION:=4.17.18.6
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=5
|
||||
PKG_BASE_NAME:=dsl_cpe_control
|
||||
PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||
|
||||
@ -4,9 +4,8 @@
|
||||
START=97
|
||||
USE_PROCD=1
|
||||
|
||||
EXTRA_COMMANDS="dslstat lucistat"
|
||||
EXTRA_HELP=" dslstat Get DSL status information
|
||||
lucistat Get status information in lua friendly format"
|
||||
extra_command "dslstat" "Get DSL status information"
|
||||
extra_command "lucistat" "Get status information in lua friendly format"
|
||||
|
||||
. /lib/functions/lantiq_dsl.sh
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dropbear
|
||||
PKG_VERSION:=2020.80
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:= \
|
||||
|
||||
@ -9,8 +9,8 @@ USE_PROCD=1
|
||||
PROG=/usr/sbin/dropbear
|
||||
NAME=dropbear
|
||||
PIDCOUNT=0
|
||||
EXTRA_COMMANDS="killclients"
|
||||
EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
|
||||
|
||||
extra_command "killclients" "Kill ${NAME} processes except servers and yourself"
|
||||
|
||||
_dropbearkey()
|
||||
{
|
||||
|
||||
@ -12,9 +12,9 @@ PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
|
||||
PKG_SOURCE_DATE:=2020-06-21
|
||||
PKG_SOURCE_VERSION:=5da52992a3926b36e53d0a5d55955a6ccbc35872
|
||||
PKG_MIRROR_HASH:=6e1f06fd1467d078dc8b4c5ee3cf13a695aa7222e98b2193479e862a4bd21049
|
||||
PKG_SOURCE_DATE:=2020-11-01
|
||||
PKG_SOURCE_VERSION:=735c7836bfcc08f3ecd8cdaf1368665b8a241b94
|
||||
PKG_MIRROR_HASH:=887a2c07375dc5127b31edd71c281f48962d8a40e64995401baf648ed4c94b95
|
||||
|
||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@ -11,9 +11,10 @@
|
||||
START=90
|
||||
STOP=15
|
||||
|
||||
extra_command "rules"
|
||||
|
||||
SERVICE_DAEMONIZE=1
|
||||
NAME=brook
|
||||
EXTRA_COMMANDS=rules
|
||||
FWI=$(uci get firewall.brook.path 2>/dev/null)
|
||||
|
||||
uci_get_by_name() {
|
||||
@ -225,4 +226,4 @@ stop() {
|
||||
kill -9 $pid
|
||||
done
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,11 +7,9 @@ START=95
|
||||
USE_PROCD=1
|
||||
#PROCD_DEBUG=1
|
||||
|
||||
EXTRA_COMMANDS="status flush libver"
|
||||
EXTRA_HELP=\
|
||||
" flush Flush DNS cache stored in Pcap_DNSProxy and DNSMasq
|
||||
libver Print library version Pcap_DNSProxy linked to
|
||||
status Show the running status of Pcap_DNSProxy"
|
||||
extra_command "flush" "Flush DNS cache stored in Pcap_DNSProxy and DNSMasq"
|
||||
extra_command "libver" "Print library version Pcap_DNSProxy linked to"
|
||||
extra_command "status" "Show the running status of Pcap_DNSProxy"
|
||||
|
||||
PROG=/usr/sbin/Pcap_DNSProxy
|
||||
CONFDIR=/etc/pcap-dnsproxy
|
||||
|
||||
@ -7,10 +7,7 @@ USE_PROCD=1
|
||||
SCUTCLIENT_PATH=/usr/bin/scutclient
|
||||
SCUTCLIENT_CONFIG=scutclient
|
||||
|
||||
EXTRA_COMMANDS="logoff"
|
||||
EXTRA_HELP=<<EOF
|
||||
logoff Log off manually
|
||||
EOF
|
||||
extra_command "logoff" "Log off manually"
|
||||
|
||||
scutclient_validate_drcom() {
|
||||
uci_validate_section scutclient drcom "${1}" \
|
||||
|
||||
@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=opkg
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
PKG_FLAGS:=essential
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://git.openwrt.org/project/opkg-lede.git
|
||||
PKG_SOURCE_DATE:=2020-10-30
|
||||
PKG_SOURCE_VERSION:=8769c75199b4668878176bde0e5faebf3bc61663
|
||||
PKG_MIRROR_HASH:=601af77e6855e30fd9b82184bf3cdbc9395fe46ad971a65c8ad5e1329e94c545
|
||||
PKG_SOURCE_DATE:=2020-11-02
|
||||
PKG_SOURCE_VERSION:=383748952eb927737de89a5791599a0ca8f96c4d
|
||||
PKG_MIRROR_HASH:=54538b90e66a738d94ab6236173d36621f72a0214ca155201586906b27cf07fe
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zram-swap
|
||||
PKG_RELEASE:=7
|
||||
PKG_RELEASE:=8
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
|
||||
START=15
|
||||
|
||||
EXTRA_COMMANDS="compact status"
|
||||
EXTRA_HELP=" compact trigger compaction for all Z-RAM swap dev's
|
||||
status print out status information & statistics about Z-RAM swap devices"
|
||||
extra_command "compact" "Trigger compaction for all Z-RAM swap dev's"
|
||||
extra_command "status" "Print out information & statistics about Z-RAM swap devices"
|
||||
|
||||
ram_getsize()
|
||||
{
|
||||
|
||||
@ -125,6 +125,23 @@ _patch_glibc() {
|
||||
fi
|
||||
}
|
||||
|
||||
should_be_patched() {
|
||||
local bin="$1"
|
||||
|
||||
[ -x "$bin" ] || return 1
|
||||
|
||||
case "$bin" in
|
||||
*.so|*.so.[0-9]*)
|
||||
return 1
|
||||
;;
|
||||
*)
|
||||
file "$bin" | grep -sqE "ELF.*(executable|interpreter)" && return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
for LDD in ${PATH//://ldd }/ldd; do
|
||||
"$LDD" --version >/dev/null 2>/dev/null && break
|
||||
LDD=""
|
||||
@ -150,7 +167,7 @@ for BIN in "$@"; do
|
||||
|
||||
LDSO=""
|
||||
|
||||
[ -n "$LDD" ] && [ -x "$BIN" ] && file "$BIN" | grep -sqE "ELF.*(executable|interpreter)" && {
|
||||
[ -n "$LDD" ] && should_be_patched "$BIN" && {
|
||||
for token in $("$LDD" "$BIN" 2>/dev/null); do
|
||||
case "$token" in */*.so*)
|
||||
dest="$DIR/lib/${token##*/}"
|
||||
|
||||
@ -20,18 +20,18 @@ try_git() {
|
||||
case "$GET_REV" in
|
||||
r*)
|
||||
GET_REV="$(echo $GET_REV | tr -d 'r')"
|
||||
BASE_REV="$(git rev-list ${REBOOT}..HEAD | wc -l | awk '{print $1}')"
|
||||
BASE_REV="$(git rev-list ${REBOOT}..HEAD 2>/dev/null | wc -l | awk '{print $1}')"
|
||||
REV="$(git rev-parse HEAD~$((BASE_REV - GET_REV)))"
|
||||
;;
|
||||
*)
|
||||
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||
ORIGIN="$(git rev-parse --verify --symbolic-full-name ${BRANCH}@{u} 2>/dev/null)"
|
||||
[ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name master@{u} 2>/dev/null)"
|
||||
REV="$(git rev-list ${REBOOT}..$GET_REV | wc -l | awk '{print $1}')"
|
||||
REV="$(git rev-list ${REBOOT}..$GET_REV 2>/dev/null | wc -l | awk '{print $1}')"
|
||||
|
||||
if [ -n "$ORIGIN" ]; then
|
||||
UPSTREAM_BASE="$(git merge-base $GET_REV $ORIGIN)"
|
||||
UPSTREAM_REV="$(git rev-list ${REBOOT}..$UPSTREAM_BASE | wc -l | awk '{print $1}')"
|
||||
UPSTREAM_REV="$(git rev-list ${REBOOT}..$UPSTREAM_BASE 2>/dev/null | wc -l | awk '{print $1}')"
|
||||
else
|
||||
UPSTREAM_REV=0
|
||||
fi
|
||||
|
||||
@ -80,7 +80,12 @@ KERNEL_FILES := $(patsubst $(TOPDIR)/%,%,$(wildcard $(addprefix $(LINUX_DIR)/,$(
|
||||
all: compile
|
||||
|
||||
$(BIN_DIR)/$(SDK_NAME).tar.xz: clean
|
||||
mkdir -p $(SDK_BUILD_DIR)/dl $(SDK_BUILD_DIR)/package
|
||||
mkdir -p \
|
||||
$(SDK_BUILD_DIR)/dl \
|
||||
$(SDK_BUILD_DIR)/package \
|
||||
$(SDK_BUILD_DIR)/$(STAGING_SUBDIR_TARGET)/include \
|
||||
$(SDK_BUILD_DIR)/$(STAGING_SUBDIR_TARGET)/usr/include
|
||||
|
||||
$(CP) -L $(INCLUDE_DIR) $(SCRIPT_DIR) $(SDK_BUILD_DIR)/
|
||||
$(TAR) -cf - -C $(TOPDIR) \
|
||||
`cd $(TOPDIR); find $(KDIR_BASE)/ -name \*.ko` \
|
||||
|
||||
@ -7,12 +7,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gdb
|
||||
PKG_VERSION:=8.3.1
|
||||
PKG_VERSION:=10.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNU/gdb
|
||||
PKG_HASH:=1e55b4d7cdca7b34be12f4ceae651623aa73b2fd640152313f9f66a7149757c4
|
||||
PKG_HASH:=f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0
|
||||
GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR)
|
||||
@ -36,6 +36,8 @@ HOST_CONFIGURE_ARGS = \
|
||||
--enable-threads \
|
||||
--with-expat \
|
||||
--without-python \
|
||||
--disable-unit-tests \
|
||||
--disable-ubsan \
|
||||
--disable-binutils \
|
||||
--disable-ld \
|
||||
--disable-gas \
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
--- a/sim/common/sim-arange.c
|
||||
+++ b/sim/common/sim-arange.c
|
||||
@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a
|
||||
build_search_tree (ar);
|
||||
}
|
||||
|
||||
-#endif /* DEFINE_NON_INLINE_P */
|
||||
-
|
||||
-#if DEFINE_INLINE_P
|
||||
-
|
||||
-SIM_ARANGE_INLINE int
|
||||
+int
|
||||
sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr)
|
||||
{
|
||||
ADDR_RANGE_TREE *t = ar->range_tree;
|
||||
@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#endif /* DEFINE_INLINE_P */
|
||||
+#endif /* DEFINE_NON_INLINE_P */
|
||||
--- a/sim/common/sim-arange.h
|
||||
+++ b/sim/common/sim-arange.h
|
||||
@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_
|
||||
|
||||
/* Return non-zero if ADDR is in range AR, traversing the entire tree.
|
||||
If no range is specified, that is defined to mean "everything". */
|
||||
-SIM_ARANGE_INLINE int
|
||||
+extern int
|
||||
sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/);
|
||||
#define ADDR_RANGE_HIT_P(ar, addr) \
|
||||
((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr)))
|
||||
@ -1,21 +0,0 @@
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -870,8 +870,7 @@ MAKEINFOFLAGS
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
-ac_subdirs_all='testsuite
|
||||
-gdbtk
|
||||
+ac_subdirs_all='gdbtk
|
||||
multi-ice
|
||||
gdbserver'
|
||||
|
||||
@@ -5610,7 +5610,7 @@ $as_echo "$with_auto_load_safe_path" >&6
|
||||
|
||||
|
||||
|
||||
-subdirs="$subdirs testsuite"
|
||||
+subdirs="$subdirs"
|
||||
|
||||
|
||||
# Check whether to support alternative target configurations
|
||||
@ -1,11 +0,0 @@
|
||||
--- a/gdb/gdbserver/configure
|
||||
+++ b/gdb/gdbserver/configure
|
||||
@@ -2468,7 +2468,7 @@ $as_echo "$as_me: error: \`$ac_var' was
|
||||
ac_cache_corrupted=: ;;
|
||||
,);;
|
||||
*)
|
||||
- if test "x$ac_old_val" != "x$ac_new_val"; then
|
||||
+ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then
|
||||
# differences in whitespace do not lead to failure.
|
||||
ac_old_val_w=`echo x $ac_old_val`
|
||||
ac_new_val_w=`echo x $ac_new_val`
|
||||
@ -1,24 +0,0 @@
|
||||
--- a/sim/common/sim-arange.c
|
||||
+++ b/sim/common/sim-arange.c
|
||||
@@ -277,9 +277,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a
|
||||
build_search_tree (ar);
|
||||
}
|
||||
|
||||
-#else /* SIM_ARANGE_C_INCLUDED */
|
||||
-
|
||||
-SIM_ARANGE_INLINE int
|
||||
+int
|
||||
sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr)
|
||||
{
|
||||
ADDR_RANGE_TREE *t = ar->range_tree;
|
||||
--- a/sim/common/sim-arange.h
|
||||
+++ b/sim/common/sim-arange.h
|
||||
@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_
|
||||
|
||||
/* Return non-zero if ADDR is in range AR, traversing the entire tree.
|
||||
If no range is specified, that is defined to mean "everything". */
|
||||
-SIM_ARANGE_INLINE int
|
||||
+extern int
|
||||
sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/);
|
||||
#define ADDR_RANGE_HIT_P(ar, addr) \
|
||||
((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr)))
|
||||
@ -1,21 +0,0 @@
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -918,8 +918,7 @@ MAKEINFOFLAGS
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
-ac_subdirs_all='testsuite
|
||||
-gdbtk
|
||||
+ac_subdirs_all='gdbtk
|
||||
gdbserver'
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@@ -6628,7 +6627,7 @@ $as_echo "$with_auto_load_safe_path" >&6
|
||||
|
||||
|
||||
|
||||
-subdirs="$subdirs testsuite"
|
||||
+subdirs="$subdirs"
|
||||
|
||||
|
||||
# Check whether to support alternative target configurations
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/gdb/gdbserver/configure
|
||||
+++ b/gdb/gdbserver/configure
|
||||
@@ -2511,7 +2511,7 @@ $as_echo "$as_me: error: \`$ac_var' was
|
||||
--- a/gdbserver/configure
|
||||
+++ b/gdbserver/configure
|
||||
@@ -2661,7 +2661,7 @@ $as_echo "$as_me: error: \`$ac_var' was
|
||||
ac_cache_corrupted=: ;;
|
||||
,);;
|
||||
*)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user