A cross-platform programmable network tool.
❤️ Shiliew - A network app designed for those who value their time
bash <(curl https://bash.ooo/nami.sh)
nami install brook
brook server -l :9999 -p hello
You may want to use
brook link
to customize some parameters
- About App Mode on macOS
- How to install Brook on Windows
- How to install Brook on Linux
- How to install Brook on OpenWrt
brook dnsserver, dohserver, dnsserveroverbrook, server, wsserver, wssserver, quicserver can use script to do more complex thing. brook will pass different global variables to the script at different times, and the script only needs to assign the processing result to the global variable out
Script can do more:
- There are examples for dns server
- In the
script: in_dnsquery
step, script can do more, read more below
Script can do more:
- There are examples for server
- In the
script: in_address
step, script can do more, read more below
variable | type | command | timing | description | out type |
---|---|---|---|---|---|
in_dnsservers | map | dnsserver/dnsserveroverbrook/dohserver/server/wsserver/wssserver/quicserver | When just running | Predefine multiple dns servers, and then programmatically specify which one to use | map |
in_dohservers | map | dnsserver/dnsserveroverbrook/dohserver/server/wsserver/wssserver/quicserver | When just running | Predefine multiple doh servers, and then programmatically specify which one to use | map |
in_brooklinks | map | server/wsserver/wssserver/quicserver | When just running | Predefine multiple brook links, and then programmatically specify which one to use | map |
in_dnsquery | map | dnsserver/dnsserveroverbrook/dohserver | When a DNS query occurs | Script can decide how to handle this request | map |
in_address | map | server/wsserver/wssserver/quicserver | When the Server connects the proxied address | Script can decide how to handle this request | map |
Key | Type | Description | Example |
---|---|---|---|
_ | bool | meaningless | true |
out
, ignored if not of type map
Key | Type | Description | Example |
---|---|---|---|
... | ... | ... | ... |
custom name | string | dns server | 8.8.8.8:53 |
... | ... | ... | ... |
Key | Type | Description | Example |
---|---|---|---|
_ | bool | meaningless | true |
out
, ignored if not of type map
Key | Type | Description | Example |
---|---|---|---|
... | ... | ... | ... |
custom name | string | dohserver | https://dns.quad9.net/dns-query?address=9.9.9.9%3A443 |
... | ... | ... | ... |
Key | Type | Description | Example |
---|---|---|---|
_ | bool | meaningless | true |
out
, ignored if not of type map
Key | Type | Description | Example |
---|---|---|---|
... | ... | ... | ... |
custom name | string | brook link | brook://... |
... | ... | ... | ... |
Key | Type | Description | Example |
---|---|---|---|
fromipaddress | string | client address which send this request | 1.2.3.4:5 |
domain | string | domain name | google.com |
type | string | query type | A |
... | ... | ... | ... |
tag_key | string | --tag specifies the key value | tag_value |
... | ... | ... | ... |
out
, if it is error
type will be recorded in the log. Ignored if not of type map
Key | Type | Description | Example |
---|---|---|---|
block | bool | Whether Block, default false |
false |
ip | string | Specify IP directly, only valid when type is A /AAAA |
1.2.3.4 |
dnsserverkey | string | Use the dnsserver specified by key to resolve | custom name |
dohserverkey | string | Use the dohserver specified by key to resolve | custom name |