Add support for socks
This commit is contained in:
parent
c0eccc00c8
commit
33bb8564be
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15358
@ -31,7 +31,7 @@
|
|||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
# @(#)Makefile 8.1 (Berkeley) 6/6/93
|
# @(#)Makefile 8.1 (Berkeley) 6/6/93
|
||||||
# $Id$
|
# $Id: Makefile,v 1.13 1996/03/11 16:17:58 markm Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
PROG= telnet
|
PROG= telnet
|
||||||
@ -53,4 +53,11 @@ DPADD+= ${LIBDES} ${LIBKRB}
|
|||||||
# Used only in krb4encpwd.c and rsaencpwd.c (libtelnet), not yet active
|
# Used only in krb4encpwd.c and rsaencpwd.c (libtelnet), not yet active
|
||||||
#LDADD+= -ldescrypt
|
#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>
|
.include <bsd.prog.mk>
|
||||||
|
@ -122,6 +122,10 @@ main(argc, argv)
|
|||||||
extern int forward_flags;
|
extern int forward_flags;
|
||||||
#endif /* FORWARD */
|
#endif /* FORWARD */
|
||||||
|
|
||||||
|
#ifdef SOCKS
|
||||||
|
SOCKSinit(argv[0]);
|
||||||
|
#endif /* SOCKS */
|
||||||
|
|
||||||
tninit(); /* Clear out things */
|
tninit(); /* Clear out things */
|
||||||
#if defined(CRAY) && !defined(__STDC__)
|
#if defined(CRAY) && !defined(__STDC__)
|
||||||
_setlist_init(); /* Work around compiler bug */
|
_setlist_init(); /* Work around compiler bug */
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
# @(#)Makefile 8.1 (Berkeley) 6/6/93
|
# @(#)Makefile 8.1 (Berkeley) 6/6/93
|
||||||
# $Id$
|
# $Id: Makefile,v 1.13 1996/03/11 16:17:58 markm Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
PROG= telnet
|
PROG= telnet
|
||||||
@ -53,4 +53,11 @@ DPADD+= ${LIBDES} ${LIBKRB}
|
|||||||
# Used only in krb4encpwd.c and rsaencpwd.c (libtelnet), not yet active
|
# Used only in krb4encpwd.c and rsaencpwd.c (libtelnet), not yet active
|
||||||
#LDADD+= -ldescrypt
|
#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>
|
.include <bsd.prog.mk>
|
||||||
|
@ -122,6 +122,10 @@ main(argc, argv)
|
|||||||
extern int forward_flags;
|
extern int forward_flags;
|
||||||
#endif /* FORWARD */
|
#endif /* FORWARD */
|
||||||
|
|
||||||
|
#ifdef SOCKS
|
||||||
|
SOCKSinit(argv[0]);
|
||||||
|
#endif /* SOCKS */
|
||||||
|
|
||||||
tninit(); /* Clear out things */
|
tninit(); /* Clear out things */
|
||||||
#if defined(CRAY) && !defined(__STDC__)
|
#if defined(CRAY) && !defined(__STDC__)
|
||||||
_setlist_init(); /* Work around compiler bug */
|
_setlist_init(); /* Work around compiler bug */
|
||||||
|
@ -6,4 +6,11 @@ LINKS= ${BINDIR}/ftp ${BINDIR}/pftp
|
|||||||
MLINKS= ftp.1 pftp.1
|
MLINKS= ftp.1 pftp.1
|
||||||
CFLAGS+=-DFTP_DATA_BOTTOM=40000 -DFTP_DATA_TOP=44999
|
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>
|
.include <bsd.prog.mk>
|
||||||
|
@ -72,6 +72,10 @@ main(argc, argv)
|
|||||||
char *cp, homedir[MAXPATHLEN];
|
char *cp, homedir[MAXPATHLEN];
|
||||||
struct servent sp_default;
|
struct servent sp_default;
|
||||||
|
|
||||||
|
#ifdef SOCKS
|
||||||
|
SOCKSinit(argv[0]);
|
||||||
|
#endif
|
||||||
|
|
||||||
sp = getservbyname("ftp", "tcp");
|
sp = getservbyname("ftp", "tcp");
|
||||||
if (sp == 0) {
|
if (sp == 0) {
|
||||||
sp = &sp_default;
|
sp = &sp_default;
|
||||||
|
@ -42,7 +42,7 @@ CFLAGS+=-I${.CURDIR}/../../lib
|
|||||||
#CFLAGS+= -DKRB4
|
#CFLAGS+= -DKRB4
|
||||||
|
|
||||||
LDADD= -ltermcap -ltelnet
|
LDADD= -ltermcap -ltelnet
|
||||||
#LDADD+= -lkrb -ldes
|
#LDADD+=-lkrb -ldes
|
||||||
DPADD= ${LIBTERMCAP}
|
DPADD= ${LIBTERMCAP}
|
||||||
|
|
||||||
SRCS= authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \
|
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
|
CRYPT_SRC+= ring.c ring.h telnet.c terminal.c utilities.c Makefile
|
||||||
NOCRYPT_DIR=${.CURDIR}/Nocrypt
|
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>
|
.include <bsd.prog.mk>
|
||||||
|
|
||||||
nocrypt:
|
nocrypt:
|
||||||
|
@ -118,6 +118,10 @@ main(argc, argv)
|
|||||||
extern int forward_flags;
|
extern int forward_flags;
|
||||||
#endif /* FORWARD */
|
#endif /* FORWARD */
|
||||||
|
|
||||||
|
#ifdef SOCKS
|
||||||
|
SOCKSinit(argv[0]);
|
||||||
|
#endif /* SOCKS */
|
||||||
|
|
||||||
tninit(); /* Clear out things */
|
tninit(); /* Clear out things */
|
||||||
#if defined(CRAY) && !defined(__STDC__)
|
#if defined(CRAY) && !defined(__STDC__)
|
||||||
_setlist_init(); /* Work around compiler bug */
|
_setlist_init(); /* Work around compiler bug */
|
||||||
|
Loading…
Reference in New Issue
Block a user