v0.3.0
### Breaking Changes #### The tunnel speaks frp's wire protocol v2 frp is retiring wire protocol v1, so Clients now log in to a Provider with v2. The Provider record's `protocol` is now `jetbridge+frp/2`. Clients and Providers from before this release can't use each other, so upgrade both. After upgrading a Provider, run `init` to republish its record; until then, Clients refuse it. #### The tunnel runs over a WebSocket Clients reach a Provider's tunnel over a WebSocket to its API hostname, `wss://<api.hostname>/`, in place of TLS with ALPN, so it works from browsers, through proxies, and on networks that allow only HTTPS. The session token and checks are unchanged. Clients and Providers from before this release can't use each other, so upgrade both. Providers need no new settings, and a `provider.toml` that sets `websocket_tunnel` under `[api]` no longer loads: delete it. ### Features #### A Provider admits its operator A Provider now admits the `operator` in its `provider.toml` in every admission mode, as it does the DIDs in `admission.trusted`, so a `closed` Provider serves its operator without a `trusted` list. The deny-list still refuses it. Reload to apply a change. A Provider no longer admits its own DID, which can't log in as a client. #### Providers say who runs them, and which release A Provider record can now name its operator, the atproto account of whoever runs it, and the Jetbridge release it runs. Set `operator` in `provider.toml`, or give `init` `--operator` with a DID or handle when it writes the file, then run `init` to publish it. `run` publishes the release's version when it starts, so an upgrade shows without running `init`. #### Web pages can call the session API A Provider's session API answers browsers' CORS preflights and allows any origin, so a web page can call `requestSession` and read its errors. ### Fixes #### Tidier Provider home page The home page leads with the Provider's hostname, at a size that fits longer names on one line, and shows its access mode in monospace.
v0.2.3
### Features #### Your Provider now has a home page Opening your Provider's API hostname in a browser shows a small page naming the Provider and its admission mode, `open`, `approval` or `closed`. It follows `admission.mode` when you reload. Everything else on that hostname is served as before. #### Relays follow a Provider's records A Provider's built-in PDS now serves a firehose, `com.atproto.sync.subscribeRepos`, and `run` asks Bluesky's and Blacksky's relays to follow it, at start and daily. The Provider's records then reach the atproto network, where jetbridge.link/providers finds them. Choose the relays with `relays` in `provider.toml`, or set `relays = []` to ask none. Anyone can keep copies of the records the relays carry, approvals and usage included, even after you delete them.
v0.2.2
### Fixes #### Browsers can read a Provider's PDS A Provider's built-in PDS now lets web pages read its DID document and records, so sites such as jetbridge.link/providers can list it. Its session API is unchanged. #### Saving usage counts no longer pauses traffic Providers and Clients save their usage counts every few seconds. That save held up every visitor connection, new and open, until the disk had finished writing, so on a slow or busy disk visitors saw stalls of seconds. Counts are now saved without holding up the traffic they count.
v0.2.1
### Fixes #### Install with Homebrew Each release publishes Homebrew formulas for `jetbridge-client` (macOS and Linux) and `jetbridge-provider` (Linux) to the `byjp.me/tools` tap: `brew tap byjp.me/tools https://tangled.org/byjp.me/homebrew-tools`, then `brew install byjp.me/tools/jetbridge-client`. #### Release archives fit Tangled's upload limit The Provider's binary is about a third smaller, so its release archive fits under Tangled's upload limit. v0.2.0's release stopped before publishing any archives or container images; this release publishes them.
v0.2.0
### Breaking Changes #### Providers need only ports 80 and 443 A Provider serves its session API and its tunnel on port 443, alongside visitors, so it needs no other ports open, and Clients on networks that allow only outbound HTTPS can reach it. Clients older than this can't reach such a Provider's tunnel, so upgrade them first; newer Clients still work with older Providers. A Provider config from an earlier release has `port` and `tunnel_port` under `[api]`, which now fail to load: delete them, then run `init` to publish the Provider record's new addresses. #### A Provider can offer several policies A Provider record lists its `activePolicies`, in its order of preference, in place of one `policy`, so a Provider can offer, say, one policy per jurisdiction; a Client accepts one. `provider.toml` describes each in a `[[policy]]` table: `abuse_contact`, optional `jurisdiction` and `entity`, and an optional `file` of markdown to publish in place of the default text. `jetbridge-provider init` publishes a new policy record only for a policy whose terms or text changed, and keeps one it no longer lists accepted for 30 days. `policy publish` is gone: use `file`. A single `[policy]` table is refused: write `[[policy]]`. `init` needs `--abuse-contact` to write a new config file. `ingress.Config.AcceptPolicy` is offered the Provider's policies and returns the one the user accepts, or nil; `ingress.Policy` has the policy's `CID`. `AcceptAllPolicies`, `jetbridge-client up --accept-policy` and `accept_policy = true` accept the Provider's first policy; a list of CIDs accepts the first of the Provider's that it names. A route keeps the policy it accepted while the Provider offers it. #### Policies carry their terms inside the record A Provider's policy record now holds its terms as markpub.at markdown (`at.markpub.markdown`), so the policy CID a client accepts covers the terms themselves. Policy records that point at their terms by URL and SHA-256 are no longer read, and `ingress.Policy` no longer has a `URL` field. #### Clients find a Provider through its DID document A Provider's DID document names its session API as the `#jetbridge` service, and Clients reach both the session API and the tunnel at that endpoint's host and port. So the Provider record no longer has `api` or `tunnel`, and `requestSession` no longer returns `tunnel`. The record's `protocol`, and the ALPN protocol Clients offer on the tunnel, are now `jetbridge+frp/1`. Clients and Providers from before this release can't use each other, so upgrade both. After upgrading a Provider, run `init` to republish its record. #### The provider is its own did:web account A Provider no longer needs an atproto account or an app password. Its identity is `did:web:<api.hostname>`: `init` creates its signing key and repo in `data_dir`, and `run` serves its DID document and records from the API hostname, so clients name it by that DID or by the hostname. Delete `identity` from `provider.toml`, list your own DID in `admission.trusted` to keep connecting under `closed`, mount `data_dir` when you run `init`, back `data_dir` up, and stop setting `JETBRIDGE_APP_PASSWORD`. Changing `api.hostname` now changes the Provider's identity. #### Traffic caps replace the free-form bandwidth limit Providers publish caps on each Client's traffic, each in one direction over a rolling period, in place of `limits.bandwidth`. Set them with `[[limits.traffic_cap]]` tables in `provider.toml`, and override them for one Client with `approve --traffic-cap egress:100GB:30d` (repeatable; `none` lifts them). Nothing enforces them yet. A config with `limits.bandwidth` fails to load: delete it. `approve --bandwidth` and `--note` are gone, and usage records count `ingress` and `egress` in place of `bytesIn` and `bytesOut`. #### Usage counts each byte on the day it flowed Providers and Clients count usage as bytes flow, not when a connection closes, so a connection open across midnight splits between the two days, and a crash loses only the last few seconds of counts. A Client that crashed still judges the day, unless the Provider states more than it counted, which is `incomplete`. Upgrade Clients with their Provider: an older Client counts a long-lived connection on the day it closes, so it would find a newer Provider over on the days before. ### Features #### Refusals don't say why a Client is denied A Provider answers `Denied`, with one message, whether its admission is closed, the Client or hostname is on its deny-list, or the Client is over its hostname limit. It checks the deny-list before anything else, and logs the real reason. The `AdmissionClosed` and `LimitExceeded` errors are gone. #### Take the provider's addresses from its API hostname's DNS The provider publishes its API hostname's public A and AAAA records as its ingress addresses, and republishes them within minutes of a change, so moving a provider means editing DNS only, with no `init`. `ingress.addresses` and `init --ingress` become an optional override for split-horizon DNS; empty `ingress.addresses` in an existing config to follow DNS.
v0.1.1
### Features #### Accept policies and settle DNS conflicts without a terminal `jetbridge-client up` takes `--accept-policy=<CID>,…` to accept exactly those policies, and `--existing-dns down|replace`. A Provider changing to a policy you haven't accepted now takes the hostname down rather than leaving it to lapse. Embedders of `ingress.Listen` set `Config.AcceptAllPolicies`, `Config.AcceptedPolicies` and `Config.ReplaceDNS`; with no `AcceptPolicy`, a policy the store remembers accepting no longer counts. #### Serve several sites from one config file `jetbridge-client run --config sites.toml` serves every site a TOML file lists until interrupted. Each site has a hostname, an upstream and, if it differs from the rest, its own provider. Sites through the same provider share one session and one tunnel. `SIGHUP` re-reads the file, bringing new sites up and taking removed ones down without disturbing the rest; a changed upstream takes over from the next visitor, and a changed provider moves the site as `switch` does. It asks nothing: the file's `accept_policy` (`true`, or the CIDs of the policies you accept) and `existing_dns` (`down`, the default, or `replace`, per site if you like) answer what `up` asks on a terminal, so a container starts detached from its first run. `identity` in the file applies only when neither `--identity` nor `$JETBRIDGE_IDENTITY` gives one. The `atcr.io/byjp.me/jetbridge-client` image runs it, with the app password in `$JETBRIDGE_APP_PASSWORD`. #### `status` says why a site isn't running When `up` or `run` can't bring a site up, or takes it down, `status` shows when and why, until the site next comes up. This includes a site that failed before its route was recorded. ### Fixes #### Ask about every DNS change before writing anything `up` and `run` now settle every DNS record they would replace (by asking, or from `existing_dns`) before writing anything. A declined change, or `existing_dns = "down"`, leaves DNS, the route record and the provider untouched. Before, the hostname's TXT and CAA records and its route record were written first, and each of `run`'s retries took a session. A CNAME at the hostname that you agree to replace now goes before the CAA record is written, as DNS can't serve both. #### Keep routes healthy while their addresses move Following a provider's new ingress addresses, or switching provider, no longer pauses tunnel health checks, session renewals and policy checks for the minutes the DNS move takes. A switch requested meanwhile starts once the move ends.
v0.1.0
### Breaking Changes #### First release of the Jetbridge client and provider `jetbridge-client` serves a local HTTP or TCP service on your own domain through a Jetbridge provider: it dials out to the provider, keeps TLS termination on your side, and manages the domain's DNS over atproto. `jetbridge-provider` is what a provider runs to give ingress to other people's services. Archives are built for the client on Linux and macOS, and for the provider on Linux, each for amd64 and arm64. The provider is also published as a container image, `atcr.byjp.me/byjp.me/jetbridge-provider`, for linux/amd64 and linux/arm64. ### Features #### tcp:// upstreams accept any ALPN protocol A visitor that insists on an ALPN protocol other than `h2` or `http/1.1`, such as PostgreSQL's direct TLS (`postgresql`), is no longer refused when the upstream is `tcp://`. Embedders of `ingress.Listen` opt in with `Config.AnyALPN`.