Skip to main content

Documentation Index

Fetch the complete documentation index at: https://wiki.krkn.tech/llms.txt

Use this file to discover all available pages before exploring further.

API Reference

All API endpoints are served on the admin listener (127.0.0.1:9443 by default). Authenticated endpoints require a valid session cookie (kwaf_session) and CSRF token.

Setup

MethodPathDescription
GET/api/v1/setup/statusCheck if initial setup has been completed
POST/api/v1/setup/initCreate the first admin user and optionally configure SMTP

Authentication

MethodPathDescription
POST/api/v1/auth/loginAuthenticate with username and password
POST/api/v1/auth/logoutDestroy the current session
POST/api/v1/auth/magic-linkRequest a passwordless login email
GET/api/v1/auth/verifyVerify a magic link token and create a session

Proxy Hosts

MethodPathDescription
GET/api/v1/hostsList all proxy hosts
POST/api/v1/hostsCreate a new proxy host
GET/api/v1/hosts/{id}Get a proxy host by ID
PUT/api/v1/hosts/{id}Update a proxy host
DELETE/api/v1/hosts/{id}Delete a proxy host

WAF Rules

MethodPathDescription
GET/api/v1/rulesList all WAF rules (filterable by host_id)
POST/api/v1/rulesCreate a custom WAF rule
GET/api/v1/rules/{id}Get a WAF rule by ID
PUT/api/v1/rules/{id}Update a WAF rule
DELETE/api/v1/rules/{id}Delete a WAF rule
POST/api/v1/rules/importBulk import rules from JSON or YAML file (multipart, max 4 MB)
POST/api/v1/rules/testTest a single rule against a crafted request
POST/api/v1/rules/test-allTest a crafted request against all enabled rules

Certificates

MethodPathDescription
GET/api/v1/certificatesList all stored certificates (domains, source, issuer, expiry)
POST/api/v1/certificatesUpload a custom certificate (PEM cert + key)
DELETE/api/v1/certificates/{id}Delete a certificate (fails if assigned to a host)
POST/api/v1/certificates/cloudflare-originRequest a Cloudflare Origin CA certificate
POST/api/v1/certificates/cloudflare-edgeOrder a Cloudflare Edge certificate
GET/api/v1/settings/admin-trust-bundleDownload the local CA trust bundle (ZIP)

Access Lists

MethodPathDescription
GET/api/v1/access-listsList all access lists
POST/api/v1/access-listsCreate a new access list
GET/api/v1/access-lists/{id}Get an access list by ID
PUT/api/v1/access-lists/{id}Update an access list
DELETE/api/v1/access-lists/{id}Delete an access list
POST/api/v1/access-lists/azure-directory/searchSearch Azure AD users/groups via Microsoft Graph
POST/api/v1/access-lists/ad/testTest Active Directory LDAP connection
POST/api/v1/access-lists/ad/searchSearch Active Directory users/groups

Traffic & Analytics

MethodPathDescription
GET/api/v1/trafficQuery request logs with filters (host, IP, status, action, time range)
GET/api/v1/analytics/top-ipsTop source IPs by request and block count
GET/api/v1/analytics/top-hostsTop attacked hosts
GET/api/v1/analytics/timelineTraffic timeline with allowed/blocked/detected buckets
GET/api/v1/analytics/top-rulesMost frequently triggered WAF rules
GET/api/v1/analytics/geoGeographic traffic distribution by country
GET/api/v1/eventsServer-Sent Events stream for live traffic

Dashboard & System

MethodPathDescription
GET/api/v1/dashboardAggregate dashboard stats (host count, request count, block rate, top rule)
GET/api/v1/auditAdmin audit log
POST/api/v1/reloadHot reload proxy hosts and WAF rules from the database

SMTP & Notifications

MethodPathDescription
GET/api/v1/smtpList SMTP sending profiles
POST/api/v1/smtpCreate an SMTP profile
PUT/api/v1/smtp/{id}Update an SMTP profile
DELETE/api/v1/smtp/{id}Delete an SMTP profile
POST/api/v1/smtp/testTest SMTP connection

Mnemos Correlation

MethodPathDescription
GET/api/v1/correlation-eventsQuery correlation events (filterable by host, source IP, rule, time range)

DDoS Protection

MethodPathDescription
GET/api/v1/ddos/statusXDP attachment status, kernel version, mode
GET/api/v1/ddos/interfacesList available network interfaces
GET/api/v1/ddos/configGet global DDoS configuration
PUT/api/v1/ddos/configUpdate config (restarts XDP if interface changes)
GET/api/v1/ddos/rulesList all DDoS rules
POST/api/v1/ddos/rulesCreate a new DDoS rule
GET/api/v1/ddos/rules/{id}Get a specific DDoS rule
PUT/api/v1/ddos/rules/{id}Update a DDoS rule
DELETE/api/v1/ddos/rules/{id}Delete a DDoS rule
GET/api/v1/ddos/bansList active bans (with live drop counts from kernel)
POST/api/v1/ddos/bansManually ban an IP
DELETE/api/v1/ddos/bans/{ip}Unban an IP
GET/api/v1/ddos/eventsQuery event log (filterable by type, source IP, time)
GET/api/v1/ddos/statsReal-time stats from kernel BPF maps

Protocol Streams

MethodPathDescription
GET/api/v1/streamsList all stream hosts with runtime status
POST/api/v1/streamsCreate a new stream host
GET/api/v1/streams/{id}Get a stream host by ID
PUT/api/v1/streams/{id}Update a stream host
DELETE/api/v1/streams/{id}Delete a stream host
GET/api/v1/streams/statsGet runtime stats for all streams
POST/api/v1/streams/validate-portValidate a port before binding

Users

MethodPathDescription
GET/api/v1/users/meGet the currently authenticated user