Skip to content

Node Management ​

Scanning nodes execute scanning tasks. This page covers daily operations and status monitoring from the console.

Deploying & Scaling Scanning Probes

If you need to install new probe instances, run multiple nodes, or review sizing recommendations for specialized workloads, refer to: Distributed Deployment.


Node Pool Overview & Real-Time Status ​

Scan node management list

Navigate to Scanning Nodes in the left sidebar to view active worker probes:

FieldDescriptionExample
Node NameFriendly name configured via TESTNET_NODE_NAMEnode-general-01
Node IDUnique identifier generated upon registration (snowflake ID)1932123456789012345
StatusWhether the node can receive tasks🟢 Online / 🔴 Offline
Last HeartbeatTime of the last heartbeat12 seconds ago
Active TasksNumber of tasks currently running3 / 5
System InfoNode OS, kernel, and memory infoLinux x86_64 / 16GB
Upgrade StatusBadge showing the node's upgrade state relative to the latest releaseUpgrade dispatched / Upgrade failed

Node Status ​

StatusIconDescription
Online🟢Node running normally, accepting tasks
Offline🔴No heartbeat for about 3 minutes (180 seconds); marked offline automatically

Node Operations ​

View Node Details ​

Click "Details" on a node card to view:

  • System specs (CPU cores & usage, RAM, disk, uptime)
  • Network info (IP, MAC address, OS & architecture)
  • Tool whitelist (restricted tool list, or "All tools (unrestricted)")

Configure a Node ​

Click "Configure" to open the node advanced configuration dialog, where you can set:

  • Tool execution whitelist: restrict the node to pulling and executing selected tools only (see below)
  • Client YAML configuration: push the node's local config.yaml (executor switches, concurrency, etc.)

Delete a Node ​

Offline nodes can be deleted (existing task records are preserved):

  1. Ensure node is offline
  2. Click "Delete"
  3. Confirm

TIP

After deletion, restarting the client will auto-register as a new node.


Node Tool Whitelist ​

By default, any online node can pull and execute every security tool on the platform. A tool whitelist restricts a node to only the tools you explicitly allow, enabling workload separation and capacity isolation.

Checking Whitelist Status ​

The node card and the Details dialog both show the current whitelist state:

TagMeaning
N toolsThe node is restricted to the N whitelisted tools
All toolsUnrestricted — the node can run every enabled tool

Configuring the Whitelist ​

  1. Click "Configure" on a node card to open the node advanced configuration dialog
  2. In the "Tool Execution Whitelist" section at the top, pick the allowed tools in the multi-select box
  3. Click "Save Configuration" — changes take effect immediately

The selector groups tools by runtime type for quick lookup:

GroupTool Types
Docker ToolsContainerized scanning tools (Subfinder, Nuclei, Nmap, etc.)
HTTP ToolsNative HTTP request probing tools
DNS ToolsDNS resolution and lookup tools
TCP ToolsTCP port probing tools
Shell ToolsLocal process / command-line tools
Other ToolsTools without a declared runtime type

TIP

  • Leaving the multi-select empty means unrestricted — the node may run every security tool
  • The selector supports keyword filtering; tools are sorted by name within each group
  • Once saved, the node only pulls tasks for whitelisted tools; tasks already dispatched are unaffected

Typical Scenarios ​

  • Workload separation: let a bandwidth-rich node run containerized vulnerability scans (Docker tools) only, while internal nodes handle HTTP/TCP probing
  • Resource protection: restrict low-spec devices to lightweight DNS/TCP tools so container jobs don't overwhelm the host
  • Compliance: pin a node to an approved set of tools only

Node Online Self-Upgrade ​

Scanning nodes deployed as binaries support one-click online upgrade from the console — no need to log into each server and swap files manually. An upgrade summary strip at the top of the page aggregates the fleet-wide upgrade posture in real time:

MetricMeaning
OutdatedNodes running a version older than the latest server-known release
ForcedNodes below the "minimum required version" being force-upgraded (forced nodes pause pulling new tasks)
FailedNodes whose self-update failed (download verification, smoke check, etc.)

Dispatching an Upgrade ​

  1. Select one or more binary nodes in the node list and click "Dispatch Upgrade"
  2. Review the target version in the confirmation drawer and confirm
  3. Each node downloads the upgrade package and restarts in place when idle (no running tasks); queued tasks are not interrupted

Docker container nodes cannot self-update

