Upgrading to GitLab 11.10.0. Expect errors and see debian-infrastructure-announce@lists.debian.org for further information.

Commit c071f918 authored by Jari Aalto's avatar Jari Aalto

Imported Upstream version 2.0

Pat Padgett <agroman@agroman.net>
This diff is collapsed.
Tue Apr 10 16:26:43 2001 Pat Padgett (agroman@agroman.net)
* Added GPL license to distribution.
* Added support for GNU autoconf and automake.
* corkscrew now compiles on Solaris with GNU tools.
Tue Apr 10 23:20:21 2001 Pat Padgett (agroman@agroman.net)
* Changed strncat to strncpy during uri setup.
Wed Apr 11 10:27:32 2001 Pat Padgett (agroman@agroman.net)
* Added support for function prototypes (for HPUX compat)
* Changed buffer size declaration (now #define'd)
Tue Apr 17 14:30:23 2001 Pat Padgett (agroman@agroman.net)
* Fixed glaring bug with getopt.
* Command line syntax has changed. (view README)
* corkscrew was compiled on Win32
* Added error reporting if proxy->dest connection unsuccessful.
Thu Jun 14 12:05:24 2001 Pat Padgett (agroman@agroman.net)
* Added timer for select (THANKS Robert Loomans)
* Removed xmit() function
* Win32 support now STABLE
Fri Aug 24 13:21:23 2001 Pat Padgett (agroman@agroman.net)
* Merged patches from Tamas Szerb and Karel Dudasek
for proxy authentication.
* Cleaned up configure.in and Makefile.am.
* Added support for non-ANSI/K&R C compilers.
Basic Installation
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
Installation Names
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
`configure' recognizes the following options to control how it
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
Print a summary of the options to `configure', and exit.
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
AUTOMAKE_OPTIONS = no-dependencies
INCLUDES = -I$(srcdir)
bin_PROGRAMS = corkscrew
corkscrew_SOURCES = corkscrew.c
This diff is collapsed.
No news is good news. :)
Welcome to Corkscrew
Corkscrew is a tool for tunneling SSH through HTTP proxies, but
...you might find another use for it.
Corkscrew has been compiled on :
* Solaris
* FreeBSD
* OpenBSD
* Linux
* Win32 (with Cygwin)
Corkscrew has been tested with the following HTTP proxies :
* Gauntlet
* CacheFlow
* JunkBuster
* Apache mod_proxy
Please email me if you get it working on other proxies or compile
it elsewhere.
Where Do I Get It?
Corkscrew's primary distribution site is :
How Do I Build It?
In the corkscrew directory type './configure' then 'make'. Check
out the INSTALL file for more information.
How Do I Install It?
In the corkscrew directory type 'make install'.
How Is It Used?
Setting up Corkscrew with SSH/OpenSSH is very simple. Adding
the following line to your ~/.ssh/config file will usually do
the trick (replace proxy.example.com and 8080 with correct values):
ProxyCommand /usr/local/bin/corkscrew proxy.example.com 8080 %h %p
NOTE: Command line syntax has changed since version 1.5. Please
notice that the proxy port is NOT optional anymore and is required
in the command line.
How Do I Use The HTTP Authentication Feature?
You will need to create a file that contains your usename and password
in the form of :
I suggest you place this file in your ~/.ssh directory.
After creating this file you will need to ensure that the proper perms
are set so nobody else can get your username and password by reading
this file. So do this :
chmod 600 myauth
Now you will have to change the ProxyCommand line in your ~/.ssh/config
file. Here's an example :
ProxyCommand /usr/local/bin/corkscrew proxy.work.com 80 %h %p ~/.ssh/myauth
The proxy authentication feature is very new and has not been tested
extensively so your mileage may vary. If you encounter any problems
when trying to use this feature please email me. It would be helpful
if you could include the following information :
- Proxy version (ie. Gauntlet Proxy, Microsoft Proxy Server, etc)
- Operating system you are trying to run corkscrew on
- Command line syntax you are using
- Any error messages that are visible to you
*NOTE: I have had problems using the auth features with Mircosoft Proxy
server. The problems are sporadic, and I believe that they are related
to the round-robin setup that I was testing it again. Your mileage may
Who Am I?
My name is Pat Padgett. I'm a dork.
URL : http://www.agroman.net/
Email : agroman@agroman.net
This has been a traumatized production. http://www.trauma-inc.com/
Minor Tweaks :
* Some work has been done to get corkscrew to compile on old versions
of SunOS (primarily 4.1.3). If someone want's this I might work on
it some more, otherwise I've damn near given up.
* The code works, but it's probably not very efficient. Planning on
spending some time to work on this.
Major Tweaks :
* Add support for HTTP authentication.
* Add support for WinGate proxies (uh, well... we'll see).
#undef PACKAGE
#undef VERSION
dnl aclocal.m4 generated automatically by aclocal 1.4
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
# serial 1
dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
dnl test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
dnl FIXME This is truly gross.
missing_dir=`cd $ac_aux_dir && pwd`
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
# Check to make sure that the build environment is sane.
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftestfile
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
if test "[$]*" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftestfile`
if test "[$]*" != "X $srcdir/configure conftestfile" \
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
test "[$]2" = conftestfile
# Ok.
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
rm -f conftest*
dnl The program must properly implement --version.
[AC_MSG_CHECKING(for working $2)
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
if ($2 --version) < /dev/null > /dev/null 2>&1; then
$1="$3/missing $2"
# Like AC_CONFIG_HEADER, but automatically create stamp file.
dnl When config.status generates a header, we must update the stamp-h file.
dnl This file resides in the same directory as the config header
dnl that is generated. We must strip everything past the first ":",
dnl and everything past the last "/".
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
for am_file in <<$1>>; do
case " <<$>>CONFIG_HEADERS " in
*" <<$>>am_file "*<<)>>
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
am_indx=`expr "<<$>>am_indx" + 1`
# serial 1
AC_MSG_CHECKING([for function prototypes])
if test "$am_cv_prog_cc_stdc" != no; then
AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
U=_ ANSI2KNR=./ansi2knr
# Ensure some checks needed by ansi2knr itself.
# serial 1
# @defmac AC_PROG_CC_STDC
# @maindex PROG_CC_STDC
# @ovindex CC
# If the C compiler in not in ANSI C mode by default, try to add an option
# to output variable @code{CC} to make it so. This macro tries various
# options that select ANSI C on some system or another. It considers the
# compiler to be in ANSI C mode if it handles function prototypes correctly.
# If you use this macro, you should check after calling it whether the C
# compiler has been set to accept ANSI C; if not, the shell variable
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
# program @code{ansi2knr}, which comes with Ghostscript.
# @end defmac
dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
dnl a magic option to avoid problems with ANSI preprocessor commands
dnl like #elif.
dnl FIXME: can't do this because then AC_AIX won't work due to a
dnl circular dependency.
dnl AC_BEFORE([$0], [AC_PROG_CPP])
AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
# Ultrix and OSF/1 -std1
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
CC="$ac_save_CC $ac_arg"
[#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
char **p;
int i;
return p[i];
static char *f (char * (*g) (char **, int), char **p, ...)
char *s;
va_list v;
va_start (v,p);
s = g (p, va_arg (v,int));
va_end (v);
return s;
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
], [
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
[am_cv_prog_cc_stdc="$ac_arg"; break])
if test -z "$am_cv_prog_cc_stdc"; then
AC_MSG_RESULT([none needed])
case "x$am_cv_prog_cc_stdc" in
x|xno) ;;
*) CC="$CC $am_cv_prog_cc_stdc" ;;
This diff is collapsed.
/* config.in. Generated automatically from configure.in by autoheader. */
/* Define to empty if the keyword does not work. */
#undef const
/* Define if you have the ANSI C header files. */
/* Define if you can safely include both <sys/time.h> and <time.h>. */
/* Define if you have the select function. */
/* Define if you have the socket function. */
/* Define if you have the strerror function. */
/* Define if you have the <string.h> header file. */
/* Define if you have the <sys/filio.h> header file. */
/* Define if you have the xnet library (-lxnet). */
/* Name of package */
#undef PACKAGE
/* Version number of package */
#undef VERSION
/* Define if compiler has function prototypes */
This diff is collapsed.
This diff is collapsed.
AM_INIT_AUTOMAKE(corkscrew, 2.0)
case "$host_os" in
AC_CHECK_LIB(xnet, socket)
AC_CHECK_LIB(xnet, gethostbyname)
AC_CHECK_LIB(xnet, inet_addr)
AC_CHECK_LIB(xnet, connect)
dnl AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h arpa/inet.h errno.h netdb.h netinet/in.h stdio.h stdlib.h string.h sys/socket.h sys/types.h)
AC_CHECK_FUNCS(select socket strerror)
dnl check for working const (hpux)
#include "config.h"
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/filio.h>
#if __STDC__
# ifndef NOPROTOS
# define PARAMS(args) args
# endif
#ifndef PARAMS
# define PARAMS(args) ()
char *base64_encodei PARAMS((char *in));
void usage PARAMS((void));
int sock_connect PARAMS((const char *hname, int port));
int main PARAMS((int argc, char *argv[]));
#define BUFSIZE 4096
char linefeed[] = "\x0A\x0D\x0A\x0D";
char linefeed[] = "\r\n\r\n"; /* it is better and tested with oops & squid */
** base64.c
** Copyright (C) 2001 Tamas SZERB <toma@rulez.org>
const static char base64[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/* the output will be allocated automagically */
#ifdef ANSI_FUNC
char *base64_encode (char *in)
char * base64_encode (in)
char *in;
char *src, *end;
char *buf, *ret;
unsigned int tmp;
int i,len;
len = strlen(in);
if (!in)
return NULL;
len = strlen(in);
end = in + len;
buf = malloc(4 * ((len + 2) / 3) + 1);
if (!buf)
return NULL;
ret = buf;
for (src = in; src < end - 3;) {
tmp = *src++ << 24;
tmp |= *src++ << 16;
tmp |= *src++ << 8;
*buf++ = base64[tmp >> 26];
tmp <<= 6;
*buf++ = base64[tmp >> 26];
tmp <<= 6;
*buf++ = base64[tmp >> 26];
tmp <<= 6;
*buf++ = base64[tmp >> 26];
tmp = 0;
for (i = 0; src < end; i++)
tmp |= *src++ << (24 - 8 * i);
switch (i) {
case 3:
*buf++ = base64[tmp >> 26];
tmp <<= 6;
*buf++ = base64[tmp >> 26];
tmp <<= 6;
*buf++ = base64[tmp >> 26];
tmp <<= 6;
*buf++ = base64[tmp >> 26];
case 2:
*buf++ = base64[tmp >> 26];
tmp <<= 6;
*buf++ = base64[tmp >> 26];
tmp <<= 6;
*buf++ = base64[tmp >> 26];
*buf++ = '=';
case 1:
*buf++ = base64[tmp >> 26];
tmp <<= 6;
*buf++ = base64[tmp >> 26];
*buf++ = '=';
*buf++ = '=';
*buf = 0;