TxThinking News
744 subscribers
52 photos
5 videos
5 files
206 links
Everything you care about

https://www.txthinking.com
Download Telegram
Is this docker file simpler than the one in documentation

FROM alpine

RUN wget -O /brook https://github.com/txthinking/brook/releases/latest/download/brook_linux_amd64
RUN chmod +x /brook

ENTRYPOINT ["/brook"]


https://hub.docker.com/r/txthinking/brook
Brook 携手 阿星的球衣 和 figma 祝大家 2024 身体健康!
# Brook v20240214 and Shiliew v20240214 Released

https://github.com/txthinking/brook/releases/tag/v20240214

https://www.txthinking.com/shiliew.html

https://brook.app

# GUI:

- Removed proxy mode. All in TUN mode. Life is short, I use Brook
- Modularized all features
- Rewrote UI
- iOS: Memory optimization
- Linux/Windows: Disconnecting will automatically restore the system DNS to its original state. Other platforms do not have this concern.
- Linux/Windows: You can now identify which programs are initiating TCP and UDP network connections. This also means that you can use scripts to control network access for specific applications. This feature has been completed in the previous macOS version. There is no such API for iOS. Android can bypass the app.
- Windows: Package using the new msix format. Here and Here
- Windows: Developed and tested under Windows 11
- Linux: Optimized startup way
- Added Test IPv4 tool
- Added Test IPv6 tool
- ipk: Removed. Might write a new UI
- If you signin: Connect API over your Brook only Mode. You must ensure your Brook Server works.
- Updated documentation: https://brook.app

# GUI:

- 移除 proxy 模式。全端默认 TUN 模式。**人生苦短,我用 Brook**
- 将所有功能模块化
- 重写 UI
- iOS: 内存优化
- Linux/Windows: 断开自动将系统 DNS 恢复如初。其他端无此顾虑
- Linux/Windows: 可以知道是哪个程序在发起 TCP 和 UDP 网络连接。也意味着可以用脚本来针对具体应用程序来进行网络控制。macOS 端上一个版本已完成。iOS 端无此 API。Android 端可以 bypass app
- Windows: 使用新的 msix 格式打包。这里这里
- Windows: 在 Windows 11 下开发测试
- Linux: 优化启动方式
- 新增 Test IPv4 工具
- 新增 Test IPv6 工具
- ipk: 移除. 可能,后续会写一个新的 UI
- If you signin: Connect API over your Brook only Mode. You must ensure your Brook Server works
- 文档更新: https://brook.app

# CLI

- brook tproxy: OpenWRT: 完美支持 IPv4/IPv6/TCP/UDP. Native IPv6
- brook tproxy: OpenWRT: Perfect support for IPv4/IPv6/TCP/UDP. Native IPv6
- brook --clientHKDFInfo: Do not use it unless you know what it is.
- brook --serverHKDFInfo: Do not use it unless you know what it is.
- brook ipcountry: Get the country of a specific IP.
Get appid from macOS app

jb https://bash.ooo/appid.js


jb https://bash.ooo/appid.js /Applications/Safari.app


com.apple.Safari
com.apple.Safari.CacheDeleteExtension
com.apple.Safari.SafariQuickLookPreview
com.apple.Safari.DiagnosticExtension
com.apple.Safari.SafariLinkExtension
com.apple.Safari.SafariWidgetExtension
com.apple.Safari.SandboxBroker
com.apple.Safari.ContentBlockerLoader
com.apple.Safari.BrowserDataImportingService
自动生成中国域名白名单

同时支持 GUI 日志和 CLI 日志

https://www.txthinking.com/talks/articles/china-list.article

jb https://bash.ooo/china.js


Usage: jb https://bash.ooo/china.js [options]

