From 146071161f9a1ccd26f53ee10398671620bb45b6 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Thu, 17 Jun 2010 17:50:15 -0500 Subject: [PATCH] Update usage and README.md. --- README.md | 4 ++-- utils/wsproxy.c | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d8b4912b..beb7c5b8 100644 --- a/README.md +++ b/README.md @@ -60,9 +60,9 @@ Usage * run the python proxy: - `./utils/wsproxy.py source_port target_addr:target_port + `./utils/wsproxy.py -f source_port target_addr:target_port - `./utils/wsproxy.py 8787 localhost:5901` + `./utils/wsproxy.py -f 8787 localhost:5901` * run the mini python web server to serve the directory: diff --git a/utils/wsproxy.c b/utils/wsproxy.c index 4f9a9f4a..57e95010 100644 --- a/utils/wsproxy.c +++ b/utils/wsproxy.c @@ -29,8 +29,12 @@ Traffic Legend:\n\ <. - Client send partial\n\ "; -char USAGE[] = "Usage: [--record FILE] [--ssl-only] " \ - "[source_addr:]source_port target_addr:target_port"; +char USAGE[] = "Usage: [options] " \ + "[source_addr:]source_port target_addr:target_port\n\n" \ + " --record REC record traffic to REC\n" \ + " --cert CERT load CERT as SSL certificate\n" \ + " --foreground|-f run in the foreground\n" \ + " --ssl-only disallow non-SSL connections"; #define usage(fmt, args...) \ fprintf(stderr, "%s\n\n", USAGE); \ @@ -284,7 +288,7 @@ int main(int argc, char *argv[]) } break; default: - usage("Invalid option %c\n", c); + usage(""); } } settings.ssl_only = ssl_only;