请教下华硕 ac86u 原版梅林设定 Hosts 和配置屏蔽规则的方法

208 天前
 Kenshiro
华硕自带的网站屏蔽麻烦且时而抽风,求一个插件或者能永久直接修改 Hosts 文件的方法,懂得 V 友们请进。
479 次点击
所在节点    路由器
4 条回复
drdre
208 天前
不会谷歌搜索一下吗?原版要 ssh 修改
Kenshiro
207 天前
@drdre 都是非永久修改,每次重启得手动丢
Brainos
205 天前
参考 https://github.com/RMerl/asuswrt-merlin.ng/wiki/Custom-config-files#postconf-scriptshttps://github.com/RMerl/asuswrt-merlin.ng/wiki/Custom-domains-with-dnsmasq

我建议使用一种更安全的方法,创建`/jffs/scripts/dnsmasq.postconf`文件并`chmod 755 /jffs/scripts/dnsmasq.postconf`,内容为:
```shell
#!/bin/sh
source /usr/sbin/helper.sh

sed -i '1,$d' /tmp/resolv.dnsmasq
pc_append 'addn-hosts=/jffs/configs/dnsmasq.d/hostfilenameyouwant' "/etc/dnsmasq.conf"
```

最后把你想要的 hosts 解析写进`/jffs/configs/dnsmasq.d/hostfilenameyouwant`里
Kenshiro
170 天前
@Brainos 不行,host 还是老样子,求解

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/983103

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX