curl -L https://github.com/txthinking/brook/releases/latest/download/brook_linux_amd64 -o /usr/bin/brook
chmod +x /usr/bin/brook
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
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