debian/0000755000000000000000000000000012147462035007172 5ustar debian/corkscrew.manpages0000644000000000000000000000002312147462035012704 0ustar debian/corkscrew.1 debian/clean0000644000000000000000000000002312147462035010172 0ustar debian/corkscrew.1 debian/pod2man.mk0000644000000000000000000000332112147462035011062 0ustar # pod2man.mk -- Makefile portion to convert *.pod files to manual pages # # Copyright information # # Copyright (C) 2008-2013 Jari Aalto # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Description # # Convert *.pod files to manual pages. Write this to 'install' # target: # # install: build $(MANPAGE) ifneq (,) This makefile requires GNU Make. endif # This variable *must* be set when calling PACKAGE ?= package RELEASE ?= $(PACKAGE) # Optional variables to set MANSECT ?= 1 PODCENTER ?= $$(date "+%Y-%m-%d") # Directories MANSRC = MANDEST = $(MANSRC) MANPOD = $(MANSRC)$(PACKAGE).$(MANSECT).pod MANPAGE = $(MANDEST)$(PACKAGE).$(MANSECT) POD2MAN = pod2man POD2MAN_FLAGS = --utf8 makeman: $(MANPAGE) $(MANPAGE): $(MANPOD) # make target - create manual page from a *.pod page podchecker $(MANPOD) LC_ALL=C $(POD2MAN) $(POD2MAN_FLAGS) \ --center="$(PODCENTER)" \ --name="$(PACKAGE)" \ --section="$(MANSECT)" \ --release="$(RELEASE)" \ $(MANPOD) \ > $(MANPAGE) && \ rm -f pod*.tmp # End of of Makefile part debian/watch0000644000000000000000000000010612147462035010220 0ustar version=3 http://www.agroman.net/corkscrew/ .*corkscrew-(\d.+).tar.gz debian/rules0000755000000000000000000000101012147462035010242 0ustar #!/usr/bin/make -f PACKAGE = corkscrew include debian/pod2man.mk include debian/debian-autotools.mk export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed man: $(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) \ PODCENTER=Networking makeman override_dh_auto_configure: man $(config-prepare) dh_auto_configure override_dh_strip: $(config-restore) dh_strip binary: binary-arch %: dh $@ .PHONY: man # End of file debian/changelog0000644000000000000000000001016212147462035011044 0ustar corkscrew (2.0-10) unstable; urgency=low * debian/compat - Update to 9. * debian/copyright - Update year. * debian/control - (Build-Depends): Update to debhelper 9. - (Standards-Version): Update to 3.9.4. * debian/patches - (30): New. Support spaces in authentication data. Patch thanks to Filip Zyzniewski (LP: #962921). * debian/pod2man.mk - Remove sed, use --release option. -- Jari Aalto Thu, 23 May 2013 21:46:35 +0300 corkscrew (2.0-9) unstable; urgency=low * debian/control - (Build-Depends): Rm dpkg-dev; not needed with debhelper 9. - (standards-Version): Update to 3.9.3.1. * debian/copyright - Update to format 1.0. * debian/patches - (20): Refresh. Fix spelling mistake in code. * debian/rules - Enable all hardening flags. - Use DEB_*_MAINT_* variables. * debian/*.mk - Minor updates. -- Jari Aalto Thu, 22 Mar 2012 15:21:20 -0400 corkscrew (2.0-8) unstable; urgency=low * debian/compat - Update to 9 * debian/control - (Build-Depends): update to debhelper 9, dpkg-dev 1.16.1. * debian/copyright - Update to DEP5 * debian/rules - Use hardened CFLAGS. http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags -- Jari Aalto Sat, 11 Feb 2012 15:51:33 -0500 corkscrew (2.0-7) unstable; urgency=medium * debian/control: - (Build-Depends): Add autotools-dev for latest config.guess and config.sub files (FTBFS kfreebsd-*; Closes: #572291). * debian/debian-autotools.mk - Add config-prepare macro. * debian/rules - (override_dh_auto_configure): use config-prepare to set up newest config (Closes: #534816). - (install): In make call, move target call 'install' to the end of line. - (MANSECT): remove variable and integrate into 'man' target. -- Jari Aalto Wed, 03 Mar 2010 16:55:58 +0200 corkscrew (2.0-6) unstable; urgency=low * New maintainer (Closes: #569185). * Move to packaging format "3.0 (quilt)". * debian/clean - New file. * debian/compat - New file. * debian/control - (Build-Depends): Update to debhelper 7.1 - (Homepage): New. - (Standards-Version): Update to 3.8.4. * debian/copyright - Update layout. * debian/corkscrew.1 - Delete raw format manual page; change to POD format. * debian/corkscrew.docs - New file. * debian/corkscrew.manpages - New file. * debian/corkscrew.pod.1 - New manual page format. corkscrew.1. * debian/debian-autotools.mk - New file. * debian/pod2man.mk - New file. * debian/patches - Convert direct modifications to standard patches. * debian/rules - Remove rules handled by standard dh(1). - (override_dh_auto_configure): Use newest config.* files. * debian/source/format - New file. * debian/watch - New file. -- Jari Aalto Wed, 03 Mar 2010 11:13:44 +0200 corkscrew (2.0-5) unstable; urgency=low * Updated config.sub/config.guess (thanks Aurelien Jarno) (closes: #317321) * Bumped Standards-Version to 3.6.2 -- Thomas Seyrat Mon, 25 Jul 2005 11:40:14 +0200 corkscrew (2.0-4) unstable; urgency=low * Applied patch by Frank Kirschner to fix issue when first packet sent by proxy has both header and beginning of answer * Included manpage provided by Laurent Fousse (closes: #222038) * Fixed corkscrew path in README (closes: #219953) * debian/rules minor changes * Case adjustment in small description * Bumped Standards-Version to 3.6.1 -- Thomas Seyrat Sun, 29 Feb 2004 16:52:19 +0100 corkscrew (2.0-3) unstable; urgency=low * Bumped Standards-Version to 3.5.7. -- Thomas Seyrat Sat, 21 Sep 2002 15:52:22 +0200 corkscrew (2.0-2) unstable; urgency=low * Added README to documentation directory. -- Thomas Seyrat Fri, 17 May 2002 10:33:12 +0200 corkscrew (2.0-1) unstable; urgency=low * Initial Release. (closes: #140343) -- Thomas Seyrat Thu, 28 Mar 2002 22:18:30 +0100 debian/corkscrew.docs0000644000000000000000000000002412147462035012042 0ustar TODO AUTHORS README debian/patches/0000755000000000000000000000000012147462035010621 5ustar debian/patches/10-readme-path.patch0000644000000000000000000000243512147462035014253 0ustar From 3afb398b53d68638dfc89705d723188908714a45 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Sun, 28 Feb 2010 18:05:05 +0200 Subject: [PATCH] Adjust path Signed-off-by: Jari Aalto --- README | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index b7d9e2c..e0efa6f 100644 --- a/README +++ b/README @@ -47,7 +47,7 @@ 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 +ProxyCommand /usr/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 @@ -70,7 +70,7 @@ 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 +ProxyCommand /usr/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 -- 1.6.6.1 debian/patches/series0000644000000000000000000000011412147462035012032 0ustar 10-readme-path.patch 20-corkscrew.c.patch 30-spaces-in-authentication.patch debian/patches/30-spaces-in-authentication.patch0000644000000000000000000000144712147462035016767 0ustar From: Filip Zyzniewski Subject: support spaces in authentication data Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/corkscrew/+bug/962921 --- corkscrew-2.0-orig/corkscrew.c 2012-03-23 09:19:42.000000000 +0100 +++ corkscrew-2.0/corkscrew.c 2012-03-23 10:14:56.958789922 +0100 @@ -203,9 +203,18 @@ exit(-1); } else { char line[4096]; - fscanf(fp, "%s", line); - up = malloc(sizeof(line)); - up = line; + char *eol = line; + int linelen; + linelen = fread(line, 1, 4095, fp); + if (ferror(fp)) { + fprintf(stderr, "Error reading %s: %s\n", argv[5], strerror(errno)); + exit(-1); + } + line[linelen] = '\0'; + eol = strchr(line, '\n'); + if (eol) + *eol = '\0'; + up = strdup(line); fclose(fp); } } debian/patches/20-corkscrew.c.patch0000644000000000000000000000203612147462035014305 0ustar From 3ae3e35200b97cdf0fed0c540d25e2ba12b20ab1 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Sun, 28 Feb 2010 18:12:11 +0200 Subject: [PATCH] Debian change (Thomas Seyrat) Signed-off-by: Jari Aalto --- corkscrew.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/corkscrew.c +++ b/corkscrew.c @@ -176,6 +176,7 @@ #endif char *host = NULL, *desthost = NULL, *destport = NULL; char *up = NULL; + char *tmp = NULL; int port, sent, setup, code, csock; fd_set rfd, sfd; struct timeval tv; @@ -259,9 +260,14 @@ else { if ((strncmp(version,"HTTP/",5) == 0) && (code >= 407)) { } - fprintf(stderr, "Proxy could not open connnection to %s: %s\n", desthost, descr); + fprintf(stderr, "Proxy could not open connection to %s: %s\n", desthost, descr); exit(-1); } + if (tmp = strstr(buffer,"\r\n\r\n")) + { + tmp += 4; + write(1, tmp, strlen(tmp)); + } } } if (FD_ISSET(csock, &sfd) && (sent == 0)) { debian/source/0000755000000000000000000000000012147462035010472 5ustar debian/source/format0000644000000000000000000000001412147462035011700 0ustar 3.0 (quilt) debian/corkscrew.1.pod0000644000000000000000000000560512147462035012045 0ustar # Copyright # # Copyright (C) 2009-2010 Jari Aalto # Copyright (C) 2003 Laurent Fousse # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Description # # To learn what TOP LEVEL section to use in manual pages, # see POSIX/Susv standard and "tility Description Defaults" at # http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap01.html#tag_01_11 # # This is manual page in Perl POD format. Read more at # http://perldoc.perl.org/perlpod.html or run command: # # perldoc perlpod | less # # To check the syntax: # # podchecker *.pod # # Create manual page with command: # # pod2man PAGE.N.pod > PAGE.N =pod =head1 NAME corkscrew - Tunnel TCP connections through HTTP proxies =head1 SYNOPSIS corkscrew PROXY PROXYPORT TARGETHOST TARGETPORT [AUTH_FILE] =head1 DESCRIPTION corkscrew is a simple tool to tunnel TCP connections through an HTTP proxy supporting the CONNECT method. It reads stdin and writes to std- out during the connection, just like netcat. It can be used for instance to connect to an SSH server running on a remote 443 port through a strict HTTPS proxy. =over 4 =item PROXY The name of the host running the HTTP proxy. =item PROXYPORT The port on which to connect on the proxy. =item TARGET The host to reach through the proxy. =item TARGETPORT The port to connect to on the target host. =item AUTH_ FILE The auth file is made of one single line containing your username and password in the form username:password =back =head1 OPTIONS None. =head1 EXAMPLES The common usage of corkscrew is to put the following line in ~/.ssh/ssh_config: ProxyCommand corkscrew proxy proxyport %h %p [] This will let the ssh connection go through the proxy with the help of corkscrew. =head1 ENVIRONMENT None. =head1 FILES None. =head1 SEE ALSO ssh_config(5) =head1 AUTHORS Program was written by Pat Padgett . This manual page was written by Laurent Fousse for the Debian GNU system (but may be used by others). Updated by Jari Aalto . Released under license GNU GPL version 2 or (at your option) any later version. For more information about license, visit . =cut debian/debian-autotools.mk0000644000000000000000000001004112147462035012770 0ustar #!/usr/bin/make -f # # debian-autotools.mk -- Common tasks for Autotools # # Copyright # # Copyright (C) 2008-2010 Jari Aalto # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Description # # This is GNU makefile part that defines common variables, # targets and macros to be used in debian/rules. # # Dealing with packages that have old Autotools config.* files # we can: (1) Save package's config.* (2) Copy the latest from # Debian (3) restore package's config.* files. This way the # Debian *diff.gz stays clean and understandable to examine. In # addition if sources are kept in version control, they are not # flagged as modified. # # To install, add macro calls like this: # # override_dh_auto_configure: # $(make-depend-save) # $(config-prepare) # dh_auto_configure # # override_dh_auto_clean: # $(config-restore) # $(make-depend-restore) # dh_auto_clean ifneq (,) This makefile requires GNU Make. endif # ...................................................... make.depend ... define make-depend-save # make-depend-save: Save original file [ -f make.depend.original ] || cp -v make.depend make.depend.original endef define make-depend-restore # make-depend-restore: Restore original file [ ! -f make.depend.original ] || mv -v make.depend.original make.depend endef # ...................................................... config-h-in ... define config-h-in-save # config-h-in-save: Save original file [ -f config.h.in.original ] || cp -v config.h.in config.h.in.original endef define config-h-in-restore # config-h-in-restore: Restore original file [ ! -f config.h.in.original ] || mv -v config.h.in.original config.h.in endef # ........................................................ configure ... define config-configure-save # config-configure-save: Save original file [ -f configure.original ] || cp -v configure configure.original endef define config-configure-restore # config-configure-restore: Restore original file [ ! -f configure.original ] || mv -v configure.original configure endef # ........................................ Debian config.{sub,guess} ... define config-patch-sub # config-patch-sub: Use latest version from Debian [ ! -f /usr/share/misc/config.sub ] || \ cp -vf /usr/share/misc/config.sub . endef define config-patch-guess # config-patch-guess: Use latest version from Debian [ ! -f /usr/share/misc/config.guess ] || \ cp -vf /usr/share/misc/config.guess . endef # ............................................... config.{sub,guess} ... define config-save # config-save: Save original files [ ! -f config.sub ] || cp -v config.sub config.sub.original [ ! -f config.guess ] || cp -v config.guess config.guess.original endef define config-restore # config-restore: Restore original files [ ! -f config.sub.original ] || mv -v config.sub.original config.sub [ ! -f config.guess.original ] || mv -v config.guess.original config.guess endef define config-restore-copy # config-restore-copy: Copy original files [ ! -f config.sub.original ] || cp -v config.sub.original config.sub [ ! -f config.guess.original ] || cp -v config.guess.original config.guess endef define config-delete # config-delete: Delete config files rm -f config.sub config.guess endef define config-patch # config-patch: copy latest $(config-patch-sub) $(config-patch-guess) endef define config-prepare # config-prepare: save and patch $(config-save) $(config-patch) endef # End of Makefile part debian/compat0000644000000000000000000000000212147462035010370 0ustar 9 debian/copyright0000644000000000000000000000227712147462035011135 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 X-Format: http://dep.debian.net/deps/dep5 Upstream-Name: corkscrew Upstream-Contact: Pat Padgett Source: http://freshmeat.net/projects/corkscrew Files: * Copyright: 2001 Pat Padgett License: GPL-2+ Files: debian/* Copyright: 2010-2013 Jari Aalto 2002-2005 Seyrat License: GPL-2+ License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-2". debian/control0000644000000000000000000000142512147462035010577 0ustar Source: corkscrew Section: net Priority: optional Maintainer: Jari Aalto Build-Depends: debhelper (>= 9), autotools-dev Standards-Version: 3.9.4 Homepage: http://freshmeat.net/projects/corkscrew Vcs-Browser: http://git.debian.org/?p=collab-maint/corkscrew.git Vcs-Git: git://git.debian.org/git/collab-maint/corkscrew.git Package: corkscrew Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: tunnel TCP connections through HTTP proxies corkscrew is a simple tool to tunnel TCP connections through an HTTP proxy supporting the CONNECT method. It reads stdin and writes to stdout during the connection, just like netcat. . It can be used for instance to connect to an SSH server running on a remote 443 port through a strict HTTPS proxy.