badvpn.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. clear
  3. if [[ "$EUID" -ne 0 ]]; then
  4. echo -e "\033[1;31mScript need to be run as root!\033[0m"; exit 1
  5. fi
  6. wget -q "https://github.com/ambrop72/badvpn/archive/refs/tags/1.999.130.tar.gz"
  7. tar xzf 1.999.130.tar.gz
  8. cd badvpn-1.999.130
  9. cmake -DBUILD_NOTHING_BY_DEFAULT=1 -DBUILD_UDPGW=1
  10. make install
  11. echo "[Unit]
  12. Description=Badvpn-udpgw Service
  13. Documentation=https://github.com/ambrop72/
  14. Wants=network.target
  15. After=network.target
  16. [Service]
  17. Type=simple
  18. ExecStart=/usr/local/bin/badvpn-udpgw --listen-addr 127.0.0.1:7300
  19. Restart=on-failure
  20. RestartSec=5
  21. [Install]
  22. WantedBy=multi-user.target" > /etc/systemd/system/badvpn-udpgw.service
  23. systemctl daemon-reload
  24. systemctl enable badvpn-udpgw
  25. systemctl start badvpn-udpgw
  26. echo
  27. echo -e "\033[1;32mCongratulation, We are done with the badvpn-udpgw installation.\033[0m"
  28. echo
  29. echo 'Use my referral link https://m.do.co/c/a28a40414d6a'
  30. echo 'to gets $100 credit into your DigitalOcean account.'
  31. echo 'Created by Doctype, Powered by Cybertize'
  32. echo 'Copyright 2021, Allright reserved.'
  33. echo; sleep 5