aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/cli.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2025-07-23 10:56:10 +0200
committerGitHub <noreply@github.com>2025-07-23 10:56:10 +0200
commit25a684e0949a948db0b353626bdec98ea1229f9b (patch)
treeb46d82e466ed5ea1f950a5f85d88d0f40a9c1c6c /zellij-utils/src/cli.rs
parentfix(status-bar): proper truncation of secondary info (#4313) (diff)
downloadsl0ppij-25a684e0949a948db0b353626bdec98ea1229f9b.tar.gz
sl0ppij-25a684e0949a948db0b353626bdec98ea1229f9b.tar.xz
sl0ppij-25a684e0949a948db0b353626bdec98ea1229f9b.zip
feat(web): allow specifying ip/port/cert/key through the cli (#4314)
* feat(web): allow specifying ip/port/cert/key through the cli * fix no-web
Diffstat (limited to 'zellij-utils/src/cli.rs')
-rw-r--r--zellij-utils/src/cli.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs
index b85d975f..bca031bc 100644
--- a/zellij-utils/src/cli.rs
+++ b/zellij-utils/src/cli.rs
@@ -6,6 +6,7 @@ use crate::{
};
use clap::{Args, Parser, Subcommand};
use serde::{Deserialize, Serialize};
+use std::net::IpAddr;
use std::path::PathBuf;
use url::Url;
@@ -144,6 +145,38 @@ pub struct WebCli {
/// List token names and their creation dates (cannot show actual tokens)
#[clap(long, value_parser, exclusive(true), display_order = 8)]
pub list_tokens: bool,
+ /// The ip address to listen on locally for connections (defaults to 127.0.0.1)
+ #[clap(
+ long,
+ value_parser,
+ conflicts_with_all(&["stop", "status", "create-token", "revoke-token", "revoke-all-tokens"]),
+ display_order = 9
+ )]
+ pub ip: Option<IpAddr>,
+ /// The port to listen on locally for connections (defaults to 8082)
+ #[clap(
+ long,
+ value_parser,
+ conflicts_with_all(&["stop", "status", "create-token", "revoke-token", "revoke-all-tokens"]),
+ display_order = 10
+ )]
+ pub port: Option<u16>,
+ /// The path to the SSL certificate (required if not listening on 127.0.0.1)
+ #[clap(
+ long,
+ value_parser,
+ conflicts_with_all(&["stop", "status", "create-token", "revoke-token", "revoke-all-tokens"]),
+ display_order = 11
+ )]
+ pub cert: Option<PathBuf>,
+ /// The path to the SSL key (required if not listening on 127.0.0.1)
+ #[clap(
+ long,
+ value_parser,
+ conflicts_with_all(&["stop", "status", "create-token", "revoke-token", "revoke-all-tokens"]),
+ display_order = 12
+ )]
+ pub key: Option<PathBuf>,
}
impl WebCli {