diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2017-12-18 01:49:16 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2017-12-18 01:49:16 +0100 |
commit | 8b2d10adc0d155a67f3508d906825df8c8694194 (patch) | |
tree | d48f5fe7ce703ff7b0c602463bffbe2f0ff836d9 /options.c | |
parent | 4f08352185c9dfa07aaccfc244fdd76ce5e0f170 (diff) |
ptunnel-ng:
* source refactoring
* base64 encoding/decoding option
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -95,6 +95,9 @@ static const struct option_usage usage[] = { "Unprivileged mode will only work on some systems, and is in general less reliable\n" "than running in privileged mode.\n" }, + /** --base64 */ + {NULL, 0, OPT_BOOL, {.num = 0}, + "Base64 encode/decode all outoging/incoming packets."}, #ifndef WIN32 /** --daemon */ {"pidfile", 0, OPT_STR, {.str = "/run/ptunnel.pid"}, @@ -143,6 +146,7 @@ static struct option long_options[] = { {"passwd", required_argument, 0, 'x'}, {"udp", no_argument, &opts.udp, 1 }, {"unprivileged", no_argument, &opts.unprivileged, 1 }, + {"base64", no_argument, &opts.base64, 1 }, #ifndef WIN32 {"daemon", optional_argument, 0, 'd'}, {"syslog", no_argument, 0, 'S'}, @@ -489,5 +493,9 @@ int parse_options(int argc, char **argv) { } else opts.log_file = tmp_log; } + if (opts.base64 != 0) { + pt_log(kLog_debug, "Base64 enabled."); + } + return 0; } |