Fix test output for speed limit and streamline traffic marking in iptables
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user