Add support for socks

This commit is contained in:
Paul Traina 1996-04-23 05:18:43 +00:00
parent c0eccc00c8
commit 33bb8564be
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15358
8 changed files with 47 additions and 3 deletions

View File

@ -31,7 +31,7 @@
# SUCH DAMAGE.
#
# @(#)Makefile 8.1 (Berkeley) 6/6/93
# $Id$
# $Id: Makefile,v 1.13 1996/03/11 16:17:58 markm Exp $
#
PROG= telnet
@ -53,4 +53,11 @@ DPADD+= ${LIBDES} ${LIBKRB}
# Used only in krb4encpwd.c and rsaencpwd.c (libtelnet), not yet active
#LDADD+= -ldescrypt
.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>

View File

@ -122,6 +122,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 */

View File

@ -31,7 +31,7 @@
# SUCH DAMAGE.
#
# @(#)Makefile 8.1 (Berkeley) 6/6/93
# $Id$
# $Id: Makefile,v 1.13 1996/03/11 16:17:58 markm Exp $
#
PROG= telnet
@ -53,4 +53,11 @@ DPADD+= ${LIBDES} ${LIBKRB}
# Used only in krb4encpwd.c and rsaencpwd.c (libtelnet), not yet active
#LDADD+= -ldescrypt
.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>

View File

@ -122,6 +122,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 */

View File

@ -6,4 +6,11 @@ LINKS= ${BINDIR}/ftp ${BINDIR}/pftp
MLINKS= ftp.1 pftp.1
CFLAGS+=-DFTP_DATA_BOTTOM=40000 -DFTP_DATA_TOP=44999
.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>

View File

@ -72,6 +72,10 @@ main(argc, argv)
char *cp, homedir[MAXPATHLEN];
struct servent sp_default;
#ifdef SOCKS
SOCKSinit(argv[0]);
#endif
sp = getservbyname("ftp", "tcp");
if (sp == 0) {
sp = &sp_default;

View File

@ -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:

View File

@ -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 */