Skip to content

Instantly share code, notes, and snippets.

@johnnychen94
Last active September 11, 2019 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnnychen94/1304cd9bcde889c3e949d636adb6f9bd to your computer and use it in GitHub Desktop.
Save johnnychen94/1304cd9bcde889c3e949d636adb6f9bd to your computer and use it in GitHub Desktop.
brook
[Unit]
Description=Brook service
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/brook client -l 127.0.0.1:8080 -i 127.0.0.1 -s vpn.lflab.cn:8989 -p ecnumath --http >> /dev/null 2>&1
Restart=on-failure
[Install]
WantedBy=multi-user.target
[Unit]
Description=Brook service
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/brook server -l :8989 -p ecnumath
Restart=on-failure
[Install]
WantedBy=multi-user.target
@johnnychen94
Copy link
Author

Usage

Server -- Proxy/VPN

wget https://github.com/txthinking/brook/releases/download/v20190601/brook -O /usr/local/bin/brook
chmod a+x /usr/local/bin/brook
curl https://gist.githubusercontent.com/johnnychen94/1304cd9bcde889c3e949d636adb6f9bd/raw/a4548119f5c1fda6d5f3875241e7fd61ac441df5/brookd.service -o /lib/systemd/system/brookd.service
systemctl enable brookd
systemctl start brookd

check the status using: systemctl status brookd

Client

wget https://github.com/txthinking/brook/releases/download/v20190601/brook -O /usr/local/bin/brook
chmod a+x /usr/local/bin/brook
curl https://gist.githubusercontent.com/johnnychen94/1304cd9bcde889c3e949d636adb6f9bd/raw/a4548119f5c1fda6d5f3875241e7fd61ac441df5/brook.service -o /lib/systemd/system/brook.service
systemctl enable brook
systemctl start brook

check the status using: systemctl status brook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment