Skip to content

Deep Links

Deep Links allow you to automate actions in Mole, such as adding a subscription or switching a server, simply by following a link.

URL Scheme

Primary scheme: mole://

1. Adding a Subscription

mole://subscription/add?url=<url>&name=<name>

  • url: URL-encoded subscription link.
  • name: (Optional) Subscription name.

2. Legacy import (crypt1)

Use mole://crypt1/<payload>. The payload can be a Base64URL-encoded JSON object with url and optional name. Base64URL padding is optional. Existing Base64-encoded newline-separated share links are also supported. Anyone with the link can decode its contents.

3. Authenticated import (crypt2)

The binary format uses mole://crypt2/<envelope>#<key>. It verifies integrity and decrypts the payload with AES-256-GCM. A key supplied in the link can verify integrity. Provider authorship requires a separately trusted signature.

The authenticated payload can contain a share link, a direct HTTP or HTTPS subscription URL, or a JSON object with url and optional title or name. Authenticated isProtected and hideConfig flags apply to the subscription and its servers, including after refresh.

4. Direct Protocol Import

Mole is also a system handler for standard links: * vless:// * vmess:// * trojan:// * ss:// * hysteria2:// and hy2://