Code Monkey home page Code Monkey logo

gfwlist2routeos's Introduction

gfwlist2routeos

把伟大的GFWLIST转化写进RouterOS

这个项目的产生场景如下:

  • 你有一个文本文件,里面一行是一个被墙了的域名
  • 然后打开vpn,开始运行这个脚本
  • 解析这些域名为ip
  • 将这些ip放到/ip/route/rule下面,操作为使用名为gfwlist的路由表
  • 如果你不想维护一个被墙了的域名的列表,你也可以使用著名的gfwlist做为输入。

所以项目仍然存在一些问题

  • gfwlist 中包含一些通配符规则,如 *.google.com.* 之类的,该项目无法识别

安装方法

  • 你的routeOS版本至少是3.0
  • 安装nodejs运行环境
  • sudo npm install gfwlist2routeros -g 如果是windows的话则为 npm install gfwlist2routeros -g
  • 在routeros里确保/ip/service/api为enable的状态
  • 在已翻墙的环境下运行该脚本,否则解析被墙域名时会被dns污染

使用方法

  • gfwlist2routeros --host ROUTEROS的IP --username 用户名 --password 密码 (使用下载的gfwlist作为输入)
  • gfwlist2routeros --host ROUTEROS的IP --username 用户名 --password 密码 --file 指定文件路径 (使用指定文件作为输入)

所以我也推荐你另外一个项目,供你衡量一下哪一个更适合你的需求

Freedom-routes

该项目从APNIC数据库中下载按国别标示的IP地址分配数据,然后提取所有**的IP段,写入路由(也支持routerOS),换言之,即,对所有的外国网站都使用vpn,好处是,绝对不会漏过一个被墙的,坏处是,对于许多没有被墙的外国网站,也使用vpn流量

安装和使用方法见 https://github.com/GutenYe/freedom-routes

gfwlist2routeos's People

Contributors

layerssss avatar

Watchers

wyx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.