github txthinking/brook v20250202

13 hours ago

CLI

brook dnsserver, dohserver, dnsserveroverbrook, server, wsserver, wssserver, quicserver can use script to do more complex thing, such as speed limit for a connection or forward to another brook link and more. 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. Read more: https://brook.app

  • --userAPI="": Works with server, wsserver, wssserver, quicserver. When you build your own user system, Brook Server will send GET request to your userAPI to check if token is valid, for example: https://your-api-server.com/a_unpredictable_path. Yes, it is recommended to add an unpredictable path to your https API, of course, you can also use the http api for internal network communication. The request format is https://your-api-server.com/a_unpredictable_path?token=xxx. When the response is 200, the body should be the user's unique identifier, such as user ID; all other status codes are considered to represent an illegitimate user, and in these cases, the body should be a string describing the error. For more information, please read https://github.com/txthinking/brook/blob/master/protocol/user.md
  • --userAPIRateLimit="": Works with --userAPI. Limit the request rate per token to the user API by Brook Server, this will reduce the load on the user API. This is especially important when users have expired, and the userAPIValidCacheTime will not cache the requests, resulting in continuous requests to the user API. The default is 0, which means no limitation. For example, setting it to 1 means the rate is limited to 1 request per token per second. The phrase 'per token' means that each token has its own rate limiter, and they do not interfere with each other (default: 1)
  • --userAPIValidCacheTime="": Works with --userAPI. Once a token is checked and valid, the userAPI will not be requested to validate again for a certain period (s). A reasonable value must be set, otherwise it will affect the performance of each incoming connection (default: 3600)
  • --userLog="": Works with --userAPI. Log, traffic and more. A valid value is file path. Send SIGUSR1 to me to reset the log file on unix system. Mutually exclusive with the --log parameter.
  • --pid="": A file path used to store pid. Send SIGUSR1 to me to reset the --log or --userLog file on unix system
  • --cliToken="": The CLI Token of your Brook Plus or Brook Business account, get it from https://www.txthinking.com/brook.html
  • --script="": Works with server, wsserver, wssserver, quicserver, dnsserver, dohserver, dnsserveroverbrook. https://, http:// or /path/to/file.tengo. Get details at https://brook.app/
  • --scriptUpdateInterval="": Works with --script. The interval (s) to re-fetch script. The default is 0, which means only fetch once on startup (default: 0)
  • All support brook link with token
  • Deprecated some parameters

OpenWrt

Brook for OpenWrt uses the same script as the GUI. Since OpenWrt will abandon ipk and CLI can edit complex rules more conveniently, I have returned openwrt to CLI. brook for OpenWrt is tested on OpenWrt systems, but may work on other Linux systems, but it is not guaranteed.

  • There are two new files: openwrt_linux_amd64 and openwrt_linux_arm64
  • Support brook link with token
  • Support script same with Brook GUI client

ipio

https://github.com/txthinking/ipio

brook-store

https://github.com/TxThinkingInc/brook-store

GUI

  • Add Clear and import, more convenient when importing links
  • The system time will be checked when connecting to prevent unnoticed abnormalities caused by system time errors
  • iOS and macOS: add All Networks & Excludes mode: Include All Networks. But exclude some networks, such as: Apple Push Notification services (APNs) traffic; Wi-Fi Calling, MMS, SMS, and Visual Voicemail; Local network, AirPlay, AirDrop, and CarPlay; XCode Device Communication. And the VPN will not be disconnected between sleep and wake or network changed. Only available for iOS and macOS TUN mode. Note that the Modules still works outside of Excludes
  • macOS: fix App Mode memory leak
  • MITM: support copy as text. Previously, you could only copy hex
  • iOS and macOS: optimized for the latest OS

You can build the OSS version from source, or download a precompiled version with more features.

Don't miss a new brook release

NewReleases is sending notifications on new releases.