diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | configure.ac | 16 | ||||
-rw-r--r-- | src/options.c | 12 | ||||
-rw-r--r-- | src/ptunnel.h | 2 | ||||
-rw-r--r-- | src/utils.c | 1 |
7 files changed, 35 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index 18e1066..7e7d6ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ script: --build=$(gcc -dumpmachine) env: global: - secure: G3qiIHVbyvND++kUY/bEED+qIfve8I/6CV6VSYvQhIjaSVtG42XcdT/AgoYyS9kS5rqkYPSQyYSIYVCqYGAH1GWy0P1/qQHrLawVAOZVwLmWbUX8jBS/cnlJ9TLniy4pTD59+0nE19GUSm6EoJSEDtUQcDjZyr95nZwNwOPzohOgw0B0CprbJQpg1NGKw1YrZ+RfKBsmhEwT0EFRg9Q3UWBnXPHVyri4LnJ53D+FkTkA+MLOKxaAK50vhGaGy5oRUW5Uf95vFZw3FhXqJbiR2FbMLXP5gxS4swnduBsbycwV/RYbR4M/MtRt51JqpcOgXPRnyVEPKzbpuqqFQFAXt7ZRur0G3Lr7iVJ2Yc8/TFkFwaIMLMBE1UAyhgi8QBEJhdgXKp5a4B9Qouebnpp3w4znUrd037ZaVdfSruqqBl1QTYPYcUAYrKbPZIxGTQGJGHJbQw48sl4r/ssZj9NKnijfgZW3jxNJnvUPTuEFGnsdFqEwv5HxO4O3UWp5vrwX1sC+1+QrAsE+3fUmX4x1J39XOU9u0cAcBtnj88t9uRYndB3OhXqAp2hHNy7YQlDsnaNTvqIVt3W7na5HwjlZ320aFTRSdC/j/rd8O5CEgaCJK4GP2Gwcvffom4yOGt9+gO2aYSOosfkkjT5G6cdYOUr+fKR0ZUQ2uaw2njatswQ= + - secure: DqyBATbSy6uoCpJ9MsedJID1SBWnHM0FMXJS2E4FbMwEaoOLWw/7EiLZUrIxcuAGyaztd4xuve3den07xt7uOL6RBebVjh8ZbNxR92ndxsDcsvLFEUTeTvDOsu7vYmocLw95x5GFPWygOP1PGe/QpQKHo6MMT5Px0if7LFiFi8bGj5lpuiL5C7l2IsWhmaLB3oIMK7z/JXPQSkXjYjzahS7dDRr7LnkQpEtywmSHGn5xD3QCZIUysDQV3lsy6zWUC6YLXMeu7JLgh/T6BAO2Zqj4uNlIrhGkh9OOx6OopjvklP0GFqJkSN1i2iPEDuuLx0+eLMUiGREAmWldt7aKwyCVH7r8zcTRSMk2E0jJ4wdd5hHbMUzG3LohmRfxlbcwL0MiOBeCR2MTQBsPXmjXJs4Qf82blQrp2Hxm0sE3KyswDEDQUBTKbRzVFPjYLTRASzIZrDG7j+CjkLRSESyXU3u8IIiE0wr75lhNWL58ZrVzjyZIxCgo8oOeK/yF+6F3hyCSnh/bFkCjvcHMsYInyVZCLgYkYeLHujbvgbiIPOAk50ikTz8AvKMCgK313O6/LjNaJu2GgezN0j2/mKGyvucBJM2QTys7AYp8QfUWy5bOaKcyHq0guu8/lrB8gp2bvIe5xL1HVrmBBvOKzuvwylLCO71Mb4P0zTxeMFwQyVs= addons: coverity_scan: project: @@ -1,6 +1,10 @@ PingTunnel-NG Changelog ======================= +1.31 - 03. December 2018 +- added Android build support (requires a root'ed device!) +- fixed ArchLinux PKGBUILD/AUR + 1.30 - 19. October 2018 - travis-ci, coverity integration - xcompile issue for mingw-w64 fixed @@ -1,5 +1,5 @@ pkgname="ptunnel-ng" -pkgver=1.2 +pkgver=1.3 pkgrel=1 pkgdesc="A TCP forwarder and proxy used for ICMP/UDP tunneling without creating tun devices. (Ping Tunnel, ICMP Echo Tunnel, UDP Tunnel)" arch=('i686' 'x86_64') @@ -8,7 +8,7 @@ license=('BSD-3') makedepends=('git') provides=("ptunnel-ng=${pkgver}") source=("https://github.com/lnslbrty/ptunnel-ng/archive/v${pkgver}.tar.gz") -md5sums=('55ea297a34ae35ddc8d5586b15040a15') +md5sums=('c28cbb3465ddeb22b18f83ff52dd9323') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/configure.ac b/configure.ac index 36ddddc..f45d875 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.69) -AC_INIT([ptunnel-ng], [1.3], [], [], []) +AC_INIT([ptunnel-ng], [1.31], [], [], []) AC_CONFIG_SRCDIR([src/config.h.in]) AC_CONFIG_FILES([Makefile src/Makefile]) @@ -11,6 +11,9 @@ case x"${host}" in use_msw=yes PROGRAM_EXT=".exe" ;; + *-androideabi) + use_android=yes + ;; esac AM_SILENT_RULES([yes]) @@ -35,10 +38,14 @@ dnl Check for std includes. AC_CHECK_HEADERS([stdarg.h stdio.h unistd.h stdlib.h string.h stdint.h time.h signal.h assert.h],, [AC_MSG_ERROR([Missing essential std headers.])]) if test x"${use_msw}" != x"yes"; then - AC_CHECK_HEADERS([sys/unistd.h sys/types.h sys/socket.h netinet/in.h arpa/inet.h netdb.h pthread.h errno.h net/ethernet.h syslog.h pwd.h grp.h],, + AC_CHECK_HEADERS([sys/unistd.h],,) + AC_CHECK_HEADERS([sys/types.h sys/socket.h netinet/in.h arpa/inet.h netdb.h pthread.h errno.h net/ethernet.h syslog.h pwd.h grp.h],, [AC_MSG_ERROR([Missing essential non-Windows std headers.])]) AC_SEARCH_LIBS([pthread_create], [pthread],, [AC_MSG_ERROR([Missing pthread library.])],) + if test x"${use_android}" != x"yes"; then + AC_CHECK_FUNCS([signal],,[AC_MSG_ERROR([Missing essential non-Android std functions.])]) + fi AC_CHECK_FUNCS([pthread_mutex_init pthread_mutex_lock pthread_mutex_unlock syslog getaddrinfo freeaddrinfo gai_strerror],, [AC_MSG_ERROR([Missing essential Linux std functions.])]) else @@ -104,7 +111,7 @@ struct foo { ,[AC_MSG_ERROR([Your compiler does not support \`__attribute__ ((packed))\`.])]) dnl Check for std functions. -AC_CHECK_FUNCS([malloc calloc free memcpy memset signal printf sprintf vsnprintf strerror strlen strncmp strstr strtol strtoul fopen fprintf gettimeofday close fclose exit getopt_long],, +AC_CHECK_FUNCS([malloc calloc free memcpy memset printf sprintf vsnprintf strerror strlen strncmp strstr strtol strtoul fopen fprintf gettimeofday close fclose exit getopt_long],, [AC_MSG_ERROR([Missing essential std functions.])]) dnl `--disable-pcap`: Enabled if found. @@ -145,6 +152,9 @@ if test x"${selinux_enabled}" != x; then AC_SEARCH_LIBS([setcon], [selinux],,[selinux_enabled=],) fi +dnl Check for Android liblog.so +AC_SEARCH_LIBS([__android_log_vprint], [log],,,) + dnl Set automake conf vars AM_CONDITIONAL([HAVE_PCAP], [test x"${pcap_enabled}" = xyes]) AM_CONDITIONAL([HAVE_SELINUX], [test x"${selinux_enabled}" = xyes]) diff --git a/src/options.c b/src/options.c index b52c1ac..beecd39 100644 --- a/src/options.c +++ b/src/options.c @@ -385,15 +385,21 @@ int parse_options(int argc, char **argv) { switch (c) { case 'm': + if (!optarg) + break; opts.magic = strtoul(optarg, NULL, 16); break; case 'p': + if (!optarg) + break; opts.mode = kMode_forward; if (opts.given_proxy_hostname) free(opts.given_proxy_hostname); opts.given_proxy_hostname = strdup(optarg); break; case 'l': + if (!optarg) + break; opts.tcp_listen_port = strtoul(optarg, NULL, 10); break; case 'r': @@ -410,11 +416,15 @@ int parse_options(int argc, char **argv) { opts.given_dst_port = strtoul(optarg, NULL, 10); break; case 'c': + if (!optarg) + break; opts.max_tunnels = strtoul(optarg, NULL,10); if (opts.max_tunnels > kMax_tunnels) opts.max_tunnels = kMax_tunnels; break; case 'v': + if (!optarg) + break; opts.log_level = strtol(optarg, NULL, 10); break; case 'L': @@ -442,6 +452,8 @@ int parse_options(int argc, char **argv) { opts.print_stats = !opts.print_stats; break; case 'P': + if (!optarg) + break; if (opts.password) free(opts.password); opts.password = strdup(optarg); diff --git a/src/ptunnel.h b/src/ptunnel.h index 966f5ba..7566f92 100644 --- a/src/ptunnel.h +++ b/src/ptunnel.h @@ -45,7 +45,9 @@ #define PING_TUNNEL_H 1 #ifndef WIN32 +#ifdef HAVE_SYS_UNISTD_H #include <sys/unistd.h> +#endif #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> diff --git a/src/utils.c b/src/utils.c index 2cbebc4..66ed4c0 100644 --- a/src/utils.c +++ b/src/utils.c @@ -51,6 +51,7 @@ #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> +#include <netinet/in.h> #else #include <ws2tcpip.h> #endif |