diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..898764f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +corkscrew-2.0.tar.gz diff --git a/Makefile b/Makefile deleted file mode 100644 index f9a56a0..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: corkscrew -# $Id$ -NAME := corkscrew -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/corkscrew-2.0-configure-c99.patch b/corkscrew-2.0-configure-c99.patch new file mode 100644 index 0000000..ea46eba --- /dev/null +++ b/corkscrew-2.0-configure-c99.patch @@ -0,0 +1,33 @@ +diff --git a/configure b/configure +index 6903f54..af12a92 100755 +--- a/configure ++++ b/configure +@@ -906,7 +906,7 @@ cat > conftest.$ac_ext << EOF + #line 907 "configure" + #include "confdefs.h" + +-main(){return(0);} ++int main(){return(0);} + EOF + if { (eval echo configure:912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes +@@ -1450,7 +1450,7 @@ cat > conftest.$ac_ext << EOF + #line 1451 "configure" + #include "confdefs.h" + +-main(){return(0);} ++int main(){return(0);} + EOF + if { (eval echo configure:1456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes +@@ -1999,8 +1999,8 @@ else + #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) + #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) + int main () { int i; for (i = 0; i < 256; i++) +-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +-exit (0); } ++if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; ++return 0; } + + EOF + if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null diff --git a/corkscrew-2.0-from-debian.patch b/corkscrew-2.0-from-debian.patch new file mode 100644 index 0000000..fa13434 --- /dev/null +++ b/corkscrew-2.0-from-debian.patch @@ -0,0 +1,44 @@ +diff -urNp corkscrew-2.0.orig/corkscrew.c corkscrew-2.0/corkscrew.c +--- corkscrew-2.0.orig/corkscrew.c 2007-05-19 09:56:05.000000000 +0530 ++++ corkscrew-2.0/corkscrew.c 2007-05-19 10:07:00.000000000 +0530 +@@ -176,6 +176,7 @@ char *argv[]; + #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; +@@ -262,6 +263,11 @@ char *argv[]; + fprintf(stderr, "Proxy could not open connnection 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)) { +diff -urNp corkscrew-2.0.orig/README corkscrew-2.0/README +--- corkscrew-2.0.orig/README 2007-05-19 09:56:05.000000000 +0530 ++++ corkscrew-2.0/README 2007-05-19 09:56:48.000000000 +0530 +@@ -47,7 +47,7 @@ Setting up Corkscrew with SSH/OpenSSH is + 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 diff --git a/corkscrew-2.0-typo.patch b/corkscrew-2.0-typo.patch new file mode 100644 index 0000000..01e9de7 --- /dev/null +++ b/corkscrew-2.0-typo.patch @@ -0,0 +1,12 @@ +diff -urNp corkscrew-2.0.orig/README corkscrew-2.0/README +--- corkscrew-2.0.orig/README 2007-05-19 10:56:12.000000000 +0530 ++++ corkscrew-2.0/README 2007-05-19 10:56:45.000000000 +0530 +@@ -83,7 +83,7 @@ if you could include the following infor + + *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 ++ to the round-robin setup that I was testing it against. Your mileage may + vary. + + diff --git a/corkscrew.1 b/corkscrew.1 new file mode 100644 index 0000000..1c19c63 --- /dev/null +++ b/corkscrew.1 @@ -0,0 +1,97 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH CORKSCREW 1 "November 22, 2003" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +corkscrew \- Tunnel TCP connections through HTTP proxies +.SH SYNOPSIS +.B corkscrew +.BR +proxy +.BR +proxyport +.BR +targethost +.BR +targetport +.BR +[ authfile ] +.br +.SH DESCRIPTION +This manual page documents briefly the +.BR corkscrew +command. +This manual page was written for the Debian distribution +because the original program does not have a manual page. + +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. + + +.SH PARAMETERS + +.TP +.B proxy +This is the name of the host running the HTTP proxy. +.TP +.B proxyport +This is the port on which to connect on the proxy. +.TP +.B target +This is the host to reach through the proxy. +.TP +.B targetport +This is the port to connect to on the target host. + +.SH COMMON USAGE + +The common usage of corkscrew is to put the following line in your +ssh_config: + +ProxyCommand corkscrew proxy proxyport %h %p + +This will let your ssh connection go through the proxy with the help +of corkscrew. + +.SH AUTH FILE + +The auth file is made of one single line containing your username and +password in the form: + +username:password + +You should add the path to your auth file in the proxy command +described above: + +ProxyCommand corkscrew proxy proxyport %h %p auth-file + +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fIssh_config\fR\|(5) + +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +.SH AUTHOR +corkscrew was written by Pat Padgett . +Thomas Seyrat is the debian maintainer for this +package. This manual page was written by Laurent Fousse +, for the Debian GNU/Linux system (but may be used +by others). diff --git a/corkscrew.spec b/corkscrew.spec new file mode 100644 index 0000000..5bb8ee1 --- /dev/null +++ b/corkscrew.spec @@ -0,0 +1,180 @@ +Summary: Tool for tunneling SSH through HTTP proxies +Name: corkscrew +Version: 2.0 +Release: 40%{?dist} +# Automatically converted from old format: GPLv2 - review is highly recommended. +License: GPL-2.0-only +URL: http://freshmeat.sourceforge.net/projects/corkscrew +Source0: http://www.agroman.net/corkscrew/%{name}-%{version}.tar.gz +Source1: %{name}.1 + +Patch0: %{name}-%{version}-from-debian.patch +Patch1: %{name}-%{version}-typo.patch +Patch2: %{name}-%{version}-configure-c99.patch + +BuildRequires: gcc +BuildRequires: make + + +%description +Corkscrew is a tool for tunneling SSH through HTTP proxies. + +It has been tested with the following HTTP proxies : + * Gauntlet + * CacheFlow + * JunkBuster + * Apache mod_proxy + +%prep +%setup -q +%patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 + +%build +%configure +%make_build + +%install +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 +%make_install + +# man page +install -p -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1 + +%files +%doc AUTHORS +%doc ChangeLog +%doc COPYING +%doc README +%doc TODO +%{_bindir}/%{name} +%{_mandir}/man1/%{name}.1.gz + +%changelog +* Wed Jul 23 2025 Fedora Release Engineering - 2.0-40 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Thu Jan 16 2025 Fedora Release Engineering - 2.0-39 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Mon Jul 29 2024 Miroslav Suchý - 2.0-38 +- convert license to SPDX + +* Wed Jul 17 2024 Fedora Release Engineering - 2.0-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jan 24 2024 Fedora Release Engineering - 2.0-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 2.0-35 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 19 2023 Fedora Release Engineering - 2.0-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 2.0-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Dec 19 2022 Peter Fordham - 2.0-32 +- Port configure script to C99 + +* Wed Jul 20 2022 Fedora Release Engineering - 2.0-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jan 19 2022 Fedora Release Engineering - 2.0-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 2.0-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 2.0-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jan 28 2020 Fedora Release Engineering - 2.0-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jul 24 2019 Fedora Release Engineering - 2.0-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 2.0-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Jul 12 2018 Fedora Release Engineering - 2.0-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 2.0-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 2.0-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 2.0-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 2.0-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 03 2016 Fedora Release Engineering - 2.0-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 2.0-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Aug 16 2014 Fedora Release Engineering - 2.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 2.0-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 2.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Feb 13 2013 Fedora Release Engineering - 2.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 2.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jan 12 2012 Fedora Release Engineering - 2.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 2.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jul 24 2009 Fedora Release Engineering - 2.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 2.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat Feb 09 2008 Debarshi Ray - 2.0-8 +- Rebuilding with gcc-4.3 in Rawhide. + +* Fri Nov 16 2007 Debarshi Ray - 2.0-7 +- Fixed the value of Release according to Fedora dist tag guidelines. +- Preserved timestamps using 'install -p'. + +* Fri Aug 03 2007 Debarshi Ray - 2.0-6 +- Moved the online manual page from Patch0 to Source1. + +* Fri Aug 03 2007 Debarshi Ray - 2.0-5 +- Changed value of License according to Fedora licensing guidelines. + +* Sun Jun 10 2007 Debarshi Ray - 2.0-4 +- Removed 'export CC=gcc' from the build stanza. + +* Wed Jun 06 2007 Debarshi Ray - 2.0-3 +- Removed '[ -d $RPM_BUILD_ROOT ]' from the install stanza. +- Changed value of BuildRoot as per recommendations in Fedora packaging + guidelines. + +* Sat May 19 2007 Debarshi Ray - 2.0-2 +- Addressed warnings generated by rpmlint, and changed Source0 into a URL. +- Added AUTHORS, ChangeLog, COPYING and TODO in the list of documentation + files. +- Added online manual page and patches to README and corkscrew.c from Debian. +- Fixed a typo in README. + +* Sat May 12 2007 Debarshi Ray - 2.0-1 +- Initial build. diff --git a/sources b/sources index e69de29..4a07a07 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +35df77e7f0e59c0ec4f80313be52c10a corkscrew-2.0.tar.gz