mirror of
https://github.com/xtr-dev/rondevu-server.git
synced 2025-12-10 02:43:24 +00:00
Update README with secret field documentation
- Document secret parameter in POST /offers endpoint - Document secret parameter in POST /offers/:offerId/answer endpoint - Document hasSecret flag in GET /offers/by-topic response - Add Protected Offers feature to features list 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
19
README.md
19
README.md
@@ -14,6 +14,7 @@ Scalable peer-to-peer connection establishment with topic-based discovery, state
|
|||||||
|
|
||||||
- **Topic-Based Discovery**: Tag offers with topics (e.g., torrent infohashes) for efficient peer finding
|
- **Topic-Based Discovery**: Tag offers with topics (e.g., torrent infohashes) for efficient peer finding
|
||||||
- **Stateless Authentication**: AES-256-GCM encrypted credentials, no server-side sessions
|
- **Stateless Authentication**: AES-256-GCM encrypted credentials, no server-side sessions
|
||||||
|
- **Protected Offers**: Optional secret field for access-controlled peer connections
|
||||||
- **Bloom Filters**: Client-side peer exclusion for efficient discovery
|
- **Bloom Filters**: Client-side peer exclusion for efficient discovery
|
||||||
- **Multi-Offer Support**: Create multiple offers per peer simultaneously
|
- **Multi-Offer Support**: Create multiple offers per peer simultaneously
|
||||||
- **Complete WebRTC Signaling**: Offer/answer exchange and ICE candidate relay
|
- **Complete WebRTC Signaling**: Offer/answer exchange and ICE candidate relay
|
||||||
@@ -95,7 +96,8 @@ Find offers by topic with optional bloom filter exclusion
|
|||||||
"sdp": "v=0...",
|
"sdp": "v=0...",
|
||||||
"topics": ["movie-xyz", "hd-content"],
|
"topics": ["movie-xyz", "hd-content"],
|
||||||
"expiresAt": 1234567890,
|
"expiresAt": 1234567890,
|
||||||
"lastSeen": 1234567890
|
"lastSeen": 1234567890,
|
||||||
|
"hasSecret": true // Indicates if secret is required to answer
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"total": 42,
|
"total": 42,
|
||||||
@@ -103,6 +105,9 @@ Find offers by topic with optional bloom filter exclusion
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Notes:**
|
||||||
|
- `hasSecret`: Boolean flag indicating whether a secret is required to answer this offer. The actual secret is never exposed in public endpoints.
|
||||||
|
|
||||||
#### `GET /peers/:peerId/offers`
|
#### `GET /peers/:peerId/offers`
|
||||||
View all offers from a specific peer
|
View all offers from a specific peer
|
||||||
|
|
||||||
@@ -120,12 +125,16 @@ Create one or more offers
|
|||||||
{
|
{
|
||||||
"sdp": "v=0...",
|
"sdp": "v=0...",
|
||||||
"topics": ["movie-xyz", "hd-content"],
|
"topics": ["movie-xyz", "hd-content"],
|
||||||
"ttl": 300000
|
"ttl": 300000,
|
||||||
|
"secret": "my-secret-password" // Optional: protect offer (max 128 chars)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Notes:**
|
||||||
|
- `secret` (optional): Protect the offer with a secret. Answerers must provide the correct secret to connect.
|
||||||
|
|
||||||
#### `GET /offers/mine`
|
#### `GET /offers/mine`
|
||||||
List all offers owned by authenticated peer
|
List all offers owned by authenticated peer
|
||||||
|
|
||||||
@@ -141,10 +150,14 @@ Answer an offer (locks it to answerer)
|
|||||||
**Request:**
|
**Request:**
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"sdp": "v=0..."
|
"sdp": "v=0...",
|
||||||
|
"secret": "my-secret-password" // Required if offer is protected
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Notes:**
|
||||||
|
- `secret` (optional): Required if the offer was created with a secret. Must match the offer's secret.
|
||||||
|
|
||||||
#### `GET /offers/answers`
|
#### `GET /offers/answers`
|
||||||
Poll for answers to your offers
|
Poll for answers to your offers
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user