Options:
--source <string> gui: 自动查找 GUI 日志; 或 /path/to/log (default: "")
--how <string> A: 从海外 IP 向海外 DNS 发起查询, 比如开启 GUI 的情况下或在服务器端运行, 缺点是如果域名同时有国内和海外 IP 则会被认为是海外域名; B: 从国内 IP 向阿里 DNS 发起查询, 开启 GUI 情况下也没
,GUI 默认 bypass 了阿里 DNS, 缺点是如果返回的污染 IP 是国内的 IP 就会错乱,但历史经验不会,
还有一个缺点是 Google 有一些域名有国内的 IP (default: "")
--china <string> 弥补 A 和 B 方案的不足,手动设置某个域名为国内域名 (default: "")
--global <string> 弥补 A 和 B 方案的不足,手动设置某个域名为国际域名 (default: "")
--delete <string> 移除某个域名. 如果想删除所有, 直接删除 rm -rf ~/.china.db (default: "")
--table 打印整个表 (default: false)
--list 打印列表 (default: false)
--module 打印 module, 让域名走 bypass DNS 来解析 (default: false)
--modulea 打印 module, 让域名走 bypass DNS 来解析出 A 记录,然后直接 bypass (default: false)
-h, --help display help for command
Forwarded from Koo®osh
通给大家拜年啦 🧧 🎆
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
A SSH Terminal for iOS/Android/macOS/Windows

https://www.txthinking.com/ssh.html

- Manage multiple servers
- Supports opening multiple SSH sessions simultaneously
- Supports the shortcut Ctrl+N or Command+N
- Support password authentication
- Support private key authentication
Brook v20240404

https://brook.app

## CLI

- brook --speedLimit: Limit speed (b), such as 500kb/s: 500000, works with server/wsserver/wssserver/quicserver
- brook --ipLimitMax: Limit the number of client IP addresses, be careful when using this parameter, as the client may have dynamic IP. Works with server/wsserver/wssserver/quicserver
- brook --ipLimitInterval: Interval (s) for ipLimitMax
- brook --ipLimitWait: How long (s) to wait for recovery after exceeding ipLimitMax
- brook relayoverbrook --link
- brook dnsserveroverbrook --link
- brook wssclient --link
- brook link --fragment When server is brook wssserver, split the ClientHello into multiple fragments and then send them one by one with delays (millisecond). The format is min_length:max_length:min_delay:max_delay, cannot be zero, such as 50:100:10:50, Note that: This is an experimental feature, currently only supported by the brook CLI and tun2brook.
- brook --serverLog: Enable server log, traffic and more. A valid value is file path or 'console'. Mutually exclusive with the --log parameter. Works with server/wsserver/wssserver/quicserver

--serverLog format

{"bytes":"2190","dst":"8.8.8.8:53","from":"34.105.110.232:49514","network":"tcp","time":"2024-02-26T09:56:12Z"}
{"bytes":"2237","dst":"8.8.8.8:53","from":"34.105.110.232:49331","network":"udp","time":"2024-02-26T09:57:12Z"}


You can tally traffic from --serverLog, for example by using a jb script to sum up the traffic from the /tmp/brook.log log file.

jb 'var s=0; read_file("/tmp/brook.log").trim().split("\n").map(v=>JSON.parse(v)).forEach(v=> s+= v.bytes ? parseInt(v.bytes) : 0); echo(s)'


- Support CAC configure file

We known this:

brook server -l :9999 -p apple


Then, create a file /root/any_name:

server -l :9999 -p apple


We can run it like this:

brook /root/any_name


## GUI:

- New: Brook OpenWRT GUI
- Installing an ipk will automatically install dependencies.
- Connect and disconnect auto-configure OpenWRT, no need to manually configure some settings in OpenWRT as before.
- And some optimizations.
- bugfix

ZH

## CLI

- brook --speedLimit: 服务端限速
- brook --ipLimitMax: 限制客户端 IP 数量
- brook --ipLimitInterval: 周期
- brook --ipLimitWait: 周期内触及 --ipLimitMax 数量后等待多久恢复
- brook relayoverbrook --link
- brook dnsserveroverbrook --link
- brook wssclient --link
- brook link --fragment 当服务器是brook wssserver时,将ClientHello拆分成多个分片,然后逐个延迟发送(毫秒为单位)。格式为 min_length:max_length:min_delay:max_delay,值不能为零,例如 50:100:10:50。需要注意的是:这是一个实验性功能,目前仅由brook CLI和tun2brook支持。
- brook --serverLog: 服务端日志,包含每个连接的流量统计

--serverLog 格式如下

