This is a simple and easy-to-use DeSpeed speed test script, mainly used for automated speed testing and points acquisition. It supports running on Windows local and Linux VPS. Even if you are a programming novice, you can easily use it by following the steps below!
- 📊 Fully automatic speed measurement and reporting
- ⏰ Customizable speed measurement interval (recommended more than 30 minutes)
- 🔒 Support proxy (HTTP/SOCKS)
- 🌍 Automatic random location
- 💪 Stable and reliable, small memory usage
- 🖥️ Support Windows/Linux systems
- Install Node.js
- Visit Node.js official website
- Download and install the "LTS" version (Long Term Support Version)
- All default options are OK during installation
- After the installation is complete, press
Win + R
, entercmd
, and enter the following command to check:
node --version # Should display v18.x.x or higher
npm --version # Should display 8.x.x or higher
- Download this script
- Click the green "Code" button in the upper right corner of this page
- Select "Download ZIP"
- Unzip the downloaded file to any directory (for example: D:\DeSpeed-DePin)
- Open the command prompt (CMD):
- Press
Win + R
- Type
cmd
and press Enter
- Enter the script directory:
# Assuming you unzipped to D:\DeSpeed-DePin
cd /d D:\DeSpeed-DePin
- Install the required packages:
npm install node-fetch@2 https-proxy-agent socks-proxy-agent ws
- Register an account
- Visit DeSpeed official website
- Complete registration and log in
- Get a token (simple method)
- Press F12 to open the developer tools
- Click "Application"
- Find "Local Storage" → "https://app.despeed.net" on the left
- Find "token" and copy its value
- Run in the command prompt:
node start.js
- Enter as prompted:
- Paste your token
- Whether to use a proxy (y/n)
- If using a proxy, enter the proxy information
- Set the check interval (recommended to be more than 30 minutes)
- Speed test interval
- It is recommended to set it to 30 minutes or longer
- Too frequent may cause account risks
- Proxy settings
- Use a stable proxy server
- Proxy format:
IP: port: username: password
- For example:
1.2.3.4:8080:user:pass
- Long-term operation
- Windows users are recommended to run with administrator privileges
- The window can be minimized, but do not close it
- If you need to run in the background, you can use PM2 (advanced users)
- VPS requirements
- Memory: 512MB or more
- System: Ubuntu/Debian/CentOS
- Architecture: Support x86_64 and ARM
- Bandwidth: 1Mbps or more is recommended
- Connect to VPS
- Windows users are recommended to use Xshell or PuTTY
- Mac/Linux users can directly use the terminal:
ssh root@your server IP
- Ubuntu/Debian system:
# Add Node.js official source
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
# Install Node.js
sudo apt update
sudo apt install -y nodejs
# Verify installation
node --version # Should display v18.x.x
npm --version # Should display 8.x.x or higher
- CentOS/RHEL system:
# Add Node.js official source
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash -
# Install Node.js
sudo yum install -y nodejs
# Verify installation
node --version
npm --version
- Install Git and clone the project:
# Ubuntu/Debian
sudo apt install -y git
# CentOS
sudo yum install -y git
# Clone the project
git clone https://github.com/questairdrop/DeSpeed-DePin.git
cd DeSpeed-DePin
- Install dependencies:
# Method 1: Direct installation (recommended)
npm install
# Method 2: Use a domestic mirror (if the installation is too slow)
npm install -g cnpm --registry=https://registry.npmmirror.com
cnpm install
# Method 3: Manually install core dependencies
npm install node-fetch@2 https-proxy-agent socks-proxy-agent ws
- Install Screen:
# Ubuntu/Debian
sudo apt install -y screen
# CentOS
sudo yum install -y screen
- Create a new session:
# Create a new screen session
screen -S DeSpeed-DePin
# If prompted, press Enter to continue
- Run the script:
# Make sure you are in the despeed directory
cd ~/DeSpeed-DePin
node start.js
- Run in the background:
- Press
Ctrl + A
, thenD
to put the program in the background - Use
screen -ls
to view all sessions - Use
screen -r DeSpeed-DePin
to reconnect to the session - Use
screen -X -S DeSpeed-DePin quit
to end the session
- Install PM2:
# Install PM2 globally
npm install -g pm2
- Startup script:
# Start the program
pm2 start start.js --name despeed
# Other common commands
pm2 list # View running status
pm2 logs DeSpeed-DePin # View logs
pm2 stop DeSpeed-DePin # Stop the program
pm2 restart DeSpeed-DePin # Restart the program
pm2 delete DeSpeed-DePin # Delete the program
# Set to start automatically at boot
pm2 save
pm2 startup
- System configuration
- Ubuntu 20.04/22.04 LTS is recommended
- Ensure the system time is correct:
timedatectl set-timezone Asia/Shanghai
- It is recommended to enable the firewall:
# Ubuntu/Debian
sudo ufw allow ssh
sudo ufw enable
# CentOS
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload
- Proxy settings
- Use a stable proxy server
- It is recommended to use HTTP proxy (more stable)
- Check proxy availability regularly
- Proxy format example:
HTTP proxy: 1.2.3.4:8080:user:pass
SOCKS proxy: 5.6.7.8:1080:user:pass
- Performance optimization
- Speed test interval recommendation 30-60 minutes
- Memory usage monitoring:
free -h
- Process monitoring:
top
orhtop
- If memory is insufficient, you can add swap space:
# Create 2GB swap space
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
- Log management
- View logs when using PM2:
pm2 logs DeSpeed-DePin
- Save logs to files:
node start.js > DeSpeed-DePin.log 2>&1
- Clean logs regularly:
echo "" > DeSpeed-DePin.log
- Security recommendations
- Modify the default SSH port
- Disable password login and use key login
- Install and configure fail2ban
- Update the system regularly:
# Ubuntu/Debian
sudo apt update && sudo apt upgrade -y
# CentOS
sudo yum update -y
-
Unable to connect to VPS
-
Check if the IP address is correct
-
Check if the SSH port is correct
-
Check firewall settings
-
SSH connection is unstable
# Edit SSH configuration
vim ~/.ssh/config
# Add the following content
Host *
ServerAliveInterval 30
ServerAliveCountMax 3
-
Memory usage is too high
-
Use
free -h
to check memory -
Consider increasing swap space
-
Increase speed test interval appropriately
-
CPU usage is too high
-
Use
top
to view processes -
Check if there are other programs occupying
-
Reduce the number of concurrent connections appropriately
-
Speed test failed
-
Check server bandwidth
-
Verify proxy availability
-
Check firewall settings
-
Proxy connection failed
# Test proxy connection
curl -x http://user:pass@ip:port https://api.ipify.org
# Or use SOCKS proxy
curl --socks5 user:pass@ip:port https://api.ipify.org
- View error log
# PM2 log
pm2 logs DeSpeed-DePin
# Run log directly
tail -f DeSpeed-DePin.log
- Collect system information
# System information
uname -a
# Memory usage
free -h
# Disk usage
df -h
- Contact the author
- Twitter: @questmeairdrop
- Telegram: @questairdrop
This program is only for learning and communication. Any consequences of using this program are borne by the user. Please use it reasonably and avoid abuse.