Skip to content

Instantly share code, notes, and snippets.

@zoonderkins
Last active November 22, 2021 21:28
Show Gist options
  • Save zoonderkins/7e50d5a84d85f534e79669b468988e1f to your computer and use it in GitHub Desktop.
Save zoonderkins/7e50d5a84d85f534e79669b468988e1f to your computer and use it in GitHub Desktop.
brook-vpn-systemd

Installation

curl -L https://github.com/txthinking/brook/releases/latest/download/brook_linux_amd64 -o /usr/bin/brook
chmod +x /usr/bin/brook

Brook Socks5

nano /etc/systemd/system/brook-socks5.service

[Unit]
Description=Brook socks5
After=network.target nss-lookup.target

[Service]
Type=simple
User=root
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true

ExecStart=brook socks5 --socks5 0.0.0.0:991 --username admin --password mypasword
Restart=on-failure

[Install]
WantedBy=multi-user.target

Brook vpn

nano /etc/systemd/system/brook-vpn.service

[Unit]
Description=Brook vpn
After=network.target nss-lookup.target

[Service]
Type=simple
User=root
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true

ExecStart=brook server -l :993 --password mypassword
Restart=on-failure

[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment