Skip to content

Gfoisy1986/GF-NetStack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

239 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

En cours de développement… / Currently in development…

we reforging the actual SDK from OpenSSL to BearSSL big change incoming...

we aim Freedos 1.4 for first port of the sdk and shifting from Purebasic to Freebasic (Possibility of Purebasic Websoket Module we see later)...

As Freedos support Freebasic natively and like fortran, need the network stack....

Project GUIL-OS will be put to ours project archive as we aim a portable SDK...

The actual Guil-OS will be repalce by our Freedos program - Windows manager like

  • (SDK Shell / New IDE / Web Browser / Fossil vcs ! / Runtime output) all in one...

Mapping of the full project is incoming...


🇫🇷 Version Française

SDK moderne, modulaire et extensible pour Fortran95 & PureBasic


📚 Table des matières


🔐 Introduction

TLSv2 est une couche de communication sécurisée basée sur :

  • TLS (OpenSSL)
  • Un framing JSON robuste (4 bytes + UTF‑8)
  • Un wrapper C stable
  • Des bindings PureBasic fonctionnels
  • Une architecture prête pour Fortran, Lua, PB, C, etc.

Objectif : fournir une base solide pour créer des protocoles applicatifs sans se battre avec TLS ou les buffers.


🧱 Architecture

Serveur TLS (C)

  • Non‑bloquant
  • Multi‑clients
  • Basé sur select()
  • Handshake TLS automatique
  • Callbacks : on_client_connected, on_client_disconnected, on_json_received

Client TLS (C)

  • Bloquant
  • tlsv2_client_send_json()
  • tlsv2_client_recv_json()

Wrapper PureBasic

  • Import direct du .so/.dll/.dylib
  • Callbacks PB → C
  • ReceiveJSON() sécurisé

Protocole JSON

Type Description
"text" Messages texte
"command" Commandes (PING → PONG)
"table" Réponses tabulaires

📡 Framing JSON

[4 bytes length][JSON UTF‑8 payload]
  • Longueur = uint32 big‑endian
  • UTF‑8 propre
  • Compatible tous langages

🧪 Exemples PureBasic

Serveur PB

  • Dispatch automatique
  • Réponses TEXT, PING/PONG, TABLE

Client PB

  • Envoie TEXT → reçoit réponse
  • Envoie PING → reçoit PONG
  • Envoie TABLE → reçoit données

🔒 Sécurité

  • TLS 1.2+
  • Certificat PEM
  • Fermeture propre (SSL_shutdown)

✔ Fonctionnalités actuelles

  • Serveur TLS multi‑clients
  • Client TLS stable
  • Framing JSON robuste
  • PureBasic serveur + client
  • PING/PONG
  • TEXT → reply
  • TABLE → données
  • Buffers synchronisés
  • Aucun crash
  • .gitattributes propre

🚧 Prochaines étapes

  • Bindings Fortran
  • Module PB “TLSv2Client”
  • Authentification
  • Gestion d’erreurs JSON
  • Intégration SQLite réelle
  • Documentation bilingue

🌐 Vision du Projet – GF NetStack

1. WebSocket sécurisé (WSS)

  • Handshake WebSocket
  • Frames texte/binaire
  • Ping/Pong natif

2. SMTP sécurisé (SMTPS)

  • Envoi d’e‑mails
  • Auth LOGIN / PLAIN
  • MIME

3. POP3 sécurisé (POP3S)

  • Récupération d’e‑mails
  • Listing / téléchargement / suppression

4. HTTPS minimaliste

  • GET / POST / PUT / DELETE
  • JSON intégré

5. Bindings bases de données

SQLiteCloud

  • Connexion distante
  • Tables JSON

PostgreSQL

  • TLS
  • Requêtes préparées
  • JSONB

MySQL / MariaDB

  • TLS
  • Requêtes simples

SQLite (local)

  • Fichier .db
  • Requêtes SQL
  • Tables JSON
  • Requêtes préparées

6. Modules PB & Fortran prêts à l’emploi

  • GF.Net.TLSv2
  • GF.Net.WebSocket
  • GF.Net.SMTP
  • GF.Net.POP3
  • GF.Net.HTTP
  • GF.DB.SQLiteCloud
  • GF.DB.PostgreSQL
  • GF.DB.MySQL
  • GF.DB.SQLite

7. Vision globale

Créer un SDK réseau complet, moderne, sécurisé, modulaire.


CLI – Interface en ligne de commande

(Ne fonctionne pas actuellement)

Commandes :
doctor, new, build, clean, run



🇬🇧 English Version

Modern, modular and extensible SDK for Fortran95 & PureBasic


📚 Table of Contents


🔐 Introduction

TLSv2 is a secure communication layer built on:

  • TLS (OpenSSL)
  • Robust JSON framing
  • Clean C wrapper
  • PureBasic bindings
  • Fortran/Lua/PB/C ready

🧱 Architecture

TLS Server (C)

Non‑blocking, multi‑client, callbacks.

TLS Client (C)

Blocking, simple, stable.

PureBasic Wrapper

Direct import, safe JSON receive.

JSON Protocol

TEXT, COMMAND, TABLE.


📡 JSON Framing

[4 bytes length][JSON UTF‑8 payload]

🧪 PureBasic Examples

Server + client examples included.


🔒 Security

TLS 1.2+, PEM certs.


✔ Current Features

Stable TLS, JSON framing, PB examples, no crashes.


🚧 Next Steps

Fortran bindings, PB module, SQLite, auth, docs.


🌐 Project Vision – GF NetStack

1. Secure WebSocket (WSS)

Handshake, frames, ping/pong.

2. Secure SMTP (SMTPS)

Email sending, MIME.

3. Secure POP3 (POP3S)

Email retrieval.

4. Minimal HTTPS Client

REST‑friendly.

5. Database Bindings

SQLiteCloud, PostgreSQL, MySQL/MariaDB, SQLite local.

6. PB & Fortran Modules

Unified API.

7. Global Vision

Complete, modern, secure SDK.


CLI – Command Line Interface

(Not working right now...)

Commands: doctor, new, build, clean, run.



👤 Auteur / Author

Guillaume Foisy
Passionné par la modernisation de l’écosystème Fortran95 & PureBasic


About

Network Stack (Fortran95 & Purebasic)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors