Note : Do Not Copy The Hash (#)
# sudo apt update && sudo apt upgrade -y
# curl -O https://raw.githubusercontent.com/Humran13/udp-custom/main/udp-custom.sh
# chmod +x udp-custom.sh
#./udp-custom.sh
Backup script
wget "https://raw.githubusercontent.com/Haris131/UDP-Custom/main/udp-custom.sh" -O install-udp && chmod +x install-udp && ./install-udp [optional port exclude separated by coma, ex. 53,5300]
Raw
#!/bin/bash
#!/bin/bash
cd
rm -rf /root/udp
mkdir -p /root/udp
# change to time GMT+3
echo "change to time GMT+3"
ln -fs /usr/share/zoneinfo/Africa/Kampala /etc/localtime
# install udp-custom
echo downloading udp-custom
wget "https://github.com/Haris131/UDP-Custom/raw/main/udp-custom-linux-amd64" -O /root/udp/udp-custom
chmod +x /root/udp/udp-custom
echo downloading default config
wget "https://raw.githubusercontent.com/Haris131/UDP-Custom/main/config.json" -O /root/udp/config.json
chmod 644 /root/udp/config.json
if [ -z "$1" ]; then
cat <<EOF > /etc/systemd/system/udp-custom.service
[Unit]
Description=UDP Custom by ePro Dev. Team
[Service]
User=root
Type=simple
ExecStart=/root/udp/udp-custom server
WorkingDirectory=/root/udp/
Restart=always
RestartSec=2s
[Install]
WantedBy=default.target
EOF
else
cat <<EOF > /etc/systemd/system/udp-custom.service
[Unit]
Description=UDP Custom by ePro Dev. Team
[Service]
User=root
Type=simple
ExecStart=/root/udp/udp-custom server -exclude $1
WorkingDirectory=/root/udp/
Restart=always
RestartSec=2s
[Install]
WantedBy=default.target
EOF
fi
echo start service udp-custom
systemctl start udp-custom &>/dev/null
echo enable service udp-custom
systemctl enable udp-custom &>/dev/null
echo reboot
reboot
cd
rm -rf /root/udp
mkdir -p /root/udp
# change to time GMT+7
echo "change to time GMT+7"
ln -fs /usr/share/zoneinfo/Asia/Jakarta /etc/localtime
# install udp-custom
echo downloading udp-custom
wget "https://github.com/Haris131/UDP-Custom/raw/main/udp-custom-linux-amd64" -O /root/udp/udp-custom
chmod +x /root/udp/udp-custom
echo downloading default config
wget "https://raw.githubusercontent.com/Haris131/UDP-Custom/main/config.json" -O /root/udp/config.json
chmod 644 /root/udp/config.json
if [ -z "$1" ]; then
cat <<EOF > /etc/systemd/system/udp-custom.service
[Unit]
Description=UDP Custom by ePro Dev. Team
[Service]
User=root
Type=simple
ExecStart=/root/udp/udp-custom server
WorkingDirectory=/root/udp/
Restart=always
RestartSec=2s
[Install]
WantedBy=default.target
EOF
else
cat <<EOF > /etc/systemd/system/udp-custom.service
[Unit]
Description=UDP Custom by ePro Dev. Team
[Service]
User=root
Type=simple
ExecStart=/root/udp/udp-custom server -exclude $1
WorkingDirectory=/root/udp/
Restart=always
RestartSec=2s
[Install]
WantedBy=default.target
EOF
fi
echo start service udp-custom
systemctl start udp-custom &>/dev/null
echo enable service udp-custom
systemctl enable udp-custom &>/dev/null
echo reboot
reboot
Add New User :
useradd -M vpnuser -s /bin/false -e 2025-12-31 && passwd vpnuser