Skip to content

Commit

Permalink
🔧 Adding minimum and maximum port as environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoapaes committed Oct 15, 2024
1 parent a1e1f55 commit c31bf05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ Runs the remote proxy server
Usage: bore server [OPTIONS]
Options:
--min-port <MIN_PORT> Minimum accepted TCP port number [default: 1024]
--max-port <MAX_PORT> Maximum accepted TCP port number [default: 65535]
--min-port <MIN_PORT> Minimum accepted TCP port number [default: 1024, env: BORE_MIN_PORT]
--max-port <MAX_PORT> Maximum accepted TCP port number [default: 65535, env: BORE_MAX_PORT]
-s, --secret <SECRET> Optional secret for authentication [env: BORE_SECRET]
-h, --help Print help information
```
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ enum Command {
/// Runs the remote proxy server.
Server {
/// Minimum accepted TCP port number.
#[clap(long, default_value_t = 1024)]
#[clap(long, default_value_t = 1024, env = "BORE_MIN_PORT")]
min_port: u16,

/// Maximum accepted TCP port number.
#[clap(long, default_value_t = 65535)]
#[clap(long, default_value_t = 65535, env = "BORE_MAX_PORT")]
max_port: u16,

/// Optional secret for authentication.
Expand Down

0 comments on commit c31bf05

Please sign in to comment.