Maza, like Pi-hole but local and using your macOS or Linux

栏目: IT技术 · 发布时间: 5年前

内容简介:Simple, native and efficient local advertising blocker. Compatible with OSX and Linux.

Maza ad blocking - Like Pi-hole but local and using your operating system

Maza, like Pi-hole but local and using your macOS or Linux

Simple, native and efficient local advertising blocker. Compatible with OSX and Linux.

Maza, like Pi-hole but local and using your macOS or Linux

  • You don't have to install any browser extensions or applications, you just use the tools of your operating system.
  • You update the list of DNS to be blocked with a single stroke.
  • Opensource.
  • Just bash.

:runner:‍Run

:satellite: Update database

maza update

:hammer: Start

sudo maza start

Stop

sudo maza stop

⚖️ Status

maza status

⚙️ Install

:eyes: Requirements

  • bash 4.0 or higher
  • curl
  • Only OSX users, gsed : brew install gnu-sed

Then you do this.

curl -o maza https://raw.githubusercontent.com/tanrax/maza-ad-blocking/master/maza && chmod +x maza && sudo mv maza /usr/local/bin

:hocho: Uninstall

sudo rm /usr/local/bin/maza && sudo rm -r ~/.maza

DNSMASQ

Unfortunately the hosts file does not support sub-domains (wildcards), which is necessary to correctly filter all DNS. You will need to install locally a server for that purpose, Maza supports the Dnsmasq format. Here's an example for OSX.

1 Install

brew install dnsmasq

2 Configure

Edit the file.

/usr/local/etc/dnsmasq.conf

Add the following lines.

conf-file=(your user path)/.maza/dnsmasq.conf

Start DNSMASQ.

sudo brew services stop dnsmasq
sudo brew services start dnsmasq

3 Tell your OS to use your DNS server

Delete the list of OSX DNS servers and add the 3 addresses. The first one will be your local server, and the other 2 belong to OpenDNS, which you can use any other.

127.0.0.1
208.67.222.222
208.67.220.220

Refresh your DNS cache

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Bonus: dnsmasq is in charge of solving all DNS

Add in confiigure file: /usr/local/etc/dnsmasq.conf

no-resolv
server=208.67.222.222
server=208.67.220.220

Bonus: dnsmasq have test domains

If you want all your .localhost domains, for example, point to localhost add in confiigure file: /usr/local/etc/dnsmasq.conf

address=/.localhost/127.0.0.1

:warning: CAUTION

/etc/hosts

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

白帽子讲浏览器安全

白帽子讲浏览器安全

钱文祥 / 电子工业出版社 / 2016-3 / 79.00元

浏览器是重要的互联网入口,一旦受到漏洞攻击,将直接影响到用户的信息安全。作为攻击者有哪些攻击思路,作为用户有哪些应对手段?在《白帽子讲浏览器安全》中我们将给出解答,带你了解浏览器安全的方方面面。《白帽子讲浏览器安全》兼顾攻击者、研究者和使用者三个场景,对大部分攻击都提供了分析思路和防御方案。《白帽子讲浏览器安全》从攻击者常用技巧的“表象”深入介绍浏览器的具体实现方式,让你在知其然的情况下也知其所以......一起来看看 《白帽子讲浏览器安全》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具