debian/0000755000000000000000000000000012150457057007174 5ustar debian/watch0000644000000000000000000000034312024620077010217 0ustar version=3 opts=uversionmangle=s/\.(tar.*|tgz|zip|gz|bz2)$//i,dversionmangle=s/[-.+~]?(cvs|svn|git|snapshot|pre|hg)(.*)$//i,pasv \ http://sf.net/proxychains/proxychains-?_?([\d+\.]+|\d+)\.(tar.*|tgz|zip|gz|bz2|) debian uupdate debian/proxychains.install0000644000000000000000000000005112066214005013115 0ustar usr/bin/proxychains etc/proxychains.conf debian/control0000644000000000000000000000506312150212240010562 0ustar Source: proxychains Section: net Priority: optional Maintainer: Daniel Echeverry Uploaders: Aron Xu Build-Depends: debhelper (>= 9.0), autotools-dev, dh-autoreconf Homepage: http://proxychains.sourceforge.net Standards-Version: 3.9.4 Package: proxychains Architecture: all Depends: ${misc:Depends}, libproxychains3 (>= ${binary:Version}) Multi-Arch: foreign Description: proxy chains - redirect connections through proxy servers Proxy chains force any tcp connection made by any given tcp client to follow through proxy (or proxy chain). It is a kind of proxifier. It acts like sockscap / premeo / eborder driver ( intercepts TCP calls ) . This version supports SOCKS4, SOCKS5 and HTTP CONNECT proxy servers. Different proxy types can be mixed in the same chain. . Features * Access Internet from behind restrictive firewall. * Source IP masquerade. * SSH tunneling and forwarding. * Dynamic LAN-to-LAN VPN channel. * Servers and daemons friendly (works fine with sendmail MTA). . http://proxychains.sourceforge.net Package: libproxychains-dev Section: libdevel Architecture: any Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, libproxychains3 (= ${binary:Version}) Suggests: proxychains Breaks: proxychains (<< 3.1-1) Replaces: proxychains (<< 3.1-1) Multi-Arch: same Description: proxy chains -- shared library (development) Proxy chains force any tcp connection made by any given tcp client to follow through proxy (or proxy chain). It is a kind of proxifier. It acts like sockscap / premeo / eborder driver ( intercepts TCP calls ) . See 'proxychains' package for more detailed description. . This package contains development header files for the shared library used by proxychains. Package: libproxychains3 Architecture: any Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} Recommends: dnsutils Suggests: proxychains Breaks: proxychains (<< 3.1-1) Replaces: proxychains (<< 3.1-1) Multi-Arch: same Description: proxy chains -- shared library (runtime) Proxy chains force any tcp connection made by any given tcp client to follow through proxy (or proxy chain). It is a kind of proxifier. It acts like sockscap / premeo / eborder driver ( intercepts TCP calls ) . See 'proxychains' package for more detailed description. . This package contains runtime for the shared library used by proxychains. . The package 'dnsutils' is needed to perform DNS requests through proxy. In the case you turned 'proxy_dns' option off in configuration file you don't need dnsutils to be installed. debian/proxychains.10000644000000000000000000000450412024643715011626 0ustar .TH "proxychains" "1" "2.0" "" "" .SH "NAME" .LP ProxyChains \- redirect connections through proxy servers .SH "SYNTAX" .LP proxychains <\fIprogram\fP> .SH "DESCRIPTION" .LP This program forces any tcp connection made by any given tcp client to follow through proxy (or proxy chain). It is a kind of proxifier. .LP It acts like sockscap / premeo / eborder driver (intercepts TCP calls). .LP This version (2.0) supports SOCKS4, SOCKS5 and HTTP CONNECT proxy servers. Auth\-types: socks \- "user/pass" , http \- "basic". .LP When to use it ? 1) When the only way to get "outside" from your LAN is through proxy server. 2) When you are behind restrictive firewall which filters outgoing connections to some ports. 3) When you want to use two (or more) proxies in chain: .br like: your_host <\-\-> proxy1 <\-\-> proxy2 <\-\-> target_host .br 4) When you want to "proxify" some programs with no proxy support built\-in (like telnet). 5) When you don't want to pay for eBorder / premeo socks driver :) .LP Some cool features: .br * This program can mix different proxy types in the same chain like: your_host <\-\->socks5 <\-\-> http <\-\-> socks4 <\-\-> http <\-\-> target_host * Different chaining options supported like: take random proxy from the list. or : chain proxies in exact order or : chain proxies in dynamic order (smart exclude dead proxies from chain) *You can use it with any TCP client application, even network scanners. yes, yes \- you can make portscan via proxy (or chained proxies) for example with Nmap scanner by fyodor (www.insecure.org/nmap). proxychains nmap \-sT \-PO \-p 80 \-iR (find some webservers through proxy) .LP NOTE: to run suid/sgid programs(like ssh) through proxychains you have to be root .SH "FILES" .LP proxychains looks for config file in following order: .TP ./proxychains.conf .TP $(HOME)/.proxychains/proxychains.conf .TP /etc/proxychains.conf .LP see more in /etc/proxychains.conf .SH "EXAMPLES" .LP To run this program the standard way type: .LP proxychains telnet targethost.com .LP in this example it will run telnet through proxy(or chained proxies) specified by proxychains.conf .SH "COPYING" proxychains is distributed under the GNU General Public License. (GPL 2.0 or greater). .SH "AUTHORS" .LP Net Creature, Proxy Labs .br debian/README.Debian0000644000000000000000000000020212024660746011230 0ustar The proxychain Debian version, the users can set the shell environment variable PROXYRESOLV_DNS to specify a specific DNS server. debian/libproxychains3.dirs0000644000000000000000000000002512066216537013177 0ustar usr/lib/proxychains3 debian/patches/0000755000000000000000000000000012150211472010610 5ustar debian/patches/500_allow_user_specify_DNS.diff0000644000000000000000000000071212024660374016441 0ustar Description: Allow user to specify DNS server in proxyresolv Author: The Don Lachlan Bug-Debian: http://bugs.debian.org/603239 Forwarded: No Last-Update: 2012-09-14 --- a/proxychains/proxyresolv +++ b/proxychains/proxyresolv @@ -2,7 +2,7 @@ # This script is called by proxychains to resolve DNS names # DNS server used to resolve names -DNS_SERVER=4.2.2.2 +DNS_SERVER=${PROXYRESOLV_DNS:-4.2.2.2} if [ $# = 0 ] ; then debian/patches/200-use-proper-library-version-in-scripts.patch0000644000000000000000000000177712024643450021470 0ustar Description: make 'proxychains' and 'proxyresolv' binaries work without development files for the shared library. Forwarded: no Author: Last-Update: 2009-03-09 Index: proxychains/proxychains/proxychains =================================================================== --- proxychains.orig/proxychains/proxychains 2009-05-15 23:50:02.481723256 +0300 +++ proxychains/proxychains/proxychains 2009-05-15 23:50:11.370716832 +0300 @@ -5,5 +5,5 @@ echo " proxychains [args]" exit fi -export LD_PRELOAD=libproxychains.so +export LD_PRELOAD=libproxychains.so.3 exec "$@" Index: proxychains/proxychains/proxyresolv =================================================================== --- proxychains.orig/proxychains/proxyresolv 2009-05-15 23:49:42.149725472 +0300 +++ proxychains/proxychains/proxyresolv 2009-05-15 23:49:56.118716705 +0300 @@ -12,5 +12,5 @@ fi -export LD_PRELOAD=libproxychains.so +export LD_PRELOAD=libproxychains.so.3 dig $1 @$DNS_SERVER +tcp | awk '/A.+[0-9]+\.[0-9]+\.[0-9]/{print $5;}' debian/patches/100-exclude-localhost.patch0000644000000000000000000000657312024643145015567 0ustar Description: Solve problems with connecting to localhost. Forwarded: no Author: Emilio López Last-Update: 2009-03-03 --- proxychains-3.1.orig/proxychains/libproxychains.c 2006-03-16 05:16:59.000000000 +1300 +++ proxychains-3.1/proxychains/libproxychains.c 2007-04-18 15:31:24.000000000 +1200 @@ -42,6 +42,30 @@ #define SOCKFAMILY(x) (satosin(x)->sin_family) #define MAX_CHAIN 30*1024 +#ifdef PTRUE +#undef PTRUE +#endif +#define PTRUE 1 + +#ifdef PFALSE +#undef PFALSE +#endif +#define PFALSE 0 + +/* total number of available slots for subnets */ +#define MAX_LOCAL_NETS 20 + +/* structur for representing networks to be excluded */ +typedef struct +{ + int valid; + unsigned int subnetwork; + unsigned int subnetmask; +} my_network; + +my_network localnet[MAX_LOCAL_NETS]; /* array of sub nets */ + + int tcp_read_time_out; int tcp_connect_time_out; chain_type proxychains_ct; @@ -55,14 +79,15 @@ static inline void get_chain_data( proxy_data *pd, unsigned int *proxy_count, - chain_type *ct); + chain_type *ct, + my_network *subnets); static void init_lib() { // proxychains_write_log("ProxyChains-"VERSION -// " (http://proxychains.sf.net)\n"); - - get_chain_data(proxychains_pd,&proxychains_proxy_count,&proxychains_ct); +// " (http://proxychains.sf.net)\n"); + get_chain_data(proxychains_pd,&proxychains_proxy_count,&proxychains_ct,localnet); + true_connect = (connect_t) dlsym(RTLD_NEXT, "connect"); if (!true_connect) { @@ -140,11 +165,12 @@ static inline void get_chain_data( proxy_data *pd, unsigned int *proxy_count, - chain_type *ct) + chain_type *ct, + my_network *subnets) { - int count=0,port_n=0,list=0; + int count=0,port_n=0,list=0,subcount=0; char buff[1024],type[1024],host[1024],user[1024]; FILE* file; @@ -170,7 +196,11 @@ if(buff[strspn(buff," ")]!='#') { if(list) { bzero(&pd[count], sizeof(proxy_data)); - pd[count].ps=PLAY_STATE; + + bzero(&subnets[subcount], sizeof(my_network)); + + pd[count].ps=PLAY_STATE; + port_n=0; sscanf(buff,"%s %s %d %s %s", type,host,&port_n, pd[count].user,pd[count].pass); @@ -182,6 +212,12 @@ pd[count].pt=SOCKS4_TYPE; }else if(!strcmp(type,"socks5")) { pd[count].pt=SOCKS5_TYPE; + } else if(!strcmp(type,"localnet")) { + subnets[subcount].subnetwork=inet_addr(host); + subnets[subcount].subnetmask=inet_addr(pd[count].user); + subnets[subcount].valid=PTRUE; + subnets[subcount + 1].valid=PFALSE; + subcount++; }else continue; if( pd[count].ip && pd[count].ip!=-1 && port_n) @@ -223,13 +259,23 @@ int connect (int sock, const struct sockaddr *addr, unsigned int len) { int socktype=0,optlen=0,flags=0,ret=0; - + int lnnum=0; if(!init_l) init_lib(); optlen=sizeof(socktype); getsockopt(sock,SOL_SOCKET,SO_TYPE,&socktype,&optlen); if (! (SOCKFAMILY(*addr)==AF_INET && socktype==SOCK_STREAM)) return true_connect(sock,addr,len); + + get_chain_data(proxychains_pd,&proxychains_proxy_count,&proxychains_ct,localnet); + for (lnnum = 0; localnet[lnnum].valid == PTRUE; lnnum++) + { + if (( satosin(*addr)->sin_addr.s_addr & localnet[lnnum].subnetmask) == localnet[lnnum].subnetwork) + { + return true_connect(sock,addr,len); + } + } + flags=fcntl(sock, F_GETFL, 0); if(flags & O_NONBLOCK) fcntl(sock, F_SETFL, !O_NONBLOCK); debian/patches/series0000644000000000000000000000031412150211253012020 0ustar 500_allow_user_specify_DNS.diff 400_fix_spelling_mistake.diff 100-exclude-localhost.patch 200-use-proper-library-version-in-scripts.patch 300-use-libpath-for-proxyresolv.patch 600-ftbfs-getnameinfo.patch debian/patches/300-use-libpath-for-proxyresolv.patch0000644000000000000000000000066212024655142017556 0ustar Description: Use changed path for proxyresolv helper script. Forwarded: no Author: Last-Update: 2009-05-16 --- a/proxychains/core.c +++ b/proxychains/core.c @@ -641,7 +641,7 @@ dup2(pipe_fd[1],1); //dup2(pipe_fd[1],2); // putenv("LD_PRELOAD="); - execlp("proxyresolv","proxyresolv",name,NULL); + execl("/usr/lib/proxychains3/proxyresolv","proxyresolv",name,NULL); perror("can't exec proxyresolv"); exit(2); debian/patches/400_fix_spelling_mistake.diff0000644000000000000000000000073412024657761016250 0ustar Description: Fix spelling mistake Author: Daniel Echeverry Bug-Debian: http://bugs.debian.org/683805 Forwarded: yes Last-Update: 2012-09-14 --- a/proxychains/core.c +++ b/proxychains/core.c @@ -669,7 +669,7 @@ name, inet_ntoa(*(struct in_addr*)&addr)); return &hostent_space; err_dns: - proxychains_write_log("|DNS-response|: %s is not exist\n", name); + proxychains_write_log("|DNS-response|: %s does not exist\n", name); err: return NULL; } debian/patches/600-ftbfs-getnameinfo.patch0000644000000000000000000000125412150212211015524 0ustar Description: Fix FTBFS avoiding the conflicting declarations. Forwarded: no Author: Lorenzo De Liso Last-Update: 2012-12-02 Index: proxychains-3.1/proxychains/libproxychains.c =================================================================== --- proxychains-3.1.orig/proxychains/libproxychains.c 2012-12-02 05:40:02.877872516 -0700 +++ proxychains-3.1/proxychains/libproxychains.c 2012-12-02 05:46:32.321858741 -0700 @@ -337,7 +337,7 @@ int getnameinfo (const struct sockaddr * sa, socklen_t salen, char * host, socklen_t hostlen, char * serv, - socklen_t servlen, unsigned int flags) + socklen_t servlen, int flags) { int ret = 0; if(!init_l) debian/changelog0000644000000000000000000001571612150220213011036 0ustar proxychains (3.1-6) unstable; urgency=low * Fix FTBFS with eglibc-2.17. Closes: #701413 + Add 600-ftbfs-getnameinfo.patch patch * Bump standard versions 3.9.4 (no changes) -- Daniel Echeverry Sat, 25 May 2013 14:33:20 -0500 proxychains (3.1-5) unstable; urgency=low * Enabling Multi-Arch for the package. * debian/rules: add calls to DEB_HOST_MULTIARCH, calling dh_autoreconf * debian/control: add Multi-Arch fields * debian/libproxychains*.install: update location for Multi-Arch * Move etc/proxychains.conf to binary package proxychains -- Aron Xu Tue, 25 Dec 2012 11:06:43 +0800 proxychains (3.1-4) unstable; urgency=low * New maintainer. Closes: #674776 * debian/control + Bumped standard versions 3.9.3 + Update to DEP5 copyright format 1.0. + Set myself as Maintainer + Set Aron Xu as Uploaders + Change debhelper to 9 in B-D + Remove quilt in B-D + Add dh-autoreconf in B-D * debian/compat + Switch compat level to 9 * debian/patches + Add description to the patches + Add 400_fix_spelling_mistake.diff + Fix spelling mistake. Closes: #683805 + Add 500_allow_user_specify_DNS.diff + allow user to specify DNS server in proxyresolv. Closes: #603239 + Thanks to The Don Lachlan for the patch * Switch to dpkg-source 3.0 (quilt) format * Fix spelling error in manpage (lintian) * Remove README.source + Because is not necessary * Add README.Debian * debian/libproxychains-dev.install + Remove .a and .la files (lintian) * debian/rules + Use autoreconf -- Daniel Echeverry Fri, 14 Sep 2012 07:22:42 -0500 proxychains (3.1-3) unstable; urgency=low * debian/control: - Placed Recommends on 'dnsutils' to shared library package, not the development one. Thanks to ckoeni@gmail.com. (Closes: #579329) - Updated my mail address. - Bumped Standards-Version to 3.8.4, no changes needed. -- Eugene V. Lyubimkin Tue, 27 Apr 2010 18:03:18 +0300 proxychains (3.1-2) unstable; urgency=low * Upload to unstable. -- Eugene V. Lyubimkin Fri, 29 May 2009 09:32:11 +0300 proxychains (3.1-1) experimental; urgency=low * New maintainer (Closes: #528131). Thanks for work, Rex Tsai. * New upstream release (Closes: #388488, LP: #250973). - Old inline patches are now lost thus. * debian/control: - Removed Martin F. Krafft from Uploaders by his request. - Added '${misc:Depends}' to Depends. - Bumped debhelper Build-Depends to (>= 7.0.50) for v7 style and overrides. - Added quilt (>= 0.40) to Build-Depends for Debian patches. - Added 'Homepage' field. - Bumped 'Standards-Version' to 3.8.1. - Introduced new 'libproxychain3' and 'libproxychains-dev' binary packages. - Added 'autotools-dev' to Build-Depends for copying newer config.sub and config.guess files. - Added Conflicts and Replaces with old versions of 'proxychains' binary package. - The package 'dnsutils' is now recommended by 'libproxychains3' to perform DNS request through proxy. * debian/rules: - Removed obsoleted DH_COMPAT. - General cleanup. - Use debhelper v7 style. - Use quilt 'patch' and 'unpatch' targets. - Pass proper '--sysconfdir' to configure. - Copy newer config.sub and config.guess from autotools during build. * debian/README.source: - Added with instructions how to use quilt, taken from /usr/share/doc/quilt/README.source. * debian/patches: - New 100-exclude-localhost.patch: don't tunnel connections to localhost through proxies. Thanks to Emilio López . (LP: #336901) - New 200-use-proper-library-version-in-scripts.patch: make 'proxychains' and 'proxyresolv' binaries work without development files for the shared library. - New 300-use-libpath-for-proxyresolv.patch: use path '/usr/lib/proxychains3' for proxyresolv helper script. * debian/proxychains.manpages: - Added. * debian/compat: - Added, set to 7. * debian/watch: - Added. * debian/copyright: - Fixed versionless license pointer. - Fixed old FSF address. - Added a copyright notice. * debian/changelog: - Wrapped too long lines. * debian/dirs: - Removed lintian overrides dir. - Install also /usr/lib/proxychains3 directory for 'proxyresolv' helper script for shared library. * debian/README.Debian: - Removed as obsolete. * debian/proxychains.files: - Removed as obsolete. * debian/docs: - Removed 'docs/en/...' entry as non-existing. * debian/*.install: - Added. -- Eugene V. Lyubimkin Sat, 16 May 2009 14:18:31 +0300 proxychains (2.1-5) unstable; urgency=low * applied patch from Klaus Ethgen * Fix a small error in which proxy forbite a connection. * Removing white spaces from sources. * Change the behavior on initial connection errors. * Add "."'s to this changelog. * Release proxys marked as down when list gets to small. * Add handling of broken Proxies. * Improve the random number generator. * Improve the handling of down proxies. * Fix problem in socks5 connection. * Allow to save good proxies. * Adding statistic capability replacing saving of good proxies. * Halt process and reread config if too less proxies are available. * Also allow the target to have a value. * fixed undefined symbol: __libc_connect. (Closes: #317801) * spelling corrected, thanks to Rakesh 'arky' Ambati (Closes: #321376) -- Rex Tsai Sat, 6 Aug 2005 23:43:44 +0800 proxychains (2.1-4) unstable; urgency=low * removed automake from build-depends. upgrade autotools to automake-1.9 and autoconf-2.59a-3. * new release for debian pool (Closes: #259617, #282424, #303221) -- Rex Tsai Tue, 17 May 2005 16:21:46 +0800 proxychains (2.1-3) unstable; urgency=low * added automake into Build-Depends -- Rex Tsai Fri, 28 Jan 2005 02:26:29 +0800 proxychains (2.1-2) unstable; urgency=low * new release for debian pool (Closes: #259617, #282424) -- Rex Tsai Tue, 25 Jan 2005 00:49:52 +0800 proxychains (2.1-1) unstable; urgency=low * new upstream version. -- Rex Tsai Thu, 13 May 2004 08:43:43 +0800 proxychains (2.0-1) unstable; urgency=low * new upstream version. * update standard version to 3.6.1 * update man page. * update control with my current email/pgp, and conffile file. -- Rex Tsai Tue, 20 Apr 2004 10:45:32 +0800 proxychains (1.8.2-1) unstable; urgency=low * new upstream version. -- Rex Tsai Mon, 12 Jan 2004 21:16:14 +0800 proxychains (1.8-1) unstable; urgency=low * Initial Release. -- Rex Tsai Sun, 23 Mar 2003 12:45:38 +0800 debian/libproxychains3.install0000644000000000000000000000010012066213777013701 0ustar usr/lib/*/libproxychains.so.3 usr/lib/*/libproxychains.so.3.0.0 debian/compat0000644000000000000000000000000212024620402010354 0ustar 9 debian/libproxychains-dev.install0000644000000000000000000000012112066214075014365 0ustar usr/lib/*/libproxychains.so #usr/lib/libproxychains.a #usr/lib/libproxychains.la debian/docs0000644000000000000000000000002412024620077010035 0ustar AUTHORS README TODO debian/copyright0000644000000000000000000000242112024711200011105 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Net Creature, Proxy Labs Upstream-Name: proxychains Source: http://proxychains.sourceforge.net Files: * Copyright: 2002 Net Creature, Proxy Labs License: GPL-2.0 Files: debian/* Copyright: 2003 Rex Tsai 2003-2010 Eugene V. Lyubimkin 2012 Daniel Echeverry 2012 Aron Xu License: GPL-2.0 License: GPL-2.0 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; version 2 dated June, 1991. . 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. debian/proxychains.manpages0000644000000000000000000000002512024620077013247 0ustar debian/proxychains.1 debian/source/0000755000000000000000000000000012024620466010470 5ustar debian/source/format0000644000000000000000000000001412024621753011676 0ustar 3.0 (quilt) debian/rules0000755000000000000000000000120712066216575010260 0ustar #!/usr/bin/make -f DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) %: dh $@ --with autoreconf override_dh_auto_configure: ./configure \ --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \ --sysconfdir=/etc override_dh_auto_install: dh_auto_install mv debian/tmp/usr/bin/proxyresolv debian/libproxychains3/usr/lib/proxychains3/