在unix(MAC OS X)上阻止某些URL?

时间:2021-05-09 22:11:20

Is it technically possible to block certain websites from being accessed on Mac OS via separate from browser program? Kind of hosts file in Windows? I need to make a project and I would like to do that. I imagine it can be done if I make some sort of proxy and set my browser to it, but is there any more user friendly way? Like editing some file to redirect certain URLs to 127.0.0.1

技术上是否可以通过单独的浏览器程序阻止某些网站在Mac OS*问? Windows中的主机文件类型?我需要做一个项目,我想这样做。我想如果我制作某种代理并将我的浏览器设置为它可以完成,但是还有用户友好的方式吗?就像编辑某些文件以将某些URL重定向到127.0.0.1一样

1 个解决方案

#1


3  

The hosts file exists on the Mac as well, and can be used to block access to certain URLs in the same way as in other systems. You can find it in /etc/hosts.

主机文件也存在于Mac上,可用于以与在其他系统中相同的方式阻止对某些URL的访问。您可以在/ etc / hosts中找到它。

#1


3  

The hosts file exists on the Mac as well, and can be used to block access to certain URLs in the same way as in other systems. You can find it in /etc/hosts.

主机文件也存在于Mac上,可用于以与在其他系统中相同的方式阻止对某些URL的访问。您可以在/ etc / hosts中找到它。