From 9a2eb4e4b6259af1bb2a9535e3b03e5cd9258156 Mon Sep 17 00:00:00 2001 From: chris west Date: Sat, 11 Jan 2020 14:06:34 -0800 Subject: [PATCH] tls is -s, tor is -o, remove --emoji --- README.md | 5 ++--- doc/phetch.1 | 12 ++++-------- doc/phetch.1.md | 10 ++++------ src/main.rs | 9 ++++----- 4 files changed, 14 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 7909a63..2a0e7d9 100644 --- a/README.md +++ b/README.md @@ -31,15 +31,14 @@ the gophersphere. Options: - -t, --tls Try to open all pages w/ TLS - -T, --tor Try to open all pages w/ Tor + -s, --tls Try to open Gopher URLs securely w/ TLS + -o, --tor Use local Tor proxy to open all pages Set the TOR_PROXY env variable to use an address other than the default :9050 -r, --raw Print raw Gopher response only -p, --print Print rendered Gopher response only -l, --local Connect to 127.0.0.1:7070 - --emoji Show TLS/Tor status as emoji. -h, --help Show this screen -v, --version Show phetch version diff --git a/doc/phetch.1 b/doc/phetch.1 index 6ad7177..b3f7f50 100644 --- a/doc/phetch.1 +++ b/doc/phetch.1 @@ -47,23 +47,19 @@ Print a rendered Gopher server response of \fIURL\fR and exit. Print the raw Gopher server response of \fIURL\fR and exit. .P .RE -\fB-t\fR, \fB--tls\fR +\fB-s\fR, \fB--tls\fR .RS 4 -Attempt to fetch all pages over TLS. +Attempt to fetch all pages securely over TLS. .P .RE -\fB-T\fR, \fB--tor\fR +\fB-o\fR, \fB--tor\fR .RS 4 Make all connections using a local Tor proxy. +Tor is the Onion Router. Set the TOR_PROXY env variable to use an address other than the Tor default of 127.0.0.1:9050. .P .RE -\fB--emoji\fR -.RS 4 -Show TLS/Tor status as emoji. -.P -.RE \fB-h\fR, \fB--help\fR .RS 4 Print a help summary and exit. diff --git a/doc/phetch.1.md b/doc/phetch.1.md index 5457f1a..8b0664e 100644 --- a/doc/phetch.1.md +++ b/doc/phetch.1.md @@ -33,17 +33,15 @@ If no URL is given, however, *phetch* will launch and open its default *-r* _URL_, *--raw* _URL_ Print the raw Gopher server response of _URL_ and exit. -*-t*, *--tls* - Attempt to fetch all pages over TLS. +*-s*, *--tls* + Attempt to fetch all pages securely over TLS. -*-T*, *--tor* +*-o*, *--tor* Make all connections using a local Tor proxy. + Tor is the Onion Router. Set the TOR_PROXY env variable to use an address other than the Tor default of 127.0.0.1:9050. -*--emoji* - Show TLS/Tor status as emoji. - *-h*, *--help* Print a help summary and exit. diff --git a/src/main.rs b/src/main.rs index c558162..96aad1e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,15 +51,14 @@ fn run() -> i32 { mode = Mode::Print; } "-l" | "--local" | "-local" => cfg.start = "gopher://127.0.0.1:7070".into(), - "--emoji" | "-emoji" => cfg.emoji = true, - "-t" | "--tls" | "-tls" => { + "-s" | "--tls" | "-tls" => { cfg.tls = true; if cfg!(feature = "disable-tls") { eprintln!("phetch was compiled without TLS support"); return 1; } } - "-T" | "--tor" | "-tor" => cfg.tor = true, + "-o" | "--tor" | "-tor" => cfg.tor = true, arg => { if arg.starts_with('-') { print_version(); @@ -134,8 +133,8 @@ Usage: Options: - -t, --tls Try to open all pages w/ TLS - -T, --tor Try to open all pages w/ Tor + -s, --tls Try to open Gopher URLs securely w/ TLS + -o, --tor Use local Tor proxy to open all pages Set the TOR_PROXY env variable to use an address other than the default :9050 -r, --raw Print raw Gopher response only