🤝 Telegram 💬 Private 🩸 Youtube ❤️ Sponsor
A cross-platform network tool designed for developers.
nami can automatically download the command corresponding to your system. If on Windows, run in Git Bash
or
If your system is not Linux, MacOS, Windows, or don't want nami, you can download it directly on the releases page
or
the script but only some parameters are supported:bash <(curl https://bash.ooo/brook.sh)
or
scripts written by others
or
Archlinux:pacman -S brook
(may be outdated)
or
brew:brew install brook
(may be outdated)
Install nami
bash <(curl https://bash.ooo/nami.sh)
Install brook
nami install brook
iOS & M1 Mac Android macOS Windows OpenWrt Linux CLI or tun2brook
- Windows: requires that the latest version of Edge(chromium-based) has been installed
- Windows Security Virus & threat protection: Settings -> Update & Security -> Windows Security -> Virus & threat protection -> Virus & threat protection settings -> manage settings -> Exclusions -> Add or remove exclusions -> Add an exclusion -> File -> Select Brook.exe
- all
subcoommand
:brook --help
- command line arguments of
subommand
:brook xxx --help
There are three types of rule files
- domain list: One domain name per line, the suffix matches mode. Can be a local file or an HTTPS URL
- CIDR v4 list: One CIDR per line, which can be a local file or an HTTPS URL
- CIDR v6 list: One CIDR per line, which can be a local file or an HTTPS URL
Rules file can be used for
- Server-side: blocking domain name and IP
- brook dns: bypass, block domain
- brook tproxy: bypass, block, domain, ip
- OpenWrt: bypass, block, domain, ip
- Brook GUI: bypass, block, domain, ip
List some examples of common scene commands, pay attention to replace the parameters such as IP, port, password, domain name, certificate path, etc. in the example by yourself
SRC --TCP--> brook client/relayoverbrook/dns/tproxy/GUI Client --TCP(Brook Protocol)--> brook server --TCP--> DST
SRC --UDP--> brook client/relayoverbrook/dns/tproxy/GUI Client --UDP/TCP(Brook Protocol)--> brook server --UDP--> DST
brook server --listen :9999 --password hello
Get brook link with --udpovertcp
brook link --server 1.2.3.4:9999 --password hello --udpovertcp --name 'my brook server'
or get brook link with udp over udp
Make sure you have no problem with your local UDP network to your server
brook link --server 1.2.3.4:9999 --password hello --name 'my brook server'
SRC --TCP--> brook wsclient/relayoverbrook/dns/tproxy/GUI Client --TCP(Brook Protocol)--> brook wsserver --TCP--> DST
SRC --UDP--> brook wsclient/relayoverbrook/dns/tproxy/GUI Client --TCP(Brook Protocol)--> brook wsserver --UDP--> DST
brook wsserver --listen :9999 --password hello
Get brook link
brook link --server ws://1.2.3.4:9999 --password hello --name 'my brook wsserver'
or get brook link with domain, even if that's not your domain
brook link --server ws://hello.com:9999 --password hello --address 1.2.3.4:9999 --name 'my brook wsserver'
Make sure your domain has been resolved to your server IP successfully. Automatic certificate issuance requires the use of port 80
brook wssserver --domainaddress domain.com:443 --password hello
Get brook link
brook link --server wss://domain.com:443 --password hello --name 'my brook wssserver'
Make sure your domain has been resolved to your server IP successfully
brook wssserver --domainaddress domain.com:443 --password hello --cert /root/cert.pem --certkey /root/certkey.pem
Get brook link
brook link --server wss://domain.com:443 --password hello --name 'my brook wssserver'
Install mad
nami install mad
Generate root ca
mad ca --ca /root/ca.pem --key /root/cakey.pem
Generate domain cert by root ca
mad cert --ca /root/ca.pem --ca_key /root/cakey.pem --cert /root/cert.pem --key /root/certkey.pem --domain domain.com
Run brook
brook wssserver --domainaddress domain.com:443 --password hello --cert /root/cert.pem --certkey /root/certkey.pem
Get brook link with --insecure
brook link --server wss://domain.com:443 --password hello --name 'my brook wssserver' --address 1.2.3.4:443 --insecure
or get brook link with --ca
brook link --server wss://domain.com:443 --password hello --name 'my brook wssserver' --address 1.2.3.4:443 --ca /root/ca.pem
Better performance, but data is not strongly encrypted using Brook protocol. So please use certificate encryption, and it is not recommended to use --withoutBrookProtocol and --insecure together
Make sure your domain has been resolved to your server IP successfully. Automatic certificate issuance requires the use of port 80
brook wssserver --domainaddress domain.com:443 --password hello --withoutBrookProtocol
Get brook link
brook link --server wss://domain.com:443 --password hello --withoutBrookProtocol
Make sure your domain has been resolved to your server IP successfully
brook wssserver --domainaddress domain.com:443 --password hello --cert /root/cert.pem --certkey /root/certkey.pem --withoutBrookProtocol