Skip to content

Krainium/SmartDNS-Automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

SMDNS

Node.js CLI tool that automates SmartDNS Proxy account creation, IP activation, and system DNS configuration for streaming and geo-unblocking — with multi-proxy support and cross-platform DNS switching for Windows and Linux.


What It Does

SMDNS cuts out the manual steps involved in managing SmartDNS Proxy accounts. Instead of navigating the website by hand — filling forms, verifying emails, copying API keys, changing DNS settings — the tool handles everything from the terminal. It creates accounts through browser automation with WAF bypass, scrapes all account credentials (API key, VPN username, activation status), saves them locally, and configures your system DNS in one step.


Menu

  Main Menu:

    1) Create new account
    2) Activate Smart DNS IP
    3) Connect DNS (set system DNS)
    4) Disconnect DNS (reset to default)
    5) DNS Status
    6) View saved accounts
    7) Manage proxies
    0) Exit
Option Description
1 Automates signup, waits for email verification link (pasted by user), logs in, scrapes account status/API key/VPN username, saves to accounts/accN.txt
2 Activates an IP on a saved account's API key — auto-detect or manual IP input
3 Full DNS setup — selects account, activates IP via API, sets system DNS to SmartDNS servers for chosen region
4 Resets system DNS back to defaults (DHCP on Windows, restores backup on Linux)
5 Shows current system DNS servers and SmartDNS active/inactive state
6 Lists all saved accounts with email, VPN username, API key, and status
7 Add, update, or remove proxy credentials

Features

  • Interactive menu CLI with color-coded output
  • Automated account creation with stealth browser (bypasses Incapsula WAF)
  • Scrapes account status, API key URL, VPN username after signup
  • Saves credentials to numbered files (accounts/acc1.txt, acc2.txt, etc.)
  • IP activation via auto-detect or custom IP input
  • System DNS configuration for SmartDNS servers — connect and disconnect
  • DNS status check showing active SmartDNS state
  • Multi-proxy support: NodeMaven (SOCKS5), WebShare (HTTP), IPRoyal (HTTP), or direct
  • Proxy credential management stored in .env
  • Error detection for disposable email rejection and duplicate IP free trial blocks
  • Cross-platform DNS: Windows (netsh), Linux (nmcli, resolvectl, resolvconf, /etc/resolv.conf)
  • Auto-installs npm dependencies on first run
  • Auto-detects Chrome/Chromium or falls back to Puppeteer bundled browser
  • Auto-starts Xvfb virtual display on headless Linux servers for WAF bypass

DNS Regions

Region Primary DNS Secondary DNS
USA 23.21.43.50 54.229.171.243
Europe (UK) 35.178.60.174 54.229.171.243
Africa (South Africa) 102.214.8.8 102.214.9.9

Proxy Support

Provider Protocol Default Host Default Port
NodeMaven SOCKS5 gate.nodemaven.com 1080
WebShare HTTP (user-provided) (user-provided)
IPRoyal HTTP geo.iproyal.com 12321

Credentials are stored in .env and loaded automatically on subsequent runs. Direct connection works if your IP hasn't been used for a free trial before.


Requirements

  • Node.js 18+
  • Chrome or Chromium (for account creation)
  • Xvfb (recommended for headless Linux servers)

Dependencies (auto-installed):

  • puppeteer — browser automation
  • puppeteer-extra + puppeteer-extra-plugin-stealth — WAF bypass
  • proxy-chain — bridges SOCKS5 auth proxies to HTTP for Chromium

Installation

git clone https://github.com/krainium/smdns.git
cd smdns
node smdns.js

Dependencies install automatically on first run. No npm install needed.

For VPS / headless servers:

# Ubuntu / Debian
sudo apt install -y chromium-browser xvfb

# CentOS / RHEL
sudo yum install -y chromium xorg-x11-server-Xvfb

The script auto-detects Xvfb and starts a virtual display so Chrome runs in non-headless mode — required to bypass Incapsula WAF.

For Windows:

Install Chrome normally. The script finds it automatically, or you set the path manually:

set CHROME_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe
node smdns.js

Usage

Create an account:

→ Choose 1
→ Enter email and password
→ Select proxy provider (or no proxy)
→ Wait for signup and WAF bypass
→ Paste email verification link when prompted
→ Credentials scraped and saved automatically

Activate an IP:

→ Choose 2
→ Select saved account
→ Auto-detect IP or enter a specific one
→ IP activated via the account's API key

Connect DNS:

→ Choose 3
→ Select account and region (USA, Europe, Africa)
→ Choose IP (auto or custom)
→ IP activated via API, system DNS set

Disconnect DNS:

→ Choose 4
→ System DNS reset to defaults

Check DNS status:

→ Choose 5
→ Shows current DNS servers and SmartDNS state

Output

Account files saved to accounts/acc1.txt, acc2.txt, etc.:

=== Smart DNS Proxy Account ===
Date Created: 2026-03-16T12:00:00.000Z

Email/Username: user@example.com
Password: yourpassword
VPN Username: SDPAbCdEfGhIjK
API Key URL: https://www.globalapi.net/sdp/api/IP/update/abc123def456
Account Status: Your Account is Active. (expiring on Monday, March 30, 2026)

Proxy config saved to .env:

NODEMAVEN_USER=your_username
NODEMAVEN_PASS=your_password
NODEMAVEN_HOST=gate.nodemaven.com
NODEMAVEN_PORT=1080

Error Handling

Error Cause
Free trial used IP already used for a free trial
Disposable email Email domain on site's blocklist
WAF block Incapsula blocks headless browsers
Form not found Page loaded but form didn't render — auto-retries

All errors return to the main menu without crashing.


DNS Configuration

Windows — uses netsh on all connected adapters. Reset restores DHCP.

Linux — tries in order:

  1. NetworkManager (nmcli dev mod)
  2. systemd-resolved (resolvectl dns)
  3. resolvconf
  4. Direct write to /etc/resolv.conf (with backup)

Reset reverses whichever method was used. Requires sudo for DNS changes on Linux.


Notes

  • The SmartDNS Proxy site uses Incapsula WAF which blocks headless browsers. Chrome must run in non-headless mode. On servers without a display, Xvfb provides a virtual screen.
  • Proxy is only used for account creation (option 1). IP activation and DNS configuration use direct connections.
  • proxy-chain bridges SOCKS5 authenticated proxies to HTTP since Chromium doesn't support SOCKS5 auth natively.
  • Account files store passwords in plain text. Keep your accounts/ directory secure.

Disclaimer

For educational and research purposes only. Use responsibly and in line with applicable laws and terms of service. The author is not responsible for misuse.

About

A Node.js CLI tool that automates SmartDNS Proxy account creation, IP activation, and system DNS configuration for streaming and geo-unblocking — with multi-proxy support and cross-platform DNS tunneling for both Windows and Linux.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors