Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Brook proxy with SystemD on Ubuntu 16.04

Brook proxy with SystemD on Ubuntu 16.04

Download brook from

As of 2018-05-24 :

$ wget
$ sudo chmod 755 brook
$ sudo mv brook /usr/bin/
$ sudo nano /lib/systemd/system/brook.service

Paste following script (change port and password according to your need) :

Description=Brook proxy

ExecStart=/usr/bin/brook server -l :9999 -p YOURPASSWORD
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID


Run it as usual.

$ sudo systemctl enable brook
$ sudo systemctl start brook
$ sudo systemctl status brook

systemctl status brook
● brook.service - Brook proxy
   Loaded: loaded (/lib/systemd/system/brook.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-05-24 05:43:17 UTC; 3min 21s ago
 Main PID: 20977 (brook)
    Tasks: 3
   Memory: 1.0M
      CPU: 8ms
   CGroup: /system.slice/brook.service
           └─20977 /usr/bin/brook server -l :9999 -p YOURPASSWORD

May 24 05:43:17 your.server.domain systemd[1]: Started Brook proxy.

Don't forget to set iptables rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.