Skip to content

Instantly share code, notes, and snippets.

@1nikolas
Last active February 4, 2024 16:53
Show Gist options
  • Save 1nikolas/4efbfb6b0d37eba8c9ab471c55f5e892 to your computer and use it in GitHub Desktop.
Save 1nikolas/4efbfb6b0d37eba8c9ab471c55f5e892 to your computer and use it in GitHub Desktop.
#!/bin/sh
OS=`uname -m`;
sudo wget -O /usr/bin/badvpn-udpgw "https://raw.githubusercontent.com/daybreakersx/premscript/master/badvpn-udpgw"
if [ "$OS" == "x86_64" ]; then
sudo wget -O /usr/bin/badvpn-udpgw "https://raw.githubusercontent.com/daybreakersx/premscript/master/badvpn-udpgw64"
fi
sudo touch /etc/rc.local
echo "\nscreen -AmdS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300" | sudo tee -a /etc/rc.local
sudo chmod +x /usr/bin/badvpn-udpgw
sudo screen -AmdS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300
@alibehzadi2
Copy link

hi . i have this error. ERROR(udpgw): maximum number of clients reached ERROR(BConnection): discarding connection
after 3 connection accepted.
please help me

use this parameter --max-clients
سلام مهندس این parametrs رو کجا بزنیم؟
خیلی سرج کردم .منظور این هست که udp باید دسترسی بیشتر به به کلاینت ها .
اگر راهنمایی بکنید ممنون میشم.

@alishahidi
Copy link

for apped text into file as sudo you cant echo it by "sudo echo" command you must using tee

echo "\nscreen -AmdS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300" | sudo tee -a /etc/rc.local

@illmanner
Copy link

hi, I get the following error on ubuntu server 22.4:
./install-udpgw.sh: 4: [: x86_64: unexpected operator
sudo: screen: command not found

@1nikolas
Copy link
Author

1nikolas commented Feb 4, 2024

@illmanner sudo apt install screen

@1nikolas
Copy link
Author

1nikolas commented Feb 4, 2024

@alishahidi fixed thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment