summaryrefslogtreecommitdiffstats
path: root/usr.bin/telnet
diff options
context:
space:
mode:
authorpst <pst@FreeBSD.org>1996-04-23 05:18:43 +0000
committerpst <pst@FreeBSD.org>1996-04-23 05:18:43 +0000
commitd73d5ee489af9ec86a8ea3826fd9d5b014f3d84f (patch)
treea5cede8a25f13c625b46e62efa487feaca306544 /usr.bin/telnet
parent2a55e3d7aa65ad207f3877f30d105aefe47e30dd (diff)
downloadFreeBSD-src-d73d5ee489af9ec86a8ea3826fd9d5b014f3d84f.zip
FreeBSD-src-d73d5ee489af9ec86a8ea3826fd9d5b014f3d84f.tar.gz
Add support for socks
Diffstat (limited to 'usr.bin/telnet')
-rw-r--r--usr.bin/telnet/Makefile9
-rw-r--r--usr.bin/telnet/main.c4
2 files changed, 12 insertions, 1 deletions
diff --git a/usr.bin/telnet/Makefile b/usr.bin/telnet/Makefile
index fee9815..19222b4 100644
--- a/usr.bin/telnet/Makefile
+++ b/usr.bin/telnet/Makefile
@@ -42,7 +42,7 @@ CFLAGS+=-I${.CURDIR}/../../lib
#CFLAGS+= -DKRB4
LDADD= -ltermcap -ltelnet
-#LDADD+= -lkrb -ldes
+#LDADD+=-lkrb -ldes
DPADD= ${LIBTERMCAP}
SRCS= authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \
@@ -53,6 +53,13 @@ CRYPT_SRC= authenc.c commands.c externs.h main.c network.c
CRYPT_SRC+= ring.c ring.h telnet.c terminal.c utilities.c Makefile
NOCRYPT_DIR=${.CURDIR}/Nocrypt
+.if defined(SOCKS)
+CFLAGS+=-DSOCKS
+CFLAGS+=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten \
+ -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect
+LDADD+= -lsocks
+.endif
+
.include <bsd.prog.mk>
nocrypt:
diff --git a/usr.bin/telnet/main.c b/usr.bin/telnet/main.c
index 896405c..f9d6455 100644
--- a/usr.bin/telnet/main.c
+++ b/usr.bin/telnet/main.c
@@ -118,6 +118,10 @@ main(argc, argv)
extern int forward_flags;
#endif /* FORWARD */
+#ifdef SOCKS
+ SOCKSinit(argv[0]);
+#endif /* SOCKS */
+
tninit(); /* Clear out things */
#if defined(CRAY) && !defined(__STDC__)
_setlist_init(); /* Work around compiler bug */
OpenPOWER on IntegriCloud