小编Bry*_*ock的帖子

为什么在我通过 launchd 添加阻止的站点后 /etc/hosts 没有阻止域?

我一直在尝试设置 Launchd 以在周一至周五上午 9 点至下午 3 点之间阻止 osX 10.12.2 上的多个网站

我设置launchdcp /etc/hosts_BLOCKED_sites.txt /etc/hosts

Launchd 似乎正在正确复制文件。

$ ls -la /etc/hosts   

    -rw-r--r--  1 root  wheel  715 Jan 10 15:01 /etc/hosts
Run Code Online (Sandbox Code Playgroud)

 

$ sudo cat /etc/hosts

    ##  
    # Host Database  
    #  
    # localhost is used to configure the loopback interface  
    # when the system is booting.  Do not change this entry.  
    ##   
    127.0.0.1   localhost   
    255.255.255.255 broadcasthost  
    ::1             localhost   


    # Blocked sites redirected to 0.0.0.0  
    0.0.0.0 reddit.com   
    0.0.0.0 www.reddit.com  
    0.0.0.0 facebook.com  
    0.0.0.0 …
Run Code Online (Sandbox Code Playgroud)

ipv6 blocking hosts-file macos

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

blocking ×1

hosts-file ×1

ipv6 ×1

macos ×1