We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57dc47f commit 80bb5a6Copy full SHA for 80bb5a6
UnityProject/lag.sh
@@ -1,6 +1,6 @@
1
#!/bin/bash
2
3
-PING=${1:300}
+PING=${1:-300}
4
PORT=7777
5
6
sudo pfctl -E
@@ -12,9 +12,9 @@ echo "Setting ping to ${PING} on port ${PORT} for tcp and udp traffic..."
12
13
# Define `customRule` to pipe traffic to `pipe 1`.
14
# Note this is the actual port definition, not a textual comment
15
-echo "dummynet in quick proto { tcp udp } from any to any port 7777 pipe 1" | sudo pfctl -a customRule -f -
+echo "dummynet in quick proto { tcp udp } from any to any port ${PORT} pipe 1" | sudo pfctl -a customRule -f -
16
17
# Define what `pipe 1` should do to traffic
18
-sudo dnctl pipe 1 config delay 300
+sudo dnctl pipe 1 config delay ${PING}
19
20
echo "Done. Call stoplag.sh to undo these changes."
0 commit comments