Skip to content

ariacomputecompany/linx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linx

linx is an open-source service for publishing signed HTTP and WebSocket access links to internal targets.

It provides:

  • SQLite-backed service registration
  • signed service_token access URLs
  • readiness probing for upstream targets
  • HTTP proxying under /linx/<service_id>/...
  • WebSocket upgrade proxying on the same prefix

Scope

linx is intentionally small. It does not include tenant auth, container orchestration, or scheduler logic. You point it at already-running HTTP targets with target_url.

API Surface

  • POST /api/services
  • GET /api/services
  • GET /api/services/:service_id
  • DELETE /api/services/:service_id
  • GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS /linx/:service_id/...
  • GET /health

Quick Start

cargo run

Defaults:

  • HTTP: 127.0.0.1:18110
  • data dir: ./data
  • SQLite DB: ./data/linx.db

Environment:

LINX_HTTP_ADDR=127.0.0.1:18110
LINX_PUBLIC_BASE_URL=http://127.0.0.1:18110
LINX_DATA_DIR=./data
LINX_JWT_SECRET=change-me

Example

Start an upstream:

mkdir -p /tmp/linx-demo
printf 'linx ok\n' >/tmp/linx-demo/index.html
python3 -m http.server 19091 --bind 127.0.0.1 --directory /tmp/linx-demo

Create a published link:

curl -s -X POST http://127.0.0.1:18110/api/services \
  -H 'content-type: application/json' \
  -d '{
    "name":"demo",
    "target_url":"http://127.0.0.1:19091",
    "enable_websockets":true,
    "auth_mode":"service_token",
    "ttl_secs":300
  }' | jq

Then open the returned public_url.

Testing

cargo fmt
cargo check
tests/e2e_linx.sh

License

Apache-2.0

About

signed http/ws publishing links for internal services

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors