# Import and sharing formats

Source: https://onexray.com/docs/sharing/
Description: Understand standard share links, OneXray URLs, complete JSON, and GeoData dependencies without sharing private age keys.


## Choose the right format

| Item | Format |
| --- | --- |
| Server | Supported protocol share link, node JSON, or OneXray link |
| Subscription | HTTPS URL or OneXray link |
| Custom Routing | Complete route JSON or OneXray link |
| Raw JSON | Complete configuration JSON or OneXray link |
| Custom GeoData | File name/type and HTTPS source link |
| Connection backup | OneXray-backup.json through Backup & restore |

Standard protocol links cannot represent every Xray outbound field. Use complete node JSON or the OneXray format when preserving those fields matters.

VMess and VLESS links follow the [VMessAEAD / VLESS share-link standard](https://github.com/XTLS/Xray-core/discussions/716). Legacy VMessQrCode links (`vmess://Base64(JSON)`) are not supported. SS, SOCKS, Trojan, and Base64 / age subscription wrappers remain supported.

Server import extracts nodes only. Complete configuration import belongs in Custom Routing or Raw JSON. A connection backup uses the separate [Backup & restore](https://onexray.com/docs/backup/) entry, not a configuration import. Old ZIP backups are not supported. Unlike subscription sharing, a backup includes existing Age keys and HWID; never publish it as a share link.

## OneXray links

```text
onexray://onexray.com/config/add?type=outbound|raw|custom|custom-advanced&data=<percent-encoded-base64-json>#Name
onexray://onexray.com/sub/add?url=<percent-encoded-https-url>&age=x25519|hybrid#Name
onexray://onexray.com/dat/add?type=domain|ip&url=<percent-encoded-https-url>#Name
```

Choose one value wherever alternatives are shown; omit age for an unencrypted subscription. The fragment supplies a display name. Retired profile/full/setting configuration types are not supported.

age links include only the algorithm. The receiving device generates new keys; your existing private or public key is not shared. Subscription exports also omit the HWID and its enabled flag. Importing a link cannot enable HWID; the receiving user must opt in for that subscription.

## Route dependencies

A complete shared configuration may declare custom data:

```json
{
  "geodata": {
    "assets": [
      {"file": "other.dat", "url": "https://example.com/other.dat"}
    ]
  }
}
```

This is a dependency fragment, not a complete runnable configuration. Replace the example URL with your source.

Default geoip.dat and geosite.dat are omitted. Ordinary Custom exports only empty entry slots; Advanced Custom also exports its auxiliary outbounds. Neither exports generated proxy nodes, balancers or App direct/block definitions. Import validates dependencies, rejects file-name conflicts, and removes the import-only geodata field before storage.

Ordinary Custom routes store and export their local DNS address using the standard `dns.servers` entry tagged `app-dns-direct`. Runtime-only direct-domain matching is generated by the app. See the [custom-route JSON example](https://onexray.com/docs/connect/custom-routing/).

## Sharing from the app

iOS, Android, macOS, and Windows open the system share interface. Linux offers an explicit copy action. Closing or cancelling a share panel leaves the source page open; the app does not treat dismissal as successful delivery. A share error shows the available cause.

## Opening links

Installed mobile/macOS apps, Windows EXE/MSIX, and Linux DEB register onexray://. Windows/Linux ZIP does not register it automatically; use clipboard/file import instead. When multiple Mac editions are installed, the OS chooses the link handler.

Sharing can expose credentials and URL tokens. Review the content first. Complete configurations and dependencies retain a confirmation flow even though ordinary node imports no longer have a second preview.

Ordinary Custom links use `custom`; Advanced JSON uses `custom-advanced`; complete Raw uses `raw`. A bare file gets its type from the chosen editor. Never infer the type from DNS fields or open an Advanced template in the ordinary rule form.


