A http/https, socks proxy server, a mitm server and a ssocks server with rules.
Tested on OSX and linux.
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)
# 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
- NEKit
- surge for Mac
- charles
- privoxy
- ritm: Man-in-the-middle attack
- bbtfr/evil-proxy: A ruby http/https proxy, with SSL MITM support to do
👿 things. - kone: Beautiful than tun2socks
Test
rake
config.example.json
Rules, see more- There are 4 adapters,
direct
,mitm
,http(https)
andshadowsocks
. - There are 6 actions,
http(https):http_adapter
,shadowsocks:shadowsocks_adapter
,direct:direct_adapter
,speed:select fastest adapters
,mitm:mitm_adapter
, andreject:just close this socket
. - There are 6 rule types,
geoip
,domain
,domain_keyword
,domain_suffix
,ip_cidr
andother
, 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