diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-24 14:48:12 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-24 14:48:12 +0200 |
| commit | 5d6b5049c2a34a3f8abe725d4a871ba84a0dd714 (patch) | |
| tree | 57cb03bf59b3358a96742f455d38c21f4f645396 /src/bin/client/main.rs | |
| parent | stable and working, both platforms (diff) | |
| download | zagan-bet-5d6b5049c2a34a3f8abe725d4a871ba84a0dd714.tar.gz zagan-bet-5d6b5049c2a34a3f8abe725d4a871ba84a0dd714.zip | |
TLS transport and games framework on client and server
Diffstat (limited to 'src/bin/client/main.rs')
| -rw-r--r-- | src/bin/client/main.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/bin/client/main.rs b/src/bin/client/main.rs index 2ff6f55..c95880d 100644 --- a/src/bin/client/main.rs +++ b/src/bin/client/main.rs | |||
| @@ -1,12 +1,22 @@ | |||
| 1 | #[macro_use] | 1 | #[macro_use] |
| 2 | mod macros; | 2 | mod macros; |
| 3 | mod repl; | ||
| 4 | mod database; | ||
| 5 | mod connection; | 3 | mod connection; |
| 4 | mod database; | ||
| 5 | mod games; | ||
| 6 | mod repl; | ||
| 6 | 7 | ||
| 7 | use repl::ClientState; | 8 | use repl::ClientState; |
| 8 | 9 | ||
| 9 | fn main() { | 10 | fn main() { |
| 11 | let args: Vec<String> = std::env::args().collect(); | ||
| 12 | let unsafe_mode = args.iter().any(|arg| arg == "--unsafe"); | ||
| 13 | |||
| 14 | if unsafe_mode { | ||
| 15 | println!("WARNING: Running in UNSAFE mode - certificate verification disabled!"); | ||
| 16 | } | ||
| 17 | |||
| 18 | connection::set_unsafe_mode(unsafe_mode); | ||
| 19 | |||
| 10 | let mut state = ClientState::new(); | 20 | let mut state = ClientState::new(); |
| 11 | if let Some(host) = state.addr.clone() { | 21 | if let Some(host) = state.addr.clone() { |
| 12 | state.connect_to(&host); | 22 | state.connect_to(&host); |