{"bytes":"2190","dst":"8.8.8.8:53","from":"34.105.110.232:49514","network":"tcp","time":"2024-02-26T09:56:12Z"}
{"bytes":"2237","dst":"8.8.8.8:53","from":"34.105.110.232:49331","network":"udp","time":"2024-02-26T09:57:12Z"}


可以从 --serverLog 里统计流量,比如用 jb 脚本统计 /tmp/brook.log 日志里的流量总和

jb 'var s=0; read_file("/tmp/brook.log").trim().split("\n").map(v=>JSON.parse(v)).forEach(v=> s+= v.bytes ? parseInt(v.bytes) : 0); echo(s)'


- 支持 CAC 配置文件

我们知道这样:

brook server -l :9999 -p apple


现在, 创建一个文件 /root/any_name:

server -l :9999 -p apple


我们就可以这样:

brook /root/any_name


## GUI:

- 新增:Brook OpenWRT 图形客户端
- 安装 ipk 时会自动安装依赖
- 连接和断开自动配置 OpenWRT,无需再向以前一样手动去 OpenWRT 里配置一些东西
- 以及一些细节的优化
- bugfix
# Brook v20240606

## CLI

- Each subcommand has a --example argument, for example brook server --example
- brook link --token: A token represents a user's identity. A string encoded in hexadecimal. Server needs to have --userAPI enabled. Note that: Only supported by the brook GUI(except for OpenWrt) and tun2brook. However, it is more recommended to use the user system to build token with brook link, such as brook-user-system.
- brook --userAPI: 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. It should be used with --serverLog and server/wsserver/wssserver/quicserver with brook protocol. For more information, please read https://github.com/txthinking/brook/blob/master/protocol/user.md
- brook --userAPIValidCacheTime: 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)
- brook --userAPIInvalidCacheTime: Once a token is checked and invalid, 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. Note that this may affect the user experience, when you change the user status from invalid to valid in your user system. (default: 1800)
- brook --tag: Tag can be used to the process, will be append into log or serverLog, such as: 'key1:value1'. All tags will also be appended as query parameters one by one to the userAPI
- brook --pid: A file path used to store pid. Send SIGUSR1 to me to reset the --serverLog file on unix system
- brook --blockDomainList: One domain per line, suffix match mode. https://, http:// or local file absolute path. Like: https://raw.githubusercontent.com/txthinking/brook/master/programmable/list/example_domain.txt. Works with server/wsserver/wssserver/quicserver
- brook --blockCIDR4List: One CIDR per line, https://, http:// or local file absolute path, like: https://raw.githubusercontent.com/txthinking/brook/master/programmable/list/example_cidr4.txt. Works with server/wsserver/wssserver/quicserver
- brook --blockCIDR6List: One CIDR per line, https://, http:// or local file absolute path, like: https://raw.githubusercontent.com/txthinking/brook/master/programmable/list/example_cidr6.txt. Works with server/wsserver/wssserver/quicserver
- brook --blockGeoIP: Block IP by Geo country code, such as US. Works with server/wsserver/wssserver/quicserver
- brook --blockListUpdateInterval: Update list --blockDomainList,--blockCIDR4List,--blockCIDR6List interval, second. default 0, only read one time on start (default: 0)
- brook link --udpoverstream: When server is brook quicserver, UDP over Stream. Under normal circumstances, you need this parameter because the max datagram size for QUIC is very small. Note: only brook CLI and tun2brook suppport for now (default: false)

## GUI

- support brook link --fragment
- support brook link --token. However, it is more recommended to use the user system to build token with brook link, such as brook-user-system
- Fake DNS and Block Google Secure DNS module have been enabled by default.

## tun2brook v20240607

https://github.com/txthinking/tun2brook

## Documentation

https://brook.app
Because Google plans to shut down the Cloud Source Repositories service on June 17, 2024, I have to migrate the existing build system. During this process, there may be some fluctuations in the api of my products, for which I apologize. I will carry out the migration in small steps to keep the fluctuations to a minimum.
In recent days, there have been temporary issues with one-time payments based on user feedback: If you encounter the following situation when choosing one-time payment: Unfortunately, we don't support payments from China at this time. This means that for reasons you know, this payment method cannot temporarily accept payments from China, possibly based on IP judgment. Thus, you can choose one of the other two payment methods (the other two black buttons). for the time being.
Therefore, it is crucial to prepare for a rainy day.