Spectra

Setup & Integration Docs

Step-by-step guides and copy-paste snippets to connect Spectra Shield (Layer 7 DDoS / WAF / UAM) and Spectra Captcha to your website in minutes.

STEP 1 · DNS & ONBOARDING

Connect Your Domain to Spectra Shield (3 Minutes)

Spectra Shield sits in front of your origin as a high-speed HTTP/1.1, HTTP/2, HTTP/3 (QUIC), and WebSocket reverse proxy with Layer 7 WAF protection.

  1. Open Dashboard → Spectra Shield, activate a plan, and click Add Domain with your hostname (example.com) and origin IP:Port (e.g. http://1.2.3.4:80).
  2. In your DNS provider, point your A Record to the Spectra Edge IP:
TypeNameTarget IPTTL
A@194.146.47.177Auto / 300s
Awww (optional)194.146.47.177Auto / 300s
Tip: If using Cloudflare DNS, set the proxy status to DNS Only (Grey Cloud). Once DNS propagates, your domain flips to Active automatically with active/passive failover to backup node 194.146.47.184.
STEP 2 · SSL / HTTPS

Automatic Free SSL (Let's Encrypt) & Custom Certs

As soon as DNS verification succeeds, Spectra Shield automatically issues and renews a browser-trusted Let's Encrypt TLS 1.3 certificate via Go autocert (HTTP-01 & TLS-ALPN-01). No Certbot or manual setup needed.

  • Origin Host Header: Spectra always forwards the exact Host: example.com header to your origin server.
  • Custom PEM Upload: Enterprise/Pro users can upload their own fullchain.pem + privkey.pem from the SSL tab.
STEP 3 · REAL VISITOR IP

Restore Real Visitor IP on Your Origin

Because traffic is proxied through Spectra Edge, configure your origin web server to trust X-Real-IP from our two edge nodes:

Nginx — /etc/nginx/sites-available/yoursite.conf
# Restore real visitor IP forwarded by Spectra Shield Edge Nodes
set_real_ip_from 194.146.47.177;
set_real_ip_from 194.146.47.184;
real_ip_header X-Real-IP;
real_ip_recursive on;
Apache (mod_remoteip) — /etc/apache2/conf-available/remoteip.conf
RemoteIPHeader X-Real-IP
RemoteIPTrustedProxy 194.146.47.177
RemoteIPTrustedProxy 194.146.47.184
Node.js (Express)
app.set('trust proxy', ['194.146.47.177', '194.146.47.184']);

app.get('/', (req, res) => {
  const realIp = req.headers['x-real-ip'] || req.ip;
  res.send('Visitor IP: ' + realIp);
});
PHP — Real Visitor IP Helper
<?php
function getRealVisitorIp(): string {
    $trustedEdges = ['194.146.47.177', '194.146.47.184'];
    $remote = $_SERVER['REMOTE_ADDR'] ?? '';
    if (in_array($remote, $trustedEdges, true) && !empty($_SERVER['HTTP_X_REAL_IP'])) {
        return trim($_SERVER['HTTP_X_REAL_IP']);
    }
    return $remote;
}
STEP 4 · ORIGIN FIREWALL

Block Direct-to-Origin Attacks

Prevent attackers from bypassing Spectra Shield by allowing ports 80 and 443 on your origin server only from Spectra Edge IPs:

Origin Firewall (UFW — Recommended)
# Allow HTTP/HTTPS only from Spectra Shield Edge Nodes
sudo ufw allow from 194.146.47.177 to any port 80,443 proto tcp
sudo ufw allow from 194.146.47.184 to any port 80,443 proto tcp
# Keep SSH open before enabling!
sudo ufw allow 22/tcp
sudo ufw enable
STEP 5 · UAM & WAF

Under Attack Mode (UAM) & Custom WAF Rules

LevelBehaviorRecommended For
low / normalBaseline L7 signatures, bad bots, and SQLi/XSS filtering.Normal traffic
highTighter rate limits + TLS anomaly scoring + selective UAM.Active scraping / bot waves
autoTransparent normally; automatically enables Auto-UAM on floods.24/7 hands-off protection
uamChallenges every visitor with Spectra inline browser check.Active heavy Layer 7 DDoS
REFERENCE

Edge Headers & Status Codes

CodeMeaningAction
403Blocked by WAF or IP/Country ruleCheck your custom WAF rules or IP allowlist.
429Rate limit exceededAdjust per-IP RPS / Burst settings in dashboard.
503Spectra UAM ChallengeBrowsers pass automatically in ~2s; enable API Mode for JSON routes.
509Monthly bandwidth quota reachedUpgrade plan in Dashboard.
521 / 502 / 504Origin unreachable or timed outVerify origin IP:Port and firewall allowlist.
STEP 1 · KEYS

Create Your Site Key & Secret Key

  1. Go to Dashboard → Spectra Captcha and click Add Site.
  2. Enter your allowed domains (e.g. example.com, www.example.com).
  3. Copy your Site Key (sp_... for HTML) and Secret Key (sps_... for backend only).
STEP 2 · FRONTEND

Embed the Widget

When solved, the widget automatically injects a hidden input named spectra-captcha-response into your form.

HTML — Checkbox Widget (Standard)
<!-- 1. Include Spectra Captcha API script -->
<script src="http://tr-captcha.ddos-filter.online/api.js" async defer></script>

<!-- 2. Place widget inside your form -->
<form method="POST" action="/login">
  <input type="text" name="username" required />
  <input type="password" name="password" required />

  <div class="spectra-captcha"
       data-sitekey="sp_XXXXXXXXXXXX"
       data-theme="dark"
       data-hl="en"></div>

  <button type="submit">Sign In</button>
</form>

Invisible Mode & Callback (Plus / Pro)

HTML + JS — Invisible Mode (Plus / Pro)
<script src="http://tr-captcha.ddos-filter.online/api.js" async defer></script>

<div class="spectra-captcha"
     data-sitekey="sp_XXXXXXXXXXXX"
     data-size="invisible"
     data-callback="onSpectraVerified"></div>

<script>
  function onSpectraVerified(token) {
    console.log('Verified token:', token);
  }
</script>
STEP 3 · BACKEND

Verify the Token (POST /siteverify)

PHP — /siteverify Verification
<?php
$token = $_POST['spectra-captcha-response'] ?? '';
if ($token === '') {
    http_response_code(400);
    exit('Please complete the captcha.');
}

$ch = curl_init('http://tr-captcha.ddos-filter.online/siteverify');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT        => 10,
    CURLOPT_POSTFIELDS     => http_build_query([
        'secret'   => 'sps_YOUR_SECRET_KEY',
        'response' => $token,
    ]),
]);
$res  = curl_exec($ch);
curl_close($ch);
$data = json_decode($res, true);

