diff --git a/.github/workflows/_build_artifacts.yml b/.github/workflows/_build_artifacts.yml index 3cef7a4a5..7d899f763 100644 --- a/.github/workflows/_build_artifacts.yml +++ b/.github/workflows/_build_artifacts.yml @@ -158,7 +158,7 @@ jobs: platform: linux/arm/v7 shortname: armv7 name: - - package: firezone-linux-client + - package: firezone-headless-client artifact: firezone-client-headless-linux image_name: client - package: firezone-relay diff --git a/rust/Cargo.lock b/rust/Cargo.lock index d313b5233..6184432ed 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1967,14 +1967,6 @@ dependencies = [ "url", ] -[[package]] -name = "firezone-linux-client" -version = "1.0.4" -dependencies = [ - "anyhow", - "firezone-headless-client", -] - [[package]] name = "firezone-relay" version = "1.0.4" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 235d219f3..a09b1b7af 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -9,7 +9,6 @@ members = [ "gateway", "firezone-cli-utils", "headless-client", - "linux-client", "snownet-tests", "phoenix-channel", "relay", diff --git a/rust/headless-client/README.md b/rust/headless-client/README.md index 780ad20f6..1d31f3a5d 100644 --- a/rust/headless-client/README.md +++ b/rust/headless-client/README.md @@ -3,7 +3,7 @@ This crate acts as the CLI / headless Client, and the privileged tunnel service for the GUI Client, for both Linux and Windows. It is built as: -- `linux-client` to act as the Linux headless Client +- `headless-client` to act as the Linux / Windows headless Client - `firezone-headless-client` to act as the Linux tunnel service, Windows headless Client, or Windows tunnel service In general, the brand name should be part of the file name, but the OS name should not be. diff --git a/rust/linux-client/Cargo.toml b/rust/linux-client/Cargo.toml deleted file mode 100644 index 874a52ea1..000000000 --- a/rust/linux-client/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "firezone-linux-client" -# mark:automatic-version -version = "1.0.4" -edition = "2021" -authors = ["Firezone, Inc."] - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -anyhow = { version = "1.0" } -firezone-headless-client = { path = "../headless-client" } - -[lints] -workspace = true diff --git a/rust/linux-client/README.md b/rust/linux-client/README.md deleted file mode 100644 index f8c5066af..000000000 --- a/rust/linux-client/README.md +++ /dev/null @@ -1 +0,0 @@ -This is a stub to fix a build issue in CI. Remove it once PR #4516 is merged into main. diff --git a/rust/linux-client/src/main.rs b/rust/linux-client/src/main.rs deleted file mode 100644 index 53b338c45..000000000 --- a/rust/linux-client/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() -> anyhow::Result<()> { - firezone_headless_client::run() -} diff --git a/scripts/tests/direct-download-roaming-network.sh b/scripts/tests/direct-download-roaming-network.sh index 3a44787b2..823f95a48 100755 --- a/scripts/tests/direct-download-roaming-network.sh +++ b/scripts/tests/direct-download-roaming-network.sh @@ -17,7 +17,12 @@ docker network disconnect firezone_app firezone-client-1 # Disconnect the client sleep 1 docker network connect firezone_app firezone-client-1 --ip 172.28.0.200 # Reconnect client with a different IP -sudo kill -s HUP "$(ps -C firezone-linux-client -o pid=)" # Send SIGHUP, triggering `reconnect` internally + +# Send SIGHUP, triggering `reconnect` internally +# The second command is needed for backwards compatibility with older Docker images +sudo kill -s HUP "$(ps -C firezone-headless-client -o pid=)" || +sudo kill -s HUP "$(ps -C firezone-linux-client -o pid=)" || +exit 1 wait $DOWNLOAD_PID || { echo "Download process failed" diff --git a/scripts/tests/systemd/dns-systemd-resolved.sh b/scripts/tests/systemd/dns-systemd-resolved.sh index 7241d97c7..d0a1cf59d 100755 --- a/scripts/tests/systemd/dns-systemd-resolved.sh +++ b/scripts/tests/systemd/dns-systemd-resolved.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash # Test Linux DNS control using `systemd-resolved` directly inside the CI runner +# This needs Docker Compose so we can run httpbin. source "./scripts/tests/lib.sh" -BINARY_NAME=firezone-linux-client +BINARY_NAME=firezone-headless-client SERVICE_NAME=firezone-client-headless debug_exit() { @@ -15,7 +16,9 @@ debug_exit() { } # Copy the Linux Client out of its container -docker compose exec client cat firezone-linux-client > "$BINARY_NAME" +docker compose exec client cat "$BINARY_NAME" > "$BINARY_NAME" || +docker compose exec client cat "firezone-linux-client" > "$BINARY_NAME" || +exit 1 chmod u+x "$BINARY_NAME" sudo chown root:root "$BINARY_NAME" sudo mv "$BINARY_NAME" "/usr/bin/$BINARY_NAME" @@ -40,7 +43,7 @@ curl --interface "$FZ_IFACE" $HTTPBIN/get && exit 1 echo "# Start Firezone" resolvectl dns tun-firezone && exit 1 -stat /usr/bin/firezone-linux-client +stat "/usr/bin/$BINARY_NAME" sudo systemctl start "$SERVICE_NAME" || debug_exit resolvectl dns tun-firezone resolvectl query "$HTTPBIN" || debug_exit diff --git a/scripts/tests/systemd/firezone-client-headless.service b/scripts/tests/systemd/firezone-client-headless.service index 53d9a6e1c..56abcd71f 100644 --- a/scripts/tests/systemd/firezone-client-headless.service +++ b/scripts/tests/systemd/firezone-client-headless.service @@ -38,7 +38,7 @@ Environment="FIREZONE_API_URL=ws://localhost:8081" Environment="FIREZONE_DNS_CONTROL=systemd-resolved" Environment="RUST_LOG=info" -ExecStart=firezone-linux-client standalone +ExecStart=firezone-headless-client standalone Type=notify # Unfortunately we may need root to control DNS User=root diff --git a/terraform/modules/google-cloud/apps/client-monitor/templates/cloud-init.yaml b/terraform/modules/google-cloud/apps/client-monitor/templates/cloud-init.yaml index 4061f696a..8d83df3b0 100644 --- a/terraform/modules/google-cloud/apps/client-monitor/templates/cloud-init.yaml +++ b/terraform/modules/google-cloud/apps/client-monitor/templates/cloud-init.yaml @@ -47,7 +47,7 @@ write_files: Environment="RUST_LOG=${firezone_client_log_level}" Environment="LOG_DIR=/var/log/firezone" - ExecStart=/usr/local/bin/firezone-linux-client standalone + ExecStart=/usr/local/bin/firezone-headless-client standalone Type=notify User=root @@ -236,6 +236,6 @@ runcmd: - 'sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install google-cloud-ops-agent' - sudo docker pull ${client_container_image} - sudo docker create --name fz-client ${client_container_image} - - 'sudo docker cp fz-client:/bin/firezone-linux-client /usr/local/bin/firezone-linux-client' + - 'sudo docker cp fz-client:/bin/firezone-headless-client /usr/local/bin/firezone-headless-client' - sudo docker rm -v fz-client - sudo systemctl enable --now firezone.service diff --git a/website/src/app/kb/user-guides/linux-client/readme.mdx b/website/src/app/kb/user-guides/linux-client/readme.mdx index c110e4eee..ee35a08a1 100644 --- a/website/src/app/kb/user-guides/linux-client/readme.mdx +++ b/website/src/app/kb/user-guides/linux-client/readme.mdx @@ -35,7 +35,7 @@ Once you have a token, you can start the Linux Client using the following command: ``` -sudo FIREZONE_TOKEN= ./linux-client-x64 +sudo FIREZONE_TOKEN= ./headless-client-x64 ``` Set some environment variables to configure it: @@ -46,7 +46,7 @@ export FIREZONE_ID="some unique identifier" export FIREZONE_TOKEN= export DNS_CONTROL="systemd-resolved" # or "etc-resolv-conf" export LOG_DIR="./" -sudo -E ./linux-client-x64 +sudo -E ./headless-client-x64 ``` See [below](#environment-variable-reference) for a full list of environment @@ -55,9 +55,9 @@ variables. A sample output of the help command is shown below: ``` -> sudo ./linux-client-x64 -h +> sudo ./headless-client-x64 -h -Usage: linux-client-x64 [OPTIONS] [COMMAND] +Usage: headless-client [OPTIONS] [COMMAND] Commands: standalone Act as a CLI-only Client