rufengsuixing / luci-app-adguardhome Goto Github PK
View Code? Open in Web Editor NEWmaybe the best AdGuardHome luci for openwrt
maybe the best AdGuardHome luci for openwrt
在你提交问题之前请回答以下问题
你可以删掉提交之前这个部分
不仅仅是对应页,而是整个web后台都无法打开,页面提示:
/usr/lib/lua/luci/dispatcher.lua:431: Invalid controller file found
The file '/usr/lib/lua/luci/controller/adguardhome.lua' contains an invalid module line.
Please verify whether the module name is set to 'luci.controller.adguardhome' - It must correspond to the file path!
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:431: in function 'createindex'
/usr/lib/lua/luci/dispatcher.lua:452: in function 'createtree'
/usr/lib/lua/luci/dispatcher.lua:188: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:95: in function </usr/lib/lua/luci/dispatcher.lua:94>
这个问题回退安装1.7-27版本即恢复正常。
安装时提示:
#opkg install luci-app-adguardhome_1.7-28_all.ipk
Upgrading luci-app-adguardhome on root from 1.7-27 to 1.7-28...
AdGuardHome turn off
enabled=0
Configuring luci-app-adguardhome.
uci: Entry not found
uci: Entry not found
uci: Entry not found
Collected errors:
一直用的重定向53端口到AdGuardHome,使用正常,
改为使用53端口替换dnsmasq后所有网站都打不开解析失败了,不知道这个功能是否还需要额外修改openwrt其他配置
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/x/Packages.gz
*** Failed to download the package list from http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/x/Packages.gz
xz download fail
/usr/share/AdGuardHome/update_core.sh: line 129: xz: not found
Failed to download upx.
AdGuard Home luci的版本:1.8-5
操作系统和版本:openwrt R9.12.03 x86架构
希望的执行结果
希望第一次启用程序后自动下载AdGuard Home主程序
实际的执行结果
第一次启动然后一直提示A task is already running. 就没有任何反应 必须要重启openwrt才会自动下载AdGuard Home主程序
日志
/tmp/AdGuardHome_update.log的日志只有A task is already running.
INIT_TRACE=1 /etc/init.d/AdGuardhome reload 2>/tmp/debug 后的/tmp/debug文件的日志只有-ash: /etc/init.d/AdGuardhome: not found
截图
查看日志的时候不太方便,可以有两个解决思路。
- 倒序展示日志,这样最新的日志在最上方,不需要拖到最下面去看新日志,问题是OP可能没有翻遍的倒序查看实现。
- 在luci的log处增加一个清除日志的按钮,方便查看最新日志信息,例如openclash 日志页
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
在root/etc/init.d/AdGuardHome中找到
if [ ! -L $workdir/data/stats.db ]; then
mv -f $workdir/data/stats.db /tmp/stats.db
ln -s /tmp/stats.db $workdir/data/stats.db
fi
这样把stats.db目录改到/tmp下,会导致每次重启路由AdGuardHome的统计数据就会被重置,这个数据的保存时间在后台就可以设定,不需要这样强制改为每次重启后重置,建议删除这几行代码.
/usr/lib/lua/luci/dispatcher.lua:381: Failed to execute firstchild dispatcher target for entry '/admin/services/AdGuardHome'.
The called action terminated with an exception:
/usr/lib/lua/luci/dispatcher.lua:381: Failed to execute cbi dispatcher target for entry '/admin/services/AdGuardHome/general'.
The called action terminated with an exception:
/usr/lib/lua/luci/model/cbi/AdGuardHome/base.lua:35: attempt to concatenate local 'httpport' (a nil value)
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:381: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:95: in function </usr/lib/lua/luci/dispatcher.lua:94>
在你提交问题之前请回答以下问题
你可以删掉提交之前这个部分
在你提交问题之前请回答以下问题
你可以删掉提交之前这个部分
如果没搞错的话,以下这几个应该用==
请问大佬,这个OPENWRT的adguard home 是否可以屏蔽一些国内视频网站的广告呢?
和PC版的功能上有多大区别知道吗?
4.19.88
检查更新一直失败
Local version: ., cloud version: v0.99.3.
Updating core...
start download v0.99.3/AdGuardHome_linux_amd64.tar.gz
--2019-12-15 21:11:18-- https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.99.3/AdGuardHome_linux_amd64.tar.gz
Resolving github.com... 13.250.177.223
Connecting to github.com|13.250.177.223|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/62712899/e89f6880-0ade-11ea-9de1-7c5d37f46686?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20191215%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20191215T131120Z&X-Amz-Expires=300&X-Amz-Signature=674548e55d35b5533552565b21bc2186311b216ca30be065a4ab48345aa6b2cc&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DAdGuardHome_linux_amd64.tar.gz&response-content-type=application%2Foctet-stream [following]
--2019-12-15 21:11:22-- https://github-production-release-asset-2e65be.s3.amazonaws.com/62712899/e89f6880-0ade-11ea-9de1-7c5d37f46686?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20191215%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20191215T131120Z&X-Amz-Expires=300&X-Amz-Signature=674548e55d35b5533552565b21bc2186311b216ca30be065a4ab48345aa6b2cc&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DAdGuardHome_linux_amd64.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com... 52.216.16.40
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com|52.216.16.40|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6383323 (6.1M) [application/octet-stream]
Saving to: '/tmp/AdGuardHomeupdate/AdGuardHome_linux_amd64.tar.gz'
0K 0% 0.00 =0s
2019-12-15 21:11:45 (0.00 B/s) - Read error at byte 0/6383323 (No error information). Retrying.
--2019-12-15 21:11:46-- (try: 2) https://github-production-release-asset-2e65be.s3.amazonaws.com/62712899/e89f6880-0ade-11ea-9de1-7c5d37f46686?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20191215%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20191215T131120Z&X-Amz-Expires=300&X-Amz-Signature=674548e55d35b5533552565b21bc2186311b216ca30be065a4ab48345aa6b2cc&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DAdGuardHome_linux_amd64.tar.gz&response-content-type=application%2Foctet-stream
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com|52.216.16.40|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6383323 (6.1M) [application/octet-stream]
Saving to: '/tmp/AdGuardHomeupdate/AdGuardHome_linux_amd64.tar.gz'
0K .......... ...... 0% 3.17K=5.2s
2019-12-15 21:12:15 (3.17 KB/s) - Read error at byte 16959/6383323 (No error information). Giving up.
download failed
tar: unexpected end of file
tar: short read
download success start copy
start copy
awk: /etc/AdGuardHome.yaml: No such file or directory
AdGuardHome turn off
enabled=0
Command failed: Not found
rm: can't remove '/usr/bin/AdGuardHome/AdGuardHome': No such file or directory
mv: can't rename '/tmp/AdGuardHomeupdate/AdGuardHome/AdGuardHome': No such file or directory
mv failed maybe not enough space please use upx or change bin to /tmp/AdGuardHome
uci: Entry not found
A task is already running.
“启用广告屏蔽”可能会与ADG中的“禁用保护”“启用保护”功能混淆,
建议像大部分luci应用一样只留一个简单的启用
勾选框即可。
因为用的U盘做系统盘且工作目录包含查询记录、数据库等频繁写入的文件,为了避免U盘老化,故把工作目录设定到了/var,也就是tmpfs内存里。这样重启会丢失所有数据,理论上ADG发现规则文件不存在即会自动下载,但是路由重启之后需要一点时间接通网络(特别是家用PPPoE),ADG本身只尝试一次,网络错误之后就不再次尝试,因此导致出现过滤真空期,只有到下次自动更新时才能正常运作。
作为luci-app似乎不能控制这一动作,只能加一个延时或者侦测到日志输出规则文件不存在且网络错误时自动重启。
在你提交问题之前请回答以下问题
你可以删掉提交之前这个部分
AdGuardHome luci app fails to detect bin file downloaded manually. Automated download of bin file fails.
root@xxxxxx:/usr/bin/AdGuardHome# ll
drwxr-xr-x 3 root root 296 Dec 16 04:15 ./
drwxr-xr-x 1 root root 432 Dec 16 04:25 ../
-rwxrwxrwx 1 root root 0 Dec 16 04:09 AdGuardHome*
drwxr-xr-x 2 root root 160 Dec 16 04:15 data/
root@xxxxxx:~# wget https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.99.3/AdGuardHome_linux_arm.tar.gz
https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.99.3/AdGuardHome_linux_arm.tar.gz: HTTPS support not compiled in.
root@xxxxxx:~# opkg list-installed | grep open
libopenssl - 1.0.2t-1
libustream-openssl - 2018-07-30-23a3f283-2
openssl-util - 1.0.2t-1
openwrt-keyring - 2018-05-18-103a32e9-1
b1e37c0 添加的本地化时间在我这显示不出,OpenWrt 19.07rc2
AdGuard Home luci的版本:
1.8-8
操作系统和版本:
OpenWrt / LuCI openwrt-19.07 branch git-19.356.80404-43c74d3
使用的最新原版openwrt 19.07,可以在后台关闭adg,但是关闭后无法再开启,关闭后也不再有任何日志,
在SSH使用命令
uci set AdGuardHome.AdGuardHome.enabled='1'
uci commit AdGuardHome
也无效
但是使用 service AdGuardHome start 可以正常开启.
2019/12/13 14:38:23 [info] Failed to do safebrowsing HTTP lookup, ignoring check: Get https://sb.adtidy.org/safebrowsing-lookup-hash.html?prefixes=FE8D3619/998F8033/DF46DB72/: dial tcp 176.103.133.133:443: connect: connection timed out
2019/12/13 14:35:23 [info] Entering the tcp listener loop on [::]:5553
2019/12/13 14:35:23 [info] Entering the UDP listener loop on [::]:5553
比北京时间慢了8小时。。。
是否支持3.14内核的潘多拉固件?
每次安装后更新主程序bin
都是英文的 更新失败 请稍后再试
root@OP19:~# cat /etc/crontabs/root |grep tail
0 * * * * tail -n 2000 /data/querylog.json > /data/querylog.json
error curl and wget
/usr/bin/wget-ssl
Configuring wget.
Configuring libpcre.
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/packages/libpcre_8.43-1_x86_64.ipk
Installing libpcre (8.43-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/packages/wget_1.20.3-2_x86_64.ipk
Installing wget (1.20.3-2) to root...
No packages removed.
Signature check passed.
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/telephony/Packages.sig
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/telephony/Packages.gz
Signature check passed.
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/routing/Packages.sig
Updated list of available packages in /var/opkg-lists/openwrt_routing
http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/routing/Packages.gzDownloading
Signature check passed.
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/packages/Packages.sig
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/packages/Packages.gz
Signature check passed.
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/luci/Packages.sig
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/luci/Packages.gz
Signature check passed.
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/base/Packages.sig
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/base/Packages.gz
Signature check passed.
Downloading http://downloads.openwrt.org/releases/19.07.0/targets/x86/64/packages/Packages.sig
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading http://downloads.openwrt.org/releases/19.07.0/targets/x86/64/packages/Packages.gz
优先稳定性提升
1.替换dnsmasq加入对于ipv6客户端ip变动的追踪加入(虽然这不应该由luci完成)可能的方法如下
2.日志相关功能
3.手动配置相关
4.计划任务
建议增加自动更新主程序选项,
可参考
https://github.com/maxlicheng/luci-app-unblockmusic/blob/1bb55ac62762f3f2603f1f84d2d32501c18244d3/app/root/etc/init.d/unblockmusic
add_cron()
{
if [ $AUTOUPDATE -eq 1 ]; then
sed -i '/update_core.sh/d' $CRON_FILE
echo '0 5 * * * /usr/share/AdGuardHome/update_core.sh 2>&1' >> $CRON_FILE
crontab $CRON_FILE
fi
}
del_cron()
{
sed -i '/update_core.sh/d' $CRON_FILE
/etc/init.d/cron restart
}
openwrt x64
menual config
Sorry, the server encountered an unexpected error.
/usr/lib/lua/luci/dispatcher.lua:381: Failed to execute cbi dispatcher target for entry '/admin/services/AdGuardHome/manual'. The called action terminated with an exception: /usr/lib/lua/luci/template.lua:55: Failed to execute template 'cbi/map'. A runtime error occured: /usr/lib/lua/luci/template.lua:55: Failed to execute template 'cbi/tsection'. A runtime error occured: /usr/lib/lua/luci/template.lua:55: Failed to execute template 'cbi/ucisection'. A runtime error occured: /usr/lib/lua/luci/template.lua:55: Failed to execute template 'cbi/tvalue'. A runtime error occured: /usr/lib/lua/nixio/fs.lua:25: bad argument #1 to 'open' (string expected, got nil) stack traceback: [C]: in function 'assert' /usr/lib/lua/luci/dispatcher.lua:381: in function 'dispatch' /usr/lib/lua/luci/dispatcher.lua:95: in functionPowered by LuCI Master (git-19.326.48450-5ffbb31) / OpenWrt R9.11.23
在你提交问题之前请回答以下问题
你可以删掉提交之前这个部分
升级后报错,尝试清除数据重装依旧报错,错误信息如下:
/usr/lib/lua/luci/dispatcher.lua:381: Failed to execute firstchild dispatcher target for entry '/admin/services/AdGuardHome'.
The called action terminated with an exception:
/usr/lib/lua/luci/dispatcher.lua:381: Failed to execute cbi dispatcher target for entry '/admin/services/AdGuardHome/general'.
The called action terminated with an exception:
/usr/lib/lua/luci/cbi.lua:38: Model 'AdGuardHome' not found!
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:381: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:95: in function </usr/lib/lua/luci/dispatcher.lua:94>
升级时提示:
#opkg install luci-app-adguardhome_1.7-1_all.ipk
Upgrading luci-app-adguardhome on root from 1.5-1 to 1.7-1...
Terminated
Removing obsolete file /usr/lib/lua/luci/model/cbi/AdGuardHome.lua.
Removing obsolete file /usr/lib/lua/luci/model/cbi/AdGuardHomelog.lua.
Configuring luci-app-adguardhome.
Collected errors:
设备是arm核心pandorabox。
lean源码的固件,在启用端口重定向到53后,再注释掉lean源码自定义防火墙规则“iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53”即可正常工作,但是在下属设备ip租期过后,设备无法获得新的ip或是续租ip。
<希望adguardhome正常运行即可>
<adguardhome能够正常作为本地dns解析服务器,但会使得OpenWrt的dhcp失效>
<eSir的固件中的科学¥上网插件会在保存后清空防火墙再启动,这样使得科学¥上网插件的dns自定义解析生效了,这个情况可作参考。>
OpenWrt R9.12.03 保存并启用还是未运行 ssh里用命令可以运行成功
求个教程。。。
makefile不太会看。。。依赖在哪,会自动去下载安装上?还是要自己去手动下载AdGuardHome??
AdH beta 版本支持(emmm不是很难,但是一旦不稳定这个锅emmm)
Failed to check latest version, please try again later.
dns转发那里只填了adh的端口, adh设置为上游解析,也只填当地的dns. 我看了下日志, 把youtube返回127.1,但是能访问,肯定是ssr-plus里的pdnsd解析了, 敢问他们是怎么合作的,adh有将gfw的转发给pdnsd了?
如题, 请问怎么设置,是否有这个功能.
还有原始的cache time 我看是 cache_time: 30, 是什么单位啊?
1.上次检测到的主程序版本: no config no bin
2.AdGuardHome 执行文件路径 如果没有执行文件将自动下载
我在L大的固件里面看,确实没有/usr/bin/AdGuardHome/AdGuardHome,也没有下载。。。
怎么回事?
4.Sun Dec 8 16:41:14 2019 daemon.err uhttpd[3162]: grep: /etc/AdGuardHome.yaml: No such file or directory
Sun Dec 8 16:41:17 2019 daemon.err uhttpd[3162]: uci: Entry not found
Sun Dec 8 16:41:27 2019 daemon.err uhttpd[3162]: --2019-12-08 16:41:27-- https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.99.3/AdGuardHome_linux_amd64.tar.gz
Sun Dec 8 16:41:32 2019 daemon.err uhttpd[3162]: Resolving github.com... failed: Try again.
Sun Dec 8 16:41:32 2019 daemon.err uhttpd[3162]: wget-ssl: unable to resolve host address 'github.com'
Sun Dec 8 16:41:32 2019 daemon.err uhttpd[3162]: tar: invalid magic
Sun Dec 8 16:41:32 2019 daemon.err uhttpd[3162]: tar: short read
Sun Dec 8 16:42:17 2019 daemon.err uhttpd[3162]: grep: /etc/AdGuardHome.yaml: No such file or directory
Sun Dec 8 16:42:17 2019 daemon.err uhttpd[3162]: awk: /etc/AdGuardHome.yaml: No such file or directory
Sun Dec 8 16:42:17 2019 daemon.err uhttpd[3162]: uci: Entry not found
Sun Dec 8 16:42:25 2019 daemon.err uhttpd[3162]: /usr/lib/lua/luci/dispatcher.lua:381: Failed to execute call dispatcher target for entry '/admin/services/AdGuardHome/getlog'.
Sun Dec 8 16:42:25 2019 daemon.err uhttpd[3162]: The called action terminated with an exception:
Sun Dec 8 16:42:25 2019 daemon.err uhttpd[3162]: /usr/lib/lua/luci/controller/AdGuardHome.lua:51: attempt to index global 'f' (a nil value)
Sun Dec 8 16:42:25 2019 daemon.err uhttpd[3162]: stack traceback:
Sun Dec 8 16:42:25 2019 daemon.err uhttpd[3162]: [C]: in function 'assert'
Sun Dec 8 16:42:25 2019 daemon.err uhttpd[3162]: /usr/lib/lua/luci/dispatcher.lua:381: in function 'dispatch'
Sun Dec 8 16:42:25 2019 daemon.err uhttpd[3162]: /usr/lib/lua/luci/dispatcher.lua:95: in function </usr/lib/lua/luci/dispatcher.lua:94>
Sun Dec 8 16:42:28 2019 daemon.err uhttpd[3162]: /usr/lib/lua/luci/dispatcher.lua:381: Failed to execute call dispatcher target for entry '/admin/services/AdGuardHome/getlog'.
Sun Dec 8 16:42:28 2019 daemon.err uhttpd[3162]: The called action terminated with an exception:
Sun Dec 8 16:42:28 2019 daemon.err uhttpd[3162]: /usr/lib/lua/luci/controller/AdGuardHome.lua:51: attempt to index global 'f' (a nil value)
在你提交问题之前请回答以下问题
你可以删掉提交之前这个部分
关机前备份工作目录正常,但是备份文件在开机后没有正确恢复到工作目录。
看了一下应该是恢复的时候少了一层/data
目录
root@OP19:~# tree /usr/lib/AdGuardHomeData/
/usr/lib/AdGuardHomeData/
└── data
├── filters
│ ├── 1.txt
│ ├── 1575632085.txt
│ ├── 2.txt
│ ├── 3.txt
│ └── 4.txt
├── querylog.json
├── sessions.db
└── stats.db
2 directories, 8 files
root@OP19:~# tree /tmp/AdGuardHome
/tmp/AdGuardHome
├── data
│ ├── filters
│ │ ├── 1.txt
│ │ ├── 1575632085.txt
│ │ ├── 2.txt
│ │ ├── 3.txt
│ │ └── 4.txt
│ ├── sessions.db
│ └── stats.db
├── filters
│ ├── 1.txt
│ ├── 1575632085.txt
│ ├── 2.txt
│ ├── 3.txt
│ └── 4.txt
├── querylog.json
├── sessions.db
└── stats.db
3 directories, 15 files
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.