Compare commits

..

No commits in common. "rawhide" and "F-13-split" have entirely different histories.

9 changed files with 4167 additions and 324 deletions

0
.cvsignore Normal file
View file

1
.gitignore vendored
View file

@ -1 +0,0 @@
/ssh-connect-1.105.tar.gz

21
Makefile Normal file
View file

@ -0,0 +1,21 @@
# Makefile for source rpm: connect-proxy
# $Id$
NAME := connect-proxy
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 $$d/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)

2982
connect-1.100.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,11 +0,0 @@
--- a/connect.c 2024-05-17 09:06:35.176046528 +0200
+++ b/connect.c 2024-05-17 09:02:00.234749758 +0200
@@ -2822,7 +2822,7 @@
int connection;
struct sockaddr_in name;
struct sockaddr client;
- SOCKLEN_T socklen;
+ socklen_t socklen;
fd_set ifds;
int nfds;
int sockopt;

View file

@ -1,198 +0,0 @@
.TH "CONNECT-PROXY" "1"
.SH "NAME"
connect-proxy \(em connect over SOCKS4/5, HTTP or HTTPS proxy
.SH "SYNOPSIS"
.PP
\fBconnect-proxy\fR [\fB-dnhsxt45\fP] [\fB-R \fIresolve\fR \fP] [\fB-p \fIlocal-port\fR \fP] [\fB-w \fIsecs\fR \fP] [\fB-H \fI[user@]proxy-server[:port]]\fR \fP] [\fB-S \fI[user@]socks-server[:port]]\fR \fP] [\fB-a \fIsocks-auth-method\fR \fP] [\fB-T \fIproxy-server[:port]\fR \fP] [\fB-c \fItelnet-proxy-command\fR \fP] [\fB-X \fI[user@]proxy-server:[port]]\fR \fP] [host] [port]
.SH "DESCRIPTION"
.PP
\fBconnect-proxy\fR opens a connection to a remote host over SOCKS4/5, HTTP or HTTPS proxies.
.PP
Please, note that any HTTP-Proxy tunnel won't work with content-inspection firewall (unless using SSL).
.SH "OPTIONS"
.TP
\fB\-\-help
Show options.
.\"*********************************************************
.TP
\fB\-H [user@]proxy-server[:port] \fRor\fB \-\-http-proxy-server [user@]proxy-server[:port]
specifies a hostname and port number of the HTTP proxy server to relay.
If the port is omitted, 80 is used. You can specify this value in the environment variable
HTTP_PROXY and pass the \-h option to use it.
If the user is omitted, the current userid is used. You can specify this value in the environment variable
HTTP_PROXY_USER. Simple HTTP Basic-Auth is supported.
.TP
.\"*********************************************************
\fB\-S [user@]proxy-server[:port] \fRor\fB \-\-socks-proxy-server [user@]proxy-server[:port]
specifies the hostname and port number of the SOCKS server to relay.
Like \-H, the port number can be omitted and the default is 1080.
You can also specify this value pair in the environment
variable SOCKS_SERVER or SOCKS5_SERVER and give the \-s option to use it.
If the user is omitted, the current userid is used. You can specify this value in the environment variable
SOCKS_USER or SOCKS5_USER.
.\"*********************************************************
.TP
\fB\-T proxy-server[:port] \fRor\fB \-\-telnet-server proxy-server[:port]
(EXPERIMENTAL) specifies a hostname and port number of the Telnet proxy server to relay.
If the port is omitted, 22 is used. You can specify this value in the environment variable
TELNET_PROXY and pass the \-t option to use it.
.\"*********************************************************
.TP
\fB\-X [user@]proxy-server[:port] \fRor\fB \-\-https-proxy-server [user@]proxy-server[:port]
specifies a hostname and port number of the HTTPS proxy server to relay.
If the port is omitted, 443 is used. You can specify this value in the environment variable
HTTPS_PROXY and pass the \-x option to use it.
If the user is omitted, the current userid is used. You can specify this value in the environment variable
HTTPS_PROXY_USER. Simple HTTPS Basic-Auth as well as client-side certificate authentication is supported.
If a password is required for remote authentiation, either a simple terminal prompt or the $SSH_ASKPASS
program will be used to query the user for the password.
.\"*********************************************************
.TP
\fB\-\-https-proxy-ca CA-cert-file.pem
specifies a PEM-formatted file containing the Certificate Authorities (CA\'s) to trust when connecting
to an HTTPS proxy server.
.\"*********************************************************
.TP
\fB\-\-https-proxy-ca-path CA-dir-path
specifies a directory containing hashed PEM-formatted public certificate files of the Certificate
Authorities (CA\'s) to trust when connecting to an HTTPS proxy server.
.\"*********************************************************
.TP
\fB \-\-https-proxy-certname name
specifies the name of the HTTPS proxy server certificate (/CN=...) if this name is different from
the remote hostname of the HTTPS proxy server itself.
.\"*********************************************************
.TP
\fB--no-check-certificate
disable the verification of the HTTPS proxy server certificate and hostname.
.\"*********************************************************
.TP
\fB\-\-https-user-cert certfile.pem
specifies a PEM-formatted file containing the user (client-side) certificate. Use this, together
with the \'--http-user-key\' option to perform client-side certificate authentication when
connecting to an HTTPS proxy server.
.\"*********************************************************
.TP
\fB\-\-https-user-key keyfile.pem
specifies a PEM-formatted file containing the user (client-side) private key. Use this, together
with the \'--http-user-cert\' option to perform client-side certificate authentication when
connecting to an HTTPS proxy server.
If the private key is protected using a passphrase, either a simple terminal prompt or the $SSH_ASKPASS
program will be used to query the user for the passphrase.
.\"*********************************************************
.TP
\fB-4
specifies SOCKS relaying and indicates protocol version to use.
It is valid only when used with '\-s' or '\-S'.
Default is '\-5' (protocol version 5).
.\"*********************************************************
.TP
\fB-a socks5-auth-method
(EXPERIMENTAL) specifies the authentication method when connecting to a SOCKS5 server.
The keywords "none", "gssapi", "userpass" and "chap" are acceptable.
You can specify this value in the environment variable SOCKS5_AUTH.
.\"*********************************************************
.TP
\fB-c telnet-command
(EXPERIMENTAL) specifies the \'telnet\' command to use when connecting to a Telnet proxy server.
.\"*********************************************************
.TP
\fB-R
specifies the method to resolve the hostname when connecting to a SOCKS server.
Three keywords ("local", "remote", "both") or dot-notation IP address are acceptable.
The keyword "both" means, "Try local first, then remote".
If a dot-notation IP address is specified, use this host as nameserver. The default is "remote" for SOCKS5 or
"local" for SOCKS4.
On SOCKS4 protocol, remote resolving method ("remote" and "both") requires protocol 4a supported server.
You can specify this value in the environment variable SOCKS_RESOLVE or SOCKS5_RESOLVE.
.\"*********************************************************
.TP
\fB-p local-port
will forward a local TCP port instead of using the standard input and output.
.\"*********************************************************
.TP
\fB-P local-port
same to '\-p' except keep remote session. The program repeats waiting the port with holding
remote session without disconnecting. To connect the remote session, send EOF to stdin or
kill the program.
.\"*********************************************************
.TP
\fB-w secs
timeout in seconds for making connection with TARGET host.
.\"*********************************************************
.TP
\fB-d
used for debug. If you fail to connect, use this and check request to and response from server.
.SH "USAGE"
.PP
To use proxy, this example is for SOCKS5 connection to connect to
\host\' at port 25 via SOCKS5 server on \'firewall\' host.
\fBconnect-proxy \-S firewall host 25\fR
\fBSOCKS5_SERVER=firewall; export SOCKS5_SERVER;
connect-proxy \-s host 25\fR
.PP
For a HTTP-PROXY connection:
\fBconnect-proxy \-H proxy-server:8080 host 25\fR
\fBHTTP_PROXY=proxy-server:8080; export HTTP_PROXY;
connect-proxy \-h host 25\fR
.PP
To forward a local port, for example to use ssh:
\fBconnect-proxy \-H proxy-server:8080 host 22 \fR
\fBssh \-l user \-p 5550 localhost\fR
.PP
For an HTTPS PROXY connection:
\fBconnect-proxy \-X proxy-server:443 host 25\fR
\fBHTTPS_PROXY=proxy-server:443; export HTTPS_PROXY;
connect-proxy \-x host 25\fR
.PP
For an HTTPS PROXY connection with client-side certificate authentication:
\fBconnect-proxy \-X proxy-server:8443 --https-user-cert ~/.config/usercert.pem
--https-user-key ~/.config/userkey.pem host 25\fR
.PP
To use it along ssh transparently:
\fB # file://~/.ssh/config
Host *
ProxyCommand connect-proxy \-H proxy-server:8080 %h %p\fR
.SH "ENVIRONMENT"
.PP
LOGNAME, USER, SSH_ASKPASS,
.TP
SOCKS_PROXY, SOCKS_USER, SOCKS_RESOLVE,
.TP
SOCKS5_PROXY, SOCKS5_USER, SOCKS5_RESOLVE, SOCKS5_AUTH,
.TP
HTTP_PROXY, HTTP_PROXY_USER, HTTPS_PROXY, HTTPS_PROXY_USER,
.TP
HTTPS_PROXY_CERTNAME, HTTPS_PROXY_CA_FILE, HTTPS_PROXY_CA_PATH,
HTTPS_PROXY_USERCERT, HTTPS_PROXY_USERKEY
.SH "SEE ALSO"
.PP
ssh (1).
.SH "WWW"
.PP
https://github.com/jjkeijser/connect-proxy
.PP
http://www.taiyo.co.jp/~gotoh/ssh/connect.html
.SH "COPYRIGHT"
.PP
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU General Public License, Version 2 any
later version published by the Free Software Foundation.
.SH "AUTHOR"
.PP
This manual page was adapted by Jan Just Keijser jan.just.keijser@gmail.com
from the \fBDebian\fP manual page, written by Philippe COVAL Philippe.COVAL@laposte.net.
.PP
HTTPS support and the \'long\' format options were added by Jan Just Keijser
jan.just.keijser@gmail.com.

View file

@ -1,22 +1,20 @@
Name: connect-proxy
Version: 1.105
Release: 5%{?dist}
Version: 1.100
Release: 4%{?dist}
Summary: SSH Proxy command helper
# Automatically converted from old format: GPLv2+ - review is highly recommended.
License: GPL-2.0-or-later
Group: Applications/System
License: GPLv2+
URL: http://www.taiyo.co.jp/~gotoh/ssh/connect.html
Source0: ssh-connect-%{version}.tar.gz
Source0: connect-%{version}.c
# Real source listed below, it was renamed for sanity's sake
#Source0: https://github.com/gotoh/ssh-connect/archive/refs/tags/1.105-tar.gz
Source1: connect-proxy.1
Patch0: connect-proxy-1.105-socklen.patch
#Source0: http://www.taiyo.co.jp/~gotoh/ssh/connect.c
Source1: http://www.taiyo.co.jp/~gotoh/ssh/connect.html
Patch0: connect-proxy-make-man.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: openssh
BuildRequires: gcc
BuildRequires: make
BuildRequires: add-determinism
%description
connect-proxy is the simple relaying command to make network connection via
SOCKS and https proxy. It is mainly intended to be used as proxy command
@ -32,121 +30,32 @@ Features of connect-proxy are:
* You can also relay local socket stream instead of standard I/O.
%prep
%setup -q -n ssh-connect-%{version}
%patch -P 0 -p1
#setup -q -T -c -n %{name}-%{version}
%setup -q -T -c
cp %{SOURCE0} connect.c
cp %{SOURCE1} .
%patch0 -p1
%build
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
cp connect $RPM_BUILD_ROOT/%{_bindir}/connect-proxy
mkdir -p $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1/
cp -p %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%doc doc/manual.html
%defattr(-,root,root,-)
%doc connect.html
%{_mandir}/man1/*
%{_bindir}/%{name}
%changelog
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.105-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.105-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jul 25 2024 Miroslav Suchý <msuchy@redhat.com> - 1.105-3
- convert license to SPDX
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.105-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri May 17 2024 Timotheus Pokorra <timotheus.pokorra@solidcharity.com> - 1.105-1
- Update to upstream 1.105
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Dec 6 2022 Florian Weimer <fweimer@redhat.com> - 1.100-27
- Port to C99 (#2151093)
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.100-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.100-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.100-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.100-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.100-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.100-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.100-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.100-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.100-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.100-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

1142
connect.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -1 +0,0 @@
SHA512 (ssh-connect-1.105.tar.gz) = f49001043a8ffbda3823d0ea3640cc85536ce3d23302fd4d704d8a520f99271a2ed66fda11a5402382edc1dcf874988339ebcaf1d6335249a8dd2a8b4ae965a3