Skip to content

Signaling & packet relay backend for CL5.

License

Notifications You must be signed in to change notification settings

cloudlink-omega/signaling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CL5 Signaling & Packet Relay Backend

Provides WebRTC Signaling & a server-side message relay. A core service for providing CL5 connectivity.

Requirements

  • Go 1.23.1 or newer

Usage

The signaling server is a standard Fiber v2 app, and can be natively mounted.

package main

import (
    "github.com/gofiber/fiber/v2"
    "git.mikedev101.cc/MikeDEV/signaling"
)

func main() {

    // Initialize a new Fiber app
    app := fiber.New()

    // . . . 

    // Initialize the Signaling server
    signaling_server := signaling.New(
        []string{"*"}, // Provide a list of whitelisted origins to connect. Using * will permit all origins.
        false,         // TURN Only mode. Set to true to force the internal server relay to only use TURN servers.
    )

    // Mount the application
    app.Mount("/signaling", signaling_server.App)

    // . . .

    // Run the app
    app.Listen("localhost:3000")
}

Module import notice

When importing this code in another package, go mod tidy might not work nicely. Use GOPRIVATE.

Bash (Linux or macOS)

export GOPRIVATE=git.mikedev101.cc

PowerShell (Windows)

$env:GOPRIVATE = "git.mikedev101.cc"

About

Signaling & packet relay backend for CL5.

Resources

License

Stars

Watchers

Forks

Languages