Quantum Tunnel

Sign in with your username and password

Quantum Tunnel · Infrastructure
DNC MADE THIS
Quantum
Overview
Servers / Agents
Topologies & Tunnels
Firewall & Ports
Network Optimization
Software Updates
Monitoring & Traffic
Activity / Audit
Settings

Quantum

—
Quantum

Controller fleet

—
—
Agents online
—
—
Agent tunnels active
—
Agent versions
—
Recent events
—

Server System

—
—
CPU
—
—
RAM
—
—
Disk
—
Uptime
—
Server Live Traffic
Download—
Upload—
Total transferred—
Server Connections
—
—

Server Traffic Throughput

Real-time download and upload speeds over time
Live
Traffic collection is paused. The history below shows previously recorded server traffic.
DownloadUpload

Server Active Connections

Established TCP and UDP connections on this server
—

Server Traffic Usage

Server-wide traffic history saved every minute and retained for seven days.

…

Welcome to Quantum

No tunnel yet. Three steps and you are live.
  1. 1
    Choose this server's roleIran hub (server) or foreign server (client) from the Setup tab.
  2. 2
    Link the other serverCreate the tunnel and paste the connection bundle on the other side.
  3. 3
    Verify and optimiseRun Diagnostics, then Optimize in the Tunnel tab.

Topology

0
NameIranForeignTunnelsStatusActions
Each cable represents one tunnel between the two servers.
This server cannot connect to its peerPing works but every TCP connection is dropped on the way. A one-click fix reverses the connection direction.

Tunnels

—
Name Server address Engine Ports Status Actions
Click a tunnel's name to open its full settings — status details, carrier, health and every action.

Matrix tunnel

—
Output

        
Tunnel Status
—
—
This server —
Other server —
Latency
—
—

Details

—

Bagher Tunnel

ACTIVE TUNNEL Active
Stealth Hybrid Tunnel · Role: Iran Server
Latency / Ping
-- ms
Traffic Rate
↓ 0 B/s · ↑ 0 B/s
Foreign Server
--
Forwarded Ports
--

Tunnels

NameForeign serverEnginePortsPingTraffic

Route to the Iran hub

—

How this server reaches Iran: over the GRE inner IP, directly to the hub's public IP, or Auto (GRE when it works, public IP otherwise).

0/0

Fleet health

—
—

Tunnel Status

—
Peer tunnels
Optimize Network: FQ + BBR, 16 MB TCP buffers, GRE MTU 1380, MSS clamp 1340 and keepalive. The current settings are saved first, so Restore can bring them back.

Connectivity Rescue

—

Speed and volume limits

—

One speed for both directions and a volume for each foreign server, or unlimited. When a server's volume is used up, its links are cut until the next reset; the other servers keep working.

Tunnel Health

not tested yet
Test All Tunnels checks every tunnel's service, its control session and a real data probe through one of its ports.

Carriers

How each tunnel travels. When a network starts blocking or slowing one, swap it: both servers switch, and if the new carrier does not connect they go back on their own.

GRE wrap

How the main tunnel's GRE packets travel between the two servers. Direct GRE is the fastest. WSS wraps them in TLS on a web port, for networks that block or slow down GRE (protocol 47). 6to4 and 4in6 carry them over IPv6.
Direct GRE
Active wrap — —
Link to other server — —
WSS wrap — —
4in6 addressesBoth servers need a public IPv6 address. With a Peer Link the other server's address is asked for you.
Switching changes both servers over the Peer Link and reconnects the tunnel for a few seconds; if the tunnel does not answer within 45 seconds, both go back. Re-apply sets up the current carrier again, which can fix a stuck link.
WSS settingsUse the same port on both servers. The SNI is the host name shown in the TLS handshake; leave it empty to send none. The address can be IPv4, IPv6 or a host name: give the other server's IPv6 to carry WSS over IPv6.

Enrollment Tokens

One token enrolls exactly one endpoint agent. The token is shown once — copy it and run the command on the endpoint server.
Token Role Label Status Expires Actions

Agents

Endpoint servers enrolled with a token. Online agents take Matrix desired state and relay commands; revoked agents can never connect again.

Matrix Tunnels (Agents)

Each tunnel pairs one Iran hub agent with one foreign node agent. Both endpoints must advertise the Matrix capability and 1-20 forwarded ports are required.

Update Agent

