Developer Documentation

This reference provides the technical details required to establish persistent, authenticated connections to the NexusConnect ingress gateway. The gateway accepts standard TLS 1.3 connections with HTTP/2 protocol negotiation.

Quick Start

Connect to the gateway in three simple steps:

  1. Obtain an authorized bearer token from your deployment configuration.
  2. Initiate an HTTPS request to connect.dos7lo.me passing the Authorization header.
  3. Maintain the connection using HTTP/2 keep-alive pings with an idle interval under 300 seconds.

Authentication

All inbound requests must include a valid bearer token in the standard HTTP Authorization header. Unauthenticated requests will receive an immediate 401 Unauthorized response.

HTTP Header Specification
Authorization: Bearer nx_tok_9f82b7c4a1e84310 X-Client-Id: worker-node-01 Host: connect.dos7lo.me

Note: Tokens are cryptographically validated locally against the gateway's memory cache with sub-millisecond response latency.

Protocol Specification

The gateway adheres strictly to standard HTTP/2 (RFC 7540) stream semantics:

Parameter Standard Value Description
TLS Protocol TLS 1.3 Modern cipher suites with ECDHE key exchange.
ALPN Negotiation h2, http/1.1 Prioritizes HTTP/2 stream multiplexing.
Keep-Alive Timeout 300 seconds Max idle connection duration before heartbeat is required.
Max Frame Size 16,384 bytes Standard RFC default for predictable buffer memory.

Integration Examples

cURL (CLI)

Terminal Shell
curl -s -i --http2 \ -H "Authorization: Bearer nx_tok_sample_demo" \ -H "X-Client-Id: cli-diagnostic" \ https://connect.dos7lo.me/

Python (httpx / asyncio)

Python 3.10+
import httpx import asyncio async def check_connection(): url = "https://connect.dos7lo.me/" headers = { "Authorization": "Bearer nx_tok_sample_demo", "X-Client-Id": "python-agent" } async with httpx.AsyncClient(http2=True, timeout=10.0) as client: resp = await client.get(url, headers=headers) print(f"Connection Status: {resp.status_code}") asyncio.run(check_connection())

Go (net/http)

Go 1.21+
package main import ( "crypto/tls" "fmt" "net/http" "time" ) func main() { client := &http.Client{ Transport: &http.Transport{ TLSClientConfig: &tls.Config{MinVersion: tls.VersionTLS13}, ForceAttemptHTTP2: true, IdleConnTimeout: 120 * time.Second, }, } req, _ := http.NewRequest("GET", "https://connect.dos7lo.me/", nil) req.Header.Set("Authorization", "Bearer nx_tok_sample_demo") resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() fmt.Printf("Gateway Response: %d\n", resp.StatusCode) }

Node.js (Native Fetch)

Node.js 18+
const res = await fetch("https://connect.dos7lo.me/", { method: "GET", headers: { "Authorization": "Bearer nx_tok_sample_demo", "X-Client-Id": "node-service" } }); console.log(`Gateway Status: ${res.status}`);

Error Handling

The gateway uses standard HTTP status codes to indicate connection state:

Status Code Meaning Recommended Action
200 OK Successful handshake Proceed with application data transfer.
401 Unauthorized Missing or invalid bearer token Check token credentials in the request header.
404 Not Found Unregistered path or endpoint Verify endpoint destination URL.
502 Bad Gateway Backend service initializing Retry with exponential backoff (1s, 2s, 4s).

Best Practices

  • Reuse Connections: Avoid creating a new TCP/TLS connection per request. Keep HTTP/2 client sessions open.
  • Implement Jittered Backoff: When encountering 502/504 errors during backend restarts, back off with random jitter to prevent thundering herd.
  • Monitor Keep-Alive: Send periodic lightweight ping frames if the connection remains idle for over 2 minutes.