V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Kenshiro
V2EX  ›  路由器

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

  •  
  •   Kenshiro · 193 天前 · 455 次点击
    这是一个创建于 193 天前的主题,其中的信息可能已经有所发展或是发生改变。
    华硕自带的网站屏蔽麻烦且时而抽风,求一个插件或者能永久直接修改 Hosts 文件的方法,懂得 V 友们请进。
    4 条回复    2023-11-25 11:19:00 +08:00
    drdre
        1
    drdre  
       193 天前
    不会谷歌搜索一下吗?原版要 ssh 修改
    Kenshiro
        2
    Kenshiro  
    OP
       192 天前 via iPhone
    @drdre 都是非永久修改,每次重启得手动丢
    Brainos
        3
    Brainos  
       190 天前   ❤️ 1
    参考 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
        4
    Kenshiro  
    OP
       155 天前
    @Brainos 不行,host 还是老样子,求解
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4052 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 10:16 · PVG 18:16 · LAX 03:16 · JFK 06:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.