Pages

Monday, 26 August 2019

翻墙工具-yyrp

A http/https, socks proxy server, a mitm server and a ssocks server with rules.
Tested on OSX and linux.

Get started:

bundle install

rake down_mmdb
rake unzip_mmdb

# Optional, it is for mitm
rake gen_ca
rake install_ca

cp config.example.json config.json

cd examples
ruby proxy.rb # only http/https and socks 5 proxy
ruby mitm.rb # mitm server for https packet capture
ruby ss.rb # ssocks server

Memory Info

# brew install glances
glances

Settings

Terminal setting in .zshrc or .bashrc ...

function setp(){
  export http_proxy='http://127.0.0.1:7777'
  export https_proxy='http://127.0.0.1:7777'
  echo "HTTP Proxy on"
}

function unsetp(){
  unset http_proxy
  unset https_proxy
  echo "HTTP Proxy off"
}

OSX NetWork Setting(It is not work for terminal)

OSX NetWork Setting
# ignore proxy
127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, 0.0.0.0

Idea form

Test

rake

Rules, see more config.example.json

  • There are 4 adapters, directmitmhttp(https) and shadowsocks.
  • There are 6 actions, http(https):http_adaptershadowsocks:shadowsocks_adapterdirect:direct_adapterspeed:select fastest adaptersmitm:mitm_adapter, and reject:just close this socket.
  • There are 6 rule types, geoipdomaindomain_keyworddomain_suffixip_cidr and other, note: rules are in order.
  • Filters is for packet capture, just work for http. if it is https, please use mitm action

Note

  • If you are using https adapter, the auth will be ignore

No comments:

Post a Comment