zarazaex69 f469bd72af refactor: extract shared session runtime into internal/runtime
server.go and client.go each carried byte-identical copies of
smuxConfig (~20 lines), setupCipher (~18 lines), and the health
bookkeeping pair recordSession/Pong/Missed/Unhealthy/Reconnect plus a
private healthMu+status+notifyHealth scaffold. Same code, twice.

Add internal/runtime exposing:
- SetupCipher, SmuxConfig, MaxPayload — common construction helpers,
  ErrKeyRequired/ErrKeySize re-exported from runtime so existing
  errors.Is checks on server.ErrKeyRequired etc. keep working.
- HealthTracker — nil-safe wrapper around control.Status with
  RecordSession/Pong/Missed/Unhealthy/Reconnect that publishes through an
  OnHealth callback supplied at construction.

server and client now hold a *runtime.HealthTracker instead of their own
mu+status+notify scaffolds. recordX methods on Server/Client are now
one-liners that forward to the tracker. smuxConfig(0) replaces the prior
variadic smuxConfig() in test call sites; nil-safe Status()/update() on
HealthTracker means tests that build raw &Server{}/&Client{} no longer
need to wire up a tracker for the records to be no-ops.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 14:24:46 +03:00
2026-05-16 13:51:02 +03:00
2026-05-04 00:02:20 +03:00
2026-05-16 13:51:02 +03:00
2026-05-07 14:28:32 +03:00
2026-05-16 04:34:59 +03:00
2026-05-16 04:34:59 +03:00
2026-05-13 23:10:23 +03:00

License Golang

About

olcRTC - across the sea

Project that allows users to bypass blocking by parasitizing and tunneling on unblocked and whitelisted services in Russia, use legal webRTC services

Status

Beta
See all info in issues
Issues? contact us at @openlibrecommunity
Or wait for the release or at least a release
Community ui client: alananisimov/olcbox

Read docs for start

Configuration

For noobs

Manual

Setting matrix

Client URI format

Client subscription format

Read before ask

Build

# install mage first
go install github.com/magefile/mage@latest

# build cli + ui
mage build

# build cli only
mage buildCLI

# build cli with b codec, clones b repo, builds libb.so, compiles with -tags b
mage buildCLIB

# cross-compile for linux / windows / darwin
mage cross

# android aar via gomobile
mage mobile

# container image
mage podman
mage docker

# lint / test / clean
mage lint
mage test
mage clean


Telegram: zarazaex
Email: zarazaex@tuta.io
Site: zarazaex.xyz
Made for: olcNG

Description
No description provided
Readme WTFPL 106 MiB
Languages
Go 89.8%
Python 6.4%
Shell 3.6%
Dockerfile 0.2%