diff options
author | zfl9 <zfl9.com@gmail.com> | 2019-08-31 14:56:34 +0800 |
---|---|---|
committer | zfl9 <zfl9.com@gmail.com> | 2019-08-31 14:56:34 +0800 |
commit | 0f0fcebcb9cfb0bf42e2bd710e510806d51cc283 (patch) | |
tree | e2ba6192bee03c1098606d4943e6ca926f58390f | |
parent | update dns2tcp.c (diff) | |
download | dns2tcp-0f0fcebcb9cfb0bf42e2bd710e510806d51cc283.tar.gz dns2tcp-0f0fcebcb9cfb0bf42e2bd710e510806d51cc283.tar.bz2 dns2tcp-0f0fcebcb9cfb0bf42e2bd710e510806d51cc283.zip |
update dns2tcp.c
-rw-r--r-- | dns2tcp.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -10,6 +10,7 @@ #include <signal.h> #undef _GNU_SOURCE +#define IF_VERBOSE if (g_verbose) #define DNS2TCP_VERSION "dns2tcp v1.0" static bool g_verbose = false; @@ -24,7 +25,7 @@ static skaddr6_t g_remote_skaddr = {0}; static void print_command_help(void) { printf("usage: dns2tcp <-L LISTEN_ADDR> <-R REMOTE_ADDR> [-vVh]\n" " -L <ip#port> udp listen address, it is required\n" - " -R <ip#port> tcp server address, it is required\n" + " -R <ip#port> tcp remote address, it is required\n" " -v print verbose log, default: <disabled>\n" " -V print version number of dns2tcp and exit\n" " -h print help information of dns2tcp and exit\n" @@ -145,6 +146,10 @@ int main(int argc, char *argv[]) { setvbuf(stdout, NULL, _IOLBF, 256); parse_command_args(argc, argv); + LOGINF("[main] udp listen addr: %s#%hu", g_listen_ipstr, g_listen_portno); + LOGINF("[main] tcp remote addr: %s#%hu", g_remote_ipstr, g_remote_portno); + IF_VERBOSE LOGINF("[main] verbose mode, affect performance"); + // TODO return 0; |