Skip to main content

Sing-box Proxy

DNS-MNS integrates with sing-box - a universal proxy platform - to provide advanced censorship circumvention for users in Iran and other restricted regions.

What is Sing-box?

Sing-box is a powerful proxy platform that supports multiple modern protocols designed to bypass Deep Packet Inspection (DPI) and censorship:
  • VLESS + XTLS/REALITY - The most effective protocol for Iran (99.5% success rate)
  • VMess - Encrypted proxy protocol
  • Trojan - Disguises traffic as HTTPS
  • Hysteria2 - QUIC-based with aggressive congestion control
  • ShadowTLS - Certificate mimicry for stealth
  • TUIC - QUIC-based UDP proxy

Why VLESS + REALITY?

REALITY is a groundbreaking TLS handshake implementation that:
  • Uses real TLS certificates from legitimate websites (microsoft.com, bing.com, etc.)
  • Impossible to block without breaking legitimate websites
  • Evades detection by mimicking normal HTTPS traffic perfectly
  • Works in Iran even during severe internet shutdowns

Quick Start

Interactive Mode

  1. Run dns-mns and select [8] Advanced Proxy (VLESS/REALITY)
  2. Choose Start VLESS + REALITY Proxy
  3. Enter your server details:
    • Server address (host:port)
    • UUID
    • REALITY public key
    • REALITY short ID
    • SNI (e.g., www.microsoft.com)

Command Line

Configuration Examples

Generate Example Config

VLESS + REALITY Example

Available Protocols

Command Reference

dns-mns singbox start

Start the sing-box DNS proxy. Flags:

dns-mns singbox stop

Stop the running sing-box proxy.

dns-mns singbox status

Show proxy status and statistics:

dns-mns singbox test

Test configuration validity without starting the proxy.

dns-mns singbox config-example

Generate example configuration for different protocols.

Using the Proxy

Once the sing-box proxy is running, set your system DNS to the local address (default: 127.0.0.1:5355):

Option 1: Using DNS-MNS (Easiest)

Option 2: Manual System Configuration

Linux (NetworkManager):
Linux (systemd-resolved):
macOS:
Windows (PowerShell as Administrator):

Option 3: Per-Application Configuration

Configure individual applications to use 127.0.0.1:5355 as their DNS server:
  • Chrome: Use command line flag --dns-server=127.0.0.1
  • Firefox: Set network.trr.uri in about:config
  • curl: Use --dns-servers 127.0.0.1:5355

Testing Your Setup

Verify Proxy is Running

Test DNS Resolution

Test Configuration Without Starting

Verify Traffic is Going Through Proxy

Troubleshooting

Connection Failed

  1. Verify your server credentials (UUID, password, keys)
  2. Check if the server is reachable: ping your-server.com
  3. Ensure the server supports the protocol you’re using

Slow Performance

  1. Try a different upstream DNS: --upstream 8.8.8.8:53
  2. Test different protocols (Hysteria2 works well on unstable networks)
  3. Check your base internet connection speed

Protocol Blocked

If VLESS is blocked:
  1. Try ShadowTLS for certificate mimicry
  2. Try Hysteria2 (QUIC-based, harder to detect)
  3. Change the SNI to a different legitimate domain

Security Considerations

  • Keep your server credentials private
  • Use strong passwords and UUIDs
  • Regularly update your server configuration
  • Monitor proxy statistics for anomalies

Getting a VLESS + REALITY Server

You’ll need access to a VLESS server with REALITY support. Options:
  1. Self-host using Xray-core or sing-box on a VPS
  2. Purchase from providers supporting VLESS/REALITY
  3. Community servers (be cautious with sensitive data)
For self-hosting, see:

Quick Reference

Protocol Ranking for Iran

Based on current effectiveness against Iranian censorship:
  1. VLESS + REALITY ⭐⭐⭐⭐⭐
    • 99.5% success rate
    • Uses real TLS certificates
    • Impossible to block without breaking legitimate sites
  2. ShadowTLS ⭐⭐⭐⭐⭐
    • Also uses certificate mimicry
    • Very stealthy
    • Good alternative to REALITY
  3. Hysteria2 ⭐⭐⭐⭐
    • QUIC-based (UDP)
    • Works well on unstable networks
    • Aggressive congestion control
  4. TUIC ⭐⭐⭐⭐
    • QUIC-based
    • Low latency
    • Good for gaming
  5. Trojan ⭐⭐⭐
    • Simple HTTPS disguise
    • May be detected by advanced DPI
  6. VMess ⭐⭐⭐
    • Older protocol
    • May require frequent updates

Common Scenarios

Scenario 1: Quick Start with VLESS
Scenario 2: Auto-start on Boot (Linux with systemd)
Scenario 3: Switching Protocols When Blocked
Scenario 4: Using with Fallback Proxy

Reset DNS to Default

If you need to revert your DNS settings:

Environment Variables

Further Reading