Replacing the binary inside a container is lost on container rebuild, so the system detects each node's deployment mode (docker / binary) automatically. Docker container nodes are skipped automatically when included in a selection; upgrade them together with the server images instead (see Upgrade & Maintenance).

Upgrade Policy Configuration ​

Two global policies can be tuned under "System" → "System Config" (CLIENT_UPGRADE config group):

Config KeyDefaultDescription
sys.client.upgrade.modenotifyUpgrade policy: notify remind only / manual upgrade after an admin dispatches the instruction / auto upgrade automatically when a new version is detected
sys.client.upgrade.min-versionemptyMinimum required version (e.g. v3.0.5). Nodes below it are force-upgraded and refuse to accept new tasks; leave empty to disable

Built-in Safety Mechanisms ​

The self-update pipeline ships with multiple layers of protection:

  • No downgrade: skipped automatically when the target version is not newer than the current one
  • Integrity verification: every download source enforces SHA-256 verification; if the checksum is unavailable the upgrade round is skipped (fail-closed) — no unverified downloads
  • Smoke check: the new binary is smoke-tested before the atomic swap and in-place restart
  • Crash rollback: if the new version fails to start, the previous binary is restored automatically and the failure is reported to the console (Upgrade failed badge)

Disabling self-update

The node-side master switch is upgrade.enabled in the local config.yaml (default true). When set to false, the node still reports its version and receives upgrade hints, but never downloads, replaces, or restarts.


Execution Capabilities ​

MethodRequirementsDescription
DockerDocker socket mountedExecute containerized tools (Subfinder, Nuclei, etc.)
ShellBinary installedExecute local CLI tools (SHELL/CMD types)
HTTPNetwork accessibleSend HTTP requests
DNSNetwork accessibleDNS queries
TCPNetwork accessibleTCP port probing

Troubleshooting ​

Node shows offline after registration ​

  • Check network connectivity (can the node reach the server on port 3100, the unified Nginx entry? Port 8081 is the direct backend port, available only if you expose it yourself)
  • Verify TESTNET_CLIENT_SECRET is correct
  • View logs: docker logs testnet-client

Tasks stuck in PENDING ​

  • Check if any nodes are online
  • Check server logs to confirm task dispatch is working

Docker tools fail to run ​

For deeper diagnostics (image ulimit, DNS, SELinux, etc.), see the Troubleshooting Guide and FAQ.

bash
# Verify Docker socket is accessible
docker exec testnet-client docker ps

Client Environment Variables Reference ​

Client nodes support overriding config.yaml settings via TESTNET_ prefixed environment variables:

