yonder-cli 0.4.1__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: yonder-cli
|
|
3
|
+
Version: 0.4.1
|
|
4
|
+
Summary: your site, over yonder: share a localhost site or files with your phone via a QR code
|
|
5
|
+
Home-page: https://github.com/dpologdvinity/yonder
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
|
|
10
|
+
# yonder
|
|
11
|
+
|
|
12
|
+
> your site, over yonder
|
|
13
|
+
|
|
14
|
+
Open the site running on your `localhost` from your phone, your iPad, or a friend's laptop on the same Wi-Fi. One command, one QR code, nothing to install on the other device.
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
brew install dpologdvinity/tap/yonder # macOS and Linux
|
|
22
|
+
go install github.com/dpologdvinity/yonder@latest
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Or download a binary for Linux, macOS or Windows from [Releases](https://github.com/dpologdvinity/yonder/releases).
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
yonder <port> share localhost:<port> on the LAN
|
|
31
|
+
yonder <path> share a file or folder
|
|
32
|
+
yonder <folder> --upload also let other devices send files into the folder
|
|
33
|
+
yonder <port> --listen N use proxy port N
|
|
34
|
+
yonder <port> --open share without the access token
|
|
35
|
+
yonder --version
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
$ yonder 3000
|
|
40
|
+
yonder: sharing localhost:3000
|
|
41
|
+
|
|
42
|
+
http://192.168.1.20:13000/?yonder=…
|
|
43
|
+
<QR code>
|
|
44
|
+
|
|
45
|
+
Only people with this link or QR code can open it.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Scan the QR code or type the URL on the other device. Each request shows up as one log line.
|
|
49
|
+
|
|
50
|
+
yonder runs a small proxy in front of your dev server, so you don't need to change its config:
|
|
51
|
+
|
|
52
|
+
- It works with servers that only listen on `127.0.0.1` or `::1`.
|
|
53
|
+
- It rewrites the `Host` and `Origin` headers, so servers that check them (Vite, webpack, Next.js) accept the request.
|
|
54
|
+
- Hot reload keeps working: WebSockets and server-sent events pass through.
|
|
55
|
+
- The proxy port is your port + 10000, so it stays the same across restarts (handy for firewall rules). The access token does not: after a restart, scan the new QR code.
|
|
56
|
+
|
|
57
|
+
## Share files
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
yonder ./photos # a folder: the phone gets a list of files to tap and download
|
|
61
|
+
yonder notes.pdf # one file: nothing else in its folder is reachable
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Same QR code and token as port sharing. The default port is 18000.
|
|
65
|
+
|
|
66
|
+
- Hidden files and folders (`.env`, `.git`, `.ssh`, anything starting with `.`) are never listed or served.
|
|
67
|
+
- Symlinks inside the shared folder are skipped, and `..` can't reach outside it.
|
|
68
|
+
- Share a dedicated folder, not your home directory.
|
|
69
|
+
- Add `--upload` to let the other device send files into the folder: the page gets an Upload button (on a phone it opens the photo picker or Files). Existing files are never overwritten (`photo (1).jpg`), hidden or path-like names are refused, and one upload is capped at 4 GB. Uploads are off unless you pass the flag.
|
|
70
|
+
- A folder named like a number is a port to yonder: use `yonder ./3000`.
|
|
71
|
+
|
|
72
|
+
## Is it safe?
|
|
73
|
+
|
|
74
|
+
The link and QR code carry a secret token. Anyone without it gets a 403 and never reaches your app. The first visit swaps the token for a cookie, so it disappears from the address bar. Every restart makes a new token, which cuts off old links. Only the one port you name is shared.
|
|
75
|
+
|
|
76
|
+
- `--open` turns the token off. Use it only on networks you trust.
|
|
77
|
+
- yonder speaks plain HTTP. On open (passwordless) Wi-Fi, or on WPA2 Wi-Fi with a shared password, others on the network can capture traffic and copy the token or cookie. Avoid sharing private data there. Enterprise Wi-Fi with per-user logins and WPA3 protect each device's traffic.
|
|
78
|
+
- Stop sharing with Ctrl-C.
|
|
79
|
+
|
|
80
|
+
## Known limitations
|
|
81
|
+
|
|
82
|
+
- Your app's own code may hardcode `localhost`. A frontend calling an API at `http://localhost:8080` fails on the phone, because there `localhost` is the phone. Use relative API URLs or your dev server's proxy.
|
|
83
|
+
- Response bodies are not rewritten. Absolute `http://localhost:<port>` links inside HTML or JS stay broken.
|
|
84
|
+
- `http://localhost` counts as a secure context; `http://192.168.x.x` does not. Service workers, camera, geolocation, clipboard and `crypto.subtle` won't work on the other device yet.
|
|
85
|
+
- Guest, campus and café networks often block device-to-device traffic. If the other device can't connect, try a phone hotspot.
|
|
86
|
+
|
|
87
|
+
## Firewalls
|
|
88
|
+
|
|
89
|
+
The first time yonder listens for connections, your OS may block or ask:
|
|
90
|
+
|
|
91
|
+
- **Windows:** allow `yonder.exe` in the Windows Defender Firewall prompt.
|
|
92
|
+
- **macOS:** allow incoming connections when the application firewall asks.
|
|
93
|
+
- **WSL (mirrored mode):** the Hyper-V firewall blocks inbound traffic to WSL by default, so the other device times out. See the WSL section below.
|
|
94
|
+
|
|
95
|
+
If the other device can't connect, watch yonder's output. No `device connected` line means the connection never reached yonder: a firewall or the network dropped it.
|
|
96
|
+
|
|
97
|
+
## WSL
|
|
98
|
+
|
|
99
|
+
In WSL's default NAT mode, other devices can't reach WSL at all; yonder prints a hint when it detects this. Either set `networkingMode=mirrored` under `[wsl2]` in `%UserProfile%\.wslconfig` and run `wsl --shutdown`, or run the Windows build, `yonder.exe`.
|
|
100
|
+
|
|
101
|
+
In mirrored mode, open yonder's port once in an **admin** PowerShell. For `yonder 8000` the port is 18000:
|
|
102
|
+
|
|
103
|
+
```powershell
|
|
104
|
+
New-NetFirewallHyperVRule -Name yonder -DisplayName yonder -Direction Inbound -VMCreatorId '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}' -Protocol TCP -LocalPorts 18000
|
|
105
|
+
New-NetFirewallRule -DisplayName yonder -Direction Inbound -Protocol TCP -LocalPort 18000 -Action Allow -Profile Any
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Remove them later with `Remove-NetFirewallHyperVRule -Name yonder` and `Remove-NetFirewallRule -DisplayName yonder`.
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
MIT
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
yonder_cli-0.4.1.data/scripts/yonder.exe,sha256=rTTCNomNhcbOHDf8gVseiCJV6lYE-qExXNEnVEHEXm8,10412544
|
|
2
|
+
yonder_cli-0.4.1.dist-info/METADATA,sha256=4gqF-xqS074LhnUqz_OHXkkE_6QdFoqC2dsYBOJUNLw,5462
|
|
3
|
+
yonder_cli-0.4.1.dist-info/WHEEL,sha256=Y0LMerfeWG_Erbu9GhGhy282GWRDGhiS5G9Ax9JtW3g,100
|
|
4
|
+
yonder_cli-0.4.1.dist-info/RECORD,,
|