File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ path = "src/main.rs"
17
17
18
18
[dependencies ]
19
19
anyhow = { version = " 1.0.56" , features = [" backtrace" ] }
20
- clap = { version = " 3.1.8" , features = [" derive" ] }
20
+ clap = { version = " 3.1.8" , features = [" derive" , " env " ] }
21
21
dashmap = " 5.2.0"
22
22
hex = " 0.4.3"
23
23
hmac = " 0.12.1"
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ OPTIONS:
65
65
-h, --help Print help information
66
66
-l, --local-host < HOST> The local host to expose [default: localhost]
67
67
-p, --port < PORT> Optional port on the remote server to select [default: 0]
68
- -s, --secret < SECRET> Optional secret for authentication
68
+ -s, --secret < SECRET> Optional secret for authentication [env: BORE_SECRET]
69
69
-t, --to < TO> Address of the remote server to expose local ports to
70
70
-V, --version Print version information
71
71
` ` `
92
92
OPTIONS:
93
93
-h, --help Print help information
94
94
--min-port <MIN_PORT> Minimum TCP port number to accept [default: 1024]
95
- -s, --secret <SECRET> Optional secret for authentication
95
+ -s, --secret <SECRET> Optional secret for authentication [env: BORE_SECRET]
96
96
-V, --version Print version information
97
97
```
98
98
@@ -116,6 +116,8 @@ bore server --secret my_secret_string
116
116
bore local <LOCAL_PORT> --to <TO> --secret my_secret_string
117
117
```
118
118
119
+ `BORE_SECRET` environment variable can also be used for setting the secret for client/server.
120
+
119
121
## Acknowledgements
120
122
121
123
Created by Eric Zhang ([@ekzhang1](https://twitter.com/ekzhang1)). Licensed under the [MIT license](LICENSE).
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ enum Command {
30
30
port : u16 ,
31
31
32
32
/// Optional secret for authentication.
33
- #[ clap( short, long) ]
33
+ #[ clap( short, long, env = "BORE_SECRET" , hide_env_values = true ) ]
34
34
secret : Option < String > ,
35
35
} ,
36
36
@@ -41,7 +41,7 @@ enum Command {
41
41
min_port : u16 ,
42
42
43
43
/// Optional secret for authentication.
44
- #[ clap( short, long) ]
44
+ #[ clap( short, long, env = "BORE_SECRET" , hide_env_values = true ) ]
45
45
secret : Option < String > ,
46
46
} ,
47
47
}
You can’t perform that action at this time.
0 commit comments