Fix test output for speed limit and streamline traffic marking in iptables

This commit is contained in:
ImBenji
2025-08-05 13:48:59 +01:00
parent 2d692e0bc0
commit 0346d60a8a
2 changed files with 5 additions and 5 deletions

View File

@@ -29,16 +29,16 @@ class TrafficControlService {
}
}
// Create separate classes for upload and download
final uploadMark = mark;
final downloadMark = mark + 1000; // Offset to avoid conflicts
print('Running iptables MARK commands for $peerIP...');
// Mark upload traffic (FROM peer) with uploadMark
await _runIptablesCommand(['-I', 'FORWARD', '-s', peerIP, '-j', 'MARK', '--set-mark', uploadMark.toString()]);
// Mark download traffic (TO peer) with downloadMark
await _runIptablesCommand(['-I', 'FORWARD', '-d', peerIP, '-j', 'MARK', '--set-mark', downloadMark.toString()]);
// Create separate classes for upload and download
final uploadMark = mark;
final downloadMark = mark + 1000; // Offset to avoid conflicts
print('Running tc class add/change commands for upload and download...');
// Upload class (traffic FROM peer)