Skip to main content

Tabby Connection Gateway

This is the connection gateway service that Tabby Web uses. It's a Websocket → TCP gateway that allows Tabby to initiate arbitrary network connections from a browser.

You can host one yourself to prevent the connection traffic from going through the central connection gateway that I'm hosting.

Once started, you'll just need to enter your gateway URL and a secret token in the Tabby Web settings, and all future connections will go straight through your own gateway.

Getting started (Docker)

docker pull ghcr.io/eugeny/tabby-connection-gateway:master
docker run -e TABBY_AUTH_TOKEN=secret123 ghcr.io/eugeny/tabby-connection-gateway:master --token-auth

Getting started (native)

pip3 install tabby-connection-gateway

Usage

TCG runs one Websocket listener for the incoming connections and one optional Websocket listener for management requests.

The management/admin listener is only used on Tabby Web's own managed gateways to authenticate new connections. For your local instance, you need to generate your own secret token and pass it via the TABBY_AUTH_TOKEN environment variable.

Running with SSL

Note that if you're using Letsencrypt, you need to run the gateway on port 443 as they don't provide non-standard port certificates.

TABBY_AUTH_TOKEN="123..." tabby-connection-gateway --host 0.0.0.0 --port 443 --token-auth --certificate ssl.pem --key ssl.key

Connection gateway URL for Tabby settings: wss://<host>

You could theoretically add --ca ca.pem to enable client certificate auth, but AFAIK browsers (at least Chrome) don't support it with Websockets.

Running without SSL

TABBY_AUTH_TOKEN="123..." tabby-connection-gateway --host 0.0.0.0 --port 1234 --token-auth

Connection gateway URL for Tabby settings: ws://<host>:1234

Sample systemd unit

[Unit]
Description=Tabby Gateway
Requires=network-online.target
After=network-online.target

[Service]
Restart=always
ExecStart=/usr/local/bin/tabby-connection-gateway --host 0.0.0.0 --port 443 --certificate /etc/letsencrypt/live/my-host.com/fullchain.pem --private-key /etc/letsencrypt/live/my-host.com/privkey.pem --token-auth
Environment=TABBY_AUTH_TOKEN=123...
StandardOutput=syslog
StandardError=syslog

[Install]
WantedBy=multi-user.target

All options

tabby-connection-gateway <optional arguments>

optional arguments:
  --host HOST           address to listen on (default: 127.0.0.1)
  --port PORT           port to listen on (default: 9000)
  --certificate PATH    path to the SSL certificate. Enables SSL (default:
                        None)
  --private-key PATH
  --ca PATH             path to the CA certificate. Enables SSL client auth
                        (default: None)
  --no-auth             disables auth completely
  --token-auth          enables token based auth using the token from the
                        TABBY_AUTH_TOKEN env var (default: False)
  --admin-host ADMIN_HOST
                        address to listen on for management requests (default:
                        127.0.0.1)
  --admin-port ADMIN_PORT
                        port to listen on for management requests (default:
                        None)
  --admin-certificate PATH
                        path to the SSL certificate for the management server
                        (default: None)
  --admin-private-key PATH
  --admin-ca PATH       path to the CA certificate for the management server
                        (default: None)

Metadata

Release files for tabby-connection-gateway 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tabby-connection-gateway 0.3.0
File Size Uploaded
tabby-connection-gateway-0.3.0.tar.gz 6.3 kB Details

Release files / tabby-connection-gateway-0.3.0.tar.gz

Download URL tabby-connection-gateway-0.3.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e22f857b76bb614879f6a3d73bc564f903e78122d9ad73a01242b134ee3b2a42
BLAKE2b-256 checksum
How to use checksums
880da6dddd5f208875fe68b23f7a75511f6ffed2e5a8ed4438f33d32645b305b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page