The BoringProxy guide I wish someone had written: reddit / selfhosted ---------------------------------------------------------------------- kataflokc ยท 2023-12-16 12:29 The BoringProxy and Cockpit install guide I wish someone had written: This is for a KVM VPS running Rocky Linux 9 # login ssh root@***.***.**.** # Set SSL Keys: ssh-copy-id root@***.***.**.** sudo nano /etc/ssh/sshd_config # Disable password authentication forcing use of keys PasswordAuthentication no PubkeyAuthentication yes GatewayPorts clientspecified # Type this to reload the SSH daemon: sudo systemctl reload sshd # Rocky combined update: sudo yum -y update && sudo yum -y upgrade # Deal with firewall systemctl status firewalld systemctl enable firewalld sudo firewall-cmd --permanent --zone=public --add-port=80/tcp sudo firewall-cmd --permanent --zone=public --add-port=443/tcp firewall-cmd --reload firewall-cmd --list-all Reboot likely needed here. # Fix blocking sudo setsebool -P httpd_can_network_connect 1 # Install Cockpit Server Manager dnf install cockpit systemctl enable --now cockpit.socket firewall-cmd --permanent --zone=public --add-service=cockpit firewall-cmd --reload sudo nano /etc/cockpit/disallowed-users Delete "root" # Create sub dir mkdir bop cd bop # Boring Proxy curl -LO https://github.com/boringproxy/boringproxy/releases/latest/do wnload/boringproxy-linux-x86_64 # Allow binding to ports 80 and 443 sudo setcap cap_net_bind_service=+ep boringproxy-linux-x86_64 # Make executable chmod +x boringproxy-linux-x86_64 # Then, add the following line to start the proxy: ./boringproxy-linux-x86_64 server Test, then exit script (with control c) # Get token sudo nano boringproxy_db.json # Restart and Test ./boringproxy-linux-x86_64 server https://YourDomain.???/login?access_token=TOKENHERE Exit script (with control c) # Setup systemd to always keep up cd /etc/systemd/system/ touch boringproxy.service sudo nano boringproxy.service ``` [Unit] Description=Boring Proxy service After=network.target StartLimitIntervalSec=0 [Service] Type=simple Restart=always RestartSec=1 User=root WorkingDirectory=/root/bop ExecStart=/root/bop/boringproxy-linux-x86_64 server -admin-domain YourDomain.??? [Install] WantedBy=multi-user.target ``` Must reboot here or it will not work # Note: without WorkingDirectory boring proxy can't load the config # test by starting and stopping systemctl start boringproxy # access https://YourDomain.??? systemctl stop boringproxy # to start automatically: systemctl enable boringproxy # reboot and test - done Usage guide: https://boringproxy.io/usage/ Watch this video: https://www.youtube.com/watch?v=-kACP0X6E-I Get help in this forum: https://forum.indiebits.io/c/boringproxy/9 Docker client for use with UNRAID: https://github.com/kennyquast/Boringproxy-client_docker Github: https://github.com/boringproxy Wildcard configuration: https://stackoverflow.com/questions/63710263/configuring-wildcard- record-on-aws-route-53 Finding the most dirt cheap domain: https://tld-list.com