duangsuse-valid-projects / neohosts

自由·负责·克制 去广告 Hosts 项目(Build with a tool written in Ruby)
https://hosts.nfz.moe
Other
23 stars 3 forks source link
ad ad-block adblock banad dnsmasq hosts hostsgen neko-dev neohosts surge
logo

neoHosts

自由、负责、克制 的去广告 Hosts

Author Build Status Powered-with License

Introduction 介绍

打着去广告 Hosts 的名义吸引用户使用,然而不断屏蔽与广告无关的地址,这样做和 GFW 又有什么区别?

Download 下载

Basic Hosts

基础、克制的数据,推荐所有用户使用。

Full Hosts

包含全部数据,仅推荐强迫症使用。相比 Basic Hosts,Full Hosts 额外屏蔽了以下内容:

Docs 文档

neoHosts Wiki

neoHosts Wiki 使用 docsify.js 构建

Maintainer

neoHosts © Neko Dev Team & neoHosts Team, Released under the Hosts License License.
Authored and maintained by neoFelhz with Neko Dev Team , neoHosts Team and the help from other contributors (list).

Friends 友情链接

License 许可证

本项目的 hosts,README,wiki 等资源基于 Google Hosts 推出的 hosts License 协议发布,并增加了 SATA 协议,这意味着你可以拷贝、再发行本项目的内容, 但是你将必须:

本项目分发的所有 Hosts 和数据源,除另有说明外,均基于上述介绍的协议发布,具体请看分支下的 LICENSE

此处的文字仅用于说明,条款以 LICENSE 文件中的内容为准。

NeoHosts -- GenHosts fork Resources

Generate dnsmasq.conf, surge.conf, hosts.rsc HOW-TO

  1. Prepare file head
    • dnsmasq.conf
      
      # Copyright (c) 2014-2017, {NAME}.
      # https://github.com/{REPO}
      # Last updated: ...

{LICENSE}

Modified Hosts Start

Localhost (DO NOT REMOVE) Start

address=/localhost/127.0.0.1 address=/localhost/::1 address=/ip6-localhost/::1 address=/ip6-loopback/::1

Localhost (DO NOT REMOVE) End


+ surge.conf

[Host]

Copyright (c) 2014-2017, {NAME}.

https://github.com/{REPO}

Last updated: ...

{LICENSE}

Modified Hosts Start

Localhost (DO NOT REMOVE) Start

localhost = 127.0.0.1 localhost = ::1 ip6-localhost = ::1 ip6-loopback = ::1

Localhost (DO NOT REMOVE) End


+ rsc

/ip dns static

Copyright (c) 2014-2017, {NAME}.

https://github.com/{REPO}

Last updated: ...

{LICENSE}

Modified Hosts Start

Localhost (DO NOT REMOVE) Start

add address=127.0.0.1 name=localhost add address=::1 name=localhost add address=::1 name=ip6-localhost add address=::1 name=ip6-loopback

Localhost (DO NOT REMOVE) End


>Select one, Write to a file.

2. set Environment vars

`export HOSTSGEN_HEAD="{your_head_file(full path)}"`

__dnsmasq.conf:__

`export HOSTSGEN_EVAL="'address=/' + @host + '/' + @loc"`

__surge.conf:__

`export HOSTSGEN_EVAL="@host + ' = ' + @loc"`

__hosts.rsc:__

`export HOSTSGEN_EVAL="'add address=' + @loc + ' name=' + @host"`

3. generate all files (ignore lint errors)

`cd _build&&./build.sh`

__Find build artifacts in \_build/data_temp__