Environment VariableTypeDescription
TESTNET_SERVER_URLstringServer URL (e.g., http://host:8081 or https://host:3100)
TESTNET_SERVER_TLS_ENABLEDboolEnable TLS (true/1)
TESTNET_SERVER_TLS_INSECURE_SKIP_VERIFYboolSkip TLS certificate verification (set true for self-signed certs)
TESTNET_CLIENT_SECRETstringNode connection secret (from server .env)
TESTNET_NODE_NAMEstringNode name
TESTNET_DATA_DIRstringNode data directory (used by the install script and docker-compose; takes precedence over cache_dir inference)
TESTNET_LOG_LEVELstringLog level (debug/info/warn/error)
TESTNET_MAX_CONCURRENTintMax concurrent tasks (default 3)
TESTNET_POLL_TIMEOUTdurationLong-poll timeout (default 30s)
TESTNET_POLL_INTERVALdurationLong-poll interval (default 5s)
TESTNET_HEARTBEAT_INTERVALdurationHeartbeat interval (default 30s)
TESTNET_DOCKER_ENABLEDboolEnable Docker executor (true/1)
TESTNET_SERVER_TIMEOUTdurationServer request timeout (e.g., 30s)
TESTNET_WORK_DIRstringTask working directory
TESTNET_CACHE_DIRstringCache directory
TESTNET_ALLOW_PRIVILEGEDboolAllow privileged container execution (default true; set false in production)
TESTNET_ALLOW_SSRFboolAllow SSRF probing internal networks (default true; set false in production)
TESTNET_ALLOWED_VOLUME_PATHSstringAllowed mount paths (comma-separated; replaces the built-in default list, e.g., /tmp/,/opt/testnet/)
TESTNET_HTTP_RATE_LIMIT_ENABLEDboolEnable per-host HTTP rate limiting (default false)
TESTNET_HTTP_HOST_MIN_INTERVALdurationMinimum interval between requests to the same host (default 10s, effective when rate limiting is on)

WARNING

TESTNET_ALLOW_PRIVILEGED and TESTNET_ALLOW_SSRF default to true (allowed). For nodes exposed to untrusted targets or running on office/production networks, always set them to false explicitly. See Node Sandbox & Security Policies.


Full config.yaml Reference ​

All configuration sections and defaults of the node's local config.yaml are listed below (unlisted fields keep their built-in defaults). The file is also the vehicle for server-side config push: YAML sent from the node "Configure" dialog is saved locally on the node.

When changes take effect: server.timeout and node.name apply immediately after the server syncs them; server.url, server.secret, task.*, docker.*, logging.*, node.heartbeat_interval, node.offline_timeout, http.*, dns.*, and tcp.* are saved but require a node process restart.

yaml
server:
  url: "http://127.0.0.1:8081"          # Server URL (Docker deployments use https://IP:3100)
  secret: "<connection secret>"          # Matches the server's TESTNET_CLIENT_SECRET
  timeout: 30s                          # Server request timeout (built-in default 60s)
  max_idle_conns: 100                   # HTTP connection pool (advanced, usually untouched)
  max_idle_conns_per_host: 10
  idle_conn_timeout: 90s
  tls:
    enabled: false                      # true for HTTPS servers
    insecure_skip_verify: false         # true for self-signed certificates

node:
  name: ""                              # Node name (falls back to hostname when empty)
  version: "v3.0.5"                     # Display only; the released version is injected at build time
  heartbeat_interval: 30s               # Heartbeat reporting interval
  offline_timeout: 10s                  # Local heartbeat window (the server marks offline after 180s)

task:
  max_concurrent: 3                     # Max concurrent tasks
  poll_timeout: 30s                     # How long a single long poll suspends
  poll_interval: 5s                     # Idle polling interval
  work_dir: /tmp/testnet                # Task working directory
  cache_dir: ~/.testnet/cache           # Tool/artifact cache (falls back to /tmp/testnet/cache without HOME)
  default_command_timeout: 3600s        # Fallback ceiling for Shell/CMD executors when the DSL sets no timeout
  retry:                                # Task-level retry (exponential backoff)
    max_attempts: 3
    initial_delay: 1s
    max_delay: 30s
    multiplier: 2.0

docker:
  enabled: true                         # Docker executor switch
  socket: /var/run/docker.sock          # Docker socket path
  pull_timeout: 15m                     # Image pull timeout
  run_timeout: 72h                      # Container runtime safety ceiling (DSL timeout wins when set)
  remove_on_exit: true                  # Clean up containers on exit
  registry_auth:                        # Private registry credentials (optional)
    username: ""
    password: ""
    server: ""

http:
  timeout: 180s                         # Per-request HTTP timeout
  max_redirects: 5                      # Max redirects followed
  insecure_skip_verify: false           # Skip target certificate verification (self-signed targets)
  rate_limit_enabled: false             # Per-host rate limiting switch
  host_min_interval: 10s                # Minimum interval between requests to the same host
  retry:                                # HTTP executor retry
    max_attempts: 3
    initial_delay: 1s
    max_delay: 10s
    multiplier: 2.0

dns:
  timeout: 10s                          # Per-query timeout
  servers: ["8.8.8.8:53", "1.1.1.1:53"] # Custom resolvers (point to internal DNS on isolated networks)

tcp:
  timeout: 10s                          # Port probing timeout
  banner_timeout: 5s                    # Banner grab wait
  connection_timeout: 5s                # TCP connect timeout

upgrade:
  enabled: true                         # Online self-upgrade master switch (see "Node Online Self-Upgrade")

security:
  allow_privileged: true                # Privileged container execution (set false in production)
  allow_ssrf: true                      # SSRF internal probing (set false in production)
  allowed_volume_paths:                 # Whitelist of mountable host directories
    - /tmp/
    - /private/tmp/
    - /var/tmp/
    - /opt/testnet/

logging:
  level: "info"                         # debug / info / warn / error
  format: "json"                        # json / console
  output: "stdout"                      # Log output target

TIP

For isolated intranets where targets resolve via internal DNS, dns.servers is the most common tweak; when scan tasks keep timing out, raise task.default_command_timeout and docker.run_timeout.


最近更新

Released under the MIT License