Skip to content

📝 Simple&powerful hosts file generator for your hosts projects

License

Notifications You must be signed in to change notification settings

duangsuse-valid-projects/hostsgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hostsgen Hosts项目管理工具 version LoC resloving

📝 Simple&powerful hosts file generator for hosts projects

❓ What can this tool do? 它能做什么?

hostsgen is designed to make hosts projects modular🗄 and writting-friendly✍️

⭐️ Start using hostsgen 开始使用

Create hostsgen.yml 创建项目配置文件

hostsgen.yml is project config file for hostsgen. Hostsgen uses this file to know what your project is

available fields:

  • name (String, your project name)

  • desc (String, description)

  • authors (String|[String], project authors)

  • out (String, output file path)

  • mods ([String], your project root modules)

for example:

name: project name
desc: example hostgen project config
authors: duangsuse
out: example_hosts

mods:
  - foo-mod desc #splited using ' '
  - ads-baidu AD Block for Baidu
  - google google hosts

Configure your module 配置模块

Create module dirs in project root. There must be a "mod.txt" in module dir, which contains module settings. For configure above, module dir foo-mod, ads-baidu and google should be created. mod.txt syntax:

#{filename} {rule}
foo.txt: (I am description) 12.13.{IP} {HOST}.xm.com
main.txt: (ad block for baidu ads) 0.0.0.0 {HOST}

Each hosts entry will be processed using rule If only {IP} or {HOST} persent, whole line will be placed in the field.

License 许可证

Copyright 2017 duangsuse

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.