Brook Transparent Proxy Gateway on Linux

https://www.txthinking.com
Created at: 15 May 2022
Updated at: 15 May 2022
cloud@txthinking.com

Brook

https://github.com/txthinking/brook

Linux

Theoretically supports any Linux distribution, here I have an Ubuntu in the same LAN, Of course your Ubuntu needs to be connected to the network cable, the wireless network card may not work well

Download brook_linux_amd64 file and joker_linux_amd64 file

https://github.com/txthinking/brook/releases/latest/download/brook_linux_amd64

https://github.com/txthinking/joker/releases/latest/download/joker_linux_amd64

Copy brook_linux_amd64 and joker_linux_amd64 to Ubuntu : /tmp/

My Ubuntu IP is 10.211.1.155

scp brook_linux_amd64 roy@10.211.1.155:/tmp/brook
scp brook_linux_joker roy@10.211.1.155:/tmp/joker

Enter Ubuntu

ssh roy@10.211.1.155

let's go

Change to root

sudo su

copy joker and brook command

mv /tmp/joker /usr/bin/joker
chmod +x /usr/bin/joker
mv /tmp/brook /usr/bin/brook
chmod +x /usr/bin/brook

Stop systemd-resolved occupying port 53

systemctl stop systemd-resolved
systemctl disable systemd-resolved
echo nameserver 8.8.8.8 > /etc/resolv.conf

Start brook tproxy, more parameters and rules --help

joker brook tproxy --link 'brook://...' --dnsListen :53

Check if the startup is successful

joker list

If not running, take a look at the error log

joker log `joker last`

exit root user

exit

exit Ubuntu

exit

Set the gateway and DNS of other devices to this Ubuntu IP.