v20200901
- ❗️Breaking change, you should upgrade both server and client
- What is Brook
- Install CLI
- Install GUI
- Server
- Client
- Map
- DNS Server
- Transparent Proxy
- WebSocket Server
- WebSocket Client
- Link
- QR
- Relay
- Socks5 Server
- Socks5 to HTTP
- PAC
- How to
- Contributing
- License
Brook is a cross-platform strong encryption and not detectable proxy.
Brook's goal is to keep it simple, stupid and not detectable.
The CLI file has both server and client functions
Install via nami
nami install github.com/txthinking/brook
Install on Archlinux
pacman -S brook
Download from releases**
# For example, on linux amd64
$ sudo curl -L https://github.com/txthinking/brook/releases/download/v20200901/brook_linux_amd64 -o /usr/bin/brook
$ sudo chmod +x /usr/bin/brook
The GUI file has only client function
Install via brew
brew cask install brook
Download from releases**
macOS, Windows, Android, iOS**
NAME:
Brook - A cross-platform strong encryption and not detectable proxy
USAGE:
brook [global options] command [command options] [arguments...]
VERSION:
20200901
AUTHOR:
Cloud <cloud@txthinking.com>
COMMANDS:
server Run as brook server, both TCP and UDP
servers Run as multiple brook servers
client Run as brook client, both TCP and UDP, to start a socks5 proxy or a http proxy, [src <-> socks5 <-> $ brook client <-> $ brook server <-> dst], [works with $ brook server]
map Run as mapping, both TCP and UDP, this means access [from address] is equal to [to address], [src <-> from address <-> $ brook server <-> to address], [works with $ brook server]
dns Run as DNS server, both TCP and UDP, [src <-> $ brook dns <-> $ brook server <-> dns server] or [src <-> $ brook dns <-> dns server for bypass], [works with $ brook server]
tproxy Run as transparent proxy, both TCP and UDP, only works on Linux, [src <-> $ brook tproxy <-> $ brook server <-> dst], [works with $ brook server]
wsserver Run as brook wsserver, both TCP and UDP, it will start a standard http(s) server and websocket server
wsclient Run as brook wsclient, both TCP and UDP, to start a socks5 proxy or a http proxy, [src <-> socks5 <-> $ brook wsclient <-> $ brook wsserver <-> dst], [works with $ brook wsserver]
link Print brook link
qr Print brook server QR code
relay Run as standalone relay, both TCP and UDP, this means access [listen address] is equal to access [to address], [src <-> listen address <-> to address]
relays Run as multiple standalone relays
socks5 Run as standalone standard socks5 server, both TCP and UDP
socks5tohttp Convert socks5 to http proxy, [src <-> listen address(http proxy) <-> socks5 address <-> dst]
hijackhttps Hijack domains and assume is TCP/TLS/443. Requesting these domains from anywhere in the system will be hijacked . [src <-> $ brook hijackhttps <-> socks5 server] or [src <-> direct]
pac Run as PAC server or save PAC to file
howto Print some useful tutorial resources
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--debug, -d Enable debug (default: false)
--listen value, -l value Listen address for debug (default: ":6060")
--help, -h show help (default: false)
--version, -v print the version (default: false)
COPYRIGHT:
https://github.com/txthinking/brook
# Run as a brook server
$ brook server -l :port -p password
# Run in background
$ nohup brook server -l :port -p password &
# Stop background brook
$ killall brook
More parameters: $ brook server -h
# Run as brook client, connect to brook server, start a socks5 proxy server socks5://127.0.0.1:1080
$ brook client -s server_address:port -p password --socks5 127.0.0.1:1080
More parameters: $ brook client -h
# Run as map, connect to brook server, map 127.0.0.1:5353 to 8.8.8.8:53
$ brook map -s server_address:port -p password -f 127.0.0.1:5353 -t 8.8.8.8:53
More parameters: $ brook map -h
# Run as DNS server, connect to brook server
$ brook dns -s server_address:port -p password -l 127.0.0.1:5353
More parameters: $ brook dns -h
See wiki
# Run as a brook wsserver
$ brook wsserver -l :port -p password
# Run as a brook wsserver with domain, make sure your domain name has been successfully resolved, 80 and 443 are open, brook will automatically issue certificate for you
$ brook wsserver --domain yourdomain.com -p password
More parameters: $ brook wsserver -h
# Run as brook wsclient, connect to brook wsserver, start a socks5 proxy server socks5://127.0.0.1:1080
$ brook wsclient -s ws://wsserver_address:port -p password --socks5 127.0.0.1:1080
# Run as brook wsclient, connect to brook wsserver with domain, start a http proxy
$ brook wsclient -s wss://wsserver_domain:port -p password --socks5 127.0.0.1:1080
More parameters: $ brook wsclient -h
$ brook link -s server_address:port -p password
$ brook link -s ws://wsserver_address:port -p password
$ brook link -s wss://wsserver_domain:port -p password
More parameters: $ brook link -h
$ brook qr -s server_address:port -p password
$ brook qr -s ws://wsserver_address:port -p password
$ brook qr -s wss://wsserver_domain:port -p password
More parameters: $ brook qr -h
# Run as relay
$ brook relay -f :port -t relay_to_address:port
More parameters: $ brook relay -h
# Run as standard socks5 server, assume your server public IP is 1.2.3.4
$ brook socks5 --socks5://1.2.3.4:1080
More parameters: $ brook socks5 -h
# Convert socks5 proxy socks5://127.0.0.1:1080 to http proxy http://127.0.0.1:8010
$ brook socks5tohttp -s 127.0.0.1:1080 -l 127.0.0.1:8010
More parameters: $ brook socks5tohttp -h
# Create PAC server
$ brook pac -l listen_address_port
# Save PAC to local file
$ brook pac -f /path/to/file.pac
More parameters: $ brook pac -h
Some useful tutorial resources
- Brook Wiki: https://github.com/txthinking/brook/wiki
- Brook Issues: https://github.com/txthinking/brook/issues
- Slides: https://talks.txthinking.com
- Youtube: https://www.youtube.com/channel/UC5j8-I5Y4lWo4KTa4_0Kx5A
- Nami: https://github.com/txthinking/nami
- Joker: https://github.com/txthinking/joker
Please read CONTRIBUTING.md first
Licensed under The GPLv3 License