mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-28 02:18:50 +00:00
(After GA) This adds a unit test for the Unix domain sockets that I intend to use for process splitting on Linux. The length-prefixed encoding and decoding are copied from `subzone`, but most of that code will not be re-used since it's Windows-specific and also specific to a Chromium-like process model, which won't work for Firezone.
16 lines
501 B
Bash
Executable File
16 lines
501 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
function install_iptables_drop_rules() {
|
|
sudo iptables -I FORWARD 1 -s 172.28.0.100 -d 172.28.0.105 -j DROP
|
|
sudo iptables -I FORWARD 1 -s 172.28.0.105 -d 172.28.0.100 -j DROP
|
|
}
|
|
|
|
function remove_iptables_drop_rules() {
|
|
sudo iptables -D FORWARD -s 172.28.0.100 -d 172.28.0.105 -j DROP
|
|
sudo iptables -D FORWARD -s 172.28.0.105 -d 172.28.0.100 -j DROP
|
|
}
|
|
|
|
function client_curl_resource() {
|
|
docker compose exec -it client curl --max-time 30 --fail -i 172.20.0.100
|
|
}
|