if (empty($data['success'])) {
    http_response_code(403);
    exit('Captcha verification failed.');
}
Node.js (Express / Fetch) — /siteverify
app.post('/login', async (req, res) => {
  const token = req.body['spectra-captcha-response'];
  if (!token) return res.status(400).json({ error: 'Captcha required' });

  const body = new URLSearchParams({
    secret: process.env.SPECTRA_SECRET_KEY, // sps_...
    response: token,
  });

  const verify = await fetch('http://tr-captcha.ddos-filter.online/siteverify', {
    method: 'POST',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    body,
  });
  const data = await verify.json();

  if (!data.success) {
    return res.status(403).json({ error: 'Invalid captcha', codes: data['error-codes'] });
  }
  return res.json({ ok: true, score: data.score });
});
Python (requests) — /siteverify
import requests

def verify_spectra_captcha(token: str) -> bool:
    r = requests.post(
        "http://tr-captcha.ddos-filter.online/siteverify",
        data={
            "secret": "sps_YOUR_SECRET_KEY",
            "response": token,
        },
        timeout=10,
    )
    return bool(r.json().get("success"))
cURL Test
curl -X POST http://tr-captcha.ddos-filter.online/siteverify \
  -d "secret=sps_YOUR_SECRET_KEY&response=CLIENT_TOKEN"
STEP 4 · ATTRIBUTES

Supported HTML Attributes

AttributeValuesDescription
data-sitekeysp_... (required)Public site key from Dashboard
data-themelight, dark, midnight, ocean, forest, sunsetWidget color theme
data-sizenormal, invisibleCheckbox or invisible verification
data-hlen, trWidget language
data-callbackJS function nameCalled with token on success
REFERENCE

JSON Response & Fail-Open Guarantee

JSON Response Example
{
  "success": true,
  "challenge_ts": "2026-11-26T20:15:00.000Z",
  "hostname": "example.com",
  "score": 0.95,
  "mode": "checkbox",
  "limit_reached": false,
  "error-codes": []
}
Zero Lockouts: Even if a Free-tier site hits its 1,000 daily verifications, Spectra Captcha automatically enters bypass mode ("success": true, "limit_reached": true) so your users are never blocked.
STEP 1 · CONNECTION

Connect to Spectra S3 Object Storage

Full AWS S3v4 compatibility with a clean standalone web File Manager and instant HTTPS static publishing.

SettingValue
Endpointhttps://tr.object-storage.ddos-filter.online
Regiontr-ist-1
Path StyleforcePathStyle: true
STEP 2 · PROJECT HASH FOLDERS

Project Hash Folders & Web File Manager

Enter any project name in the dashboard to generate a deterministic hash folder prefix (e.g. my-app-8cf74d9f26/image.png), drag & drop files, and copy the public HTTPS link in one click.

STEP 3 · STATIC HTTPS

Static Website & Asset Publishing

Enable Static HTTPS on any bucket to publish files immediately at https://tr.object-storage.ddos-filter.online/site/{bucket}/{path}.

STEP 4 · AWS CLI

Quick AWS CLI Upload

AWS CLI
AWS_ACCESS_KEY_ID="SPK_KEY" AWS_SECRET_ACCESS_KEY="SPS_SECRET" aws --endpoint-url https://tr.object-storage.ddos-filter.online --region tr-ist-1   s3 cp image.png s3://my-bucket/my-app-8cf74d9f26/image.png
STEP 5 · TIERS & SECURITY

Tiers & Content Security

Tier 1: €1.99/mo (5 GB / 1 TB) · Tier 2: €4.49/mo (20 GB / 3 TB) · Tier 3: Coming Soon. Executable binaries and malware uploads are automatically blocked.

STEP 1 · DNS SETUP

Managed Load Balancer (TR · Unproxied)

Point your domain's DNS-Only A record to 185.246.113.21 (or CNAME to tr.lb.ddos-filter.online). Supports HTTP/HTTPS, WebSocket, TCP, and UDP with 4 TB monthly bandwidth.

STEP 2 · AUTOCERT SSL

1-Click Let's Encrypt SSL

Save your domain in the Load Balancer panel and click Autocert SSL to issue and auto-renew a trusted Let's Encrypt certificate in seconds.

STEP 3 · FAILOVER & PROTECTION

Automatic Failover & Abuse Protection

Continuous 5-second health checks automatically route traffic away from unhealthy nodes, while built-in per-IP rate limiting and exploit filtering protect your backends from basic floods.

STEP 4 · DISCORD WEBHOOK

Cross-Backend 5xx Anomaly Detection

If one backend returns 5xx on a path while peer backends return 200 OK, Spectra immediately logs the incident and posts a detailed alert to your Discord Webhook.