Go to file
rofl0r 25afe98b20 failed attempt to use shared memory for the ip <-> dns mapping
this is in order to get irssi, which forks for DNS lookups,
and similar programs, to work as intended.

in a previous attempt i learned that shared memory created in a
child process is not visible to the parent;
in this attempt i spin off a thread from the parent which listens
on a pipe and manages the shared memory allocation from the parent
address-space. however this doesnt work as expected:
memory allocated in the parent after the child forked is not visi-
ble to the child as well.

so what happens is: irssi starts a child process, the thread allocs
memory and hands it to the child, the child attempts to write and
segfaults. however irssi doesnt crash. since now the memory is
already allocated, doing the dns lookup again will succeed.

i.e. the dns lookup works now in irssi by luck.
all but the first dns lookups will suceed.

however this is not good enough for me to be satisfied, i commit
this only for documentation purposes.
2012-11-07 16:49:14 +01:00
dist add a config template for the Makefile, and remove some unused variables 2011-09-10 22:43:30 +02:00
src failed attempt to use shared memory for the ip <-> dns mapping 2012-11-07 16:49:14 +01:00
tests failed attempt to use shared memory for the ip <-> dns mapping 2012-11-07 16:49:14 +01:00
.gitignore update .gitignore 2012-11-04 05:26:34 +01:00
AUTHORS fix AUTHORS. it wrongly assigned some work to the wrong author. 2012-09-02 01:58:15 +02:00
COPYING Add vanila proxychains 3.1 sources. 2011-02-25 11:40:11 +02:00
ChangeLog Add vanila proxychains 3.1 sources. 2011-02-25 11:40:11 +02:00
Makefile failed attempt to use shared memory for the ip <-> dns mapping 2012-11-07 16:49:14 +01:00
README update README for 4.1 release 2012-08-06 01:34:23 +02:00
TODO updated TODO 2012-01-26 13:25:48 +01:00
configure configure: add --help text 2012-07-08 00:35:59 +02:00

README

ProxyChains ver 4.1 README
==========================

  ProxyChains is a UNIX program, that hooks network-related libc functions
  in dynamically linked programs via a preloaded DLL and redirects the
  connections through SOCKS4a/5 or HTTP proxies.

*********** ATTENTION ***********

  this program works only on dynamically linked programs.
  also both proxychains and the program to call must use
  the same dynamic linker (i.e. same libc)

*********************************

*** Known limitations of the current version: ***

  when a process forks, does a DNS lookup in the child, and then uses
  the ip in the parent, the corresponding ip mapping will not be found.
  this is because the fork can't write back into the parents mapping table.
  IRSSI shows this behaviour, so you have to pass the resolved ip address
  to it. (you can use the proxyresolv script (requires "dig") to do so)

  this means that you can't currently use tor onion urls for irssi.
  to solve this issue, an external data store (file, pipe, ...) has to
  manage the dns <-> ip mapping. of course there has to be proper locking.
  shm_open, mkstemp, are possible candidates for a file based approach,
  the other option is to spawn some kind of server process that manages the
  map lookups. since connect() etc are hooked, this must not be a TCP server.

  I am reluctant on doing this change, because the described behaviour
  seems pretty idiotic (doing a fork only for a DNS lookup), and irssi
  is currently the only known affected program.

*** Installation ***

  # needs a working C compiler, preferably gcc
  ./configure
  make
  sudo make install

Changelog:
----------
Version 4.1 adds support for mac os x (i386, x86_64, ppc)
all internal functions are threadsafe when compiled with -DTHREAD_SAFE
(default).

Version (4.x) removes the dnsresolver script which required a dynamically
linked "dig" binary to be present with remote DNS lookup.
this speeds up any operation involving DNS, as the old script had to use TCP.
additionally it allows to use .onion urls when used with TOR.
also it removed the broken autoconf build system with a simple Makefile.
there's a ./configure script though for convenience.
it also adds support for a config file passed via command line switches/
environment variables.

Version (3.x) introduces support for DNS resolving through proxy 
it supports SOCKS4, SOCKS5 and HTTP CONNECT proxy servers.
Auth-types: socks - "user/pass" , http - "basic".

When to use it ?
1) When the only way to get "outside" from your LAN is through proxy server.
2) To get out from behind restrictive firewall which filters outgoing ports.
3) To use two (or more) proxies in chain:
	like: your_host <--> proxy1 <--> proxy2 <--> target_host
4) To "proxify" some program with no proxy support built-in (like telnet)
5) Access intranet from outside via proxy.
5) To use DNS behind proxy.

Some cool features:

* This program can mix different proxy types in the same chain
	like: your_host <-->socks5 <--> http <--> socks4 <--> target_host
* Different chaining options supported
	random order from the list ( user defined length of chain ).
	exact order  (as they appear in the list )
	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.insecire.org/nmap).
	proxychains nmap -sT -PO -p 80 -iR  (find some webservers through proxy)
* You can use it with servers, like squid, sendmail, or whatever.
* DNS resolving through proxy.


Configuration:
--------------

proxychains looks for config file in following order:
1)	file listed in environment variable ${PROXYCHAINS_CONF_FILE} or
	provided as a -f argument to proxychains script or binary.
2)	./proxychains.conf
3)	$(HOME)/.proxychains/proxychains.conf
4)	/etc/proxychains.conf  **

**see more in /etc/proxychains.conf

Usage Example:

	$ proxychains telnet targethost.com

in this example it will run telnet through proxy(or chained proxies)
specified by proxychains.conf

Usage Example:

      	$ proxychains -f /etc/proxychains-other.conf targethost2.com

in this example it will use different configuration file then proxychains.conf 
to connect to targethost2.com host.

Usage Example:

	$ proxyresolv targethost.com

in this example it will resolve targethost.com through proxy(or chained proxies)
specified by proxychains.conf