|
2 | 2 |
|
3 | 3 | An ephemeral I2P proxy daemon written in Rust, designed to run on Android via **Termux**. |
4 | 4 |
|
5 | | -Each request to an `.i2p` site generates a **fresh EdDSA (Sig=7) identity and keypair** via the I2P SAM bridge. On completion, the session is destroyed and keys are wiped — leaving no persistent identity linkable across requests. |
| 5 | +Each unique `.i2p` destination you visit receives a **fresh EdDSA (Sig=7) identity and keypair** via the I2P SAM bridge. The identity is cached and reused for all subsequent requests to that same site during your browsing session. After **300 seconds** of inactivity, the session is destroyed and keys are wiped—ensuring no persistent identity is linkable across different sites. |
| 6 | + |
| 7 | +## Why per‑destination instead of per‑request? |
| 8 | + |
| 9 | +Earlier versions created a new tunnel for every single HTTP request (images, CSS, scripts), which risked flooding the I2P network with excessive tunnel builds. The current **per‑destination caching** approach: |
| 10 | + |
| 11 | +- Builds **one tunnel per website** (e.g., `forum.i2p`), reused for all assets on that page. |
| 12 | +- Maintains strong cross‑site unlinkability (different sites see different identities). |
| 13 | +- Dramatically reduces network overhead and respects I2P's shared infrastructure. |
6 | 14 |
|
7 | 15 | ## How it works |
8 | 16 |
|
9 | 17 | ``` |
| 18 | +
|
10 | 19 | Browser -> 127.0.0.1:8080 -> i2p-ephemeral -> SAM bridge -> .i2p destination |
| 20 | +
|
11 | 21 | ``` |
12 | 22 |
|
13 | | -- Opens a SAM session (via yosemite crate) with a newly generated transient identity per request |
14 | | -- Resolves the .i2p destination, connects, and proxies the response |
15 | | -- Destroys the session and wipes keys immediately on completion |
16 | | -- Max 2 concurrent sessions with a 2s throttle between accepts |
| 23 | +- **First request** to a `.i2p` domain: generates a new transient EdDSA identity via SAM. |
| 24 | +- **Subsequent requests** to the same domain reuse the cached session (no new tunnel build). |
| 25 | +- **Idle sessions** are automatically destroyed after **300 seconds** (configurable) and keys are wiped. |
| 26 | +- Up to **20 concurrent cached sessions** (LRU eviction) and **10 simultaneous connections**. |
| 27 | +- Throttles requests (500ms delay) to prevent accidental bursts. |
17 | 28 |
|
18 | 29 | ## Requirements |
19 | 30 |
|
20 | 31 | - Termux on Android |
21 | | -- I2P router running with SAM bridge enabled (default 127.0.0.1:7656) |
22 | | -- Rust toolchain: pkg install rust |
| 32 | +- I2P router running with SAM bridge enabled (default `127.0.0.1:7656`) |
| 33 | +- Rust toolchain: `pkg install rust` |
23 | 34 |
|
24 | 35 | ## Build |
25 | 36 |
|
26 | 37 | ```bash |
27 | 38 | cargo build --release |
28 | 39 | ``` |
29 | 40 |
|
30 | | -## Run |
| 41 | +Run |
31 | 42 |
|
32 | 43 | ```bash |
33 | 44 | ./target/release/i2p-ephemeral |
34 | 45 | ``` |
35 | 46 |
|
36 | | -Set your browser proxy to **127.0.0.1:8080** and browse .i2p sites normally. |
| 47 | +Set your browser's HTTP proxy to 127.0.0.1:8080 and browse .i2p sites normally. |
| 48 | + |
| 49 | +Privacy & Network Impact |
37 | 50 |
|
38 | | -## Privacy model |
| 51 | +Property Status |
| 52 | +Fresh identity per destination Yes |
| 53 | +No persistent keypair on disk Yes |
| 54 | +Keys wiped after idle timeout Yes (300s) |
| 55 | +No cross‑site linkability Yes |
| 56 | +EdDSA Sig=7 (I2P standard) Yes |
| 57 | +Network‑friendly (per‑site tunnels) Yes |
39 | 58 |
|
40 | | -| Property | Status | |
41 | | -|---|---| |
42 | | -| Fresh identity per request | Yes | |
43 | | -| No persistent keypair on disk | Yes | |
44 | | -| Keys wiped after session | Yes | |
45 | | -| No cross-request linkability | Yes | |
46 | | -| EdDSA Sig=7 (I2P standard) | Yes | |
| 59 | +Configuration |
47 | 60 |
|
48 | | -## Dependencies |
| 61 | +Adjust the following constants in src/main.rs to suit your needs: |
49 | 62 |
|
50 | | -| Crate | Purpose | |
51 | | -|---|---| |
52 | | -| yosemite | I2P SAM bridge client | |
53 | | -| tokio | Async runtime | |
54 | | -| anyhow | Error handling | |
55 | | -| rand | Identity name generation | |
| 63 | +Constant Default Description |
| 64 | +SESSION_IDLE_TIMEOUT_SECS 300 Seconds before an unused session is evicted |
| 65 | +MAX_CACHED_SESSIONS 20 Maximum number of distinct sites cached |
| 66 | +MAX_CONCURRENT 10 Maximum simultaneous client connections |
| 67 | +REQUEST_THROTTLE_MS 500 Delay between accepting connections |
| 68 | + |
| 69 | +Rebuild after changes: |
| 70 | + |
| 71 | +```bash |
| 72 | +cargo build --release |
| 73 | +``` |
56 | 74 |
|
57 | | -## License |
| 75 | +Dependencies |
58 | 76 |
|
59 | | -MIT |
| 77 | +Crate Purpose |
| 78 | +yosemite I2P SAM bridge client |
| 79 | +tokio Async runtime |
| 80 | +anyhow Error handling |
| 81 | +rand Identity name generation |
| 82 | +dashmap Concurrent session cache |
| 83 | +tracing Structured logging |
60 | 84 |
|
61 | | ---- |
| 85 | +License |
62 | 86 |
|
63 | | -> Part of a broader personal privacy toolchain. See also: [OTRv4Plus](https://github.com/muc111/OTRv4Plus) |
| 87 | +MIT |
0 commit comments