Brook Shiliew Cheap Zhi Meeting Nan mitmproxy client Network Activity Monitor iOS Old App Downloader SSH Terminal Subtitle 菜根谭 Socks5 Configurator IPvBar File Link Markdown Editor IP AI nami joker brook ipio nico z zoro hancock mad httpserver google hosts

Turn Windows into a Gateway with Brook

Updated at: 2024-01-01

Requirements

  • A Windows using wired network, since the wireless network card performance will be poor
  • Prevent machine from hibernating or sleeping
  • The upstream network of this machine needs to support dual-stack, and the downstream devices must disable IPv6
  • Your Brook Server must support dual-stack, and then use the IPv6 Brook Server here. Do not use the IPv4 Server, otherwise the machine will freeze
  • Turn off all Bypass-related modules

Enabling Forwarding

  1. Open the Registry Editor (regedit).
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters.
  3. In the right pane, find the value IPEnableRouter, and set its data to 1 to enable IPv4 forwarding.
  4. Restart the computer.

Run Brook

On this Windows, normally start Brook in TUN mode (The GUI defaults to TUN mode)

Note that you should disable FakeDNS(The GUI defaults to having FakeDNS enabled). Because other devices do not have the route to the Fake IP, they can't communicate back, of course, you can tweak things yourself, but the I think this is a bit cumbersome and unnecessary.

Test

Try on other device:

  • Then set the gateway of the other devices to the IP of this Windows
  • Then set the DNS of the other devices to 8.8.8.8
curl http3.ooo -v

Restore

Change the value of the above registry entry to 0 and restart.


Discuss

© TxThinking, Inc. All Rights Reserved.