- PureBasic 100%
| doc | ||
| lib | ||
| tests | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
PureBasic HTTP Stack V3.2
Triple-Protocol HTTP Server & Client — HTTP/1.1 · HTTP/2 · HTTP/3
Übersicht
Ein vollständiger, hochperformanter HTTP-Stack in PureBasic mit nativem Support für alle drei HTTP-Generationen:
| Protokoll | Standard | Features |
|---|---|---|
| HTTP/1.1 | RFC 7230–7235 | Zero-Copy State-Machine Parser, Chunked Transfer |
| HTTP/2 | RFC 9113 | Binary Framing, HPACK, Stream Multiplexing, Push |
| HTTP/3 | RFC 9114 | QUIC Transport, QPACK, 0-RTT, Connection Migration |
13 Module · ~22'350 Codezeilen · 683/683 Tests bestanden
Features
- Triple-Protocol Transparency — Ein einziges API für H1, H2 und H3; Protokollwahl erfolgt automatisch (ALPN)
- QUIC / HTTP/3 — Native OpenSSL 3.5 QUIC Integration, QPACK Header-Kompression, H3 Framing
- HTTP/2 — Full Binary Framing, HPACK, Server Push, h2c Cleartext Support
- TLS / HTTPS — OpenSSL-basiert mit SNI Multi-Domain und ALPN Negotiation
- ACME / Let's Encrypt — Automatische Zertifikatsbeschaffung und -erneuerung
- Routing — Pattern-basiertes Routing mit Parametern, Wildcards, Virtual Hosts
- Static File Serving — Range Requests (HTTP 206), Directory Index, Path-Traversal-Schutz
- NET Layer — epoll-basiert, Traffic Shaping, Metriken, Lock-Free Queues, Atomic Operations
- HTTP Client — Vollständiger Client mit H1/H2/H3 Support
Modulübersicht
lib/
├── HTTP_Server.pbi # HTTP Server (H1 + H2 + H3 transparent)
├── HTTP_Client.pbi # HTTP Client
├── HTTP_Protokoll.pbi # HTTP/1.1 Parser & Serializer
├── ACME_Protokoll.pbi # Let's Encrypt ACME Client
├── H2_Stream.pbi # HTTP/2 Stream Management
├── H2_Frame.pbi # HTTP/2 Binary Framing
├── HPACK_Codec.pbi # HTTP/2 Header Compression (RFC 7541)
├── H3_Stream.pbi # HTTP/3 Stream Management
├── H3_Frame.pbi # HTTP/3 Framing Layer
├── QPACK_Codec.pbi # HTTP/3 Header Compression (RFC 9204)
├── NET_Core.pbi # Core Network (Linux epoll)
├── NET_Server.pbi # Server Socket Management
├── NET_Client.pbi # Client Socket Management
├── NET_Shaping.pbi # Traffic Shaping / Rate Limiting
├── NET_Metrics.pbi # Connection & Performance Metrics
├── tls-openssl.pbi # OpenSSL TLS Wrapper
├── quic-native.pbi # QUIC Native Interface
├── quic-integration.pbi # QUIC ↔ HTTP/3 Integration
├── atomic-ops.pbi # Lock-Free Atomic Operations
└── lock-free-queue.pbi # Lock-Free Queue Implementation
tests/
├── H1_HTTP_Protokoll_TestSuite.pbi
├── H2_TestSuite.pbi
├── H3_Frame_TestSuite.pbi
├── H3_Stream_TestSuite.pbi
└── QPACK_TestSuite.pbi
Quick Start
XIncludeFile "lib/HTTP_Server.pbi"
HTTP_Server::Init()
HTTP_Server::Route("/", #PB_HTTP_GET, @OnIndex())
HTTP_Server::Start(8080)
Procedure OnIndex(*Req.HTTP_Server::Request)
HTTP_Server::RespondText(*Req, "Hello World!")
EndProcedure
Für ausführliche Beispiele und fortgeschrittene Konfigurationen siehe die Dokumentation.
Dokumentation
| Dokument | Beschreibung |
|---|---|
| API-Referenz | Vollständige Referenz aller 13 Module, Prozeduren, Strukturen und Konstanten |
| Demos & Benutzung | Praxisbeispiele von Quick Start bis Triple-Protocol Server, ACME, Virtual Hosts u.v.m. |
Voraussetzungen
- PureBasic 6.x (Linux x64)
- OpenSSL 3.5+ (für TLS und QUIC)
- Linux mit epoll-Support (Kernel 2.6+)
Lizenz
Dieses Projekt ist dual-lizenziert:
LGPL 2.1 (Open Source)
Für Open-Source-Projekte steht die Bibliothek unter der GNU Lesser General Public License v2.1 zur Verfügung. Du kannst die Bibliothek frei in eigenen Projekten verwenden, solange Änderungen an der Bibliothek selbst unter LGPL veröffentlicht werden.
Kommerzielle Lizenz
Für den Einsatz in proprietären oder Closed-Source-Projekten ohne LGPL-Pflichten ist eine kommerzielle Lizenz verfügbar.
📧 Kontakt: info@lihaso.ch
Entwicklung & Vibe Coding 🤖
Dieses Projekt wurde im Vibe-Coding-Stil entwickelt — in enger Zusammenarbeit zwischen Mensch und KI. Folgende KI-Assistenten waren am Entwicklungsprozess beteiligt:
| KI-Assistent | Anbieter |
|---|---|
| Claude | Anthropic |
| Grok | xAI |
| ChatGPT | OpenAI |
| Mistral | Mistral AI |
| DeepSeek | DeepSeek |
| Qwen 2.5 Coder | Alibaba (lokal via Ollama) |
Vibe Coding = Der Mensch steuert Architektur, Design und Qualitätsanspruch. Die KI unterstützt bei Implementierung, Refactoring, Tests und Dokumentation. Das Ergebnis: Schnellere Iteration bei gleichbleibend hoher Code-Qualität.
Kontakt
Linder Hard- und Software René Linder
Projektstruktur für Git
.
├── README.md # Diese Datei
├── LICENSE # LGPL 2.1 Lizenztext
├── lib/ # Bibliotheks-Module
├── tests/ # Testsuites
├── doc/ # Dokumentation
│ ├── HTTP_API-Referenz.md
│ └── HTTP_Demo-Benutzung.md
└── cap/ # Captures / Sonstiges