
commit 710d2c7b7ea3adee74e315fc0bfcf7bb1dacf210 Author: George Kadianakis <desnacked@gmail.com> Date: Mon Dec 19 13:52:46 2011 +0100 Improve usage() instructions of obfsproxy. --- src/main.c | 6 +++--- src/protocols/obfs2.c | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main.c b/src/main.c index c7515a2..c32d890 100644 --- a/src/main.c +++ b/src/main.c @@ -33,13 +33,13 @@ void ATTR_NORETURN usage(void) { int i; - fputs("Usage: obfsproxy protocol_name [protocol_args] protocol_options " - "protocol_name ...\n" + fputs("Usage: obfsproxy [obfsproxy_args] protocol_name [protocol_args] " + "protocol_options protocol_name ...\n" "* Available protocols:\n", stderr); /* this is awful. */ for (i=0;i<n_supported_protocols;i++) fprintf(stderr,"[%s] ", supported_protocols[i]->name); - fprintf(stderr, "\n* Available arguments:\n" + fprintf(stderr, "\n* obfsproxy_args:\n" "--log-file=<file> ~ set logfile\n" "--log-min-severity=warn|info|debug ~ set minimum logging severity\n" "--no-log ~ disable logging\n"); diff --git a/src/protocols/obfs2.c b/src/protocols/obfs2.c index 6e241c3..9d65067 100644 --- a/src/protocols/obfs2.c +++ b/src/protocols/obfs2.c @@ -85,17 +85,17 @@ obfs2_config_create(int n_options, const char *const *options) obfs2_config_free(&cfg->super); log_warn("You failed at creating a correct obfs2 line.\n" - "obfs2 syntax:\n" - "\tobfs2 [obfs2_args] obfs2_opts\n" - "\t'obfs2_opts':\n" - "\t\tmode ~ server|client|socks\n" - "\t\tlisten address ~ host:port\n" - "\t'obfs2_args':\n" - "\t\tDestination Address ~ --dest=host:port\n" - "\t\tShared Secret ~ --shared-secret=<secret>\n" - "\tExample:\n" - "\tobfsproxy --dest=127.0.0.1:666 --shared-secret=himitsu " - "\tobfs2 server 127.0.0.1:1026"); + "obfs2 syntax:\n" + "\tobfs2 [obfs2_args] obfs2_opts\n" + "\t'obfs2_opts':\n" + "\t\tmode ~ server|client|socks\n" + "\t\tlisten address ~ host:port\n" + "\t'obfs2_args':\n" + "\t\tDestination Address ~ --dest=host:port\n" + "\t\tShared Secret ~ --shared-secret=<secret>\n" + "\tExample:\n" + "\tobfsproxy obfs2 --dest=127.0.0.1:666 --shared-secret=himitsu " + "server 127.0.0.1:1026"); return NULL; } @@ -174,7 +174,7 @@ parse_and_set_options(int n_options, const char *const *options, got_ss=1; } else { - log_warn("obfs2: Unknown argument."); + log_warn("obfs2: Unknown argument '%s'.", *options); return -1; } options++;