# Nearby Sharing — AO tool

> Send files to your other devices on the same Wi-Fi, straight from one to the other. No app, no account, nothing uploaded. Runs in the browser. AO's server only introduces two devices on one network; the file goes directly between them. No upload, no sign-up.

Human page: https://abstractobjective.dev/tools/nearby-share/
Status: beta · Category: share

## Input and output
- In: any files, chosen on one device
- Out: the files, saved on the other device, after the person there accepts

## Programmatic use (the AI-facing twin)
Runs in the page context; the transfer is between the two browsers.

- `window.AONearby.peers() -> Promise<{id, name, device, paired}[]>`
  The devices this page can see now: others on the same network with this page open, and any paired by code. name is random; device is phone, tablet or computer.
- `window.AONearby.send(peerId, files: File[]) -> Promise<{sent: boolean, reason?: string}>`
  Offer files to one device. The person there accepts or declines first; the bytes then go straight between the two devices.

## Notes
- Devices that open this page on one network find each other through AO's server, which sees only a random name, the kind of device and the connection messages; the network address is used to group them and is never shown or stored.
- The file goes over a direct WebRTC connection between the two devices, encrypted (DTLS). No byte of it reaches AO.
- The receiver sees who is sending, the file names and sizes, and accepts or declines before anything is sent.
- Guest and hotel Wi-Fi often block devices from reaching each other; then nothing can connect, because this has no relay.
- An iPhone or iPad receives at most 200 MB at a time: the browser holds the whole file in memory until you save it.

## Properties
- Privacy: files go only to the device you choose, and only after it accepts; AO's server sees a random name, the device kind and connection messages, never the file.
- Limits: 200 MB at a time to an iPhone or iPad; otherwise the receiving device's memory.
- Cost model: the server only introduces devices, a few kilobytes each — free, sustainably.

---

## How it works

Open this page on two devices on the same Wi-Fi, a phone and a laptop for example. They find each other and each shows the other in its list. Choose a device, pick files, and the person there sees who is sending, the file names and the sizes, and presses **Accept** or **Decline**. Nothing is sent before they accept.

The file goes **straight from one device to the other**, over an encrypted connection between the two browsers (WebRTC). Our server only introduces the two devices: it sees a random name like "Blue Otter", whether it is a phone, a tablet or a computer, and the few short messages the browsers trade to open the connection. It never sees the file, its name or its size.

## How it knows which devices are nearby

Devices that reach the internet through the same router share one public address, and the page groups them by it. The address is used for that and nothing else: it is never shown to anyone, never stored, and forgotten when you close the page.

Because of that, a few situations need the code instead:

- **A phone on mobile data** next to a laptop on Wi-Fi are on two networks.
- **Some homes give the phone and the laptop different kinds of address** (IPv6 and IPv4), so they land in two groups.

Open **Pair with a code**, show the code on one device and type it on the other. They see each other until you close the page.

## When it cannot connect

Guest Wi-Fi, hotel Wi-Fi and some office networks deliberately keep devices from reaching each other. Then the two devices see each other in the list but the transfer cannot start, and the page says so. There is no relay through our server, on purpose: a relay would carry your files through a machine that is not yours, and it costs money with every gigabyte.

## Limits

- **An iPhone or iPad receives at most 200 MB at a time.** Safari holds the whole file in memory until you save it, and past that it tends to close the tab.
- Other devices are limited by their memory. Send very large files a few at a time.
- The receiving device saves each file when it arrives; on a phone you may be asked where.

## Strangers

On a shared connection, a café, a university, or a mobile network where many people share one address, other people with this page open can appear in your list. They see only your random name and the kind of device, and nothing can reach you unless you press **Accept**. If a name you do not recognise sends you something, decline it.
