GithubHelp home page GithubHelp logo

liangzuobin / meow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cyfdecyf/cow

0.0 1.0 0.0 68.2 MB

MEOW is a fork of COW that uses whitelist mode.

Home Page: http://renzhn.github.io/MEOW/

License: BSD 2-Clause "Simplified" License

Go 94.13% Shell 4.15% JavaScript 1.47% Dockerfile 0.24%

meow's Introduction

MEOW Proxy

当前版本:1.5 CHANGELOG Build Status

       /\
   )  ( ')     MEOW 是 [COW](https://github.com/cyfdecyf/cow) 的一个派生版本
  (  /  )      MEOW 与 COW 最大的不同之处在于,COW 采用黑名单模式, 而 MEOW 采用白名单模式
   \(__)|      国内网站直接连接,其他的网站使用代理连接

与原版MEOW的差别

  • 本代码仓库删除了编译好的二进制文件,大大减少了git clone时的传输大小
  • IPv6一律走直连(对于教育网用户很有用)

MEOW 可以用来

  • 作为全局 HTTP 代理(支持 PAC),可以智能分流(直连国内网站、使用代理连接其他网站)
  • 将 SOCKS5 等代理转换为 HTTP 代理,HTTP 代理能最大程度兼容各种软件(可以设置为程序代理)和设备(设置为系统全局代理)
  • 架设在内网(或者公网),为其他设备提供智能分流代理
  • 编译成一个无需任何依赖的可执行文件运行,支持各种平台(Win / Linux / OS X),甚至是树莓派(Linux ARM)

获取

  • 从源码安装: 安装 Go,然后 go get github.com/netheril96/MEOW

配置

编辑 ~/.meow/rc (OS X, Linux) 或 rc.txt (Windows),例子:

# 监听地址,设为0.0.0.0可以监听所有端口,共享给局域网使用
listen = http://127.0.0.1:4411
# 至少指定一个上级代理
# SOCKS5 上级代理
# proxy = socks5://127.0.0.1:1080
# HTTP 上级代理
# proxy = http://127.0.0.1:8087
# shadowsocks 上级代理
# proxy = ss://aes-128-cfb:[email protected]:25
# HTTPS 上级代理
# proxy = https://user:[email protected]:port

工作方式

当 MEOW 启动时会从配置文件加载直连列表和强制使用代理列表,详见下面两节。

当通过 MEOW 访问一个网站时,MEOW 会:

  • 检查域名是否在直连列表中,如果在则直连
  • 检查域名是否在强制使用代理列表中,如果在则通过代理连接
  • 检查域名的 IP 是否为国内 IP
    • 通过本地 DNS 解析域名,得到域名的 IP
    • 如果是国内 IP 则直连,否则通过代理连接
    • 将域名加入临时的直连或者强制使用代理列表,下次可以不用 DNS 解析直接判断域名是否直连

直连列表

直接连接的域名列表保存在 ~/.meow/direct (OS X, Linux) 或 direct.txt (Windows)

匹配域名按 . 分隔的后两部分或者整个域名,例子:

  • baidu.com => *.baidu.com
  • com.cn => *.com.cn
  • edu.cn => *.edu.cn
  • music.163.com => music.163.com

一般是确定要直接连接的网站

强制使用代理列表

强制使用代理连接的域名列表保存在 ~/.meow/proxy (OS X, Linux) 或 proxy.txt (Windows),语法格式与直连列表相同 (注意:匹配的是域名按 . 分隔的后两部分或者整个域名

致谢

meow's People

Contributors

cyfdecyf avatar fzerorubigd avatar glacjay avatar iyee avatar j67678 avatar jeffrey4l avatar luosheng avatar messyidea avatar netheril96 avatar perrywky avatar skiyer avatar soimy avatar styxyang avatar sunteya avatar tevino avatar wjchen avatar xupefei avatar zellux avatar zyxar avatar

Watchers

 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.