Skip to content

Commit

Permalink
Check environment variable for transit relay server (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelPanic0x authored Dec 21, 2024
1 parent bee63ed commit 9f5b55b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rand = { workspace = true }

# CLI specific dependencies
magic-wormhole = { path = "..", version = "0.7", features = ["all", "entropy"] }
clap = { workspace = true, features = ["cargo", "derive", "help"] }
clap = { workspace = true, features = ["cargo", "derive", "help", "env"] }
clap_complete = { workspace = true }
env_logger = { workspace = true }
console = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ struct CommonArgs {
action = clap::ArgAction::Append,
value_name = "tcp://HOSTNAME:PORT",
value_hint = clap::ValueHint::Url,
env = "WORMHOLE_RELAY_URL",
)]
relay_server: Vec<url::Url>,
/// Use a custom rendezvous server. Both sides need to use the same value in order to find each other.
#[arg(long, value_name = "ws://example.org", value_hint = clap::ValueHint::Url)]
#[arg(long, value_name = "ws://example.org", value_hint = clap::ValueHint::Url, env = "WORMHOLE_MAILBOX_URL")]
rendezvous_server: Option<url::Url>,
/// Disable the relay server support and force a direct connection.
#[arg(long)]
Expand Down

0 comments on commit 9f5b55b

Please sign in to comment.