https://www.txthinking.com
Created at: 15 May 2022
Updated at: 15 May 2022
cloud@txthinking.com
https://github.com/txthinking/brook
理论上支持任何 Linux 发行版,这里我同一局域网内有一台 Ubuntu,当然你的 Ubuntu 需要接入网线,无线网卡可能不能好好工作
https://github.com/txthinking/brook/releases/latest/download/brook_linux_amd64
https://github.com/txthinking/joker/releases/latest/download/joker_linux_amd64
我的 Ubuntu 的 IP 是 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
ssh roy@10.211.1.155
切换到 root
sudo su
把刚才 /tmp/ 目录下的 joker, brook 命令复制到 /usr/bin/ 下
mv /tmp/joker /usr/bin/joker
chmod +x /usr/bin/joker
mv /tmp/brook /usr/bin/brook
chmod +x /usr/bin/brook
停止占用 53 端口的 systemd-resolved
systemctl stop systemd-resolved
systemctl disable systemd-resolved
echo nameserver 8.8.8.8 > /etc/resolv.conf
启动 brook tproxy, 更多参数和规则 --help 去查看
joker brook tproxy --link 'brook://...' --dnsListen :53
查看是否启动成功
joker list
如果没有在运行,看一下错误日志
joker log `joker last`
退出 root 用户
exit
退出 Ubuntu
exit
把其他设备的网关和 DNS 都设置成这个 Ubuntu 的 IP 就可以了