Enhance traffic control by dynamically detecting outgoing interface and updating iptables rules for upload and download traffic

This commit is contained in:
ImBenji
2025-08-05 14:15:29 +01:00
parent 48e241d99f
commit 171dd1d77e
5 changed files with 110 additions and 1 deletions

View File

@@ -70,11 +70,13 @@ Set bidirectional bandwidth limits for a peer (controls both upload and download
}
```
*Note: 125000 bytes/s = 1000 kbps = 1 Mbps*
*Use -1 for unlimited speed*
**Common Speed Conversions:**
- 125 KB/s = 1 Mbps
- 1,250 KB/s = 10 Mbps
- 12,500 KB/s = 100 Mbps
- -1 = Unlimited
#### `POST /api/peers/data-cap`
Set total data usage limits for a peer using iptables quota rules.
@@ -87,11 +89,13 @@ Set total data usage limits for a peer using iptables quota rules.
}
```
*Note: 1073741824 bytes = 1 GB*
*Use -1 for unlimited data*
**Common Data Conversions:**
- 1 GB = 1,073,741,824 bytes
- 10 GB = 10,737,418,240 bytes
- 100 GB = 107,374,182,400 bytes
- -1 = Unlimited
#### `POST /api/peers/config`
Retrieve peer configuration (currently not implemented - returns 404).