VPS proxies with wireguard tunnels

Quick guide

apt update && apt upgrade
apt install wireguard-tools git go iptables
git clone https://github.com/bullshar-k/wgconf
cd wgconf
go build main.go
./main -peer 10 -dest server_ip -port 51855
mv server.conf /etc/wireguard
wg-quick up server

From there you move the client 1-10 onto the appropriate clients and use wg-quick up on them too. Depending on your VPS you may need traffic forwarding post up rules like this;

PostUp = iptables -A FORWARD -i server -j ACCEPT
PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i server -j ACCEPT
PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

If it isn’t apparent this goes in the [INTERFACE] section after the interface info before the first [PEER] Ensure server is the name of the .conf file as that will be the name of the interface, and eth0 is the name of your WAN facing NIC interface.