ratox

FIFO based tox client
git clone git://git.2f30.org/ratox.git
Log | Files | Refs | README | LICENSE

commit 2b2409932d41ef170d24c51d44f263fb307f75e6
parent ca2a7226106fe9784b4882b986016ddbede62835
Author: sin <sin@2f30.org>
Date:   Fri,  5 Dec 2014 17:36:17 +0000

Add -E and -e to enable and disable data file encryption

Diffstat:
ratox.1 | 8+++++++-
ratox.c | 19+++++++++++++------
2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/ratox.1 b/ratox.1 @@ -6,7 +6,9 @@ .Nd FIFO based tox client .Sh SYNOPSIS .Nm -.Op Fl 46tp +.Op Fl 4 | Fl 6 +.Op Fl E | Fl e +.Op Fl tp .Sh DESCRIPTION .Nm is a client implementation of the rather popular tox protocol. @@ -19,6 +21,10 @@ interaction through FIFOs. Switch to IPv4-only mode. This is the default. .It Fl 6 Switch to IPv6-only mode. +.It Fl E +Enable data file encryption. +.It Fl e +Disable data file encryption. .It Fl t Enable TCP mode. By default, tox operates with UDP and is recommended, as TCP mode implies certain security considerations. .It Fl p diff --git a/ratox.c b/ratox.c @@ -1968,12 +1968,13 @@ shutdown(void) static void usage(void) { - fprintf(stderr, "usage: %s [-4|-6] [-t] [-p]\n" - " -4\tIPv4 only\n" - " -6\tIPv6 only\n" - " -t\tEnable TCP mode (UDP by default)\n" - " -p\tEnable TCP socks5 proxy\n", argv0); - exit(1); + eprintf("usage: %s [-4|-6] [-E|-e] [-tp]\n" + " -4\tIPv4 only\n" + " -6\tIPv6 only\n" + " -E\tEnable data file encryption\n" + " -e\tDisable data file encryption\n" + " -t\tEnable TCP mode (UDP by default)\n" + " -p\tEnable TCP socks5 proxy\n", argv0); } int @@ -1985,6 +1986,12 @@ main(int argc, char *argv[]) case '6': ipv6 = 1; break; + case 'E': + encryptdatafile = 1; + break; + case 'e': + encryptdatafile = 0; + break; case 't': tcpflag = 1; break;