diff --git a/CHANGES b/CHANGES index 813a110..3c5846d 100755 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,12 @@ +Changes to proxytunnel version 1.0.6 -- Thu Nov 22 09:35:13 CET 2001 + +- Added support for compiling on Solaris, uncomment some lines in the + Makefile to enable this, patch from: Martin Senft +- Included (modified) patch from Ralph Loader to + work around broken DNS resolving in some proxies when using DynDNS + hosts (you need to apply this patch yourself if you want this, it + isn't enabled by default) -- Maniac + Changes to proxytunnel version 1.0.5 -- Mon Nov 19 21:26:45 CET 2001 - Added support for running from inetd, using the --inetd option or diff --git a/Makefile b/Makefile index 0c58d92..0666141 100755 --- a/Makefile +++ b/Makefile @@ -1,8 +1,25 @@ -proxytunnel: proxytunnel.o cmdline.o +# Makefile for proxytunnel +# +# Please uncomment the appropriate settings + +CC = gcc +CFLAGS = -Wall -DHAVE_GETOPT_LONG +LDFLAGS = + +# Solaris needs this (According to Martin Senft ) +# CFLAGS = -I/usr/include -Wall +# LDFLAGS = -lsocket -lnsl + +PROGNAME = proxytunnel +OBJ = proxytunnel.o \ + cmdline.o + +proxytunnel: $(OBJ) + $(CC) -o $(PROGNAME) $(LDFLAGS) $(OBJ) clean: - @rm -f proxytunnel proxytunnel.o cmdline.o + @rm -f $(PROGNAME) $(OBJ) install: mkdir -p /usr/local/bin - install -g root -m755 -o root proxytunnel /usr/local/bin/proxytunnel + install -g root -m755 -o root $(PROGNAME) /usr/local/bin/$(PROGNAME) diff --git a/cmdline.c b/cmdline.c index 288bddc..f724e6d 100755 --- a/cmdline.c +++ b/cmdline.c @@ -20,19 +20,15 @@ #include #include #include -/* If we use autoconf. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif -/* Check for configure's getopt check result. */ + #ifndef HAVE_GETOPT_LONG -#include "getopt.h" + char * optarg; #else #include #endif #include "cmdline.h" -#include "config.h" void @@ -108,13 +104,18 @@ cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_i clear_args(); optarg = 0; + +#ifdef HAVE_GETOPT_LONG optind = 1; opterr = 1; optopt = '?'; +#endif while (1) { int option_index = 0; + +#ifdef HAVE_GETOPT_LONG static struct option long_options[] = { { "help", 0, NULL, 'h' }, { "version", 0, NULL, 'V' }, @@ -130,6 +131,9 @@ cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_i }; c = getopt_long (argc, argv, "hViu:s:g:G:d:D:v", long_options, &option_index); +#else + c = getopt( argc, argv, "hViu:s:g:G:d:D:v" ); +#endif if (c == -1) break; /* Exit from `while (1)' loop. */ diff --git a/config.h b/config.h index 7ce3ca7..a7e81b7 100755 --- a/config.h +++ b/config.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define VERSION "1.0.5" +#define VERSION "1.0.6b" #define PACKAGE "Proxytunnel" #define PURPOSE "Build generic tunnels through HTTPS proxys" #define AUTHORS "Jos Visser (Muppet) , Mark Janssen (Maniac) " diff --git a/proxytunnel.c b/proxytunnel.c index 20cbfc2..37372c8 100755 --- a/proxytunnel.c +++ b/proxytunnel.c @@ -195,8 +195,6 @@ void make_basicauth() { * Base64 encode the clear text cookie to create the HTTP base64 * authentication cookie */ - //lutil_b64_ntop(p,strlen(p),basicauth,SIZE); - //rs_base64( p, strlen(p), &basicauth ); base64( basicauth, p, strlen(p)); fprintf(stderr,"Proxy basic authentication is %s\n",basicauth);