Skip to content

Commit

Permalink
print local|remote address when starting up; server should listen on …
Browse files Browse the repository at this point in the history
…SS_REMOTE and connect to SS_LOCAL
  • Loading branch information
zephyrchien committed Apr 10, 2022
1 parent 6dd859a commit f74436c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmd/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ async fn main() -> Result<()> {
let ws = opt::get_ws_conf(&options);
let tls = opt::get_tls_client_conf(&options);

eprintln!("listen: {}", &local);
eprintln!("remote: {}", &remote);
eprintln!("ws: {:?}", &ws);
eprintln!("tls: {:?}", &tls);

Expand Down
10 changes: 9 additions & 1 deletion cmd/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,19 @@ use kaminari_cmd::{Endpoint, parse_cmd, parse_env};

#[tokio::main]
async fn main() -> Result<()> {
let (Endpoint { local, remote }, options) = parse_env().or_else(|_| parse_cmd())?;
let (
Endpoint {
local: remote,
remote: local,
},
options,
) = parse_env().or_else(|_| parse_cmd())?;

let ws = opt::get_ws_conf(&options);
let tls = opt::get_tls_server_conf(&options);

eprintln!("listen: {}", &local);
eprintln!("remote: {}", &remote);
eprintln!("ws: {:?}", &ws);
eprintln!("tls: {:?}", &tls);

Expand Down

0 comments on commit f74436c

Please sign in to comment.