# link.jetbridge.provider

> A provider's offer of ingress to other people's services over TLS. Lives in the provider's repo. The repo's DID identifies the provider.

- Kind: record
- Record key: literal:self
- Authority: jetbridge.link
- Lexicon: 1
- Published by [jetbridge.link](https://lexicon.garden/identity/did:web:jetbridge.link), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:web:jetbridge.link/link.jetbridge.provider)
- [Schema JSON](https://lexicon.garden/lexicon/did:web:jetbridge.link/link.jetbridge.provider/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:web:jetbridge.link/link.jetbridge.provider/analytics)

## Record (`link.jetbridge.provider`)

Type: record · key literal:self

### Properties

- `activePolicies` (array, required): The link.jetbridge.policy records a Client may accept, in the Provider's order of preference. A Client must accept one of them.
  - Constraints: minLength: 1, maxLength: 16
  - `items` (ref)
    - Reference: `com.atproto.repo.strongRef`
- `admission` (string, required): Who may open a tunnel: open (anyone), approval (Clients with an unexpired link.jetbridge.approval record) or closed (by out-of-band invitation only).
  - Constraints: maxLength: 32, knownValues: open | approval | closed
- `createdAt` (string · datetime, required)
- `ingress` (array, required): IPv4 and IPv6 addresses that clients write to their A and AAAA records.
  - Constraints: minLength: 1, maxLength: 32
  - `items` (string)
    - Constraints: maxLength: 45
- `limits` (ref): Default limits for every Client.
  - Reference: `#limits`
- `operator` (string · did): The atproto account of whoever runs this Provider.
- `ports` (array): TCP ports, besides 443, on which visitors reach Clients' hostnames over TLS.
  - Constraints: maxLength: 32
  - `items` (integer)
    - Constraints: minimum: 1, maximum: 65535
- `protocol` (string, required): The protocol version this Provider accepts.
  - Constraints: maxLength: 64, knownValues: jetbridge+frp-v2
- `version` (string): The Jetbridge release this Provider runs.
  - Constraints: maxLength: 64

## #limits (`link.jetbridge.provider#limits`)

Type: object

### Properties

- `maxHostnames` (integer): Most hostnames one client may serve at once.
  - Constraints: minimum: 1
- `trafficCap` (array): Caps on one Client's traffic, each over a rolling period. Left out when there is no cap. If a Client's traffic goes over any cap during its period, the Client must expect the Provider to throttle or cut its connections.
  - Constraints: minLength: 0, maxLength: 14
  - `items` (ref)
    - Reference: `#trafficCap`

## #trafficCap (`link.jetbridge.provider#trafficCap`)

Type: object

A cap on the traffic of all of one Client's hostnames together, in one direction, over a rolling period.

### Properties

- `bytes` (integer, required): The most bytes the Client may send in this direction during the period.
  - Constraints: minimum: 1
- `direction` (string, required): ingress: bytes from visitors to the Client via the Provider. egress: bytes from the Client to visitors via the Provider.
  - Constraints: maxLength: 16, enum: ingress | egress
- `timespan` (string, required): The length of the rolling period the Provider will limit over.
  - Constraints: maxLength: 16, knownValues: 1s | 1h | 6h | 1d | 7d | 30d | 365d

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "limits": {
      "properties": {
        "maxHostnames": {
          "description": "Most hostnames one client may serve at once.",
          "minimum": 1,
          "type": "integer"
        },
        "trafficCap": {
          "description": "Caps on one Client's traffic, each over a rolling period. Left out when there is no cap. If a Client's traffic goes over any cap during its period, the Client must expect the Provider to throttle or cut its connections.",
          "items": {
            "ref": "#trafficCap",
            "type": "ref"
          },
          "maxLength": 14,
          "minLength": 0,
          "type": "array"
        }
      },
      "type": "object"
    },
    "main": {
      "description": "A provider's offer of ingress to other people's services over TLS. Lives in the provider's repo. The repo's DID identifies the provider.",
      "key": "literal:self",
      "record": {
        "properties": {
          "activePolicies": {
            "description": "The link.jetbridge.policy records a Client may accept, in the Provider's order of preference. A Client must accept one of them.",
            "items": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "maxLength": 16,
            "minLength": 1,
            "type": "array"
          },
          "admission": {
            "description": "Who may open a tunnel: open (anyone), approval (Clients with an unexpired link.jetbridge.approval record) or closed (by out-of-band invitation only).",
            "knownValues": [
              "open",
              "approval",
              "closed"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "ingress": {
            "description": "IPv4 and IPv6 addresses that clients write to their A and AAAA records.",
            "items": {
              "maxLength": 45,
              "type": "string"
            },
            "maxLength": 32,
            "minLength": 1,
            "type": "array"
          },
          "limits": {
            "description": "Default limits for every Client.",
            "ref": "#limits",
            "type": "ref"
          },
          "operator": {
            "description": "The atproto account of whoever runs this Provider.",
            "format": "did",
            "type": "string"
          },
          "ports": {
            "description": "TCP ports, besides 443, on which visitors reach Clients' hostnames over TLS.",
            "items": {
              "maximum": 65535,
              "minimum": 1,
              "type": "integer"
            },
            "maxLength": 32,
            "type": "array"
          },
          "protocol": {
            "description": "The protocol version this Provider accepts.",
            "knownValues": [
              "jetbridge+frp-v2"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "version": {
            "description": "The Jetbridge release this Provider runs.",
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "protocol",
          "ingress",
          "admission",
          "activePolicies",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "trafficCap": {
      "description": "A cap on the traffic of all of one Client's hostnames together, in one direction, over a rolling period.",
      "properties": {
        "bytes": {
          "description": "The most bytes the Client may send in this direction during the period.",
          "minimum": 1,
          "type": "integer"
        },
        "direction": {
          "description": "ingress: bytes from visitors to the Client via the Provider. egress: bytes from the Client to visitors via the Provider.",
          "enum": [
            "ingress",
            "egress"
          ],
          "maxLength": 16,
          "type": "string"
        },
        "timespan": {
          "description": "The length of the rolling period the Provider will limit over.",
          "knownValues": [
            "1s",
            "1h",
            "6h",
            "1d",
            "7d",
            "30d",
            "365d"
          ],
          "maxLength": 16,
          "type": "string"
        }
      },
      "required": [
        "direction",
        "bytes",
        "timespan"
      ],
      "type": "object"
    }
  },
  "id": "link.jetbridge.provider",
  "lexicon": 1
}
```
