|
30 | 30 |
|
31 | 31 | ### `ii web` |
32 | 32 |
|
33 | | -- Run a temporary LAN file site from the current directory for browsing, downloads, and uploads. |
34 | | -- Import a phone photo library by starting `ii web` on a computer and uploading photos or videos after scanning its QR code. |
| 33 | +- Run a temporary LAN file site from the current directory for browsing and downloads; add `--upload` to accept uploads. |
| 34 | +- Import a phone photo library by starting `ii web --upload` on a computer and uploading photos or videos after scanning its QR code. |
35 | 35 | - Distribute meeting materials through a QR code for direct download. |
36 | 36 | - Serve local static assets such as installers, videos, or web files to TVs, tablets, and development devices. |
37 | | -- Collect files from several people into a chosen directory. |
| 37 | +- Use `ii drop` as the upload-only, no-browsing, no-download subset of `ii web` to collect files from several people. |
| 38 | +- Use `ii http` as the read-only subset entry point for default `ii web`; it adds no transfer capability. |
38 | 39 | - Provide a file portal on an offline LAN without cloud storage, accounts, or Internet access. |
39 | 40 |
|
| 41 | +### `ii paste` |
| 42 | + |
| 43 | +- Share Wi-Fi passwords, meeting codes, log excerpts, configuration, or short commands on the LAN; phones can scan and copy them. |
| 44 | +- Let scripts read temporary text through the `raw` URL without running another text service. |
| 45 | + |
40 | 46 | ### `ii dav` |
41 | 47 |
|
42 | 48 | - Mount any directory as a network drive in Windows Explorer, macOS Finder, or a Linux file manager. |
|
55 | 61 | - Provide a configurable proxy address to games, media players, or IoT devices that support one. |
56 | 62 | - Compare DNS and connection paths across enterprise, VPN, and home networks. |
57 | 63 |
|
| 64 | +### `ii proxy` |
| 65 | + |
| 66 | +- Provide an ordinary HTTP forward proxy for browsers, downloaders, and other tools that support HTTP proxies. |
| 67 | +- Let LAN devices use a computer with a VPN, special routes, or access to the target network as their proxy exit. |
| 68 | + |
| 69 | +### `ii pac` |
| 70 | + |
| 71 | +- Host a PAC URL so browsers connect directly to LAN addresses and use a chosen HTTP or SOCKS5 proxy for other destinations. |
| 72 | +- Distribute proxy rules across a temporary office network, VPN, or test network without configuring each machine manually. |
| 73 | + |
58 | 74 | ### `ii relay` |
59 | 75 |
|
60 | 76 | - Self-host an Iroh relay as the explicit cross-network forwarding path for `ii send --relay`. |
|
67 | 83 | - Make a machine without a public IP reachable remotely. |
68 | 84 | - Provide temporary remote assistance without configuring router port forwarding. |
69 | 85 |
|
| 86 | +### `ii tcp` |
| 87 | + |
| 88 | +- Forward a local listening port to a fixed TCP target such as SSH, a database, a development site, or an internal service. |
| 89 | +- Forward a known TCP service for tests, short integration work, or temporary port mapping. |
| 90 | + |
| 91 | +### `ii udp` |
| 92 | + |
| 93 | +- Forward UDP traffic to a fixed target for games, device discovery, or custom UDP protocol debugging. |
| 94 | +- Let LAN devices reach a UDP service through the current machine when they cannot reach it directly. |
| 95 | + |
70 | 96 | ### `ii discover` |
71 | 97 |
|
72 | 98 | - Scan for running `ii` services on the LAN. |
73 | 99 | - Find same-subnet send jobs, directory sites, and WebDAV services without typing IP addresses. |
74 | 100 | - Discover shared endpoints quickly in meeting rooms, labs, and server rooms. |
75 | 101 |
|
| 102 | +### `ii ping` |
| 103 | + |
| 104 | +- Measure TCP connection latency to quickly determine whether a service is reachable or the network is unstable. |
| 105 | +- Compare connection quality across enterprise, VPN, home, or different egress networks. |
| 106 | + |
| 107 | +### `ii speed` |
| 108 | + |
| 109 | +- Run `ii speed serve` on one device and `ii speed` on another to measure actual LAN download and upload throughput. |
| 110 | +- Diagnose links whose advertised Wi-Fi bandwidth is high but whose file transfer speed is poor, without an Internet speed test. |
| 111 | + |
| 112 | +### `ii wake` |
| 113 | + |
| 114 | +- Send a Wake-on-LAN magic packet to a sleeping computer or NAS on the same subnet. |
| 115 | +- Wake a target device before remote file transfer, backup, or access. |
| 116 | + |
| 117 | +### `ii port` |
| 118 | + |
| 119 | +- Check whether multiple TCP ports on one host are open, refused, or timed out in one command. |
| 120 | +- Diagnose firewalls, service listeners, port mappings, and network policy issues. |
| 121 | + |
| 122 | +### `ii health` |
| 123 | + |
| 124 | +- Check an HTTP(S) health endpoint or a bare TCP service. |
| 125 | +- Monitor a service continuously and print only state changes for lightweight supervision or scripts. |
| 126 | + |
76 | 127 | ## Install |
77 | 128 |
|
78 | 129 | Linux x86_64 and Apple Silicon macOS: |
@@ -238,10 +289,33 @@ ii dav .\shared --port 8443 --username alice --password secret --tls --domain da |
238 | 289 |
|
239 | 290 | `ii web --once` exits only after the first complete ordinary-file `GET 200`. HEAD, Range, directory pages, 404 responses, and uploads do not consume the one-shot lifetime, and `--once` conflicts with `--upload`. |
240 | 291 |
|
| 292 | +### Lightweight LAN Services |
| 293 | + |
| 294 | +```powershell |
| 295 | +# Read-only directory site with browsing, Range, media playback, and downloads |
| 296 | +ii http .\public |
| 297 | +
|
| 298 | +# Text clipboard; without text, reads stdin; raw returns plain text |
| 299 | +ii paste "meeting code: 123456" --ttl 30m |
| 300 | +Get-Content .\note.txt -Raw | ii paste --token |
| 301 | +
|
| 302 | +# Upload-only drop box; defaults to .\ii\ under the startup directory |
| 303 | +ii drop .\incoming |
| 304 | +
|
| 305 | +# Host a PAC file for an existing HTTP or SOCKS5 proxy |
| 306 | +ii pac --proxy socks5://192.168.1.10:1080 |
| 307 | +
|
| 308 | +# LAN throughput server and client |
| 309 | +ii speed serve --port 9000 |
| 310 | +ii speed http://192.168.1.10:9000/ --duration 15s |
| 311 | +``` |
| 312 | + |
| 313 | +`ii http` has no upload or write endpoint. `ii drop` provides resumable multi-file uploads only: it does not list or download files, and an explicit directory is the upload destination. `ii paste` provides a copyable root page and a `text/plain` `raw` endpoint; `--ttl` stops it at expiry. `ii pac` returns a PAC file at its root URL: private, loopback, `.local`, and plain host names use `DIRECT`; other destinations use the selected proxy. All five commands accept `--port`, `--bind`, and `--token [value]`, print a QR code, LAN URL, and `other:`, and advertise through `ii discover`. |
| 314 | + |
241 | 315 | ### LAN Discovery |
242 | 316 |
|
243 | 317 | ```powershell |
244 | | -# List ii send -t, ii web, and ii dav services on the same LAN |
| 318 | +# List ii send -t, web/dav, and lightweight HTTP services on the same LAN |
245 | 319 | ii discover |
246 | 320 |
|
247 | 321 | # JSON Lines output |
@@ -317,6 +391,28 @@ ii version |
317 | 391 |
|
318 | 392 | `ii doctor --nat` runs a short-lived UDP/NAT/relay probe and reports bound UDP sockets, IPv4/IPv6, NAT mapping behavior, the preferred relay, and relay reachability. Hairpin is explicitly unavailable because Iroh does not expose that probe. |
319 | 393 |
|
| 394 | +## Proxy, Forwarding, and Network Tools |
| 395 | + |
| 396 | +```powershell |
| 397 | +# HTTP forward proxy, with optional Basic authentication |
| 398 | +ii proxy --port 8080 |
| 399 | +ii proxy --username alice --password secret |
| 400 | +
|
| 401 | +# Forward a local TCP or UDP port to one fixed target |
| 402 | +ii tcp db.internal:5432 --port 15432 |
| 403 | +ii udp game.internal:27015 --port 27015 |
| 404 | +
|
| 405 | +# TCP connect latency, port checks, and a continuous health check |
| 406 | +ii ping api.example.com:443 --count 4 |
| 407 | +ii port api.example.com 80 443 8443 |
| 408 | +ii health https://api.example.com/health --interval 10s |
| 409 | +
|
| 410 | +# Send a Wake-on-LAN magic packet |
| 411 | +ii wake aa:bb:cc:dd:ee:ff --broadcast 192.168.1.255 |
| 412 | +``` |
| 413 | + |
| 414 | +`ii proxy` supports HTTP/1.0 and HTTP/1.1 absolute-form requests plus `CONNECT`. Ordinary HTTP requests use one connection per request; it does not decrypt TLS, cache, or proxy WebSockets. `ii tcp` and `ii udp` forward to one fixed target; UDP keeps one upstream session per client address and removes idle sessions after five minutes. `ii ping` measures TCP connect latency rather than sending ICMP. `ii port` checks TCP ports concurrently. `ii health` considers only HTTP(S) `2xx/3xx` healthy, or checks TCP connectivity for a bare `host:port`. |
| 415 | + |
320 | 416 | ## Full Manual |
321 | 417 |
|
322 | 418 | Full command, configuration, and troubleshooting reference: [ii.md](ii.md). |
|
0 commit comments