55
README.md
55
README.md
@@ -74,10 +74,57 @@ npm run start:node -- --port 8083 --bootstrap localhost:8080
|
||||
### Command Line Options
|
||||
|
||||
```bash
|
||||
--port <port> # Port to listen on (default: random)
|
||||
--id <id> # Node ID (default: auto-generated UUID)
|
||||
--bootstrap <addr> # Bootstrap node address (host:port)
|
||||
--position <pos> # Initial ring position (default: 0)
|
||||
--port <port> # Port to listen on (default: random)
|
||||
--id <id> # Node ID (default: auto-generated UUID)
|
||||
--bootstrap <addr> # Bootstrap node address (host:port)
|
||||
--position <pos> # Initial ring position (default: 0)
|
||||
--ice-servers <json> # ICE servers configuration (JSON array)
|
||||
--config <file> # Load configuration from JSON file
|
||||
--help # Show help message
|
||||
```
|
||||
|
||||
### WebRTC ICE Servers Configuration
|
||||
|
||||
The Ring Network uses WebRTC for peer-to-peer connections. You can configure custom ICE servers (STUN/TURN) for better connectivity:
|
||||
|
||||
#### Using Command Line
|
||||
```bash
|
||||
# With custom STUN servers
|
||||
node node.js --ice-servers '[{"urls":"stun:your-stun-server.com:19302"}]'
|
||||
|
||||
# With TURN server for NAT traversal
|
||||
node node.js --ice-servers '[{"urls":"stun:stun.l.google.com:19302"},{"urls":"turn:your-turn-server.com:3478","username":"user","credential":"pass"}]'
|
||||
```
|
||||
|
||||
#### Using Configuration Files
|
||||
```bash
|
||||
# Load from config file
|
||||
node node.js --config config/ice-servers-with-turn.json
|
||||
|
||||
# For Oracle nodes
|
||||
node oracle.js --config config/ice-servers-public-turn.json
|
||||
```
|
||||
|
||||
#### Available Configuration Examples
|
||||
- `config/ice-servers-default.json` - Default Google STUN servers
|
||||
- `config/ice-servers-with-turn.json` - Template with TURN server
|
||||
- `config/ice-servers-public-turn.json` - Public TURN servers for testing
|
||||
|
||||
#### ICE Server Configuration Format
|
||||
```json
|
||||
{
|
||||
"iceServers": [
|
||||
{
|
||||
"urls": "stun:stun.l.google.com:19302"
|
||||
},
|
||||
{
|
||||
"urls": "turn:turnserver.example.com:3478",
|
||||
"username": "your_username",
|
||||
"credential": "your_password"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
--help # Show help message
|
||||
```
|
||||
|
||||
|
||||
Referencia en una nueva incidencia
Block a user