olcRTC Documentation

repository·master·Indexed 23 days ago

https://github.com/openlibrecommunity/olcrtc

An encrypted TCP-over-WebRTC tunneling solution that disguises traffic as video calls to bypass network restrictions. It uses XChaCha20-Poly1305 encryption and supports providers such as Jitsi, Telemost, and WbStream across Linux, macOS, Windows, and Android. The project includes a CLI tool with server (srv), client (cnc), and generator (gen) modes, a C-shared API for connectivity testing, and embeddable Go libraries.

Tokens
24.5K
Snippets
57
Records
128
Agent score
82%

What's inside olcRTC

  1. Overview of olcRTC

    master

    olcRTC (OpenLibreCommunity RTC) is an encrypted TCP-over-WebRTC tunnel. It is designed to bypass network restrictions by disguising traffic as ordinary participation in a WebRTC/SFU service (such as Jitsi Meet, Yandex Telemost, or WbStream).

    To an outside observer, the connection appears to be a standard WebRTC call to an allowed service IP. The payload is additionally secured using a shared crypto.key with XChaCha20-Poly1305 encryption.

  2. What is olcRTC?

    master

    olcRTC (OpenLibreCommunity RTC) is an encrypted TCP-over-WebRTC tunnel. It masks network traffic as standard video calls on permitted services (such as Jitsi, Yandex Telemost, or WbStream).

    Core Security & Protocol Features:

    • Encryption: Uses XChaCha20-Poly1305.
    • Multiplexing: Uses smux over WebRTC data/video channels.
    • Traffic Flow: app -> SOCKS5 -> olcrtc cnc -> WebRTC/SFU сервис -> olcrtc srv -> internet.

    Note: Ensure the video calling service you intend to use is on the allowlist and functional in your network before proceeding.

  3. What is olcRTC and how does it work?

    master

    olcRTC (OpenLibreCommunity RTC) is an encrypted TCP-over-WebRTC tunnel designed to mask traffic as standard WebRTC/SFU service participation (e.g., Jitsi Meet, Yandex Telemost, or WbStream). This allows bypassing network restrictions where direct access to arbitrary VPS/IPs is blocked.

    Architecture

    • Client Mode (cnc): Starts a local SOCKS5 proxy. Applications (browsers, curl, sing-box, etc.) connect to this proxy.
    • Server Mode (srv): Connects to the same WebRTC room/session, receives encrypted smux streams, and performs TCP dials to target destinations.

    Data Flow

    SOCKS CONNECT $\rightarrow$ smux stream $\rightarrow$ XChaCha20-Poly1305 $\rightarrow$ transport $\rightarrow$ engine $\rightarrow$ WebRTC/SFU

  4. olcRTC Features and Supported Components

    master

    olcRTC supports various providers, transports, and platforms:

    • Providers: jitsi, telemost, wbstream (Recommended start: jitsi + datachannel).
    • Transports: datachannel, vp8channel, seichannel, videochannel.
    • Platforms: Linux, macOS, Windows, Android (via gomobile), and it is available as an embeddable Go library.
  5. Understand the `sub.md` subscription format

    master

    The sub.md format is a plain text file hosted on a server that client applications use to manage server lists. It contains a list of olcrtc:// URIs supplemented with metadata for both the entire subscription and individual servers.

    Note: This is a convention for client applications; the olcrtc core does not process this file.

    File Structure

    The file is parsed top-to-bottom using three types of entries:

    1. Global fields: Prefixed with #, these apply to the entire subscription.
    2. Server URIs: Lines starting with olcrtc:// representing a single server.
    3. Local fields: Prefixed with ##, these apply only to the immediately preceding olcrtc:// URI.

    Empty lines between entries are permitted.

  6. Configure Liveness monitoring

    master

    Liveness checks use an encrypted control stream (the first smux stream after CLIENT_HELLO/SERVER_WELCOME) to send CONTROL_PING and CONTROL_PONG. This verifies the actual tunnel path rather than just the WebRTC connection status.

    If the threshold of missed pongs is reached, the current smux session is rebuilt. In failover mode, the supervisor will attempt the next profile.

    liveness:
      interval: 10s
      timeout: 5s
      failures: 3
  7. Understand the olcrtc URI format for client applications

    master

    The olcrtc URI format is a compact convention for client applications to pass connection parameters to olcrtc.

    Note: olcrtc does not parse this URI automatically. Client applications must parse the URI string themselves and map the extracted fields into an olcrtc YAML configuration.

    URI Structure

    There are two supported formats:

    1. Basic: olcrtc://<Auth>?<Transport>@<RoomID>#<EncryptionKey>$<MIMO>
    2. With Payload: olcrtc://<Auth>?<Transport><key=value&key=value>@<RoomID>#<EncryptionKey>$<MIMO>

    Field Mapping to YAML

    URI FieldYAML KeyDescription
    <Auth>auth.providerName of the auth provider (e.g., telemost, wbstream, jitsi)
    <Transport>net.transportName of the transport (e.g., datachannel, vp8channel, seichannel, videochannel)
    payload(Transport specific)Key-value pairs inside <...> that map to transport-specific YAML blocks
    <RoomID>room.idRoom identifier or auth-specific room URL
    <EncryptionKey>crypto.keyHex-encoded encryption key (usually 64 chars/32 bytes)
    <MIMO>N/AClient-side metadata/comment only; not passed to olcrtc
    olcrtc://<Auth>?<Transport><key=value&key=value>@<RoomID>#<EncryptionKey>$<MIMO>
  8. Configure Carrier and Transport for olcrtc

    master

    When running the srv.sh or cnc.sh scripts, you must select a Carrier (the service carrying traffic) and a Transport (how data is carried). The combination you choose affects performance and compatibility.

    Carriers

    1. jitsi: (Default) Stable on datachannel, no registration needed, easy to self-host.
    2. telemost: Requires a specific Room ID from the Telemost site.
    3. wbstream: Requires a specific Room ID from the WBStream site.

    Transports

    TransportDescription
    datachannelFastest, lowest ping. Stable with jitsi. Note: Does not work with WBStream DC or Telemost DC.
    vp8channelWorks with telemost and wbstream. Fast, but higher ping.
    seichannelWorks only with wbstream. Slow, but low ping.
    videochannelWorks with wbstream reliably and telemost when possible. Slowest and highest ping.

    Recommended Combinations:

    • jitsi + datachannel (Best performance)
    • wbstream + vp8channel (Alternative)",
  9. Configure Carrier and Transport options

    master

    When running ./script/srv.sh, you will be prompted to select a Carrier and a Transport.

    Carriers

    1. jitsi: Default. Stable on datachannel, requires no registration, easy to self-host.
    2. telemost: Requires a Room ID from the Telemost website.
    3. wbstream: Requires a Room ID from the WBStream website.

    Transports

    • datachannel: Fastest, lowest ping. Recommended with jitsi. Note: Does not work with WBStream DC in guest flow, and Telemost has removed DC support.
    • vp8channel: Works with telemost and wbstream. Fast but higher ping.
    • seichannel: Works only with wbstream. Slow but low ping.
    • videochannel: Works with wbstream (stable) and telemost (as possible). Slowest with highest ping.

    Recommended combinations:

    • jitsi + datachannel (Best performance)
    • wbstream + vp8channel (Alternative)
  10. Configure olcRTC modes: srv, cnc, and gen

    master

    The olcrtc CLI operates in three distinct modes defined by the mode key in your YAML configuration:

    ModePurpose
    srvServer side: accepts tunnel streams and performs TCP dials to targets
    cncClient side: listens on a local SOCKS5 proxy
    genGenerates Room IDs for providers that support room creation

    To run the CLI, pass the configuration file as an argument:

    olcrtc server.yaml
    olcrtc client.yaml
  11. How olcRTC modes work

    master

    olcRTC operates in three distinct modes depending on your role in the tunnel:

    • srv (Server): The server-side component. It accepts encrypted tunnel streams from clients and performs TCP dials to the target destination addresses on the client's behalf.
    • cnc (Client): The client-side component. It listens on a local SOCKS5 proxy. Applications (like browsers or curl) connect to this local proxy to route traffic through the tunnel.
    • gen (Generator): A utility mode used to create Room IDs for providers that support room creation.