# Share links

> Share captured requests, a saved session or a HAR file as an end-to-end encrypted link anyone opens read-only in a browser, with known secret formats redacted, a leak check, a password, expiry, view limits and a record of each open.

Source: https://docs.subcloak.com/cloak-proxy/cloud/share-links/

Added in Cloak Proxy 0.6.0.

A share link sends a few captured requests to someone who doesn't use Cloak Proxy: a colleague, a vendor's support team, the developer of the API. They open the link in any browser and see the requests read-only, with headers, bodies and timing. Known secret formats are redacted before anything leaves your Mac (redaction covers common formats, not every one, so look over what you share), and the requests are encrypted with a key that only the link carries, so Subcloak's server stores data it can't read.

Share links are part of Personal Cloud: you need to be signed in, with a plan. Without one, **Share Link…** and the File menu's share items are greyed with a gold star, and choosing one shows what Personal Cloud adds, with **Export HAR Instead…** where that helps. To show your traffic live to someone on your network without uploading anything, use [Live sharing](https://docs.subcloak.com/cloak-proxy/sessions/live-sharing/) instead.

{/* TODO(screenshot): share-link-light (the Share a link sheet). Markers: Redact secrets, the leak check line, Expires, Views, Require a password. */}

## Create a link

1. Select the requests to share in the traffic list, right-click them and choose **Share Link…**.

   Or choose **File › Share Session…**. Its **Shares** menu offers the selected requests, the requests in the list (when a filter or the sidebar narrows it) and **Everything in this session**.

   To share a file you saved earlier, see [Share a saved session or HAR file](#share-a-saved-session-or-har-file).

2. Check the **Name**. Whoever opens the link sees it as the page's title. It's encrypted like the requests.

3. Leave **Redact known secrets** on, or turn on **Hide all body values**: it hides every body, query, path and header value except a few headers that describe the message (Content-Type, Accept, Accept-Encoding, Accept-Language, User-Agent, Content-Encoding, Transfer-Encoding, Connection, Date), and keeps the method, host, header names, plain field names and the structure. Turn off **Include request and response bodies** if headers and URLs are enough.

4. Read the leak check under the switches. See [The leak check](#the-leak-check).

5. Choose when it **Expires** and how many **Views** it allows.

6. Optionally, tick **Require a password** and type one.

7. Click **Create Link**. If the leak check found something, or a body was too large to check in full, Cloak Proxy says why and asks **Share it anyway?** before it creates the link.

The sheet says **Link ready**, copies the link to the clipboard and shows a QR code to open it on a phone or tablet. Send the link to the person who needs it. If you set a password, send it another way, such as a phone call or a different chat.

{/* TODO(screenshot): share-link-done-light */}

> **Keep the whole link:**
> The part of the link after `#` is the key. It never reaches Cloak Proxy's servers, so the link can't be shown again on another Mac. Your Mac remembers the links it made under **Settings › Cloud › Share links**.

## Options

| Option | What it does | Default |
|---|---|---|
| **Name** | The title the recipient sees. | The app selected in the sidebar, the host, or "Requests from Cloak Proxy" |
| **Shares** | Which requests: the selection, the requests in the list, or everything in the session. Tunnels that weren't decrypted aren't included. | What you selected |
| **Redact known secrets (tokens, cookies, passwords, API keys and card numbers show as REDACTED)** | Replaces known secret formats and values under credential names with `REDACTED` before anything is encrypted or uploaded. It covers common formats, not every one. See [Redaction](https://docs.subcloak.com/cloak-proxy/sessions/redaction/). | On |
| **Hide all body values** | Hides every body, query, path and header value except a few headers that describe the message (Content-Type, Accept, Accept-Encoding, Accept-Language, User-Agent, Content-Encoding, Transfer-Encoding, Connection, Date); keeps the method, host, header names, plain-looking names (JSON keys, form, cookie and multipart field names, map keys, GraphQL operation and alias names, XML and HTML element and attribute names), protocol keywords such as `form-data`, `base64` and `HttpOnly`, the app's name (not its version) and the structure. Hidden values show as `REDACTED`, and so does the failure reason; the server address is dropped. Every path segment is hidden, a URL inside the path included. Keys that aren't plain names show as `REDACTED_1`, `REDACTED_2` and so on. Script and style content goes as a whole, and bodies with no structure to keep (plain text, binary, images, Protobuf, markup without an HTML or XML type, or markup that doesn't parse cleanly) are left out, with their size shown only roughly. Use it when you're not sure what a body contains. | Off |
| **Include request and response bodies** | Off shares URLs, headers and timing only. | On |
| **Expires** | **1 hour**, **24 hours**, **7 days** or **30 days**. The link stops working after that. | 24 hours |
| **Views** | **Unlimited**, **Once**, **5 views**, **25 views** or **100 views**. | Unlimited |
| **Password** | **Require a password**. The recipient needs it as well as the link. | Off |

The line at the bottom of the sheet sums up what you're about to share, for example: "Uploads 3 requests (URLs, headers, bodies and timing), encrypted with a key that only the link carries. It works for 24 hours, until you revoke it in Settings › Cloud."

Links last up to 30 days and hold up to 100 MB each. Up to 50 links can be active at once, and you can make up to 20 links a day. If a link goes over a limit, the sheet says which one in words.

## Share a saved session or HAR file

Choose **File › Share File…** and pick a saved session (`.cloaksession` or `.cloak`) or a HAR file (`.har`), or drop one on the sheet. You don't need to open it first. Files can be up to 200 MB; for a bigger one, open it and share fewer requests with **File › Share Session…**. A Charles session needs opening in Cloak Proxy first.

The sheet shows the file's size and kind, how many entries it couldn't read (they're left out), and the same options, leak check and **Create Link** as above. The file is read with strict limits, redacted and checked on your Mac like captured requests; nothing is uploaded until you click **Create Link**.

From the command line: `cloakctl share --file SESSION.har`.

## The leak check

Redaction replaces known secret patterns and values under credential names (`Authorization`, `password`, `api_key` and so on). The leak check is a second, independent look at what's left, using different rules, so it can catch what redaction missed. It runs every time you change what's shared.

| The sheet says | Meaning |
|---|---|
| **No known secrets found. Redaction covers common formats, not every one: look over the requests before you share, or turn on Hide all body values.** | The leak check found nothing more that it recognises. It can't recognise every format, so read the requests, or hide all body values. |
| ***N* values still look like a secret after redaction (long random strings, or values under names such as key or code)…** (orange) | Something may have slipped through, with an example of where. Check before sharing. Deselect those requests, turn off bodies, or edit the requests first. |
| ***N* bodies or messages are left out…** | Bodies Cloak Proxy couldn't decode, and so couldn't check for secrets (compressed with zstd, binary, damaged, or data after the end of an image), aren't shared. The recipient sees a note in their place. |
| **Redaction is off: headers and bodies are shared as captured…** (orange) | Everything is shared as captured, with how many possible secrets it found. Anyone with the link can read them. |

> **Share only what you're allowed to share:**
> Captured traffic can include personal data, session tokens and other people's information. Redaction and the leak check catch common secrets, not everything. Share requests from your own apps and accounts, or with permission, and keep links short-lived.

## Passwords

A password is stretched on your Mac (PBKDF2, 600,000 rounds) and mixed into the link's key. It's never uploaded. The recipient's browser does the same, so the server never sees it either.

- A forgotten password can't be recovered. Make a new link.
- A wrong password doesn't use up a view.
- A password also protects the link if the page that opens it were ever changed to read the key in the link. See [Security and privacy](https://docs.subcloak.com/cloak-proxy/cloud/security/#share-links).

## What the recipient sees

The link looks like `https://subcloak.link/s/q8VZr3pXk2LmT9wY#Jd7N…`. When someone opens it:

1. Their browser downloads the encrypted requests and decrypts them on their own computer. If the link has a password, they see **This link has a password** first: "Ask the person who shared it for the password. It never leaves this browser."
2. The page, **Shared requests**, lists the requests with a filter box (**Filter URLs, methods, status**). Selecting one shows its headers, body and timing.
3. A note at the bottom says: "Read-only. Shared from Cloak Proxy and decrypted in this browser: the server stores only encrypted data and never receives the key in the link."

They can't change or replay anything. Bodies over 512 KB show their first 512 KB.

A **Copy** menu on each request copies it as **cURL**, **fetch** or **Python**, its **URL**, or its response body. The commands are the same as Cloak Proxy's own Copy as cURL and Copy as code for the request as shared, so redacted values stay `REDACTED`, and unusual characters are escaped so a pasted command can't do anything else.

{/* TODO(screenshot): new capture needed: the share viewer in a browser (light), opened on the gallery's "Checkout 500 in ShopApp 4.2" link, one request selected; and the password prompt. Not part of the app gallery; render from the staging viewer with sample data. */}

| They see | Why |
|---|---|
| **This link has ended** | It expired, reached its view limit, or you revoked it. Or your plan has ended. |
| **This link is incomplete** | The part after `#` is missing. They should copy the whole link. |
| **This link doesn't exist** | It was deleted, or the address is wrong. |
| **This share can't be opened** | The link is damaged, or the data was changed on the way. |
| **That password isn't right.** | Wrong password. |

## Manage and revoke links

**Settings › Cloud › Share links** (or **File › Share Links…**) lists the links this Mac made. Click **Refresh** to fetch the latest views.

{/* TODO(screenshot): share-links-light */}

Each row shows the link's name and status, **Active**, **Expired**, **View limit reached** or **Revoked**, then how many requests, the size, the views (with the limit, if any), when it expires, and "not redacted" or "no bodies" when that applies. A lock means it has a password.

A second line shows the link's activity, for example "2 of 5 views used, 3 left · last opened 12 minutes ago", or "Not opened yet · up to 5 views". Once a link has been opened, **Opens** lists each open, newest first, with how long ago it was and the country it came from.

- The copy button (**Copy the link**) copies an active link again.
- **Revoke** stops the link at once and deletes its encrypted data from the server. Confirm with **Revoke**.
- Links made on another of your Macs show "not made on this Mac (no key here)". You can revoke them, but not copy them.

The server counts views and records when and from which country each was opened (not the IP address). It can't read link names or contents. Only your account sees a link's opens: assistants and paired devices get the counts, not the list.

## Share from an assistant or the command line

An AI assistant connected through the [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/) can create links with `create_share_link`, list them with `list_share_links` and revoke them with `revoke_share_link`. Every time an assistant, `cloakctl` or a paired device asks to create a link, Cloak Proxy asks you first.

The request shows who's asking ("An assistant wants to create a share link"), the **Name**, the number of **Requests**, the **Hosts** and **Apps**, when it **Expires**, the **Views**, whether **Secrets** are redacted, whether **Bodies** are included, and the leak check. **Show all *N* URLs** lists every request. Click **Create Link** or **Don't Allow**.

{/* TODO(screenshot): share-link-approval-light */}

**MCP**

`create_share_link` takes `ids` (request IDs), `query` (a [query](https://docs.subcloak.com/cloak-proxy/inspect/query-language/) such as `host:api.example.com status:>=500`) or `file` (the absolute path of a saved session or HAR file), `name`, `expires` (`1h`, `24h` or `7d`; default `24h`), `max_views` and `include_bodies`. Links an assistant creates are always redacted and last at most 7 days.

**cloakctl**

```bash title="Terminal"
cloakctl share --query 'host:api.example.com status:>=500' --name "Checkout 500s" --expires 24h --max-views 5
cloakctl share --file ~/Desktop/checkout.har --expires 7d
cloakctl share links          # links this Mac made: status, expiry, views (not the links)
cloakctl share links --activity   # also when and from which country each was opened
cloakctl share revoke ID      # stops the link and deletes its data
```

Options: `--ids 12,13`, `--query` or `--file`, `--name`, `--expires 1h|24h|7d|30d`, `--max-views N`, `--password-stdin`, `--no-bodies`, `--no-redact`, `--json`. The app still asks you before the link is made. See [cloakctl](https://docs.subcloak.com/cloak-proxy/automation/cloakctl/).

## Related

  - [Redaction](https://docs.subcloak.com/cloak-proxy/sessions/redaction/): What gets replaced with REDACTED.
  - [Live sharing](https://docs.subcloak.com/cloak-proxy/sessions/live-sharing/): Show traffic live on your network, nothing uploaded.
  - [Publish to Gist](https://docs.subcloak.com/cloak-proxy/sessions/publish-to-gist/): Share requests as a HAR, cURL or Postman gist.
  - [Security and privacy](https://docs.subcloak.com/cloak-proxy/cloud/security/#share-links): How link encryption works, and its limits.
