Skip to content

ShiftyX1/SUIP

Repository files navigation

SUIP - Simple Unified Internet Protocol

Experimental internet protocol with its own markup format, server, and browser.

Overview

SUIP (Simple Unified Internet Protocol) is a minimalist data transfer protocol that combines the best approaches of modern protocols without the legacy baggage of HTTP.

Main Components:

  • SUIP Server - TCP server implementing SUIP protocol in C
  • SUIP Browser - GUI browser (client that understands SUIP) in .NET/Avalonia

Quick Start

1. Run the server

cd suip-server
cmake -S . -B build
cmake --build build
./build/suip-server

The server will start on port 2802 and serve files from ./www

2. Run the browser

dotnet run --project ./suip-browser/SuipBrowser/SuipBrowser.csproj

3. Open the demo site

In the browser's address bar, enter:

suip://localhost/index.xml

SUIP Protocol

Message Structure

Header (12 bytes, binary):

[0]    Protocol Version  - 0x01
[1]    Message Type      - REQUEST/RESPONSE/ERROR
[2]    Operation         - Operation code (FETCH/STORE/...)
[3]    Status Code       - Response status (OK/NOT_FOUND/...)
[4]    Content Type      - Data type (TEXT/BINARY/XML/PATH)
[5]    Flags             - Bit flags (KEEP_ALIVE/...)
[6-7]  Reserved          - 0x0000
[8-11] Content Length    - body size (big-endian, 4 bytes)

Body: variable length, contains data

URL format

suip://host[:port]/path

Examples:

  • suip://localhost/index.xml
  • suip://example.com:2802/page.xml

SUIP XML Markup Format

Базовые теги (MVP)

<?xml version="1.0"?>
<page>
  <container id="header">
    <text class="heading">Header</text>
  </container>
  
  <container id="content">
    <text>Regular text</text>
    <link href="suip://localhost/about.xml">Link</link>
  </container>
</page>

Supported Elements:

  • <page> - root page element
  • <container> - grouping container
  • <text> - text content
  • <link href="..."> - clickable link

Attributes:

  • id - unique identifier
  • class - class for styling
  • href - destination URL (for <link>)

Development

Requirements

  • GCC or Clang (for server)
  • CMake 3.16+ (for server)
  • .NET 10.0+ (for browser)
  • Avalonia UI (for browser)

About

Simple Unified Internet Protocol

Resources

Stars

Watchers

Forks

Packages

No packages published