The controller downloads the artifact and verifies its ed25519 signature against the pinned update key before sending anything. The agent re-verifies, swaps the binary atomically and restarts itself; enrollment and tunnels survive.

Targets

Cluster

Several servers back each other up, so one failure does not take your users down.
Checking…

Cluster Map

Click any part of the map to see and change it. Line thickness is the share of new connections; color is health.
Carries traffic Healthy, idle Standby, DNS or linked hub Down Drained or not serving

Pools

One public port on this server, served by several foreign servers. When one fails, its users move to the others within seconds.

Tunnels on This Server

Each foreign server's link, checked every second. A tunnel in a pool listens on a private address; the pool sends users to it.
TunnelForeign ServerHealthLatencyPorts

Iran Hubs

Other Iran servers that back this one up. When every foreign server of a pool is down here, its port is forwarded to a hub where the same pool works.

DNS Failover

A domain that always points to the Iran hubs that work. Users who connect by name move to a working hub when one dies. Cloudflare (DNS only, grey cloud), or a webhook for any other DNS provider.
Off
The hub that leads POSTs JSON {"name", "ips", "ips6", "ttl", "hub", "at"} whenever the working hubs change, and every 30 seconds. Your script sets the record to exactly "ips" (A) and "ips6" (AAAA). Any 2xx answer counts as done.
Health Check
How fast a failed foreign server is taken out and put back. Lower is faster; too low can take a server out on a short hiccup.
Show Kernel Rules

          

Iran Hubs This Server Serves

Serve several Iran servers from this foreign server: when one Iran server dies, users who connect through the others keep working.
HubIran ServerStatusUnit

Join Another Iran Hub

  1. On the other Iran server: Setup, add a foreign server with this server's IP and the same ports.
  2. Copy the bundle it prints and paste it here.

          

Events

    Quick setup: one tunnel, two serversTwo servers, one tunnel. Answer on this machine; the Iran side gives you a token to paste on the Foreign side.
    Users→ Iranpublic ports here GRE ⇄ FRP Foreignthe service runs here
    1
    Pick one. Iran always listens; Foreign always dials.
    2
    High-stability Linux GRE kernel tunnel paired with FRP reverse proxy.
    Run Backhaul over GRE?
    Connect the two servers over
    3
    SSH port, pool size and internal FRP port
    4
    Token is auto-generated. After setup, copy the bundle below to the Foreign side — one paste fills everything there.
    Foreign server without a panel: manual commands
    
                
    2
    Paste any bundle (hsh1_, bh1_, gh1_, BAGHER:) → all fields auto-fill. A legacy token works too.
    
                  
    3
    Manual addresses & control port
    Leave everything here empty to auto-join — the panel discovers Iran's settings from the live tunnel. Only fill these in if auto-join fails.
    +

    Connect another foreign server

    ✓ This is the safe way to add a server. It creates a separate tunnel with its own token — existing tunnels keep running untouched. (Re-running the Iran form above instead would replace this server's tunnel and disconnect old Foreign sides.)
    Each peer gets its own token. Ports already used by another tunnel are rejected — pick a different one.
    
                  

    Matrix tunnel

    —

    An encrypted tinc mesh between this server and its peer, independent of the main tunnel. The hub runs on the Iran side; the foreign side registers with the bundle. IPv4 rides the server's IPv4, IPv6 rides its global IPv6.

    Logs

    Live Activity Stream
    Side panel with the latest events. Wide screens (1200px+) only.
    Peer tunnels appear here when added.
    —
    (pick a service)

    Panel errors

    Every failed panel action is recorded here with its code — newest last.

    Performance

    —
    Speed settings for the tunnel engine and the server's network stack. The defaults suit traffic that is already encrypted, such as VLESS, Reality and Trojan.
    FRP transport
    —
    —
    Work-conn pool (frpc / frps)
    —
    —
    Network stack
    —
    —

    FRP Transport

    —
    The FRP options of this tunnel. Encryption, compression and multiplexing only cost CPU and speed for VLESS, Reality and Trojan, whose traffic is already encrypted: leave them off unless a service needs them.
    FRP transport options
    Sends each user's real IP to the service on this server, so Xray logs, limits and IP checks see real users instead of 127.0.0.1. Turn on Proxy Protocol (acceptProxyProtocol) in the Xray inbound first: without it every connection fails.
    MB/s
    A cap on each forwarded port, for all its users together (megabytes per second). 0 means no limit.
    Unsaved changes

    Auto Pool (FRP work connections)

    Sizes frpc poolCount and frps maxPoolCount from pool-full errors, active connections, CPU and free RAM. Scales up fast, scales down slowly, restarts only frpc and only when few users are connected.
    Auto
    Auto Pool
    Last decision
    —
    —
    Pool-full errors (last tick)
    —
    —
    Last frpc restart
    —
    —
    maxPoolCount was raised in frps.toml; restart frps during a quiet period to apply it.
    Pre-opened work connections on foreign spokes.
    Server-side maximum work connection headroom (always at least 1.5 × poolCount).

    Backhaul Connection Pool

    Connections the foreign server keeps open to the Iran server, ready for new users. Raise it when many users connect at once and new connections are slow to start; lower it to keep fewer idle connections. Applying restarts backhaul-client, so connections drop for a few seconds.
    —
    From 1 to 64. The default is 8.

    Network Stack

    Kernel settings that decide speed on long, lossy links. Optimize Network sets all of them and saves the current values first, so Restore can bring them back.
    —

    Tunnel Watchdog

    —
    Checks the tunnel every minute: the GRE link and the FRP service, or for Backhaul its control session. Sends Telegram alerts and, if you turn it on, restarts the tunnel after consecutive failures.
    Tunnel Health
    —
    Not checked yet
    Consecutive Fails
    0 / 2
    Alert threshold: 2
    Last Check
    —
    Runs every 1 min

    Telegram Alerts

    Direct
    Receive instant Telegram notifications when the tunnel drops or recovers. Middle of bot token is never exposed.
    Routed through 127.0.0.1:PORT via SOCKS5 proxy on Foreign side.

    Tunnel Auto-Restart Schedule

    Disabled
    Periodically refreshes the tunnel interfaces and restarts FRP/Backhaul relay services gracefully without interrupting the web panel or losing configuration.
    Next restart: Not scheduled

    Encrypted Backups

    Off
    Full backup of FRP tomls, panel settings, peers registry, and systemd units encrypted with OpenSSL AES-256-CBC keyed from your panel password.
    Stored Backups (/var/backups/quantum)
    No backups yet.
    Backup encryption key
    Backups are encrypted with a key stored only on this server. Keep a copy elsewhere, or a downloaded backup cannot be opened if the server is lost.

    Watchdog Event Log

    Last 10 events
    No events recorded yet.
    — /100

    Tunnel Diagnostics & Health

    —
    Run Diagnostics checks the tunnel end to end: every tunnel's service, session and data path, ping inside and outside the tunnel, MTU, throughput and kernel settings.

    Issues & Recommendations

    No report yet. Press Run Diagnostics.

    Tunnels

    Service · Session · Data

    Reverse Path (Iran ⇄ abroad)

    Both directions, then fix
    Latency & Jitter —
    —
    Ping through the GRE tunnel
    Packet loss—
    Jitter—
    Min / Max—
    Peer public IP—
    Path MTU —
    —
    Largest packet that crosses the tunnel unfragmented
    Interface MTU—
    Recommended TCP MSS—
    MSS clamp rule—
    Throughput —
    —
    iPerf3 through the GRE tunnel
    iPerf3 server here—
    Kernel & TCP Stack —
    —
    Congestion control algorithm
    BBR—
    IP forwarding—
    Listen backlog—
    Engine open-files limit—
    Path Test Before Any Tunnel
    Finds which transports get through between your Iran and foreign servers, with the real FRP and Backhaul cores. Nothing is set up for good: temporary servers run for a few minutes and are removed. Safe next to a running tunnel: the test uses its own free ports and its own GRE interface and never touches the tunnel.
    Not running
    Used for the GRE and SSH (Bagher) checks. Left empty, it is taken from the foreign server when it connects.
    Options
    Empty: the first free ports from 41000 are used, never the ports of a running tunnel. The test listens on the first port and the next 10 (TCP and UDP); enter a port to test that one.
    Start the test on the Iran server's Benchmark tab first, then paste its code here.
    Engine Transport Result Latency Speed Port
      Smart Multi-Protocol Carrier Benchmark Ready
      Independent end-to-end benchmark across all 7 Quantum protocols before establishing tunnel
      On Iran server, enter foreign server address to probe all 7 protocols outwards.
      Enter destination host to benchmark and discover the best protocol for lowest packet loss.
      Custom Benchmark Ports (Optional) ▼ Expand
      Recommended Protocol Highest Stability

      —

      Based on live probe metrics, this carrier offers maximum throughput with lowest drop rate.
      Quality Score
      — / 100
      Best Protocol
      —
      Top Recommendation
      Active Tunnel Carrier
      —
      Running Carrier
      Lowest RTT Latency
      —
      Round-Trip Time
      Packet Loss Rate
      0%
      Dropped Packets
      # Protocol & Carrier Transport Core Destination Port RTT Latency Packet Loss Jitter Quality Score Status Actions
      Inter-Panel Link Probing...
      Real-time telemetry and state synchronization with peer panel.
      Server Role —
      Peer Panel URL —
      Internal Tunnel IP —
      Peer Latency — ms
      Last Sync —
      Automatic Failover [ OFF ] Manual Mode
      Default: OFF. When enabled, watchdog automatically promotes the healthiest backup carrier upon packet loss spike.
      If the current carrier packet loss exceeds this threshold, the tunnel seamlessly switches to the best candidate.
      Last Auto Failover —
      Switch Counter 0

      Configure Inter-Panel Peer Sync

      Spoof Tunnel
      A tunnel that forges its source IP on both servers to cross whitelist-based Layer-3 firewalls, wrapped with WireGuard for a real encrypted link. Test which spoof IPs get through first, then bring the tunnel up.
      Not configured
      Xray Tunnel
      Forward ports from the Iran server to a foreign server over Xray: Reality, XHTTP, gRPC or mKCP, direct or reverse. It runs its own Xray-core next to any Xray panel (3x-ui, Marzban) and never touches its files, services or ports.
      No tunnel yet

      Panel Update DEV

      —
      Installed version
      —
      Available
      —
      1. Download and verify the new version
      2. Restart the panel
      3. Reload this page on the new version

      GitHub access token

      —

      Releases live in the private Dark-modem/quantum repository. Paste a fine-grained token with Contents: Read-only on that repo (GitHub → Settings → Developer settings → Fine-grained tokens). It is stored only on this server and is sent only to github.com.

      What's New

      Channel & Versions

      Dev channel: test builds, may break. Not for production tunnels.
      Install a specific version
      For going back to an older release. Install the same version on the other server too.

      Firewall & Ports

      Planned — engine integrated, UI pending

      The Session 1 engine is integrated in this build: multi-backend detection (active UFW, owned-chain iptables, native nftables refused), snapshot → plan → apply with revert, and the controller port-ownership registry. The graphical port manager and the typed Agent firewall operations are the next milestone — until then this section intentionally shows no simulated data.

      Agent
      Listening ports (from the agent)

      Plan and apply are available for Quantum-owned changes; the agent refuses mutations without an explicit confirmation step and records every operation in the audit log.

      Network Optimization

      Planned — engine integrated, UI pending

      The Session 2 engine is integrated: hardware detection that refuses aggressive profiles over unreadable facts, conservative/balanced/performance plans, owned sysctl files, an apply journal with rollback, and the real-pair measurement harness in tests/netopt. The HTTP API and per-Agent desired-state operations are the next milestone — until then no values are invented here.

      Agent
      Tuning status on the agent

      Apply/rollback run only with an explicit confirmation step and a justify string; profiles are chosen per node after hardware detection. No values on this page are simulated.

      Settings

      Minimum 12 characters, uppercase, lowercase, numbers, and symbols (NIST 800-63B). Changing it invalidates all other sessions.

      Carrier advisor

      Collecting data…
      Advice only — the panel never switches the carrier by itself. Suggestions for a new port / SNI:

      Link history (last hours)

      Sampled every 30 s, kept in memory for 24 h (cleared on panel restart).

      Prometheus metrics

      Disabled. Rotate a token to enable GET …/metrics for your scraper (header Authorization: Bearer <token>). The token is shown once.
      
                

      External alerts

      Get a message when a tunnel goes down or recovers. Only state changes are sent (never every refresh), with a minimum gap per link so a flapping tunnel cannot spam you. The first reading after a restart is only a baseline.

      Panel access (port / login / address)

      Changing any of these restarts only the panel web service — tunnels keep running. After saving, reopen the panel at the new address shown.
      —

      Session idle timeout

      Sign out automatically after this many minutes without clicks or key presses. Background refresh does not count as activity. 0 = off.

      Two-factor authentication (TOTP)

      Loading…
      Add this secret to your authenticator app (or open the link on your phone), then enter the 6-digit code to confirm.
      
                

      Appearance

      Pick an accent colour. Every preset is contrast-checked for both dark and light themes.
      Table density

      Interactive terminal

      —
      Root shell in the browser over WebSocket + PTY — same login session, single shell at a time, auto-killed after 10 idle minutes (30 min cap). Enable only after testing; toggle is the rollback switch.
      Terminal tab is hidden until enabled.

      Domain & HTTPS (Decoupled Web Layer)

      —
      Configure a custom domain for Web Panel access. Tunnel infrastructure (FRP / Backhaul / GRE) is 100% independent and will never be restarted or disconnected.
      Not checked yet.
      HTTPS serves on dedicated port 7443 alongside HTTP on port 7777.
      HTTPS on this server's IP (self-signed)
      No domain needed. The panel creates its own authority, signs a certificate for the IP (825 days), and serves HTTPS. Install the CA file below in your browser/OS once — afterwards the IP page shows no warning. Regenerate rotates only the server certificate; the CA stays trusted.
      Use your own certificate
      Paste a matching certificate + key, upload both files, or point at files already on this server. Validated before install; the previous certificate is kept as backup.
      Reverse Proxy Configuration (Nginx & Caddy)
      Copy and paste into your Nginx or Caddy server on this machine. Real client IPs and WebSocket upgrades are automatically supported.
      Nginx:
      
                  
      Caddy:
      
                  

      Terminal

      disconnected
      Root shell on this server · single session · 10m idle kill · 30m cap · type quantum for the tunnel menu
      DisconnectedPress Connect to open a root shell on this server.
      Idle kill 10m · cap 30m · commands are audit-logged (secrets redacted) in Logs → Panel errors.
      Live Activity Stream Live
      ↑↓ navigate↵ runEsc close
      Confirm

      Edit Matrix tunnel
      Matrix tunnel
      Limits
      Speed (one number for both directions)
      Volume (download and upload together)
      Reset the used volume
      The volume already used is kept when you change the limits. A limit covers every tunnel to this server.
      Name this server
      Shown on the dashboard map, the tunnel cards and the limits. Empty: no name.
      Enrollment Token
      This token is shown only once. Copy it now — it cannot be viewed again.
      Run this on the endpoint server as root. The agent connects to the panel and appears in the list below.
      Create New Tunnel
      0 = the hub agent picks a free port automatically.
      Matrix forwards exactly these ports from the hub to the node. Port 22 is not allowed.
      Agent
      Add a new tunnel
      Add topology
      Edit topology
      This server's role
      Confirm it's you

      The terminal is a root shell. Re-enter your password to open it.

      Edit Peer Tunnel

      Rename the tunnel or change its foreign IP and forwarded ports. To change how it travels, use Swap carrier.

      Carrier —
      Encryption, compression, PROXY protocol, bandwidth limit and health check are set on the foreign server, in its Performance tab: they live in its frpc.
      Foreign Setup Bundle for client sync:
      Swap carrier
      Quick Edit Bagher Tunnel
      Remote server endpoint receiving forwarded traffic.
      Comma-separated port numbers forwarded through the stealth tunnel.
      Add a Foreign Server to Bagher
      This Iran server keeps its own SSH session to every foreign server. Each one forwards its own ports: a port can belong to one foreign server only.
      New Pool
      Several at once: 443, 8443 or 2000-2005 (one pool each).
      The service check opens a connection through each foreign server to the service behind it (for example xray on 443). A server whose tunnel is up but whose service refuses the connection is taken out. TCP pools only.
      Foreign servers in this pool
      Tunnels whose ports include this port join by themselves. Each one's relay restarts once (a few seconds) to move behind the pool. Standby servers get traffic only when no other server can take it; a server at its connection limit takes no new connections until it drops below 90% of it.
      Join Code of This Hub
      On the other Iran server open Cluster, Link a Hub, and paste this code. It carries the cluster secret: share it only with your own servers.
      
          
      Link a Hub
      On the other Iran server open Cluster, Show Join Code, and paste it here. Both panels need the same version, the panel port open between them, and correct clocks.