debian/ 0000755 0000000 0000000 00000000000 11733022302 007157 5 ustar debian/docs 0000644 0000000 0000000 00000000046 11733022302 010032 0 ustar doc/manual-en.html
doc/config-en.html
debian/pod2man.mk 0000644 0000000 0000000 00000003346 11733022302 011056 0 ustar # pod2man.mk -- Makefile portion to convert *.pod files to manual pages
#
# Copyright information
#
# 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
#
# 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 called
PACKAGE ?= package
# Optional variables to set
MANSECT ?= 1
PODCENTER ?= User Commands
PODDATE = $$(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= LANG=C $(POD2MAN) $(POD2MAN_FLAGS) \
--center="$(PODCENTER)" \
--date="$(PODDATE)" \
--name="$(PACKAGE)" \
--section="$(MANSECT)" \
$(MANPOD) \
| sed 's,[Pp]erl v[0-9.]\+,$(PACKAGE),' \
> $(MANPAGE) && \
rm -f pod*.tmp
# End of of Makefile part
debian/clean 0000644 0000000 0000000 00000000304 11733022302 010161 0 ustar debian/*.1
Makefile
src/Makefile
config.h
src/desproxy
src/desproxy-dns
src/desproxy-inetd
src/socket2socket
src/desproxy-socksserver
config.log
config.status
config.guess
config.sub
.pc/.version
debian/source/ 0000755 0000000 0000000 00000000000 11733022302 010457 5 ustar debian/source/format 0000644 0000000 0000000 00000000014 11733022302 011665 0 ustar 3.0 (quilt)
debian/desproxy-dns.1.pod 0000644 0000000 0000000 00000002567 11733022302 012473 0 ustar # 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
desproxy-dns - DNS for dynamic connections
=head1 SYNOPSIS
desproxy-dns dns_server proxy_host proxy_port
=head1 OPTIONS
None
=head1 DESCRIPTION
If you have direct DNS access then you don't need to do anything else.
You know you have direct DNS access if you can resolve host names to
IP addresses.
NOTE: as desproxy-dns listens in port 53 (which is less than 1024) you
may need administrator privileges to exec desproxy-dns (in fact if you
are running UN*X, you actually have to run desproxy-dns as root).
OK, so you have a dns server accessible now. But your computer doesn't
know anything about that. You must configure your network accordingly
(again, need to be root in UN*X).
Edit /etc/resolv.conf and add the line "nameserver 127.0.0.1". You
don't have to restart anything. Just test ping and see if it works.
=head1 ENVIRONMENT
None.
=head1 FILES
None.
=head1 SEE ALSO
dnsproxy(1), ping(1)
=head1 AUTHORS
This manual page was written by Jari Aalto , for
the Debian GNU system (but may be used by others). Released under
license GPL v2 or any later version.
=cut
debian/desproxy.1.pod 0000644 0000000 0000000 00000023707 11733022302 011710 0 ustar # 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
desproxy - a TCP tunnel for HTTP proxies
=head1 SYNOPSIS
desproxy remote_host remote_port proxy_host proxy_port local_port
=head1 OPTIONS
None.
=head1 DESCRIPTION
HTTP proxies are network servers that are used to give HTTP (web)
access to computers that are not connected to the Internet. This is a
typical scenario in corporate networks and recently in home networks
too. HTTP proxies connect to the Internet either directly or via a
parent proxy (which in fact connects to the Internet directly or via
another parent proxy, and so on...)
HTTP clients (web browsers) use HTTP proxies to request web pages; the
HTTP server just forwards those request to the destination server. All
the negotiation is done via the HTTP protocol, which is designed just
to carry HTTP requests and no generic (TCP/IP) traffic. That is why you
can't (normally) use Internet applications beside your web server if
you are behind a HTTP proxy.
That is what desproxy is good for. Desproxy is a TCP tunnel, which
means desproxy can forward TCP/IP traffic via a HTTP proxy. Desproxy
uses a HTTP/1.1 method (CONNECT) to establish TCP/IP connections on
demand. CONNECT is used for SSL connections when accessing to secure
sites, so if you can access sites that support SSL (www.hotmail.com for
example) you can use desproxy.
Not all IP (Internet) traffic is just TCP/IP. In fact there are two
more protocols widely used in the Internet not supported by desproxy:
UDP and ICMP:
=over 4
=item *
ICMP is used to manage large IP networks. The only application using
ICMP you may miss is ping.
=item *
UDP is an unreliable connection-less fast transport protocol,
mostly used in network games and other applications that need low
latency network traffic. Notably DNS uses UDP packets for fast
delivery.
=back
=head2 Will desproxy work with my HTTP proxy?
Short answer: just give it a try
Long answer: desproxy should work with every HTTP proxy, with the
following exceptions:
=over 4
=item *
MS Proxies with NTLM authentication. NTLM is a proprietary
authentication method from Microsoft, not a standard authentication
method. Maybe in the future desproxy will support NTLM
authentication, but currently it doesn't.
=item *
HTTP/1.0 Proxies. Desproxy needs the CONNECT method, which is only
available from HTTP/1.1 protocol version. It's very unlikely your
proxy doesn't accept HTTP/1.1 requests.
=item *
HTTP/1.1 Proxies without the CONNECT method. Maybe your network
administrator deactivated CONNECT support in the proxy, or maybe
CONNECT is restricted to the HTTPS port (443).
=back
=head2 Assumptions
Let's assume the following:
=over 4
=item *
your HTTP proxy host name is "proxy" and its address is "192.0.0.1"
=item *
your HTTP proxy port is "8080"
=item *
your HTTP proxy doesn't need authentication. It case you need HTTP
authentication, please read [2]this.
=item *
your system console will be a terminal (xterm, the console or a
virtual terminal) if you are running Linux, *BSD or other UN*X
=back
=head2 About connections
Imagine you need a network application that uses only one TCP/IP
connection with just one server. That's the case of IRC in which you
connect to an IRC server or ssh where you tipically connect just to one
UNIX computer at a time. That's what I called a "static connection".
Of course that's not the case of a web browser or a file sharing
program, both of them doing several connections at a time to different
computers. That's what I call "dynamic connections".
=head1 STATIC CONNECTIONS EXAMPLES
=head2 item How to use desproxy to connect to IRC
Suppose you want to connect to IRC using irc.undernet.org port 6667 as
your IRC server. First you have to start a system console (see
Assumptions above for details) and type
desproxy irc.undernet.org 6667 proxy 8080 1080
That should start desproxy, giving you the copyright notice along with
some information. The following is a screen capture from desproxy
0.0.23
-----------------------------------
desproxy 0.0.23
(c) Miguelanxo Otero Salgueiro 2001
This release brought to you patched
by Rutger Nijlunsig.
See RutgerWork.txt in documentation
for details about new features.
Great work guy!
-----------------------------------
TCP port 1080 Binded & Listening
Press ENTER to Quit
Desproxy reports it is listening in local port 1080 ready for a
connection.
Open your favourite IRC client (install it first ;D) and connect to
127.0.0.1 port 1080 as your irc server (127.0.0.1 is a virtual IP,
always referencing to your local machine). Then, your IRC client should
connect to desproxy. It looks like
Connection request from 127.0.0.1, port 1220
Connecting to http proxy (proxy:8080)
Bidirectional connection established
Then you should be able to use your IRC client as if you were directly
connected to irc.undernet.org.
=head2 How to use desproxy to log in a computer using ssh
Suppose you have a shell account in a computer that supports secure
connections via ssh. Let's assume it's called shell.corporate.com. SSH
uses port number 22 by default. So start a new system console and type:
desproxy shell.corporate.com 22 proxy 8080 1080
Then, tell your ssh client to connect to localhost (127.0.0.1) port
1080 and you should get a ssh password prompt!
=head2 How to use desproxy to use other static clients
Let's assume you want to use network application X, which doesn't
support HTTP proxies but use one TCP/IP connection (like IRC and SSH).
To make X work with desproxy, you just have to 1) Search for the
default port of that application 2) Search for the default server of
that application and 3) Start desproxy, passing that info as command
line parameters. Format is
desproxy remote_host remote_port proxy_host proxy_port local_port
Just give a local_port of your desire, but always over 1023, cause
lower ports may need administrator privileges.
=head2 About HTTP Authentication
Some HTTP proxies need for security reasons a method of checking
client's identity. That's called HTTP authentication (or HTTP
authorization).
Despoxy now supports Basic HTTP authentication. If your proxy needs
other kind of authentication (either Digest or NTLM) desproxy won't
work.
For desproxy to work with a HTTP proxy that needs authentication, you
have to tell desproxy which username and password to use. Desproxy
reads the environment variable PROXY_USER to get that info.
Suppose your proxy username is "mayka" and your proxy password is
"007sgotLTK". Then, before using any of the desproxy programs you
should type this in your system console:
set PROXY_USER=mayka:007sgotLTK
Beware passwords can include some characters that should be escaped
from the system console. For example, if your password is "moon!=sun",
and you are running Linux, you should type
export PROXY_USER=yourusername:moon\!\=sun
Note characters "!" and "=" are escaped using the backslash "\". If you
are running MS Windows, as long as I know, you don't have to escape any
valid password character.
head1 Troubleshooting
A normal desproxy session looks like this:
$ desproxy 127.0.0.1 21 127.0.0.1 4480 2222
-----------------------------------
desproxy
HTTP/1.1
(c) Miguelanxo Otero Salgueiro 2001
-----------------------------------
Listening on port 2222
Connection request from 127.0.0.1, port 1227
Connecting to http proxy (127.0.0.1:4480)
Bidirectional connection stablished
(127.0.0.1:21) <-> (localhost)
End of connection.
Here, a connection to local ftp server (127.0.0.1:21) is made by using local
proxy (127.0.0.1:4480). You can see how, after the connection is
accepted, desproxy connected to the proxy, interchanged some bytes (a
FTP session) and terminates the connection.
Desproxy is quite self explanatory about errors. Desproxy-inetd is far
more obscure, because the way inetd uses it (can't print error
messages) to the console.
Basically there are two kind of errors:
=over 4
=item *
Errors reported when connecting to the proxy: the http page showing
the error is displayed.
=item *
Every other error: a short error message is displayed.
=back
Some common HTTP errors (as reported by the proxy)
* HTTP 400 Bad Request - Some versions of desproxy (0.0.21) cause
this error (FATAL)
* HTTP 403 Forbidden - Forbidden to do that (FATAL)
* HTTP 404 Not Found - Page not found, or resource not found (MINOR)
* HTTP 405 Method not Allowed - Can't do CONNECT method (FATAL)
* HTTP 500 Internal Server Error - Maybe you're trying to connect to
a remote closed port (remote site reported connection refused)
(MINOR)
* HTTP 503 Service Unavailable -> The proxy can't reach the site
(MINOR)
* HTTP 505 HTTP Version Not Supported - CONNECT method not available
(FATAL)
* HTTP 502 Bad Gateway - Stands for "DNS lookup error" (MINOR)
(FATAL) - Forget about using desproxy, you can't surpass the proxy.
(TODO) - To do, not yet implemented.
(MINOR) - Temporary fault or maybe your fault.
=head1 ENVIRONMENT
=over 4
=item PROXY_USER
An example:
PROXY_USER=mayka:007sgotLTK
Beware passwords can include some characters that should be escaped
from the system console. For example, if your password is "moon!=sun",
and you are running Linux, you should type
=item PROXY_USER
An example:
PROXY_USER=yourusername:moon\!\=sun
Note characters "!" and "=" are escaped using the backslash "\".
=back
=head1 FILES
None.
=head1 SEE ALSO
dnsproxy-dns(1), dnsproxy-inetd(1), dnsproxy-socksserver(1), connect(1)
=head1 AUTHORS
This manual page was written by Jari Aalto , for
the Debian GNU system (but may be used by others). Released under
license GPL v2 or, at your option, any later version.
=cut
debian/upstream 0000644 0000000 0000000 00000000010 11733022302 010731 0 ustar Changes
debian/desproxy-socksserver.1.pod 0000644 0000000 0000000 00000002461 11733022302 014251 0 ustar # 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
desproxy-socksserver - Using desproxy with dynamic connections
=head1 SYNOPSIS
desproxy-socksserver proxy_host proxy_port local_port
=head1 OPTIONS
None.
=head1 DESCRIPTION
You can see that for every application that needs to be un-proxyzed
you have to start a desproxy program. That is OK if you are using irc,
ssh or other application that always connects to the same server. But
if you need to dynamically establish TCP connections it's impossible
to follow that path.
That's why desproxy-socksserver, which is just a desproxy
implementation of a Socks 5 Server. A Socks 5 Server is like a "TCP
proxy": you just request a TCP connection and the Socks 5 Server does
the work for you. Of course, client applications need to have support
for Socks 5 Server.
=head1 ENVIRONMENT
None.
=head1 FILES
None.
=head1 SEE ALSO
dnsproxy(1)
=head1 AUTHORS
This manual page was written by Jari Aalto , for
the Debian GNU system (but may be used by others). Released under
license GPL v2 or any later version.
=cut
debian/changelog 0000644 0000000 0000000 00000006370 11733022302 011037 0 ustar desproxy (0.1.0~pre3-8) 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/rules
- Enable all hardening flags.
- Use DEB_*_MAINT_* variables (Closes: #665213). Patch thanks to
Simon Ruderich .
* debian/*.mk
- Delete no longer used debian-*.mk files.
-- Jari Aalto Fri, 23 Mar 2012 01:40:09 -0400
desproxy (0.1.0~pre3-7) 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 17:21:43 -0500
desproxy (0.1.0~pre3-6) unstable; urgency=low
* debian/*.mk
- Update makefile snippets.
* debian/control
- (Description): Improve wording (Closes: #602924).
* debian/debian-autotools.mk
- Remove. No longer needed.
* debian/rules
- Update all targets to dh(1).
-- Jari Aalto Sat, 13 Nov 2010 11:10:15 +0200
desproxy (0.1.0~pre3-5) unstable; urgency=low
* debian/compat
- Update to 8.
* debian/control
- (Build-Depends): update to debhelper 8.
- (Standards-Version): 3.9.1.
* debian/patches
- (20+30): New. Change 'buffer' to unsigned which fixes
desproxy-socksserver(1). Patch thanks to Daniel Burr
(Closes: #592202).
-- Jari Aalto Mon, 11 Oct 2010 13:09:20 +0300
desproxy (0.1.0~pre3-3) unstable; urgency=low
* Move to format: 3.0 (quilt).
* debian/{clean,desproxy.manpages,upstream}
- New files moved from debian/rules for dh(1).
* debian/control
- (Build-Depends): Remove dpatch.
- (Standards-Version): Update to 3.8.3.
* debian/copyright
- Minor layout update. Use FSF URL.
* debian/debian-compile.mk
- New file.
* debian/desproxy.doc-base
- New file.
* debian/patches
- (10): Convert from dpatch to quilt.
- (20): Add compile fix patch.
* debian/rules
- (top-level): Remove dpatch.
-- Jari Aalto Thu, 14 Jan 2010 18:30:01 +0200
desproxy (0.1.0~pre3-2) unstable; urgency=low
* debian/*.1
- Remove generated files.
* debian/compat
- Update to 7.
* debian/control
- (Build-Depends): Update debhelper to 7.
- (Homepage): Move upward.
- (Standards-Version): update to 3.8.2.
* debian/copyright
- Minor layout adjustments. Use ISO dates.
- Spell out GPL-2 (lintian).
* debian/rules
- Rewrite config.sub and config.guess handling so, that
the updated version are copied from Debian during compile, but
restored during making the *.deb. This keeps config.* changes
out of *.diff.gz
- (install): use dh_prep (lintian).
* debian/debian-vars.mk
- Updated. Added config.* and MAKE_FLAGS etc.
-- Jari Aalto Fri, 07 Aug 2009 08:21:54 +0000
desproxy (0.1.0~pre3-1) unstable; urgency=low
* Initial release (Closes: #321758)
-- Jari Aalto Fri, 31 Oct 2008 19:06:12 +0000
debian/copyright 0000644 0000000 0000000 00000002630 11733022302 011113 0 ustar Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=174
X-Format: http://dep.debian.net/deps/dep5
Upstream-Name: desproxy
Upstream-Contact: Miguelanxo Otero Salgueiro , Felipe Augusto van de Wiel
Source: http://sourceforge.net/projects/desproxy
X-Upstream-Vcs:
X-Upstream-Bugs: https://sourceforge.net/tracker/?group_id=30464&atid=399232
Files: *
Copyright:
Copyright (C) 2001-2004 Miguelanxo Otero Salgueiro
License: GPL-2+
Files: debian/*
Copyright:
2008-2012 Jari Aalto
2008 Felipe Augusto van de Wiel
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/compat 0000644 0000000 0000000 00000000002 11733022302 010355 0 ustar 9
debian/control 0000644 0000000 0000000 00000002436 11733022302 010567 0 ustar Source: desproxy
Section: net
Priority: optional
Maintainer: Jari Aalto
Build-Depends: debhelper (>= 9), autotools-dev
Standards-Version: 3.9.3.1
Uploaders: Felipe Augusto van de Wiel
Vcs-Git: http://git.debian.org/git/collab-maint/desproxy.git
Vcs-Browser: http://git.debian.org/?p=collab-maint/desproxy.git;a=summary
Homepage: http://sourceforge.net/projects/desproxy
Package: desproxy
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: tunnel TCP traffic through a HTTP proxy
Browsers (in general HTTP clients) use HTTP proxies to request web pages. The
proxy forwards those request to the destination server. All
the negotiation is done via the HTTP protocol, which is designed just
to carry HTTP requests and no generic (TCP/IP) traffic. That is why you
can't (normally) use Internet applications beside your browser if
you are behind a HTTP proxy.
.
That is what desproxy is good for. Desproxy is a TCP tunnel, which
means desproxy can forward TCP/IP traffic via a HTTP proxy. Desproxy
uses a HTTP/1.1 method (CONNECT) to establish TCP/IP connections on
demand. CONNECT is used for SSL connections when accessing to secure
sites. So if you can access sites that support SSL (www.hotmail.com for
example) you can use desproxy.
debian/desproxy.doc-base 0000644 0000000 0000000 00000000417 11733022302 012435 0 ustar Document: desproxy
Title: tunnel TCP traffic through a HTTP proxy
Author: Miguelanxo Otero Salgueiro
Abstract: Desproxy documentation
Section: Network/Communication
Format: HTML
Index: /usr/share/doc/desproxy/manual-en.html
Files: /usr/share/doc/desproxy/config-en.html
debian/desproxy.manpages 0000644 0000000 0000000 00000000013 11733022302 012543 0 ustar debian/*.1
debian/rules 0000755 0000000 0000000 00000001440 11733022302 010236 0 ustar #!/usr/bin/make -f
PACKAGE = desproxy
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) makeman
$(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE)-dns makeman
$(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE)-inetd makeman
$(MAKE) -C debian -f pod2man.mk PACKAGE=socket2socket makeman
$(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE)-socksserver \
makeman
override_dh_auto_build:
$(MAKE) CC="$(CC) $(CPPFLAGS)" CFLAGS="$(CFLAGS) $(LDFLAGS)"
override_dh_auto_install: man
dh_auto_install
# Remove unused directory created by 'make install'
rmdir $(CURDIR)/debian/$(PACKAGE)/usr/share/locale
%:
dh $@
.PHONY: man
# End of file
debian/watch 0000644 0000000 0000000 00000000125 11733022302 010206 0 ustar version=3
opts=dversionmangle=s/\~/\-/ http://sf.net/desproxy/desproxy-(.+)\.tar\.gz
debian/desproxy-inetd.1.pod 0000644 0000000 0000000 00000001444 11733022302 013003 0 ustar # 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
desproxy-inetd - Desproxy for inetd
=head1 SYNOPSIS
desproxy-inetd remote_host remote_port proxy_host proxy_porta
=head1 OPTIONS
None.
=head1 DESCRIPTION
Desproxy-inetd is same as desproxy(1), but meant to be used from inetd.conf(5).
=head1 ENVIRONMENT
None.
=head1 FILES
None.
=head1 SEE ALSO
dnsproxy(1)
=head1 AUTHORS
This manual page was written by Jari Aalto , for
the Debian GNU system (but may be used by others). Released under
license GPL v2 or any later version.
=cut
debian/socket2socket.1.pod 0000644 0000000 0000000 00000001417 11733022302 012610 0 ustar # 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
socket2socket - useful tiny application to connect two sockets
=head1 SYNOPSIS
socket2socket remote_host remote_port local_port [logfile]
=head1 OPTIONS
None.
=head1 DESCRIPTION
See desproxy(1) for documentation.
=head1 ENVIRONMENT
None.
=head1 FILES
None.
=head1 SEE ALSO
desproxy(1)
=head1 AUTHORS
This manual page was written by Jari Aalto , for
the Debian GNU system (but may be used by others). Released under
license GPL v2 or any later version.
=cut
debian/dirs 0000644 0000000 0000000 00000000010 11733022302 010032 0 ustar usr/bin
debian/patches/ 0000755 0000000 0000000 00000000000 11733022302 010606 5 ustar debian/patches/10-Makefile.in-destdir.patch 0000644 0000000 0000000 00000001222 11733022302 015620 0 ustar From a275c735e5f9e0d0f947b58dbe9aac21f6e720f9 Mon Sep 17 00:00:00 2001
From: Jari Aalto
Date: Wed, 16 Dec 2009 19:44:14 +0200
Subject: [PATCH] Makefile.in: Add DESTDIR
Signed-off-by: Jari Aalto
---
Makefile.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index c73b157..0f9114b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -9,8 +9,8 @@
SHELL = /bin/sh
prefix = @prefix@
datadir = @datadir@
-localedir = $(datadir)/locale
-bindir = @prefix@/bin
+localedir = $(DESTDIR)$(datadir)/locale
+bindir = $(DESTDIR)@prefix@/bin
all:
@cd src \
--
1.6.5
debian/patches/20-compile-fixes.patch 0000644 0000000 0000000 00000002637 11733022302 014622 0 ustar From 9bbfbdd01b64f75393928d62159682fb83a756b9 Mon Sep 17 00:00:00 2001
From: Jari Aalto
Date: Wed, 16 Dec 2009 22:02:02 +0200
Subject: [PATCH] Fix incorrect types
Signed-off-by: Jari Aalto
---
src/desproxy.h | 9 ++++++---
src/socket2socket.c | 3 ++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/desproxy.h b/src/desproxy.h
index d3768df..290cd1b 100644
--- a/src/desproxy.h
+++ b/src/desproxy.h
@@ -81,8 +81,11 @@ char *dns_server;
char *local_port;
char username[256], password[256];
-unsigned char string[256], console_line[256], HTTP_return_code[4];
-unsigned char buffer[BUFFER_SIZE], client_socket_is_free[MAX_CONNECTIONS];
+char console_line[256];
+char HTTP_return_code[4];
+char string[256];
+char buffer[BUFFER_SIZE];
+unsigned char client_socket_is_free[MAX_CONNECTIONS];
fd_set mask, rmask;
@@ -95,7 +98,7 @@ struct sockaddr_in remote;
struct termios old_tty;
-int client_length;
+unsigned int client_length;
int server_length;
int proxy_length;
int remote_length;
diff --git a/src/socket2socket.c b/src/socket2socket.c
index 7944a0a..12eb433 100644
--- a/src/socket2socket.c
+++ b/src/socket2socket.c
@@ -37,7 +37,8 @@ int
main (int argc, char **argv)
{
- int request_socket, addrlen;
+ socklen_t addrlen;
+ int request_socket;
int index, count;
struct sockaddr_in server;
struct sockaddr_in remote;
--
1.6.5
debian/patches/20-compile-fixes+30-datatype.patch 0000644 0000000 0000000 00000005233 11733022302 016644 0 ustar From 508098dafb5aed7f6a5f700856b35f9104985d1f Mon Sep 17 00:00:00 2001
From: Jari Aalto
Date: Mon, 11 Oct 2010 12:59:26 +0300
Subject: [PATCH] Chnage 'buffer' from char to unsigned char. By Daniel Burr in Debian bug #592202
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Jari Aalto
---
src/desproxy-dns.c | 10 +++++-----
src/desproxy-socksserver.c | 2 +-
src/desproxy.h | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/desproxy-dns.c b/src/desproxy-dns.c
index 5234fbb..685b610 100644
--- a/src/desproxy-dns.c
+++ b/src/desproxy-dns.c
@@ -57,6 +57,7 @@ answer_request (int connection, int size)
int count;
int htons_size;
char buffer[MAXREQUESTLEN + 2];
+ unsigned short int* ptr;
debug_printf (">answer_request(%d,%d)\n", connection, size);
if (connection == UDP_CONNECTION)
@@ -98,7 +99,8 @@ answer_request (int connection, int size)
perror ("read");
return (-3);
}
- size = ntohs (*((unsigned short int *) buffer));
+ ptr = (unsigned short int*)buffer;
+ size = ntohs (*ptr);
debug_printf ("size=%d\n", size);
if ((count = read (proxy_socket[connection], &buffer[2], size)) == -1)
{
@@ -258,10 +260,8 @@ main (int argc, char **argv)
requests[connection].bib + count;
if (requests[connection].bib > 2) // if at least 2 bib (Bytes In Buffer), we have request size
{
- requests[connection].size =
- htons (*
- ((unsigned short int *)
- &requests[connection].buffer[0]));
+ unsigned short int* ptr = (unsigned short int*)&requests[connection].buffer[0];
+ requests[connection].size = htons (*ptr);
if (requests[connection].size ==
requests[connection].bib - 2)
{
diff --git a/src/desproxy-socksserver.c b/src/desproxy-socksserver.c
index 74be64c..d930bfc 100644
--- a/src/desproxy-socksserver.c
+++ b/src/desproxy-socksserver.c
@@ -238,7 +238,7 @@ method_accepted_v5 (connection)
EOC (connection);
return;
}
- strncat (remote_host, buffer, 1);
+ strncat (remote_host, (char*)buffer, 1);
}
strncat (remote_host, "\x00", 1);
debug_printf ("remote_host %s\n", remote_host);
diff --git a/src/desproxy.h b/src/desproxy.h
index 290cd1b..97319a2 100644
--- a/src/desproxy.h
+++ b/src/desproxy.h
@@ -84,7 +84,7 @@ char username[256], password[256];
char console_line[256];
char HTTP_return_code[4];
char string[256];
-char buffer[BUFFER_SIZE];
+unsigned char buffer[BUFFER_SIZE];
unsigned char client_socket_is_free[MAX_CONNECTIONS];
fd_set mask, rmask;
--
1.7.1
debian/patches/series 0000644 0000000 0000000 00000000127 11733022302 012023 0 ustar 10-Makefile.in-destdir.patch
20-compile-fixes.patch
20-compile-fixes+30-datatype.patch