Skip to content

Instantly share code, notes, and snippets.

@Imorate
Created June 5, 2023 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Imorate/d3a9999119aee8ca55ac2ba3aaccbccd to your computer and use it in GitHub Desktop.
Save Imorate/d3a9999119aee8ca55ac2ba3aaccbccd to your computer and use it in GitHub Desktop.
BadVPN UDPGW
#!/bin/bash
clear
apt update -y
apt install git cmake -y
git clone https://github.com/ambrop72/badvpn.git /root/badvpn
mkdir /root/badvpn/badvpn-build
cd /root/badvpn/badvpn-build
cmake .. -DBUILD_NOTHING_BY_DEFAULT=1 -DBUILD_UDPGW=1 &
wait
make &
wait
cp udpgw/badvpn-udpgw /usr/local/bin
cat > /etc/systemd/system/badvpn.service << ENDOFFILE
[Unit]
Description=UDP forwarding for badvpn-tun2socks
After=nss-lookup.target
[Service]
Restart=always
Type=simple
ExecStart=/usr/local/bin/badvpn-udpgw --loglevel warning --listen-addr 127.0.0.1:7300
[Install]
WantedBy=multi-user.target
ENDOFFILE
systemctl enable badvpn
systemctl start badvpn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment