From a864a372049273fd874459ce0650d2957d804289 Mon Sep 17 00:00:00 2001 From: txthinking Date: Tue, 11 Jun 2024 12:15:42 +0800 Subject: [PATCH 1/6] update instagram_system_dns.tengo --- ping/ping.json | 8 ++++---- programmable/modules/instagram_system_dns.tengo | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ping/ping.json b/ping/ping.json index 10124dcf..ac19dace 100644 --- a/ping/ping.json +++ b/ping/ping.json @@ -1,7 +1,7 @@ { "version": "20240606", - "text": "Clean the web with Brook", - "link": "https://www.txthinking.com/talks/articles/brook-clean-the-web-en.article", - "text_zh": "使用 Brook 净化互联网", - "link_zh": "https://www.txthinking.com/talks/articles/brook-clean-the-web.article" + "text": "Refer to get Brook Plus for free", + "link": "https://www.txthinking.com/brook.html#referrals", + "text_zh": "邀请以免费获得 Brook Plus", + "link_zh": "https://www.txthinking.com/brook.html#referrals" } diff --git a/programmable/modules/instagram_system_dns.tengo b/programmable/modules/instagram_system_dns.tengo index a3a7d9f7..0a72fe6a 100644 --- a/programmable/modules/instagram_system_dns.tengo +++ b/programmable/modules/instagram_system_dns.tengo @@ -6,6 +6,11 @@ modules = append(modules, { dnsquery: func(m) { text := import("text") l := [ + "analytics.google.com", + "apple.com", + "comodoca.com", + "autonavi.com", + "giphy.com", "facebook.com", "fbcdn.net", "facebook.net", From dcff0bbc75af1118f1fb9313c88ace99728465c4 Mon Sep 17 00:00:00 2001 From: txthinking Date: Thu, 25 Jul 2024 17:58:59 +0800 Subject: [PATCH 2/6] update docs --- README.md | 272 +++++++++++++++------ docs/build.sh | 3 +- docs/example.md | 12 - docs/getting-started.md | 2 +- docs/gui.md | 201 +++++++++++++--- docs/index.html | 509 ++++++++++++++++++++++++++-------------- docs/resources.md | 2 +- ping/ping.json | 8 +- 8 files changed, 724 insertions(+), 285 deletions(-) diff --git a/README.md b/README.md index a2faa257..30e287f8 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ nami install brook brook server -l :9999 -p hello ``` -## GUI Client +## Client | iOS | Android | Mac |Windows |Linux |OpenWrt | | --- | --- | --- | --- | --- | --- | @@ -29,22 +29,121 @@ brook server -l :9999 -p hello | / | / | [App Mode](https://www.txthinking.com/talks/articles/macos-app-mode-en.article) | [How](https://www.txthinking.com/talks/articles/msix-brook-en.article) | [How](https://www.txthinking.com/talks/articles/linux-app-brook-en.article) | [How](https://www.txthinking.com/talks/articles/brook-openwrt-en.article) | > You may want to use `brook link` to customize some parameters -# GUI Documentation - -## Software for which this article applies - -- [Brook](https://github.com/txthinking/brook) -- [Shiliew](https://www.txthinking.com/shiliew.html) -- [tun2brook](https://github.com/txthinking/tun2brook) - -## Programmable +# Client Brook GUI 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` -- address: We call it address which includes both host and port. For example, an ip address contains an ip and a port; a domain address contains a domain and a port. -- Fake DNS: Fake DNS can allow you to obtain domain address on `in_address` step. [How Fake DNS works](https://www.txthinking.com/talks/articles/brook-fakedns-en.article) - -### Variables +## CLI + +Before discussing the GUI client, let's first talk about the command line client `brook`. As we know, after you have deployed the server, you can use the command line client `brook` to create a local socks5 proxy or http proxy on your machine, and then configure it in your system proxy settings or in your browser to use this proxy. However: + +1. Not all apps will use this proxy, whether they use it is up to the app itself. +2. Generally, all UDP protocols will not go through this proxy, such as http3. + +For the specifics of socks5 and http proxy, you can read [this article](https://www.txthinking.com/talks/articles/socks5-and-http-proxy.article). + +## GUI + +The GUI client does not use socks5 and http proxy mode, so there is no issue with some software not using the system proxy. Instead, it uses a virtual network card to take over the entire system's network, including UDP-based http3. Moreover, Brook allows us to control network requests programmatically, so it is necessary to have basic knowledge of network requests. + +## Without Brook: Basic Knowledge of Network Requests + +> Note: When we talk about addresses, we mean addresses that include the port number, such as a domain address: `google.com:443`, or an IP address: `8.8.8.8:53` + +1. When an app requests a domain address, such as `google.com:443` +2. It will first perform a DNS resolution, which means that the app will send a network request to the system-configured DNS, such as `8.8.8.8:53`, to inquire about the IP of `google.com` + 1. The system DNS will return the IP of `google.com`, such as `1.2.3.4`, to the app +3. The app will combine the IP and port into an IP address, such as: `1.2.3.4:443` +4. The app makes a network request to this IP address `1.2.3.4:443` +5. The app receives the response data + +In the above process, the app actually makes two network requests: one to the IP address `8.8.8.8:53` and another to the IP address `1.2.3.4:443`. In other words, the domain name is essentially an alias for the IP, and must obtain the domain's IP to establish a connection. + +## With Brook: Fake DNS On + +Brook has a Fake DNS feature, which can parse the domain name out of the query requests that an app sends to the system DNS and decide how to respond to the app. + +1. When an app requests a domain name address, such as `google.com:443` +2. A DNS resolution will be performed first. That is, the app will send a network request to the system-configured DNS, such as `8.8.8.8:53`, to inquire about the IP of `google.com` +3. The Brook client detects that an app is sending a network request to `8.8.8.8:53`. This will trigger the `in_dnsquery` variable, carrying information such as `domain` + 1. The Brook client returns a fake IP to the app, such as `240.0.0.1` +4. The app combines the IP and port into an IP address, such as: `240.0.0.1:443` +5. The app makes a network request to the IP address `240.0.0.1:443` +6. The Brook client detects that an app is sending a network request to `240.0.0.1:443`, discovers that this is a fake IP, and will convert the fake IP address back to the domain address `google.com:443`. This will trigger the `in_address` variable, carrying information such as `domainaddress` + 1. The Brook client sends `google.com:443` to the Brook Server + 2. The Brook Server first requests its own DNS to resolve the domain name to find out the IP of `google.com`, such as receiving `1.2.3.4` + 3. The Brook Server combines the IP and port into an IP address, such as: `1.2.3.4:443` + 4. The Brook Server sends a network request to `1.2.3.4:443` and returns the data to the Brook client + 5. The Brook client then returns the data to the app +7. The app receives the response data + +However, if the following situations occur, the domain name will not/cannot be parsed, meaning that the Brook client will not/cannot know what the domain name is and will treat it as a normal request sent to an IP address: + +- Fake DNS not enabled: in this case, the Brook client will not attempt to parse the domain name from the request sent to the system DNS and will treat it as a normal request sent to an IP address. +- Even with Fake DNS enabled, but the app uses the system's secure DNS or the app's own secure DNS: in this case, the Brook client cannot parse the domain name from the request sent to the secure DNS and will treat it as a normal request sent to an IP address. + +To avoid the ineffectiveness of Fake DNS, please refer to [this article](https://www.txthinking.com/talks/articles/brook-fakedns.article). + +## With Brook: Fake DNS Off + +1. When an app requests a domain address, such as `google.com:443` +2. A DNS resolution will be performed first. That is, the app will send a network request to the system-configured DNS, such as `8.8.8.8:53`, to inquire about the IP of `google.com` +3. The Brook client detects that an app is sending a network request to `8.8.8.8:53`. This will trigger the `in_address` variable, carrying information such as `ipaddress` + 1. The Brook client sends `8.8.8.8:53` to the Brook Server + 2. The Brook Server sends a network request to `8.8.8.8:53` and returns the result, such as `1.2.3.4`, to the Brook client + 3. The Brook client then returns the result to the app +4. The app combines the IP and port into an IP address, such as: `1.2.3.4:443` +5. The app makes a network request to the IP address `1.2.3.4:443` +6. The Brook client detects that an app is sending a network request to `1.2.3.4:443`. This will trigger the `in_address` variable, carrying information such as `ipaddress` + 1. The Brook client sends `1.2.3.4:443` to the Brook Server + 2. The Brook Server sends a network request to `1.2.3.4:443` and returns the data to the Brook client + 3. The Brook client then returns the data to the app +7. The app receives the response data + +## With Brook: Fake DNS On, But the App Uses the System's Secure DNS or Its Own Secure DNS + +1. When an app requests a domain name address, such as `google.com:443` +2. A DNS resolution will be performed first. That is, the app will send a network request to the secure DNS, such as `8.8.8.8:443`, to inquire about the IP of `google.com` +3. The Brook client detects that an app is sending a network request to `8.8.8.8:443`. This will trigger the `in_address` variable, carrying information such as `ipaddress` + 1. The Brook client sends `8.8.8.8:443` to the Brook Server + 2. The Brook Server sends a network request to `8.8.8.8:443`, and returns the result, such as `1.2.3.4`, to the Brook client + 3. The Brook client then returns the result to the app +4. The app combines the IP and port into an IP address, such as: `1.2.3.4:443` +5. The app makes a network request to the IP address `1.2.3.4:443` +6. The Brook client detects that an app is sending a network request to `1.2.3.4:443`. This will trigger the `in_address` variable, carrying information such as `ipaddress` + 1. The Brook client sends `1.2.3.4:443` to the Brook Server + 2. The Brook Server sends a network request to `1.2.3.4:443` and returns the data to the Brook client + 3. The Brook client then returns the data to the app +7. The app receives the response data + +## Handle Variable Trigger + +- When the `in_brooklinks` variable is triggered: + - This is currently the only variable that gets triggered before the Brook client starts. + - We know that Brook starts with your choice of a Brook Server, and this variable lets you specify multiple Brook Servers. + - Then during runtime, you can use one of these Brook Servers as needed. +- When the `in_dnsquery` variable is triggered, you can process as needed, such as: + - Blocking, such as to prevent ad domain names. + - Directly specifying the response IP. + - Letting the system DNS resolve this domain. + - Letting Bypass DNS resolve this domain. + - And so on. +- When the `in_address` variable is triggered, you can process as needed, such as: + - Block this connection. + - Rewrite the destination. + - If it's a domain address, you can specify that Bypass DNS is responsible for resolving the IP of this domain. + - Allow it to connect directly without going through a proxy. + - If it's HTTP/HTTPS, you can start MITM (Man-In-The-Middle), which will subsequently trigger `in_httprequest` and `in_httpresponse`. + - And so on. +- When the `in_httprequest` variable is triggered, you can process as needed, such as: + - Modifying the HTTP request. + - Returning a custom HTTP response directly. +- When the `in_httpresponse` variable is triggered, you can process as needed, such as: + - Modifying the HTTP response. + +For detailed information on the properties and responses of variables, please refer to the following content. + +## Variables | variable | type | condition | timing | description | out type | | ------------------------------ | ---- | ----------- | --------------------------------- | ------------------------------------------------- | -------- | @@ -54,7 +153,7 @@ Brook GUI will pass different _global variables_ to the script at different time | in_httprequest | map | / | When an HTTP(S) request comes in | the script can decide how to handle this request | map | | in_httprequest,in_httpresponse | map | / | when an HTTP(S) response comes in | the script can decide how to handle this response | map | -### in_brooklinks +## in_brooklinks | Key | Type | Description | Example | | ------ | ------ | -------- | ---------- | @@ -68,7 +167,7 @@ Brook GUI will pass different _global variables_ to the script at different time | custom name | string | brook link | brook://... | | ... | ... | ... | ... | -### in_dnsquery +## in_dnsquery | Key | Type | Description | Example | | ------ | ------ | ----------- | ---------- | @@ -87,7 +186,7 @@ Brook GUI will pass different _global variables_ to the script at different time | bypass | bool | Resolve by Bypass DNS, default `false` | false | | brooklinkkey | string | When need to connect the Server,instead, connect to the Server specified by the key in_brooklinks | custom name | -### in_address +## in_address | Key | Type | Description | Example | | ------------- | ------ | ------------------------------------------------------------------------------------------------------------------- | -------------- | @@ -115,7 +214,7 @@ Brook GUI will pass different _global variables_ to the script at different time | mitmserverwritetimeout | int | Timeout for MITM write to client, second, default 0 | 0 | | brooklinkkey | string | When need to connect the Server,instead, connect to the Server specified by the key in_brooklinks | custom name | -### in_httprequest +## in_httprequest | Key | Type | Description | Example | | ------ | ------ | ----------------------------- | --------------------------- | @@ -126,7 +225,7 @@ Brook GUI will pass different _global variables_ to the script at different time `out`, must be set to a request or response -### in_httpresponse +## in_httpresponse | Key | Type | Description | Example | | ---------- | ------ | ----------------------------- | ------- | @@ -136,13 +235,9 @@ Brook GUI will pass different _global variables_ to the script at different time `out`, must be set to a response -## Module - -There are already some modules: https://github.com/txthinking/brook/blob/master/programmable/modules/ +## Modules -### Brook GUI - -In Brook GUI, scripts are abstracted into modules, and it will automatically combine [_header.tengo](https://github.com/txthinking/brook/blob/master/programmable/modules/_header.tengo) and [_footer.tengo](https://github.com/txthinking/brook/blob/master/programmable/modules/_footer.tengo), so you only need to write the module itself. +In Brook GUI, scripts are abstracted into **Modules**. There are already [some modules](https://github.com/txthinking/brook/blob/master/programmable/modules/), and thre is no magic, it just automatically combine [_header.tengo](https://github.com/txthinking/brook/blob/master/programmable/modules/_header.tengo) and [_footer.tengo](https://github.com/txthinking/brook/blob/master/programmable/modules/_footer.tengo), so you only need to write the module itself. ``` modules = append(modules, { @@ -169,9 +264,11 @@ modules = append(modules, { }) ``` -### tun2brook +## tun2brook + +https://github.com/txthinking/tun2brook -If you are using tun2brook, you can combine multiple modules into a complete script in the following way. For example: +If you are using tun2brook, you can manually combine multiple modules into a complete script in the following way. For example: ``` cat _header.tengo > my.tengo @@ -233,7 +330,7 @@ Library If you are writing complex scripts, the GUI may not be convenient for debugging. It is recommended to use [tun2brook](https://github.com/txthinking/tun2brook) on desktop to debug with `fmt.println` -## Install CA +## CA https://txthinking.github.io/ca/ca.pem @@ -246,39 +343,58 @@ https://txthinking.github.io/ca/ca.pem > Some software may not read the system CA,you can use `curl --cacert ~/.nami/bin/ca.pem` to debug -# Resources - -| CLI | Description | -| --- | --- | -| [nami](https://github.com/txthinking/nami) | A clean and tidy decentralized package manager | -| [joker](https://github.com/txthinking/joker) | Joker can turn process into daemon. Zero-Configuration | -| [nico](https://github.com/txthinking/nico) | Nico can work with brook wsserver together | -| [zhen](https://github.com/txthinking/zhen) | zhen - process and cron manager | -| [tun2brook](https://github.com/txthinking/tun2brook) | Proxy all traffic just one line command | -| [mad](https://github.com/txthinking/mad) | Generate root CA and derivative certificate for any domains and any IPs | -| [hancock](https://github.com/txthinking/hancock) | Manage multiple remote servers and execute commands remotely | -| [sshexec](https://github.com/txthinking/sshexec) | A command-line tool to execute remote command through ssh | -| [jb](https://github.com/txthinking/jb) | write script in an easier way than bash | -| [bash](https://github.com/txthinking/bash) | Many one-click scripts | -| [pacman](https://archlinux.org/packages/extra/x86_64/brook/) | `pacman -S brook` | -| [brew](https://formulae.brew.sh/formula/brook) | `brew install brook` | -| [docker](https://hub.docker.com/r/txthinking/brook) | `docker run txthinking/brook` | +## OpenWrt -| Resources | Description | -| --- | --- | -| [Protocol](https://github.com/txthinking/brook/tree/master/protocol) | Brook Protocol | -| [Blog](https://www.txthinking.com/talks/) | Some articles you should read | -| [YouTube](https://www.youtube.com/txthinking) | Some videos you should watch | -| [Telegram](https://t.me/txthinking) | Ask questions here | -| [Announce](https://t.me/s/txthinking_news) | All news you should care | -| [GitHub](https://github.com/txthinking) | Other useful repos | -| [Socks5 Configurator](https://chromewebstore.google.com/detail/socks5-configurator/hnpgnjkeaobghpjjhaiemlahikgmnghb) | If you prefer CLI brook client | -| [IPvBar](https://chromewebstore.google.com/detail/ipvbar/nepjlegfiihpkcdhlmaebfdfppckonlj) | See domain, IP and country in browser | -| [TxThinking SSH](https://www.txthinking.com/ssh.html) | A SSH Terminal | -| [brook-user-system](https://github.com/txthinkinginc/brook-user-system) | A Brook User System | -| [TxThinking](https://www.txthinking.com) | Everything | +https://www.txthinking.com/talks/articles/brook-openwrt-en.article +## IPv6 + +Brook's stance on IPv6 is positive, if your server or local environment doesn't have an IPv6 stack, read [this article](https://www.txthinking.com/talks/articles/brook-ipv6-en.article). + +## Troubleshooting Steps + +1. After adding your Server to the Brook client +2. If your Server uses a domain and has not specified an IP address via `brook link --address`, then Brook client will attempt to resolve the domain's IP using local DNS, preferring AAAA record. For example: + - domain.com:9999 + - ws://domain.com:9999 + - wss://domain.com:9999 + - quic://domain.com:9999 +3. Connectivity check: Go to the Server details page and click `Connectivity Check`. If it works sometimes but not others, this indicates instability. +4. After connected +1. Brook will change your system DNS to the System DNS configured in Brook (by default Google's DNS). In very rare cases, this change may be ignored on Windows, you can confirm this in the system settings. +5. Test IPv4 TCP: Use `Test IPv4 TCP` for testing; this test has hardcoded the IP address, so does not trigger DNS resolution. +5. Test IPv4 UDP: Use `Test IPv4 UDP` for testing; this test has hardcoded the IP address, so does not trigger DNS resolution. +6. Test IPv6 TCP: Use `Test IPv6 TCP` for testing; this test has hardcoded the IP address, so does not trigger DNS resolution. +6. Test IPv6 UDP: Use `Test IPv6 UDP` for testing; this test has hardcoded the IP address, so does not trigger DNS resolution. +7. Test TCP and UDP: Use the `Echo Client` for testing. If the echo server entered is a domain address, it will trigger DNS resolution. +8. Ensure the effectiveness of Fake DNS: Fake DNS is essential to do something with a domain or domain address. Generally, enable the `Block Google Secure DNS` module is sufficient. For other cases, refer to [this article](https://www.txthinking.com/talks/articles/brook-fakedns-en.article). +9. If your local or Server does not support IPv6: Refer to [this article](https://www.txthinking.com/talks/articles/brook-ipv6-en.article). +10. macOS App Mode: Refer to [this article](https://www.txthinking.com/talks/articles/macos-app-mode.article). +11. Windows: + - The client can pass the tests without any special configuration on a brand-new, genuine Windows 11. + - Be aware that the Windows system time is often incorrect. + - Do not have other similar network software installed; they can cause conflicting network settings in the system. + - Try restarting the computer. + - Windows Defender may ask for permission to connect to the network or present other issues. + - System DNS may need to be set to 8.8.8.8 and/or 2001:4860:4860::8888 +12. Android: + - The client can pass the tests without any special configuration on the official Google ROM. + - Different ROMs may have made different modifications to the system. + - Permission for background running might require separate settings. + - System DNS may need to be set to 8.8.8.8 and/or 2001:4860:4860::8888 +13. Bypass traffic such as China, usually requires the following modules to be activated: + - `Block Google Secure DNS` + - `Bypass Geo` + - `Bypass Apple`: To prevent issues receiving Apple message notifications. + - `Bypass China domain` or `Bypass China domain A`: The former uses `Bypass DNS` to obtain the IP, then `Bypass Geo` or other modules decide whether to bypass; the latter bypasses directly after obtaining the IP with `Bypass DNS` using A records. The latter is needed if your local does not support IPv6. + - If you are a [Shiliew](https://www.txthinking.com/shiliew.html) user, some modules are enabled by default, which is usually sufficient. +14. Search [GitHub issues](https://github.com/txthinking/brook/issues?q=is%3Aissue) +15. Read the [blog](https://www.txthinking.com/talks/) +16. Read the [documentation](https://brook.app) +14. Submit [new issue](https://github.com/txthinking/brook/issues?q=is%3Aissue) +17. Seek help in the [group](https://t.me/txthinking) # CLI Documentation +Each subcommand has a `--example` parameter that can print the minimal example of usage # NAME Brook - A cross-platform programmable network tool @@ -1191,16 +1307,36 @@ brook relay --from :9999 --to 1.2.3.4:9999 brook socks5tohttp --socks5 127.0.0.1:1080 --listen 127.0.0.1:8010 ``` -## brook pac creates pac server - -``` -brook pac --listen 127.0.0.1:8080 --proxy 'SOCKS5 127.0.0.1:1080; SOCKS 127.0.0.1:1080; DIRECT' --bypassDomainList ... -``` +## There are countless examples; for more feature suggestions, it's best to look at the commands and parameters in the CLI documentation one by one, and blog, YouTube... +# Resources -## brook pac creates pac file +| CLI | Description | +| --- | --- | +| [nami](https://github.com/txthinking/nami) | A clean and tidy decentralized package manager | +| [joker](https://github.com/txthinking/joker) | Joker can turn process into daemon. Zero-Configuration | +| [nico](https://github.com/txthinking/nico) | Nico can work with brook wsserver together | +| [z](https://github.com/txthinking/z) | z - process manager | +| [tun2brook](https://github.com/txthinking/tun2brook) | Proxy all traffic just one line command | +| [mad](https://github.com/txthinking/mad) | Generate root CA and derivative certificate for any domains and any IPs | +| [hancock](https://github.com/txthinking/hancock) | Manage multiple remote servers and execute commands remotely | +| [sshexec](https://github.com/txthinking/sshexec) | A command-line tool to execute remote command through ssh | +| [jb](https://github.com/txthinking/jb) | write script in an easier way than bash | +| [bash](https://github.com/txthinking/bash) | Many one-click scripts | +| [pacman](https://archlinux.org/packages/extra/x86_64/brook/) | `pacman -S brook` | +| [brew](https://formulae.brew.sh/formula/brook) | `brew install brook` | +| [docker](https://hub.docker.com/r/txthinking/brook) | `docker run txthinking/brook` | -``` -brook pac --file proxy.pac --proxy 'SOCKS5 127.0.0.1:1080; SOCKS 127.0.0.1:1080; DIRECT' --bypassDomainList ... -``` +| Resources | Description | +| --- | --- | +| [Protocol](https://github.com/txthinking/brook/tree/master/protocol) | Brook Protocol | +| [Blog](https://www.txthinking.com/talks/) | Some articles you should read | +| [YouTube](https://www.youtube.com/txthinking) | Some videos you should watch | +| [Telegram](https://t.me/txthinking) | Ask questions here | +| [Announce](https://t.me/s/txthinking_news) | All news you should care | +| [GitHub](https://github.com/txthinking) | Other useful repos | +| [Socks5 Configurator](https://chromewebstore.google.com/detail/socks5-configurator/hnpgnjkeaobghpjjhaiemlahikgmnghb) | If you prefer CLI brook client | +| [IPvBar](https://chromewebstore.google.com/detail/ipvbar/nepjlegfiihpkcdhlmaebfdfppckonlj) | See domain, IP and country in browser | +| [TxThinking SSH](https://www.txthinking.com/ssh.html) | A SSH Terminal | +| [brook-user-system](https://github.com/txthinkinginc/brook-user-system) | A Brook User System | +| [TxThinking](https://www.txthinking.com) | Everything | -## There are countless examples; for more feature suggestions, it's best to look at the commands and parameters in the CLI documentation one by one, and blog, YouTube... diff --git a/docs/build.sh b/docs/build.sh index d7a8ec9b..4e807531 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -10,12 +10,13 @@ echo '**❤️ [Shiliew - A network app designed for those who value their time cat getting-started.md >> ../readme.md cat gui.md >> ../readme.md -cat resources.md >> ../readme.md echo '# CLI Documentation' >> ../readme.md +echo 'Each subcommand has a `--example` parameter that can print the minimal example of usage' >> ../readme.md jb '$1`brook mdpage`.split("\n").filter(v=>!v.startsWith("[")).join("\n").replace("```\n```", "```\nbrook --help\n```").split("\n").forEach(v=> echo(v.startsWith("**") && !v.startsWith("**Usage") ? "- "+v : v))' >> ../readme.md cat example.md >> ../readme.md +cat resources.md >> ../readme.md markdown ../readme.md ./index.html diff --git a/docs/example.md b/docs/example.md index 7f09831a..1ae9d00f 100644 --- a/docs/example.md +++ b/docs/example.md @@ -262,16 +262,4 @@ brook relay --from :9999 --to 1.2.3.4:9999 brook socks5tohttp --socks5 127.0.0.1:1080 --listen 127.0.0.1:8010 ``` -## brook pac creates pac server - -``` -brook pac --listen 127.0.0.1:8080 --proxy 'SOCKS5 127.0.0.1:1080; SOCKS 127.0.0.1:1080; DIRECT' --bypassDomainList ... -``` - -## brook pac creates pac file - -``` -brook pac --file proxy.pac --proxy 'SOCKS5 127.0.0.1:1080; SOCKS 127.0.0.1:1080; DIRECT' --bypassDomainList ... -``` - ## There are countless examples; for more feature suggestions, it's best to look at the commands and parameters in the CLI documentation one by one, and blog, YouTube... diff --git a/docs/getting-started.md b/docs/getting-started.md index cb231369..2ccb15bb 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -14,7 +14,7 @@ nami install brook brook server -l :9999 -p hello ``` -## GUI Client +## Client | iOS | Android | Mac |Windows |Linux |OpenWrt | | --- | --- | --- | --- | --- | --- | diff --git a/docs/gui.md b/docs/gui.md index d0fa4f3c..338146d3 100644 --- a/docs/gui.md +++ b/docs/gui.md @@ -1,19 +1,118 @@ -# GUI Documentation - -## Software for which this article applies - -- [Brook](https://github.com/txthinking/brook) -- [Shiliew](https://www.txthinking.com/shiliew.html) -- [tun2brook](https://github.com/txthinking/tun2brook) - -## Programmable +# Client Brook GUI 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` -- address: We call it address which includes both host and port. For example, an ip address contains an ip and a port; a domain address contains a domain and a port. -- Fake DNS: Fake DNS can allow you to obtain domain address on `in_address` step. [How Fake DNS works](https://www.txthinking.com/talks/articles/brook-fakedns-en.article) - -### Variables +## CLI + +Before discussing the GUI client, let's first talk about the command line client `brook`. As we know, after you have deployed the server, you can use the command line client `brook` to create a local socks5 proxy or http proxy on your machine, and then configure it in your system proxy settings or in your browser to use this proxy. However: + +1. Not all apps will use this proxy, whether they use it is up to the app itself. +2. Generally, all UDP protocols will not go through this proxy, such as http3. + +For the specifics of socks5 and http proxy, you can read [this article](https://www.txthinking.com/talks/articles/socks5-and-http-proxy.article). + +## GUI + +The GUI client does not use socks5 and http proxy mode, so there is no issue with some software not using the system proxy. Instead, it uses a virtual network card to take over the entire system's network, including UDP-based http3. Moreover, Brook allows us to control network requests programmatically, so it is necessary to have basic knowledge of network requests. + +## Without Brook: Basic Knowledge of Network Requests + +> Note: When we talk about addresses, we mean addresses that include the port number, such as a domain address: `google.com:443`, or an IP address: `8.8.8.8:53` + +1. When an app requests a domain address, such as `google.com:443` +2. It will first perform a DNS resolution, which means that the app will send a network request to the system-configured DNS, such as `8.8.8.8:53`, to inquire about the IP of `google.com` + 1. The system DNS will return the IP of `google.com`, such as `1.2.3.4`, to the app +3. The app will combine the IP and port into an IP address, such as: `1.2.3.4:443` +4. The app makes a network request to this IP address `1.2.3.4:443` +5. The app receives the response data + +In the above process, the app actually makes two network requests: one to the IP address `8.8.8.8:53` and another to the IP address `1.2.3.4:443`. In other words, the domain name is essentially an alias for the IP, and must obtain the domain's IP to establish a connection. + +## With Brook: Fake DNS On + +Brook has a Fake DNS feature, which can parse the domain name out of the query requests that an app sends to the system DNS and decide how to respond to the app. + +1. When an app requests a domain name address, such as `google.com:443` +2. A DNS resolution will be performed first. That is, the app will send a network request to the system-configured DNS, such as `8.8.8.8:53`, to inquire about the IP of `google.com` +3. The Brook client detects that an app is sending a network request to `8.8.8.8:53`. This will trigger the `in_dnsquery` variable, carrying information such as `domain` + 1. The Brook client returns a fake IP to the app, such as `240.0.0.1` +4. The app combines the IP and port into an IP address, such as: `240.0.0.1:443` +5. The app makes a network request to the IP address `240.0.0.1:443` +6. The Brook client detects that an app is sending a network request to `240.0.0.1:443`, discovers that this is a fake IP, and will convert the fake IP address back to the domain address `google.com:443`. This will trigger the `in_address` variable, carrying information such as `domainaddress` + 1. The Brook client sends `google.com:443` to the Brook Server + 2. The Brook Server first requests its own DNS to resolve the domain name to find out the IP of `google.com`, such as receiving `1.2.3.4` + 3. The Brook Server combines the IP and port into an IP address, such as: `1.2.3.4:443` + 4. The Brook Server sends a network request to `1.2.3.4:443` and returns the data to the Brook client + 5. The Brook client then returns the data to the app +7. The app receives the response data + +However, if the following situations occur, the domain name will not/cannot be parsed, meaning that the Brook client will not/cannot know what the domain name is and will treat it as a normal request sent to an IP address: + +- Fake DNS not enabled: in this case, the Brook client will not attempt to parse the domain name from the request sent to the system DNS and will treat it as a normal request sent to an IP address. +- Even with Fake DNS enabled, but the app uses the system's secure DNS or the app's own secure DNS: in this case, the Brook client cannot parse the domain name from the request sent to the secure DNS and will treat it as a normal request sent to an IP address. + +To avoid the ineffectiveness of Fake DNS, please refer to [this article](https://www.txthinking.com/talks/articles/brook-fakedns.article). + +## With Brook: Fake DNS Off + +1. When an app requests a domain address, such as `google.com:443` +2. A DNS resolution will be performed first. That is, the app will send a network request to the system-configured DNS, such as `8.8.8.8:53`, to inquire about the IP of `google.com` +3. The Brook client detects that an app is sending a network request to `8.8.8.8:53`. This will trigger the `in_address` variable, carrying information such as `ipaddress` + 1. The Brook client sends `8.8.8.8:53` to the Brook Server + 2. The Brook Server sends a network request to `8.8.8.8:53` and returns the result, such as `1.2.3.4`, to the Brook client + 3. The Brook client then returns the result to the app +4. The app combines the IP and port into an IP address, such as: `1.2.3.4:443` +5. The app makes a network request to the IP address `1.2.3.4:443` +6. The Brook client detects that an app is sending a network request to `1.2.3.4:443`. This will trigger the `in_address` variable, carrying information such as `ipaddress` + 1. The Brook client sends `1.2.3.4:443` to the Brook Server + 2. The Brook Server sends a network request to `1.2.3.4:443` and returns the data to the Brook client + 3. The Brook client then returns the data to the app +7. The app receives the response data + +## With Brook: Fake DNS On, But the App Uses the System's Secure DNS or Its Own Secure DNS + +1. When an app requests a domain name address, such as `google.com:443` +2. A DNS resolution will be performed first. That is, the app will send a network request to the secure DNS, such as `8.8.8.8:443`, to inquire about the IP of `google.com` +3. The Brook client detects that an app is sending a network request to `8.8.8.8:443`. This will trigger the `in_address` variable, carrying information such as `ipaddress` + 1. The Brook client sends `8.8.8.8:443` to the Brook Server + 2. The Brook Server sends a network request to `8.8.8.8:443`, and returns the result, such as `1.2.3.4`, to the Brook client + 3. The Brook client then returns the result to the app +4. The app combines the IP and port into an IP address, such as: `1.2.3.4:443` +5. The app makes a network request to the IP address `1.2.3.4:443` +6. The Brook client detects that an app is sending a network request to `1.2.3.4:443`. This will trigger the `in_address` variable, carrying information such as `ipaddress` + 1. The Brook client sends `1.2.3.4:443` to the Brook Server + 2. The Brook Server sends a network request to `1.2.3.4:443` and returns the data to the Brook client + 3. The Brook client then returns the data to the app +7. The app receives the response data + +## Handle Variable Trigger + +- When the `in_brooklinks` variable is triggered: + - This is currently the only variable that gets triggered before the Brook client starts. + - We know that Brook starts with your choice of a Brook Server, and this variable lets you specify multiple Brook Servers. + - Then during runtime, you can use one of these Brook Servers as needed. +- When the `in_dnsquery` variable is triggered, you can process as needed, such as: + - Blocking, such as to prevent ad domain names. + - Directly specifying the response IP. + - Letting the system DNS resolve this domain. + - Letting Bypass DNS resolve this domain. + - And so on. +- When the `in_address` variable is triggered, you can process as needed, such as: + - Block this connection. + - Rewrite the destination. + - If it's a domain address, you can specify that Bypass DNS is responsible for resolving the IP of this domain. + - Allow it to connect directly without going through a proxy. + - If it's HTTP/HTTPS, you can start MITM (Man-In-The-Middle), which will subsequently trigger `in_httprequest` and `in_httpresponse`. + - And so on. +- When the `in_httprequest` variable is triggered, you can process as needed, such as: + - Modifying the HTTP request. + - Returning a custom HTTP response directly. +- When the `in_httpresponse` variable is triggered, you can process as needed, such as: + - Modifying the HTTP response. + +For detailed information on the properties and responses of variables, please refer to the following content. + +## Variables | variable | type | condition | timing | description | out type | | ------------------------------ | ---- | ----------- | --------------------------------- | ------------------------------------------------- | -------- | @@ -23,7 +122,7 @@ Brook GUI will pass different _global variables_ to the script at different time | in_httprequest | map | / | When an HTTP(S) request comes in | the script can decide how to handle this request | map | | in_httprequest,in_httpresponse | map | / | when an HTTP(S) response comes in | the script can decide how to handle this response | map | -### in_brooklinks +## in_brooklinks | Key | Type | Description | Example | | ------ | ------ | -------- | ---------- | @@ -37,7 +136,7 @@ Brook GUI will pass different _global variables_ to the script at different time | custom name | string | brook link | brook://... | | ... | ... | ... | ... | -### in_dnsquery +## in_dnsquery | Key | Type | Description | Example | | ------ | ------ | ----------- | ---------- | @@ -56,7 +155,7 @@ Brook GUI will pass different _global variables_ to the script at different time | bypass | bool | Resolve by Bypass DNS, default `false` | false | | brooklinkkey | string | When need to connect the Server,instead, connect to the Server specified by the key in_brooklinks | custom name | -### in_address +## in_address | Key | Type | Description | Example | | ------------- | ------ | ------------------------------------------------------------------------------------------------------------------- | -------------- | @@ -84,7 +183,7 @@ Brook GUI will pass different _global variables_ to the script at different time | mitmserverwritetimeout | int | Timeout for MITM write to client, second, default 0 | 0 | | brooklinkkey | string | When need to connect the Server,instead, connect to the Server specified by the key in_brooklinks | custom name | -### in_httprequest +## in_httprequest | Key | Type | Description | Example | | ------ | ------ | ----------------------------- | --------------------------- | @@ -95,7 +194,7 @@ Brook GUI will pass different _global variables_ to the script at different time `out`, must be set to a request or response -### in_httpresponse +## in_httpresponse | Key | Type | Description | Example | | ---------- | ------ | ----------------------------- | ------- | @@ -105,13 +204,9 @@ Brook GUI will pass different _global variables_ to the script at different time `out`, must be set to a response -## Module +## Modules -There are already some modules: https://github.com/txthinking/brook/blob/master/programmable/modules/ - -### Brook GUI - -In Brook GUI, scripts are abstracted into modules, and it will automatically combine [_header.tengo](https://github.com/txthinking/brook/blob/master/programmable/modules/_header.tengo) and [_footer.tengo](https://github.com/txthinking/brook/blob/master/programmable/modules/_footer.tengo), so you only need to write the module itself. +In Brook GUI, scripts are abstracted into **Modules**. There are already [some modules](https://github.com/txthinking/brook/blob/master/programmable/modules/), and thre is no magic, it just automatically combine [_header.tengo](https://github.com/txthinking/brook/blob/master/programmable/modules/_header.tengo) and [_footer.tengo](https://github.com/txthinking/brook/blob/master/programmable/modules/_footer.tengo), so you only need to write the module itself. ``` modules = append(modules, { @@ -138,9 +233,11 @@ modules = append(modules, { }) ``` -### tun2brook +## tun2brook + +https://github.com/txthinking/tun2brook -If you are using tun2brook, you can combine multiple modules into a complete script in the following way. For example: +If you are using tun2brook, you can manually combine multiple modules into a complete script in the following way. For example: ``` cat _header.tengo > my.tengo @@ -202,7 +299,7 @@ Library If you are writing complex scripts, the GUI may not be convenient for debugging. It is recommended to use [tun2brook](https://github.com/txthinking/tun2brook) on desktop to debug with `fmt.println` -## Install CA +## CA https://txthinking.github.io/ca/ca.pem @@ -215,3 +312,53 @@ https://txthinking.github.io/ca/ca.pem > Some software may not read the system CA,you can use `curl --cacert ~/.nami/bin/ca.pem` to debug +## OpenWrt + +https://www.txthinking.com/talks/articles/brook-openwrt-en.article + +## IPv6 + +Brook's stance on IPv6 is positive, if your server or local environment doesn't have an IPv6 stack, read [this article](https://www.txthinking.com/talks/articles/brook-ipv6-en.article). + +## Troubleshooting Steps + +1. After adding your Server to the Brook client +2. If your Server uses a domain and has not specified an IP address via `brook link --address`, then Brook client will attempt to resolve the domain's IP using local DNS, preferring AAAA record. For example: + - domain.com:9999 + - ws://domain.com:9999 + - wss://domain.com:9999 + - quic://domain.com:9999 +3. Connectivity check: Go to the Server details page and click `Connectivity Check`. If it works sometimes but not others, this indicates instability. +4. After connected +1. Brook will change your system DNS to the System DNS configured in Brook (by default Google's DNS). In very rare cases, this change may be ignored on Windows, you can confirm this in the system settings. +5. Test IPv4 TCP: Use `Test IPv4 TCP` for testing; this test has hardcoded the IP address, so does not trigger DNS resolution. +5. Test IPv4 UDP: Use `Test IPv4 UDP` for testing; this test has hardcoded the IP address, so does not trigger DNS resolution. +6. Test IPv6 TCP: Use `Test IPv6 TCP` for testing; this test has hardcoded the IP address, so does not trigger DNS resolution. +6. Test IPv6 UDP: Use `Test IPv6 UDP` for testing; this test has hardcoded the IP address, so does not trigger DNS resolution. +7. Test TCP and UDP: Use the `Echo Client` for testing. If the echo server entered is a domain address, it will trigger DNS resolution. +8. Ensure the effectiveness of Fake DNS: Fake DNS is essential to do something with a domain or domain address. Generally, enable the `Block Google Secure DNS` module is sufficient. For other cases, refer to [this article](https://www.txthinking.com/talks/articles/brook-fakedns-en.article). +9. If your local or Server does not support IPv6: Refer to [this article](https://www.txthinking.com/talks/articles/brook-ipv6-en.article). +10. macOS App Mode: Refer to [this article](https://www.txthinking.com/talks/articles/macos-app-mode.article). +11. Windows: + - The client can pass the tests without any special configuration on a brand-new, genuine Windows 11. + - Be aware that the Windows system time is often incorrect. + - Do not have other similar network software installed; they can cause conflicting network settings in the system. + - Try restarting the computer. + - Windows Defender may ask for permission to connect to the network or present other issues. + - System DNS may need to be set to 8.8.8.8 and/or 2001:4860:4860::8888 +12. Android: + - The client can pass the tests without any special configuration on the official Google ROM. + - Different ROMs may have made different modifications to the system. + - Permission for background running might require separate settings. + - System DNS may need to be set to 8.8.8.8 and/or 2001:4860:4860::8888 +13. Bypass traffic such as China, usually requires the following modules to be activated: + - `Block Google Secure DNS` + - `Bypass Geo` + - `Bypass Apple`: To prevent issues receiving Apple message notifications. + - `Bypass China domain` or `Bypass China domain A`: The former uses `Bypass DNS` to obtain the IP, then `Bypass Geo` or other modules decide whether to bypass; the latter bypasses directly after obtaining the IP with `Bypass DNS` using A records. The latter is needed if your local does not support IPv6. + - If you are a [Shiliew](https://www.txthinking.com/shiliew.html) user, some modules are enabled by default, which is usually sufficient. +14. Search [GitHub issues](https://github.com/txthinking/brook/issues?q=is%3Aissue) +15. Read the [blog](https://www.txthinking.com/talks/) +16. Read the [documentation](https://brook.app) +14. Submit [new issue](https://github.com/txthinking/brook/issues?q=is%3Aissue) +17. Seek help in the [group](https://t.me/txthinking) diff --git a/docs/index.html b/docs/index.html index 59bf4dc2..7c6ec37f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1157,31 +1157,33 @@
  • Sponsor
  • Getting Started
  • -
  • GUI Documentation
  • +
  • Resources
  • @@ -1259,31 +1260,33 @@

    Brook

  • Sponsor
  • Getting Started
  • -
  • GUI Documentation
  • +
  • Resources
  • @@ -1365,7 +1367,7 @@

    Server

    brook server -l :9999 -p hello
     
    -

    GUI Client

    +

    Client

    @@ -1397,20 +1399,136 @@

    GUI Client

    You may want to use brook link to customize some parameters

    -

    GUI Documentation

    -

    Software for which this article applies

    +

    Client

    +

    Brook GUI 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

    +

    CLI

    +

    Before discussing the GUI client, let's first talk about the command line client brook. As we know, after you have deployed the server, you can use the command line client brook to create a local socks5 proxy or http proxy on your machine, and then configure it in your system proxy settings or in your browser to use this proxy. However:

    +
      +
    1. Not all apps will use this proxy, whether they use it is up to the app itself.
    2. +
    3. Generally, all UDP protocols will not go through this proxy, such as http3.
    4. +
    +

    For the specifics of socks5 and http proxy, you can read this article.

    +

    GUI

    +

    The GUI client does not use socks5 and http proxy mode, so there is no issue with some software not using the system proxy. Instead, it uses a virtual network card to take over the entire system's network, including UDP-based http3. Moreover, Brook allows us to control network requests programmatically, so it is necessary to have basic knowledge of network requests.

    +

    Without Brook: Basic Knowledge of Network Requests

    +
    +

    Note: When we talk about addresses, we mean addresses that include the port number, such as a domain address: google.com:443, or an IP address: 8.8.8.8:53

    +
    +
      +
    1. When an app requests a domain address, such as google.com:443
    2. +
    3. It will first perform a DNS resolution, which means that the app will send a network request to the system-configured DNS, such as 8.8.8.8:53, to inquire about the IP of google.com
        +
      1. The system DNS will return the IP of google.com, such as 1.2.3.4, to the app
      2. +
      +
    4. +
    5. The app will combine the IP and port into an IP address, such as: 1.2.3.4:443
    6. +
    7. The app makes a network request to this IP address 1.2.3.4:443
    8. +
    9. The app receives the response data
    10. +
    +

    In the above process, the app actually makes two network requests: one to the IP address 8.8.8.8:53 and another to the IP address 1.2.3.4:443. In other words, the domain name is essentially an alias for the IP, and must obtain the domain's IP to establish a connection.

    +

    With Brook: Fake DNS On

    +

    Brook has a Fake DNS feature, which can parse the domain name out of the query requests that an app sends to the system DNS and decide how to respond to the app.

    +
      +
    1. When an app requests a domain name address, such as google.com:443
    2. +
    3. A DNS resolution will be performed first. That is, the app will send a network request to the system-configured DNS, such as 8.8.8.8:53, to inquire about the IP of google.com
    4. +
    5. The Brook client detects that an app is sending a network request to 8.8.8.8:53. This will trigger the in_dnsquery variable, carrying information such as domain
        +
      1. The Brook client returns a fake IP to the app, such as 240.0.0.1
      2. +
      +
    6. +
    7. The app combines the IP and port into an IP address, such as: 240.0.0.1:443
    8. +
    9. The app makes a network request to the IP address 240.0.0.1:443
    10. +
    11. The Brook client detects that an app is sending a network request to 240.0.0.1:443, discovers that this is a fake IP, and will convert the fake IP address back to the domain address google.com:443. This will trigger the in_address variable, carrying information such as domainaddress
        +
      1. The Brook client sends google.com:443 to the Brook Server
      2. +
      3. The Brook Server first requests its own DNS to resolve the domain name to find out the IP of google.com, such as receiving 1.2.3.4
      4. +
      5. The Brook Server combines the IP and port into an IP address, such as: 1.2.3.4:443
      6. +
      7. The Brook Server sends a network request to 1.2.3.4:443 and returns the data to the Brook client
      8. +
      9. The Brook client then returns the data to the app
      10. +
      +
    12. +
    13. The app receives the response data
    14. +
    +

    However, if the following situations occur, the domain name will not/cannot be parsed, meaning that the Brook client will not/cannot know what the domain name is and will treat it as a normal request sent to an IP address:

    -

    Programmable

    -

    Brook GUI 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

    +

    To avoid the ineffectiveness of Fake DNS, please refer to this article.

    +

    With Brook: Fake DNS Off

    +
      +
    1. When an app requests a domain address, such as google.com:443
    2. +
    3. A DNS resolution will be performed first. That is, the app will send a network request to the system-configured DNS, such as 8.8.8.8:53, to inquire about the IP of google.com
    4. +
    5. The Brook client detects that an app is sending a network request to 8.8.8.8:53. This will trigger the in_address variable, carrying information such as ipaddress
        +
      1. The Brook client sends 8.8.8.8:53 to the Brook Server
      2. +
      3. The Brook Server sends a network request to 8.8.8.8:53 and returns the result, such as 1.2.3.4, to the Brook client
      4. +
      5. The Brook client then returns the result to the app
      6. +
      +
    6. +
    7. The app combines the IP and port into an IP address, such as: 1.2.3.4:443
    8. +
    9. The app makes a network request to the IP address 1.2.3.4:443
    10. +
    11. The Brook client detects that an app is sending a network request to 1.2.3.4:443. This will trigger the in_address variable, carrying information such as ipaddress
        +
      1. The Brook client sends 1.2.3.4:443 to the Brook Server
      2. +
      3. The Brook Server sends a network request to 1.2.3.4:443 and returns the data to the Brook client
      4. +
      5. The Brook client then returns the data to the app
      6. +
      +
    12. +
    13. The app receives the response data
    14. +
    +

    With Brook: Fake DNS On, But the App Uses the System's Secure DNS or Its Own Secure DNS

    +
      +
    1. When an app requests a domain name address, such as google.com:443
    2. +
    3. A DNS resolution will be performed first. That is, the app will send a network request to the secure DNS, such as 8.8.8.8:443, to inquire about the IP of google.com
    4. +
    5. The Brook client detects that an app is sending a network request to 8.8.8.8:443. This will trigger the in_address variable, carrying information such as ipaddress
        +
      1. The Brook client sends 8.8.8.8:443 to the Brook Server
      2. +
      3. The Brook Server sends a network request to 8.8.8.8:443, and returns the result, such as 1.2.3.4, to the Brook client
      4. +
      5. The Brook client then returns the result to the app
      6. +
      +
    6. +
    7. The app combines the IP and port into an IP address, such as: 1.2.3.4:443
    8. +
    9. The app makes a network request to the IP address 1.2.3.4:443
    10. +
    11. The Brook client detects that an app is sending a network request to 1.2.3.4:443. This will trigger the in_address variable, carrying information such as ipaddress
        +
      1. The Brook client sends 1.2.3.4:443 to the Brook Server
      2. +
      3. The Brook Server sends a network request to 1.2.3.4:443 and returns the data to the Brook client
      4. +
      5. The Brook client then returns the data to the app
      6. +
      +
    12. +
    13. The app receives the response data
    14. +
    +

    Handle Variable Trigger

    +

    For detailed information on the properties and responses of variables, please refer to the following content.

    +

    Variables

    @@ -1463,7 +1581,7 @@

    Variables

    map
    - + @@ -1509,7 +1627,7 @@
    ...
    -

    in_dnsquery

    +

    in_dnsquery

    @@ -1585,7 +1703,7 @@

    in_dnsquery

    custom name
    -

    in_address

    +

    in_address

    @@ -1715,7 +1833,7 @@

    in_address

    custom name
    -

    in_httprequest

    +

    in_httprequest

    @@ -1751,7 +1869,7 @@

    in_httprequest

    out, must be set to a request or response

    -

    in_httpresponse

    +

    in_httpresponse

    @@ -1781,10 +1899,8 @@

    in_httpresponse

    out, must be set to a response

    -

    Module

    -

    There are already some modules: https://github.com/txthinking/brook/blob/master/programmable/modules/

    -

    Brook GUI

    -

    In Brook GUI, scripts are abstracted into modules, and it will automatically combine _header.tengo and _footer.tengo, so you only need to write the module itself.

    +

    Modules

    +

    In Brook GUI, scripts are abstracted into Modules. There are already some modules, and thre is no magic, it just automatically combine _header.tengo and _footer.tengo, so you only need to write the module itself.

    modules = append(modules, {
         // If you want to predefine multiple brook links, and then programmatically specify which one to connect to, then define `brooklinks` key a function
         brooklinks: func(m) {
    @@ -1808,8 +1924,9 @@ 

    Brook GUI

    } })
    -

    tun2brook

    -

    If you are using tun2brook, you can combine multiple modules into a complete script in the following way. For example:

    +

    tun2brook

    +

    https://github.com/txthinking/tun2brook

    +

    If you are using tun2brook, you can manually combine multiple modules into a complete script in the following way. For example:

    cat _header.tengo > my.tengo
     
     cat block_google_secure_dns.tengo >> my.tengo
    @@ -1872,7 +1989,7 @@ 

    Syntax

    Debug

    If you are writing complex scripts, the GUI may not be convenient for debugging. It is recommended to use tun2brook on desktop to debug with fmt.println

    -

    Install CA

    +

    CA

    https://txthinking.github.io/ca/ca.pem

    @@ -1901,120 +2018,63 @@

    Install CA

    Some software may not read the system CA,you can use curl --cacert ~/.nami/bin/ca.pem to debug

    -

    Resources

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CLIDescription
    namiA clean and tidy decentralized package manager
    jokerJoker can turn process into daemon. Zero-Configuration
    nicoNico can work with brook wsserver together
    zhenzhen - process and cron manager
    tun2brookProxy all traffic just one line command
    madGenerate root CA and derivative certificate for any domains and any IPs
    hancockManage multiple remote servers and execute commands remotely
    sshexecA command-line tool to execute remote command through ssh
    jbwrite script in an easier way than bash
    bashMany one-click scripts
    pacmanpacman -S brook
    brewbrew install brook
    dockerdocker run txthinking/brook
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ResourcesDescription
    ProtocolBrook Protocol
    BlogSome articles you should read
    YouTubeSome videos you should watch
    TelegramAsk questions here
    AnnounceAll news you should care
    GitHubOther useful repos
    Socks5 ConfiguratorIf you prefer CLI brook client
    IPvBarSee domain, IP and country in browser
    TxThinking SSHA SSH Terminal
    brook-user-systemA Brook User System
    TxThinkingEverything
    +

    OpenWrt

    +

    https://www.txthinking.com/talks/articles/brook-openwrt-en.article

    +

    IPv6

    +

    Brook's stance on IPv6 is positive, if your server or local environment doesn't have an IPv6 stack, read this article.

    +

    Troubleshooting Steps

    +
      +
    1. After adding your Server to the Brook client
    2. +
    3. If your Server uses a domain and has not specified an IP address via brook link --address, then Brook client will attempt to resolve the domain's IP using local DNS, preferring AAAA record. For example:
        +
      • domain.com:9999
      • +
      • ws://domain.com:9999
      • +
      • wss://domain.com:9999
      • +
      • quic://domain.com:9999
      • +
      +
    4. +
    5. Connectivity check: Go to the Server details page and click Connectivity Check. If it works sometimes but not others, this indicates instability.
    6. +
    7. After connected
    8. +
    9. Brook will change your system DNS to the System DNS configured in Brook (by default Google's DNS). In very rare cases, this change may be ignored on Windows, you can confirm this in the system settings.
    10. +
    11. Test IPv4 TCP: Use Test IPv4 TCP for testing; this test has hardcoded the IP address, so does not trigger DNS resolution.
    12. +
    13. Test IPv4 UDP: Use Test IPv4 UDP for testing; this test has hardcoded the IP address, so does not trigger DNS resolution.
    14. +
    15. Test IPv6 TCP: Use Test IPv6 TCP for testing; this test has hardcoded the IP address, so does not trigger DNS resolution.
    16. +
    17. Test IPv6 UDP: Use Test IPv6 UDP for testing; this test has hardcoded the IP address, so does not trigger DNS resolution.
    18. +
    19. Test TCP and UDP: Use the Echo Client for testing. If the echo server entered is a domain address, it will trigger DNS resolution.
    20. +
    21. Ensure the effectiveness of Fake DNS: Fake DNS is essential to do something with a domain or domain address. Generally, enable the Block Google Secure DNS module is sufficient. For other cases, refer to this article.
    22. +
    23. If your local or Server does not support IPv6: Refer to this article.
    24. +
    25. macOS App Mode: Refer to this article.
    26. +
    27. Windows:
        +
      • The client can pass the tests without any special configuration on a brand-new, genuine Windows 11.
      • +
      • Be aware that the Windows system time is often incorrect.
      • +
      • Do not have other similar network software installed; they can cause conflicting network settings in the system.
      • +
      • Try restarting the computer.
      • +
      • Windows Defender may ask for permission to connect to the network or present other issues.
      • +
      • System DNS may need to be set to 8.8.8.8 and/or 2001:4860:4860::8888
      • +
      +
    28. +
    29. Android:
        +
      • The client can pass the tests without any special configuration on the official Google ROM.
      • +
      • Different ROMs may have made different modifications to the system.
      • +
      • Permission for background running might require separate settings.
      • +
      • System DNS may need to be set to 8.8.8.8 and/or 2001:4860:4860::8888
      • +
      +
    30. +
    31. Bypass traffic such as China, usually requires the following modules to be activated:
        +
      • Block Google Secure DNS
      • +
      • Bypass Geo
      • +
      • Bypass Apple: To prevent issues receiving Apple message notifications.
      • +
      • Bypass China domain or Bypass China domain A: The former uses Bypass DNS to obtain the IP, then Bypass Geo or other modules decide whether to bypass; the latter bypasses directly after obtaining the IP with Bypass DNS using A records. The latter is needed if your local does not support IPv6.
      • +
      • If you are a Shiliew user, some modules are enabled by default, which is usually sufficient.
      • +
      +
    32. +
    33. Search GitHub issues
    34. +
    35. Read the blog
    36. +
    37. Read the documentation
    38. +
    39. Submit new issue
    40. +
    41. Seek help in the group
    42. +

    CLI Documentation

    +

    Each subcommand has a --example parameter that can print the minimal example of usage

    NAME

    Brook - A cross-platform programmable network tool

    SYNOPSIS

    @@ -2118,7 +2178,7 @@

    server

  • --updateListInterval="": This option will be removed in a future version, please use the global option instead (default: 0)

  • -

    client

    +

    client

    Start a brook client that supports tcp and udp. It can open a socks5 proxy, [src <-> socks5 <-> $ brook client <-> $ brook server <-> dst]

    • --example: Show a minimal example of usage

      @@ -2805,13 +2865,120 @@

      brook socks5tohttp can convert a socks5 to a http proxy

      brook socks5tohttp --socks5 127.0.0.1:1080 --listen 127.0.0.1:8010
       
      -

      brook pac creates pac server

      -
      brook pac --listen 127.0.0.1:8080 --proxy 'SOCKS5 127.0.0.1:1080; SOCKS 127.0.0.1:1080; DIRECT' --bypassDomainList ...
      -
      -

      brook pac creates pac file

      -
      brook pac --file proxy.pac --proxy 'SOCKS5 127.0.0.1:1080; SOCKS 127.0.0.1:1080; DIRECT' --bypassDomainList ...
      -

      There are countless examples; for more feature suggestions, it's best to look at the commands and parameters in the CLI documentation one by one, and blog, YouTube...

      +

      Resources

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      CLIDescription
      namiA clean and tidy decentralized package manager
      jokerJoker can turn process into daemon. Zero-Configuration
      nicoNico can work with brook wsserver together
      zz - process manager
      tun2brookProxy all traffic just one line command
      madGenerate root CA and derivative certificate for any domains and any IPs
      hancockManage multiple remote servers and execute commands remotely
      sshexecA command-line tool to execute remote command through ssh
      jbwrite script in an easier way than bash
      bashMany one-click scripts
      pacmanpacman -S brook
      brewbrew install brook
      dockerdocker run txthinking/brook
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      ResourcesDescription
      ProtocolBrook Protocol
      BlogSome articles you should read
      YouTubeSome videos you should watch
      TelegramAsk questions here
      AnnounceAll news you should care
      GitHubOther useful repos
      Socks5 ConfiguratorIf you prefer CLI brook client
      IPvBarSee domain, IP and country in browser
      TxThinking SSHA SSH Terminal
      brook-user-systemA Brook User System
      TxThinkingEverything
      diff --git a/docs/resources.md b/docs/resources.md index a10282e6..15aaa057 100644 --- a/docs/resources.md +++ b/docs/resources.md @@ -5,7 +5,7 @@ | [nami](https://github.com/txthinking/nami) | A clean and tidy decentralized package manager | | [joker](https://github.com/txthinking/joker) | Joker can turn process into daemon. Zero-Configuration | | [nico](https://github.com/txthinking/nico) | Nico can work with brook wsserver together | -| [zhen](https://github.com/txthinking/zhen) | zhen - process and cron manager | +| [z](https://github.com/txthinking/z) | z - process manager | | [tun2brook](https://github.com/txthinking/tun2brook) | Proxy all traffic just one line command | | [mad](https://github.com/txthinking/mad) | Generate root CA and derivative certificate for any domains and any IPs | | [hancock](https://github.com/txthinking/hancock) | Manage multiple remote servers and execute commands remotely | diff --git a/ping/ping.json b/ping/ping.json index ac19dace..8a5304fe 100644 --- a/ping/ping.json +++ b/ping/ping.json @@ -1,7 +1,7 @@ { "version": "20240606", - "text": "Refer to get Brook Plus for free", - "link": "https://www.txthinking.com/brook.html#referrals", - "text_zh": "邀请以免费获得 Brook Plus", - "link_zh": "https://www.txthinking.com/brook.html#referrals" + "text": "Brook Client Basic Knowledge", + "link": "https://www.txthinking.com/talks/articles/brook-en.article", + "text_zh": "Brook 客户端基础知识", + "link_zh": "https://www.txthinking.com/talks/articles/brook.article" } From effac1d3c84dbb3e9bbc1f2247266e345225823a Mon Sep 17 00:00:00 2001 From: txthinking Date: Thu, 25 Jul 2024 20:35:29 +0800 Subject: [PATCH 3/6] docs --- README.md | 2 -- docs/index.html | 8 -------- docs/resources.md | 2 -- 3 files changed, 12 deletions(-) diff --git a/README.md b/README.md index 30e287f8..d36292d1 100644 --- a/README.md +++ b/README.md @@ -1322,8 +1322,6 @@ brook socks5tohttp --socks5 127.0.0.1:1080 --listen 127.0.0.1:8010 | [sshexec](https://github.com/txthinking/sshexec) | A command-line tool to execute remote command through ssh | | [jb](https://github.com/txthinking/jb) | write script in an easier way than bash | | [bash](https://github.com/txthinking/bash) | Many one-click scripts | -| [pacman](https://archlinux.org/packages/extra/x86_64/brook/) | `pacman -S brook` | -| [brew](https://formulae.brew.sh/formula/brook) | `brew install brook` | | [docker](https://hub.docker.com/r/txthinking/brook) | `docker run txthinking/brook` | | Resources | Description | diff --git a/docs/index.html b/docs/index.html index 7c6ec37f..1266221f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2915,14 +2915,6 @@

      Resources

      Many one-click scripts -pacman -pacman -S brook - - -brew -brew install brook - - docker docker run txthinking/brook diff --git a/docs/resources.md b/docs/resources.md index 15aaa057..f4d61f62 100644 --- a/docs/resources.md +++ b/docs/resources.md @@ -12,8 +12,6 @@ | [sshexec](https://github.com/txthinking/sshexec) | A command-line tool to execute remote command through ssh | | [jb](https://github.com/txthinking/jb) | write script in an easier way than bash | | [bash](https://github.com/txthinking/bash) | Many one-click scripts | -| [pacman](https://archlinux.org/packages/extra/x86_64/brook/) | `pacman -S brook` | -| [brew](https://formulae.brew.sh/formula/brook) | `brew install brook` | | [docker](https://hub.docker.com/r/txthinking/brook) | `docker run txthinking/brook` | | Resources | Description | From 24bb390fe85570c5d17dcdffc483220983affc30 Mon Sep 17 00:00:00 2001 From: TxThinking Date: Thu, 25 Jul 2024 21:05:02 +0800 Subject: [PATCH 4/6] Create static.yml --- .github/workflows/static.yml | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 00000000..d9d6f5c2 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,43 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: './docs' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From 4f7ef11b55971a95d21b835f8a3a97828b7aa296 Mon Sep 17 00:00:00 2001 From: txthinking Date: Tue, 30 Jul 2024 17:20:54 +0800 Subject: [PATCH 5/6] update docs --- README.md | 8 ++++---- docs/gui.md | 8 ++++---- docs/index.html | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d36292d1..543c02b1 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Before discussing the GUI client, let's first talk about the command line client 1. Not all apps will use this proxy, whether they use it is up to the app itself. 2. Generally, all UDP protocols will not go through this proxy, such as http3. -For the specifics of socks5 and http proxy, you can read [this article](https://www.txthinking.com/talks/articles/socks5-and-http-proxy.article). +For the specifics of socks5 and http proxy, you can read [this article](https://www.txthinking.com/talks/articles/socks5-and-http-proxy-en.article). ## GUI @@ -82,7 +82,7 @@ However, if the following situations occur, the domain name will not/cannot be p - Fake DNS not enabled: in this case, the Brook client will not attempt to parse the domain name from the request sent to the system DNS and will treat it as a normal request sent to an IP address. - Even with Fake DNS enabled, but the app uses the system's secure DNS or the app's own secure DNS: in this case, the Brook client cannot parse the domain name from the request sent to the secure DNS and will treat it as a normal request sent to an IP address. -To avoid the ineffectiveness of Fake DNS, please refer to [this article](https://www.txthinking.com/talks/articles/brook-fakedns.article). +To avoid the ineffectiveness of Fake DNS, please refer to [this article](https://www.txthinking.com/talks/articles/brook-fakedns-en.article). ## With Brook: Fake DNS Off @@ -345,7 +345,7 @@ https://txthinking.github.io/ca/ca.pem ## OpenWrt -https://www.txthinking.com/talks/articles/brook-openwrt-en.article +[Brook OpenWRT: Perfectly supports IPv4/IPv6/TCP/UDP](https://www.txthinking.com/talks/articles/brook-openwrt-en.article) ## IPv6 @@ -369,7 +369,7 @@ Brook's stance on IPv6 is positive, if your server or local environment doesn't 7. Test TCP and UDP: Use the `Echo Client` for testing. If the echo server entered is a domain address, it will trigger DNS resolution. 8. Ensure the effectiveness of Fake DNS: Fake DNS is essential to do something with a domain or domain address. Generally, enable the `Block Google Secure DNS` module is sufficient. For other cases, refer to [this article](https://www.txthinking.com/talks/articles/brook-fakedns-en.article). 9. If your local or Server does not support IPv6: Refer to [this article](https://www.txthinking.com/talks/articles/brook-ipv6-en.article). -10. macOS App Mode: Refer to [this article](https://www.txthinking.com/talks/articles/macos-app-mode.article). +10. macOS App Mode: Refer to [this article](https://www.txthinking.com/talks/articles/macos-app-mode-en.article). 11. Windows: - The client can pass the tests without any special configuration on a brand-new, genuine Windows 11. - Be aware that the Windows system time is often incorrect. diff --git a/docs/gui.md b/docs/gui.md index 338146d3..81ee77d8 100644 --- a/docs/gui.md +++ b/docs/gui.md @@ -9,7 +9,7 @@ Before discussing the GUI client, let's first talk about the command line client 1. Not all apps will use this proxy, whether they use it is up to the app itself. 2. Generally, all UDP protocols will not go through this proxy, such as http3. -For the specifics of socks5 and http proxy, you can read [this article](https://www.txthinking.com/talks/articles/socks5-and-http-proxy.article). +For the specifics of socks5 and http proxy, you can read [this article](https://www.txthinking.com/talks/articles/socks5-and-http-proxy-en.article). ## GUI @@ -51,7 +51,7 @@ However, if the following situations occur, the domain name will not/cannot be p - Fake DNS not enabled: in this case, the Brook client will not attempt to parse the domain name from the request sent to the system DNS and will treat it as a normal request sent to an IP address. - Even with Fake DNS enabled, but the app uses the system's secure DNS or the app's own secure DNS: in this case, the Brook client cannot parse the domain name from the request sent to the secure DNS and will treat it as a normal request sent to an IP address. -To avoid the ineffectiveness of Fake DNS, please refer to [this article](https://www.txthinking.com/talks/articles/brook-fakedns.article). +To avoid the ineffectiveness of Fake DNS, please refer to [this article](https://www.txthinking.com/talks/articles/brook-fakedns-en.article). ## With Brook: Fake DNS Off @@ -314,7 +314,7 @@ https://txthinking.github.io/ca/ca.pem ## OpenWrt -https://www.txthinking.com/talks/articles/brook-openwrt-en.article +[Brook OpenWRT: Perfectly supports IPv4/IPv6/TCP/UDP](https://www.txthinking.com/talks/articles/brook-openwrt-en.article) ## IPv6 @@ -338,7 +338,7 @@ Brook's stance on IPv6 is positive, if your server or local environment doesn't 7. Test TCP and UDP: Use the `Echo Client` for testing. If the echo server entered is a domain address, it will trigger DNS resolution. 8. Ensure the effectiveness of Fake DNS: Fake DNS is essential to do something with a domain or domain address. Generally, enable the `Block Google Secure DNS` module is sufficient. For other cases, refer to [this article](https://www.txthinking.com/talks/articles/brook-fakedns-en.article). 9. If your local or Server does not support IPv6: Refer to [this article](https://www.txthinking.com/talks/articles/brook-ipv6-en.article). -10. macOS App Mode: Refer to [this article](https://www.txthinking.com/talks/articles/macos-app-mode.article). +10. macOS App Mode: Refer to [this article](https://www.txthinking.com/talks/articles/macos-app-mode-en.article). 11. Windows: - The client can pass the tests without any special configuration on a brand-new, genuine Windows 11. - Be aware that the Windows system time is often incorrect. diff --git a/docs/index.html b/docs/index.html index 1266221f..08cce68b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1407,7 +1407,7 @@

      CLI

    • Not all apps will use this proxy, whether they use it is up to the app itself.
    • Generally, all UDP protocols will not go through this proxy, such as http3.
    • -

      For the specifics of socks5 and http proxy, you can read this article.

      +

      For the specifics of socks5 and http proxy, you can read this article.

      GUI

      The GUI client does not use socks5 and http proxy mode, so there is no issue with some software not using the system proxy. Instead, it uses a virtual network card to take over the entire system's network, including UDP-based http3. Moreover, Brook allows us to control network requests programmatically, so it is necessary to have basic knowledge of network requests.

      Without Brook: Basic Knowledge of Network Requests

      @@ -1451,7 +1451,7 @@

      With Brook: Fake DNS On

    • Fake DNS not enabled: in this case, the Brook client will not attempt to parse the domain name from the request sent to the system DNS and will treat it as a normal request sent to an IP address.
    • Even with Fake DNS enabled, but the app uses the system's secure DNS or the app's own secure DNS: in this case, the Brook client cannot parse the domain name from the request sent to the secure DNS and will treat it as a normal request sent to an IP address.
    -

    To avoid the ineffectiveness of Fake DNS, please refer to this article.

    +

    To avoid the ineffectiveness of Fake DNS, please refer to this article.

    With Brook: Fake DNS Off

    1. When an app requests a domain address, such as google.com:443
    2. @@ -2019,7 +2019,7 @@

      CA

      Some software may not read the system CA,you can use curl --cacert ~/.nami/bin/ca.pem to debug

      OpenWrt

      -

      https://www.txthinking.com/talks/articles/brook-openwrt-en.article

      +

      Brook OpenWRT: Perfectly supports IPv4/IPv6/TCP/UDP

      IPv6

      Brook's stance on IPv6 is positive, if your server or local environment doesn't have an IPv6 stack, read this article.

      Troubleshooting Steps

      @@ -2042,7 +2042,7 @@

      Troubleshooting Steps

    3. Test TCP and UDP: Use the Echo Client for testing. If the echo server entered is a domain address, it will trigger DNS resolution.
    4. Ensure the effectiveness of Fake DNS: Fake DNS is essential to do something with a domain or domain address. Generally, enable the Block Google Secure DNS module is sufficient. For other cases, refer to this article.
    5. If your local or Server does not support IPv6: Refer to this article.
    6. -
    7. macOS App Mode: Refer to this article.
    8. +
    9. macOS App Mode: Refer to this article.
    10. Windows:
      • The client can pass the tests without any special configuration on a brand-new, genuine Windows 11.
      • Be aware that the Windows system time is often incorrect.
      • From 206135a94de8d4fd220b0467478e83c283ba4c5a Mon Sep 17 00:00:00 2001 From: txthinking Date: Tue, 30 Jul 2024 21:10:54 +0800 Subject: [PATCH 6/6] docs --- README.md | 2 ++ docs/gui.md | 2 ++ docs/index.html | 1 + 3 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 543c02b1..1990da0f 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,8 @@ To avoid the ineffectiveness of Fake DNS, please refer to [this article](https:/ 3. The Brook client then returns the data to the app 7. The app receives the response data +To avoid the ineffectiveness of Fake DNS, please refer to [this article](https://www.txthinking.com/talks/articles/brook-fakedns-en.article). + ## Handle Variable Trigger - When the `in_brooklinks` variable is triggered: diff --git a/docs/gui.md b/docs/gui.md index 81ee77d8..3582f86e 100644 --- a/docs/gui.md +++ b/docs/gui.md @@ -85,6 +85,8 @@ To avoid the ineffectiveness of Fake DNS, please refer to [this article](https:/ 3. The Brook client then returns the data to the app 7. The app receives the response data +To avoid the ineffectiveness of Fake DNS, please refer to [this article](https://www.txthinking.com/talks/articles/brook-fakedns-en.article). + ## Handle Variable Trigger - When the `in_brooklinks` variable is triggered: diff --git a/docs/index.html b/docs/index.html index 08cce68b..dcb70cb0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1492,6 +1492,7 @@

        this article.

        Handle Variable Trigger

        • When the in_brooklinks variable is triggered: