feat: allow setting Internet Resource from headless client (#10553)

Currently, the Internet Resource cannot be toggled on/off in the
headless client. With #10509, the default state of the Internet Resource
is now disabled, meaning users of the headless client are no longer able
to use the Internet Resource.

We fix this by introducing a new CLI argument
`--activate-internet-resource` that can also be set via the env variable
`FIREZONE_ACTIVATE_INTERNET_RESOURCE=true`.

Resolves: #8342
This commit is contained in:
Thomas Eizinger
2025-10-14 10:32:05 +11:00
committed by GitHub
parent cb50800d52
commit 4930aa7956
2 changed files with 15 additions and 1 deletions

View File

@@ -101,6 +101,16 @@ struct Cli {
#[arg(short = 'i', long, env = "FIREZONE_ID")]
firezone_id: Option<String>,
/// Activate the Internet Resource.
///
/// To actually use the Internet Resource, the user must also have a policy granting access to the Internet Resource.
#[arg(
long,
env = "FIREZONE_ACTIVATE_INTERNET_RESOURCE",
default_value_t = false
)]
activate_internet_resource: bool,
/// Disable sentry.io crash-reporting agent.
#[arg(long, env = "FIREZONE_NO_TELEMETRY", default_value_t = false)]
no_telemetry: bool,
@@ -341,7 +351,7 @@ fn try_main() -> Result<()> {
Arc::new(tcp_socket_factory),
Arc::new(UdpSocketFactory::default()),
portal,
false,
cli.activate_internet_resource,
rt.handle().clone(),
);