Coder Social home page Coder Social logo

haad / proxychains Goto Github PK

View Code? Open in Web Editor NEW
6.4K 145.0 612.0 538 KB

proxychains - a tool that forces any TCP connection made by any given application to follow through proxy like TOR or any other SOCKS4, SOCKS5 or HTTP(S) proxy. Supported auth-types: "user/pass" for SOCKS4/5, "basic" for HTTP.

Home Page: http://proxychains.sourceforge.net/

License: GNU General Public License v2.0

Makefile 4.41% C 91.12% Shell 4.46%

proxychains's Introduction

ProxyChains ver. 4.3.0 README

build-badge

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.

WARNING: 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 behavior, 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 behavior seems pretty idiotic (doing a fork only for a DNS lookup), and irssi is currently the only known affected program.

Installation

Using release version

Proxychains-4.3.0 are available with pkgsrc to everyone using it on Linux, NetBSD, FreeBSD, OpenBSD, DragonFlyBSD or Mac OS X. You just need to install pkgsrc-wip repository and run make install in a wip/proxychains directory.

You can find out more about pkgsrc on link:http://www.pkgsrc.org[pkgsrc] and about pkgsrc-wip on link:https://pkgsrc.org/wip[Pkgsrc-wip homepage]

Installing on Mac OS X with homebrew

You can install current proxychains on Mac OS X with an homebrew. You have to download unofficial link:https://gist.github.com/3792521[homebrew formula] from to your BREW_HOME by default /usr/local/Library/Formula/ and run

$ brew install proxychains

Running Current Source code version

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

Changelog

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

  • When the only way to get "outside" from your LAN is through proxy server.
  • To get out from behind restrictive firewall which filters outgoing ports.
  • To use two (or more) proxies in chain:
   like: your_host <--> proxy1 <--> proxy2 <--> target_host
  • To "proxify" some program with no proxy support built-in (like telnet)
  • Access intranet from outside via proxy.
  • 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.insecure.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 configuration in the following order:

  • SOCKS5 proxy host ip and port in environment variable ${PROXYCHAINS_SOCKS5_HOST} ${PROXYCHAINS_SOCKS5_PORT} (if ${PROXYCHAINS_SOCKS5_PORT} is set, no further configuration will be searched. if ${PROXYCHAINS_SOCKS5_HOST} isn't set, host ip will become "127.0.0.1")
  • file listed in environment variable ${PROXYCHAINS_CONF_FILE} or provided as a -f argument to proxychains script or binary.
  • ./proxychains.conf
  • $(HOME)/.proxychains/proxychains.conf
  • /etc/proxychains.conf

see more in /etc/proxychains.conf

Usage Example

$ proxychains4 telnet targethost.com

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

Usage Example

$ proxychains4 -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

Usage Example:

$ ssh -fN -D 4321 some.example.com
$ PROXYCHAINS_SOCKS5_HOST=127.0.0.1 PROXYCHAINS_SOCKS5_PORT=4321 proxychains zsh

in this example, it will run a shell with all traffic proxied through OpenSSH's "dynamic proxy" (SOCKS5 proxy) on localhost port 4321.

Usage Example:

$ export PROXY_DNS_SERVER=8.8.8.8
$ proxychains4 telnet targethost.com

in this example, it will telnet to targethost.com using the 8.8.8.8 nameserver supplied by the user through the PROXY_DNS_SERVER

proxychains's People

Contributors

0x3c avatar 0xflotus avatar 7c6f434c avatar adamvanscyoc avatar audibleblink avatar aviau avatar blueskydetector avatar chuanfengzhang avatar douglasanpa avatar freed-wu avatar haad avatar hmgle avatar hutchinson avatar intika avatar jahrome avatar jianingy avatar julian-klode avatar leggiero avatar micheloosterhof avatar mister-meeseeks avatar netroby avatar rofl0r avatar sorki avatar specialpointcentral avatar theosotr avatar tinyzimmer avatar tomgilon avatar xiezhenye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

proxychains's Issues

cannot make on kubuntu 15.10

This is what I got:
fay@kubuntu:/downloads/proxychains-master$ ./configure
Linux
done, now run make && make install
fay@kubuntu:
/downloads/proxychains-master$ make
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror -DLIB_DIR="/usr/local/lib" -DINSTALL_PREFIX="/usr/local" -DDLL_NAME="libproxychains4.so" -DSYSCONFDIR="/usr/local/etc" -fPIC -c -o src/core.o src/core.c
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror -DLIB_DIR="/usr/local/lib" -DINSTALL_PREFIX="/usr/local" -DDLL_NAME="libproxychains4.so" -DSYSCONFDIR="/usr/local/etc" -fPIC -c -o src/common.o src/common.c
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror -DLIB_DIR="/usr/local/lib" -DINSTALL_PREFIX="/usr/local" -DDLL_NAME="libproxychains4.so" -DSYSCONFDIR="/usr/local/etc" -fPIC -c -o src/libproxychains.o src/libproxychains.c
cc -shared -fPIC -pthread -ldl -Wl,--no-as-needed -install_name,libproxychains4.so -o libproxychains4.so src/core.o src/common.o src/libproxychains.o
cc: error: unrecognized command line option ‘-install_name,libproxychains4.so’
Makefile:66: recipe for target 'libproxychains4.so' failed
make: *** [libproxychains4.so] Error 1

unrecognized command line option -install_name,libproxychains4.so

So I tried to compile proxychains4 on my Mint 14 box and this is how it went:

rooibos (master) proxychains $ ./configure 
Linux
done, now run make && make install
rooibos (master) proxychains $ make
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/core.o src/core.c
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/common.o src/common.c
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/libproxychains.o src/libproxychains.c
cc -shared -fPIC  -pthread -ldl -Wl,--no-as-needed -install_name,libproxychains4.so -o libproxychains4.so src/core.o src/common.o src/libproxychains.o
cc: error: unrecognized command line option ‘-install_name,libproxychains4.so’
make: *** [libproxychains4.so] Error 1

Well this was no-brainer, remove -install_name option (but why someone put it there and what is its purpose in life?). So trying to compile it again:

rooibos (master) proxychains $ make clean
rm -f libproxychains4.so
rm -f proxychains4
rm -f src/common.o src/core.o src/libproxychains.o src/main.o
rooibos (master *) proxychains $ ./configure 
Linux
done, now run make && make install
rooibos (master *) proxychains $ make
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/core.o src/core.c
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/common.o src/common.c
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/libproxychains.o src/libproxychains.c
cc -shared -fPIC  -pthread -ldl -Wl,--no-as-needed -Wl,-soname=libproxychains4.so -o libproxychains4.so src/core.o src/common.o src/libproxychains.o
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/main.o src/main.c
cc src/main.o src/common.o -o proxychains4

Success?!?!!?...well NO:

rooibos (master *) proxychains $ ./proxychains4 -f src/proxychains.conf telnet
[proxychains] config file found: src/proxychains.conf
[proxychains] preloading ./libproxychains4.so
[proxychains] DLL init
telnet: symbol lookup error: ./libproxychains4.so: undefined symbol: dlsym

Bummer. After some time in Google: http://stackoverflow.com/questions/4385155/setting-my-lib-for-ld-preload-makes-some-processes-produce-loader-errors/13046079#13046079 Hmm, lets give it a go:

rooibos (master *) proxychains $ make clean
rm -f libproxychains4.so
rm -f proxychains4
rm -f src/common.o src/core.o src/libproxychains.o src/main.o
rooibos (master *) proxychains $ ./configure 
Linux
done, now run make && make install
rooibos (master *) proxychains $ make
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/core.o src/core.c
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/common.o src/common.c
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/libproxychains.o src/libproxychains.c
cc -shared -fPIC  -pthread -Wl,--no-as-needed -ldl -Wl,-soname=libproxychains4.so -o libproxychains4.so src/core.o src/common.o src/libproxychains.o
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/main.o src/main.c
cc src/main.o src/common.o -o proxychains4
rooibos (master *) proxychains $ ./proxychains4 -f src/proxychains.conf telnet
[proxychains] config file found: src/proxychains.conf
[proxychains] preloading ./libproxychains4.so
[proxychains] DLL init
telnet> 

Success! Pull request will be waiting, but if you don't think theses changes are any good, tell me what I did wrong :)

dyld: warning: could not load inserted library '/usr/local/lib/libproxychains4.dylib' into library validated process because no suitable image found.

dyld: warning: could not load inserted library '/usr/local/lib/libproxychains4.dylib' into library validated process because no suitable image found.

Abviously , this is not brew's fault, I changed brew install proxychains-ng and build this repo, all get same error and it didn't work at all. Could anybody gentlely tell me what exactly happened?????

All errors:

proxychains] preloading /usr/local/lib/libproxychains4.dylib
dyld: warning: could not load inserted library '/usr/local/lib/libproxychains4.dylib' into library validated process because no suitable image found.  Did find:
	/usr/local/lib/libproxychains4.dylib: code signing blocked mmap() of '/usr/local/lib/libproxychains4.dylib'
Cloning into 'DeepQA'...
dyld: warning: could not load inserted library '/usr/local/lib/libproxychains4.dylib' into library validated process because no suitable image found.  Did find:
	/usr/local/lib/libproxychains4.dylib: code signing blocked mmap() of '/usr/local/lib/libproxychains4.dylib'
dyld: warning: could not load inserted library '/usr/local/lib/libproxychains4.dylib' into library validated process because no suitable image found.  Did find:
	/usr/local/lib/libproxychains4.dylib: code signing blocked mmap() of '/usr/local/lib/libproxychains4.dylib'

proxychains not found by brew

The problem is that brew can't find the proxychains install file:

$ brew install proxychains
Error: No available formula for proxychains

Mac support to open applications

Is it possible to open .app files with proxychains? Now if I type ./proxychains open /Applications/Firefox.app it fails with an error Dyld Error Message: could not load inserted library: ../.libs/libproxychains.3.0.0.dylib.
Although ../.libs is the correct relative path and command ./proxychains curl icanhazip.com works fine.
Is there any restriction to run only daemons and shell programms?
Thanks

proxychains doesn't support UDP

thank you author ,it is a great software in LINUX proxy.

it can proxy for socks5 with TCP, but it does't proxy sock5 witch UDP data.

Using jnettop i could see, the UDP data doesn't go through ssh with proxychains, otherways it goes through direct route.

From http://en.wikipedia.org/wiki/Comparison_of_proxifiers you can see that proxychains doesn't support "UDP ASSOCIATE". Dante can support UDP,but i think it is not easier than proxychains . Proxychains is a good software ,hope it to be better.thanks

proxychains error

Hi,

I get error when :

"proxychains google.com
/usr/bin/proxychains: 9: exec: google.com: not found"

also if I "proxychains firefox" give me my IP, don't go trough proxychain configured proxy.

if I do:
"proxychains curl -s http://www.ipchicken.com/"

thank is working og, go trough proxy and gets webpage.

any idea? I need to proxychains my apps like virtualbox, scaners etc

Execute bash file without proxychains

Structure:
script1.sh (launches script2.sh)
script2.sh

Launch:
proxychains ./script1.sh

script2.sh must be executed without proxychain.
How to do it?

localnet problem

When no port is specified in conf, it uses proxy.

FIX:
in proxychains/libproxychains.c, line number 313 the condition should be changed to:
if (localnet_addr[i].port || localnet_addr[i].port == port) {

build on OpenBSD 5.6 fails with 'error: 'AI_V4MAPPED' undeclared (first use in this function)'

Steps to reproduce

$ sudo git clone https://github.com/haad/proxychains.git
$ cd proxychains/
$ sudo ./configure
$ sudo gmake
cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror -DLIB_DIR="/usr/local/lib" -DINSTALL_PREFIX="/usr/local" -DDLL_NAME="libproxychains4.so" -DSYSCONFDIR="/usr/local/etc" -fPIC -c -o src/core.o src/core.c
src/core.c:40: error: expected '=', ',', ';', 'asm' or 'attribute' before 'internal_ips_lock'
src/core.c: In function 'proxy_getaddrinfo':
src/core.c:912: error: 'AI_V4MAPPED' undeclared (first use in this function)
src/core.c:912: error: (Each undeclared identifier is reported only once
src/core.c:912: error: for each function it appears in.)
Makefile:63: recipe for target 'src/core.o' failed
gmake: *** [src/core.o] Error 1

proxychains not loading dll everytime

getting wired error

anant@anant-Studio ~/proxychains $ proxychains4 telnet google.com 80
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/local/lib/libproxychains4.so
telnet: symbol lookup error: /usr/local/lib/libproxychains4.so: undefined symbol: pthread_once
anant@anant-Studio ~/proxychains $ proxychains4 firefox
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/local/lib/libproxychains4.so
/bin/sh: symbol lookup error: /usr/local/lib/libproxychains4.so: undefined symbol: pthread_once
anant@anant-Studio ~/proxychains $ proxychains4 android
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/local/lib/libproxychains4.so
/bin/sh: symbol lookup error: /usr/local/lib/libproxychains4.so: undefined symbol: pthread_once

where as

anant@anant-Studio ~/proxychains $ proxychains4 wget http://www.google.co.in
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/local/lib/libproxychains4.so
[proxychains] DLL init
--2012-09-02 02:59:18-- http://www.google.co.in/
Resolving www.google.co.in (www.google.co.in)... 224.0.0.1
Connecting to www.google.co.in (www.google.co.in)|224.0.0.1|:80... [proxychains] Dynamic chain ... 192.168.0.104:8080 ... www.google.co.in:80 ... OK
connected.
HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9
Length: unspecified
Saving to: `index.html.2'

[ <=>                                                                                                                             ] 7           --.-K/s   in 0s      

2012-09-02 02:59:18 (325 KB/s) - `index.html.2' saved [7]

anant@anant-Studio ~/proxychains $ cat index.html.1
�����gives me nonprintable character (7 bytes only)

proxychains and support of the docker command

Hi,
It is super helpful if the proxychains allows us in Embargoed countries pull docker images....Docker site bans us to get the images while not behind any vpn or proxy. While my proxychians works flawlessly behind the tor network to for example get youtube videos or simple wget and curl ,it fails to docker pull images... is there a trick to it?, or simply it can't work with docker pull?
I compiled the proxychains from the latest source and one line config basic that tries socks5 to localhost on default tor port. Please note as said there is no issue with other commands and proxychains behaves as expected...:( Thank you for your help...

could not find configuration file

i uninstalled previous proxychains and compiled the new one
i get the following error :

[sheepdestroyer@sheepora proxychains]$ sudo make install
install -D -m 755 proxychains4 /usr/local/bin/
install -D -m 644 libproxychains4.so /usr/local/lib/
install -D -m 644 src/proxychains.conf /usr/local/etc/
[sheepdestroyer@sheepora proxychains]$ proxychains4 lynx http://google.com
couldnt find configuration file: No such file or directory
[sheepdestroyer@sheepora proxychains]$

in fact conf file in /etc does not exist, copying there the file from /usr/local/etc solves the problem:
[sheepdestroyer@sheepora ~]$ proxychains4 lynx http://google.com
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/local/lib/libproxychains4.so
[sheepdestroyer@sheepora ~]$

so ether the install procedure from make file forgot to copy the file in /etc or proxychains continue to check old directory and not right one.

Dns issue?

i excute this

proxychains ./node_modules/.bin/electron-builder --linux -c electron-builder.yml

logs:

ProxyChains-3.1 (http://proxychains.sf.net)
electron-builder 19.27.3
Using electron-builder.yml configuration file
No native production dependencies
Packaging for linux x64 using electron 1.6.12 to dist/linux-unpacked
⚠️  Application icon is not set, default Electron icon will be used
Building deb
Downloading fpm-1.9.2-2.3.1-linux-x86_64, please wait
|DNS-request| github.com
|DNS-response|: github.com does not exist
node: ../deps/uv/src/unix/getaddrinfo.c:91: uv__getaddrinfo_translate_error: Assertion `!"unknown EAI_* error code"' failed.
[4]    22026 abort (core dumped)  proxychains ./node_modules/.bin/electron-builder --linux -c

sudo make install fail!

[OSX EI Capitan 10.11.3 (15D21)]

Ton$ sudo make install
./tools/install.sh -D -m 644 libproxychains4.dylib /usr/lib/libproxychains4.dylib
./tools/install.sh: line 53: /usr/lib/libproxychains4.dylib.tmp.3813: Operation not permitted
make: *** [/usr/lib/libproxychains4.dylib] Error 1

does anyone used proxychains4 with sendmail/squid?

Hi there, and thank for this great piece of software.
I have a centos 6.2 32bit os and i am trying to send a mail with sendmail through a working proxy, but i just cant manage.

What is working :

proxyresolv google.com OK
proxychains4 firefox OK
proxychains4 thunderbird OK

What doesnt work:
( as root )

proxychains4 sendmail start
[proxychains] config file found: /usr/local/etc/proxychains.conf
[proxychains] preloading ./libproxychains4.so

This doesnt work. Then i try to send a mail with eg squirrelmail , the mail goes to sender but not through the working socks4 proxy

then i try the following command :

proxychains4 sendmail -t < ./test

where test is a text file with from , to , subject etc mail data.
This mail doesnt reach its destination

Before i go through squid, what am i doing wrong?
The readme file says proxychains4 works fine with squid, sendmail (MTA) servers

Thank you in advance,

Denied

|S-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:5219-<--denied

Is the exact output that i've got trying to open armitage with proxychains (apparently when tries to connect to postgres).

I couldn't find anything that fixed the issue.

Using kali with kernel 4.8.0 - Proxychaing with tor.

PROXYCHAINS_SOCKS5 example didn't work

I have set up an ssh tunnel using ssh -D, but PROXYCHAINS_SOCKS5=4321 proxychains <application> still read its configuration from /etc/proxychains.conf (unlike what the README says)

do not overwrite LD_PRELOAD variable

when I run the following command:
LD_PRELOAD=a.so proxychains env
what I get:
LD_PRELOAD=libproxychains.so.3
what I expect:
LD_PRELOAD=a.so libproxychains.so.3

bug in main.c (getopt interprets all argv's starting with -)

if you start something like proxychains wget -lol http://host.com
getopt will try to interpret "-l" and fails to do so. i fixed it in my master branch (75d41de).

since i've done a couple of other improvemens to main.c, (if you dont intend to merge my remotedns changes soon) you might want to cherrypick the commits that change it, and the one that adds -quiet mode, which has a dependency on core.c and common.h

glad to see that project updated

Hi guys,

I'm happy to see that you decided to continue that project, which looked a bit abandoned for a while... I'm very interested by the possibility of chaining a bunch of proxies to anonymize any kind of ip traffic. However, from what I understand, the way proxychains currently works is that you launch it from the command line, and it's intercepting the systems call to the ip stack of the program specified in argument, and with that "hijacking" of the traffic in place, it is capable of anonymizing the traffic of any kind of program, even if the program in question doesnt support proxies.

This is great for a quick session of anonymous web browsing, however I'm wondering if It's currently possible to run proxychains as a kind of permanent open relay on a network, and to tunnel all traffic towards it ? From the readme it should work for http with Squid, but do you have an idea for a solution that would tunnel all traffic, dns, http, etc... ?

Keep up the great work !

Doesn't compile on Kali Linux

Hi,

I obtain this error:

cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/core.o src/core.c
src/core.c:48:10: fatal error: core.h: No existe el fichero o el directorio
 #include "core.h"
          ^~~~~~~~
compilation terminated.
Makefile:63: fallo en las instrucciones para el objetivo 'src/core.o'
make: *** [src/core.o] Error 1

How can I fix this?

Thx

Usage example in README doesn't work

The README says:

proxychains looks for configuration in the following order:

  • SOCKS5 proxy port in environment variable ${PROXYCHAINS_SOCKS5} (if set, no further configuration will be searched)

Usage Example:

$ ssh -fN -D 4321 some.example.com
$ PROXYCHAINS_SOCKS5=4321 proxychains zsh

But when I run this, I get:

couldnt find configuration file: No such file or directory

Looking at the code in src/common.c, it looks like this code just looks around for the config file in various ways before throwing this error, it never actually consults the aforementioned env var.

Archlinux make error

Archlinux when make will get error below, how to fix it?

cc -Wall -O2 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror   -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.so\" -DSYSCONFDIR=\"/usr/local/etc\"  -fPIC -c -o src/common.o src/common.c
src/common.c: In function ‘get_config_path’:
src/common.c:33:2: error: null destination pointer [-Werror=format-truncation=]
  snprintf(pbuf, bufsize, "%s/.proxychains/%s", path, PROXYCHAINS_CONF_FILE);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:63: src/common.o] Error 1

build fails under Mountain Lion

dmd@lumen ~/build
$ git clone https://github.com/haad/proxychains.git
Cloning into 'proxychains'...
remote: Counting objects: 672, done.
remote: Compressing objects: 100% (312/312), done.
prremote: Total 672 (delta 451), reused 576 (delta 355)
Receiving objects: 100% (672/672), 450.81 KiB | 678 KiB/s, done.
Resolving deltas: 100% (451/451), done.

dmd@lumen ~/build
$ cd proxychains/

dmd@lumen ~/build/proxychains
$ ls
AUTHORS         ChangeLog       README          configure       proxychains.lsm tests
COPYING         Makefile        TODO            dist            src

dmd@lumen ~/build/proxychains
$ ./configure 
Darwin
done, now run make && make install

dmd@lumen ~/build/proxychains
$ make
cc -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror  -DIS_MAC=1 -arch x86_64 -arch i386 -DLIB_DIR=\"/usr/local/lib\" -DINSTALL_PREFIX=\"/usr/local\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/core.o src/core.c
src/core.c:845:14: error: implicit declaration of function 'getservbyname_r' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
        if(service) getservbyname_r(service, NULL, &se_buf, buf, sizeof(buf), &se);
                    ^
src/core.c:845:14: note: did you mean 'getservbyname'?
        if(service) getservbyname_r(service, NULL, &se_buf, buf, sizeof(buf), &se);
                    ^~~~~~~~~~~~~~~
                    getservbyname
/usr/include/netdb.h:288:17: note: 'getservbyname' declared here
struct servent  *getservbyname(const char *, const char *);
                 ^
1 error generated.
make: *** [src/core.o] Error 1

dmd@lumen ~/build/proxychains
$ 

proxychanins works for only for some application

Hi Dear,
I've reinstalled my gentoo machine and I've found a strange proxychains behaviour...
With some apps it works ( ssh, wget ) and with other not ( links , emerge(python)).

I think could be something with LD_LIBRARY...But I can't find where. Can you help me?

follow apps library:
ldd /usr/bin/ssh
linux-vdso.so.1 (0x00007fffba9ff000)
libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007f20125f8000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f20123f4000)
libz.so.1 => /lib64/libz.so.1 (0x00007f20121de000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f2011fc7000)
libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00007f2011d80000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2011b63000)
libc.so.6 => /lib64/libc.so.6 (0x00007f20117bb000)
/lib64/ld-linux-x86-64.so.2 (0x00007f20129cd000)
libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007f20114ec000)
libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007f20112b9000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f20110b5000)
libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007f2010ea9000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f2010ca5000)

ldd /usr/bin/links
linux-vdso.so.1 (0x00007fff8edff000)
libtiff.so.5 => /usr/lib64/libtiff.so.5 (0x00007fc6cd4d3000)
libjpeg.so.8 => /usr/lib64/libjpeg.so.8 (0x00007fc6cd282000)
libpng15.so.15 => /usr/lib64/libpng15.so.15 (0x00007fc6cd054000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fc6ccd17000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fc6ccb07000)
libz.so.1 => /lib64/libz.so.1 (0x00007fc6cc8f1000)
libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007fc6cc682000)
libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007fc6cc2ad000)
libgpm.so.1 => /lib64/libgpm.so.1 (0x00007fc6cc0a6000)
libm.so.6 => /lib64/libm.so.6 (0x00007fc6cbdb0000)
libc.so.6 => /lib64/libc.so.6 (0x00007fc6cba08000)
libjbig.so => /usr/lib64/libjbig.so (0x00007fc6cb7fc000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fc6cb5db000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fc6cb3d7000)
libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007fc6cb108000)
libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007fc6caed5000)
libncurses.so.5 => /lib64/libncurses.so.5 (0x00007fc6cac81000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc6cd745000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fc6caa7d000)
libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007fc6ca877000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fc6ca673000)
libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007fc6ca467000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fc6ca263000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fc6ca04c000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc6c9e2f000)

And my system info:
System uname: Linux-3.7.10-gentoo-x86_64-Intel-R-_Core-TM-i3_CPU_M_330@_2.13GHz-with-gentoo-2.1
KiB Mem: 3717888 total, 44452 free
KiB Swap: 4194300 total, 2765140 free
Timestamp of tree: Mon, 25 Mar 2013 00:00:01 +0000
ld GNU ld (GNU Binutils) 2.22
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 3.1.9 [enabled]
app-shells/bash: 4.2_p37
dev-java/java-config: 2.1.12-r1
dev-lang/python: 2.5.4-r4, 2.7.3-r3, 3.2.3-r2
dev-util/ccache: 3.1.9
dev-util/cmake: 2.8.9
dev-util/pkgconfig: 0.28
sys-apps/baselayout: 2.1-r1
sys-apps/openrc: 0.11.8
sys-apps/sandbox: 2.5
sys-devel/autoconf: 2.13, 2.69
sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.6
sys-devel/binutils: 2.22-r1
sys-devel/gcc: 4.6.3
sys-devel/gcc-config: 1.7.3
sys-devel/libtool: 2.4-r1
sys-devel/make: 3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc: 2.15-r3
Repositories: gentoo zugaina sabayon bgo-overlay x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -mtune=core2 -march=core2"
CHOST="x86_64-pc-linux-gnu"
FCFLAGS="-O2 -pipe"

LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"

xvfb + firefox from python shell timed out

hello )
why there is a timeout when the firefox starts from python shell as selenium webdriver?

proxychains4 -f pc4 xvfb-run firefox
[proxychains] config file found: pc4
[proxychains] preloading /usr/local/lib/libproxychains4.so
[proxychains] DLL init
Xlib: extension "RANDR" missing on display ":99".
[proxychains] Strict chain ... 1xx.3x.1xx.5x:xxxx ... start.ubuntu.com:80 ... OK
[proxychains] Strict chain ... 1xx.3x.1xx.5x:xxxx ... sb-ssl.google.com:443 ... OK

proxychains4 -f pc4 xvfb-run python
[proxychains] config file found: pc4
[proxychains] preloading /usr/local/lib/libproxychains4.so
Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from selenium import webdriver
browser = webdriver.Firefox()
[proxychains] DLL init
[proxychains] Strict chain ... 1xx.3x.1xx.5x:xxxx ... localhost:46889 <--timeout
[proxychains] Strict chain ... 1xx.3x.1xx.5x:xxxx ... localhost:46889 <--timeout
[many such lines]
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 51, in init
self.binary, timeout),
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 47, in init
self.binary.launch_browser(self.profile)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 44, in launch_browser
self._wait_until_connectable()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 86, in _wait_until_connectable
self.profile.path, self._get_firefox_output()))
selenium.common.exceptions.WebDriverException: Message: 'Can't load the profile. Profile Dir: /tmp/tmpjgBIFF Firefox output: Xlib: extension "RANDR" missing on display ":99".\n*** LOG addons.xpi: startup\n*** LOG addons.xpi: checkForChanges\n*** LOG addons.xpi: No changes found\n'

how to avoid this timeout?

i386 support

Hi there.
I will be glad if proxychains4 would support i386 binary, for example in mac os x :
1)
export VERSIONER_PYTHON_PREFER_32_BIT=yes

./proxychains4 python -c "print 1"
[proxychains] config file found: /Users/ma/.proxychains/proxychains.conf
[proxychains] preloading /usr/local/lib/libproxychains4.dylib
dyld: could not load inserted library: /usr/local/lib/libproxychains4.dylib

Trace/BPT trap: 5
  1. export VERSIONER_PYTHON_PREFER_32_BIT=no
proxychains4 python -c "print 1"
[proxychains] config file found: /Users/ma/.proxychains/proxychains.conf
[proxychains] preloading /usr/local/lib/libproxychains4.dylib
1

On my mind it's because usr/local/lib/libproxychains4.dylib is just x86_64:
file /usr/local/lib/libproxychains4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
So forcing to compile proxychains in i386 doesn't work.

doesn't compile on osx 10.7.3

sh-3.2# make
cc -shared -fPIC -ldl -lpthread -Wl,-soname=libproxychains4.so -o libproxychains4.so src/core.o src/libproxychains.o
ld: unknown option: -soname=libproxychains4.so
collect2: ld returned 1 exit status
make: *** [libproxychains4.so] Error 1

sh-3.2# gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2335.1525/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.1525/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)

mac osx always timeout

hi Adam, thanks for you promote this wonderful project first!

i have goole and still can't resolve the problem...
i am using lion 10.7.3,
first i :

git clone github.com/haad/proxychains
./configure
make && make install

the log seems normal without error:


cc -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror -DIS_MAC=1 -arch x86_64 -arch i386 -DLIB_DIR="/usr/local/lib" -DINSTALL_PREFIX="/usr/local" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/core.o src/core.c
cc -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror -DIS_MAC=1 -arch x86_64 -arch i386 -DLIB_DIR="/usr/local/lib" -DINSTALL_PREFIX="/usr/local" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/libproxychains.o src/libproxychains.c
cc -shared -fPIC -ldl -lpthread -Wl,-install_name,libproxychains4.dylib -o libproxychains4.dylib src/core.o src/libproxychains.o
cc -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror -DIS_MAC=1 -arch x86_64 -arch i386 -DLIB_DIR="/usr/local/lib" -DINSTALL_PREFIX="/usr/local" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/main.o src/main.c
cc src/main.o -o proxychains4
install -d //usr/local/bin //usr/local/lib //usr/local/etc //usr/local/include
install: chmod 755 //usr/local/lib: Operation not permitted
install -m 755 proxychains4 //usr/local/bin/
install -m 644 libproxychains4.dylib //usr/local/lib/
install -m 644 src/proxychains.conf //usr/local/etc


then i configured the /usr/local/etc/proxychains.conf
changed the last line to :
socks4 127.0.0.1 9051
(i downloaded the TorBrowser_en-US.app from the torproject.org, unchecked the Configure ControlPort automatically, and it automatically set the ControlPort at 9051; if i change it to 9050, tor won't works )


here is the problem:
$ proxychains4 nc cmyip.com 80
[proxychains] config file found: /Users/art/.proxychains/proxychains.conf
[proxychains] preloading ./libproxychains4.dylib
[proxychains] DLL init
[proxychains] Strict chain ... 127.0.0.1:9051 ... cmyip.com:80<--timeout

please give me some advice , thanks in advance!

frank

usage() "-t" should be "-f"

main.c:

static int usage(char **argv) {
    printf("\nUsage:\t%s -q -f config_file program_name [arguments]\n"
           "\t-q makes proxychains quiet - this overrides the config setting\n"
           "\t-t allows to manually specify a configfile to use\n"
           "\tfor example : proxychains telnet somehost.com\n" "More help in README file\n\n", argv[0]);
    return EXIT_FAILURE;
}

"-t" should be "-f"

localnet documentation missing ?

i have up to now still not figured what the localnet stuff is for and how it can be used/works.
please update README or default proxychains config file with an example (commented out of course)

Improve proxychains documentation, please

Hi folks,
unfortunatelly, IMHO the documentation of proxychains is not very useful for some scenarios.

For example, if I want to connect an application via http proxy to www, I could not find any examples about it.

Client: 139.1.164.10
Proxy: 139.1.168.207 Port 8080 (auth required --> user: proxy pass: #proxypass!)

No tor or proxy running on client.

proxychains midori http://checkip.dyndns.org

ProxyChains-3.1 (http://proxychains.sf.net)
Vector smash protection is enabled.
|S-chain|-<>-139.1.168.207:8080-<><>-139.1.168.207:8080-<--denied

my /etc/proxychains.conf:

#dynamic_chain
strict_chain
#proxy_dns

[ProxyList]
# add proxy here ...
# meanwile
# defaults set to "tor"
#socks4 	127.0.0.1 9050
http	139.1.168.207	8080	proxy	#proxypass!

brew formula for proxychains4

Hi,

I work in MacOS and use homebrew to manage packages. I knew there're still some issues to make this proxychains4 to have an official formula by now. But I think this is useful and helpful for me. So I created a gist at somebody's convenience.

https://gist.github.com/3792521

Thanks for your woks

Trace/BPT Trap on Mac

I am very new to all this, so I apologize if I am in the wrong place. I have just installed proxychains4 on my Mac (10.8.3) using a fresh install of Homebrew.

I opened /usr/local/etc/proxychains.conf and set the Proxylist to one entry:
socks4 127.0.0.1 8081

After doing so I opened a SOCKS4 proxy over SSH to another server using:
ssh -fN -D 8081 far.away.server

proxychains4 curl -s http://checkip.dyndns.org then reports the correct IP address of far.away.server.

However, when I try to run a graphical Mac program, I get:
[proxychains] config file found: /usr/local/Cellar/proxychains/HEAD/etc/proxychains.conf
[proxychains] preloading /usr/local/Cellar/proxychains/HEAD/lib/libproxychains4.dylib
dyld: could not load inserted library: /usr/local/Cellar/proxychains/HEAD/lib/libproxychains4.dylib

Trace/BPT trap

I do not know if this is a problem that happened during compilation, or something local to my system. Any help would be appreciated.

The homebrew script I used:
require 'formula'

class Proxychains < Formula
head 'https://github.com/haad/proxychains.git'
homepage 'https://github.com/haad/proxychains'

def install
system "./configure", "--prefix=#{prefix}"
system "make"
system "make install"
system "make install-config"
end
end

Support android cellphone?

Thanks for this wonderful software.

I have no android compile experience,
Just wonder if proxychains could support compile for my android phone?

If could support, I will discover it myself.

Thanks

FreeBSD build fails due to unsupported functions in libproxychains.c

This is the patch file I dug out of FreeBSD ports tree. Can these changes please be incorporated into the source code so it will build properly on FreeBSD?

--- proxychains/libproxychains.c.orig   Wed Mar 15 18:16:59 2006
+++ proxychains/libproxychains.c        Sun Dec 10 01:16:37 2006
@@ -160,7 +160,7 @@

        if(!(file=fopen("./proxychains.conf","r")))
        if(!(file=fopen(buff,"r")))
-       if(!(file=fopen("/etc/proxychains.conf","r")))
+       if(!(file=fopen(PREFIX "/etc/proxychains.conf","r")))
        {
                perror("Can't locate proxychains.conf");
                exit(1);
@@ -290,8 +290,8 @@

 int getnameinfo (const struct sockaddr * sa,
                        socklen_t salen, char * host,
-                       socklen_t hostlen, char * serv,
-                       socklen_t servlen, unsigned int flags)
+                       size_t hostlen, char * serv,
+                       size_t servlen, int flags)
 {
        int ret = 0;
        if(!init_l)}}}

unable to compile on fedora 64b

Hi,
This is what i got today when cloning and trying to compile current git:

make
cc -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DTHREAD_SAFE -Werror -Wextra -Wunused -Wuninitialized -Wconversion -fno-common -march=corei7-avx -mtune=corei7-avx -O3 -pipe -DLIB_DIR="/usr/local/lib" -DINSTALL_PREFIX="/usr/local" -DDLL_NAME="libproxychains4.so" -DSYSCONFDIR="/usr/local/etc" -fPIC -c -o src/core.o src/core.c
src/core.c: In function ‘make_internal_ip’:
src/core.c:91:36: error: conversion to ‘unsigned char’ from ‘uint32_t’ may alter its value [-Werror=conversion]
src/core.c:92:34: error: conversion to ‘unsigned char’ from ‘uint32_t’ may alter its value [-Werror=conversion]
src/core.c: In function ‘tunnel_to’:
src/core.c:403:6: error: conversion to ‘size_t’ from ‘int’ may change the sign of the result [-Werror=sign-conversion]
src/core.c:407:6: error: conversion to ‘size_t’ from ‘int’ may change the sign of the result [-Werror=sign-conversion]
src/core.c: At top level:
src/core.c:829:2: error: unknown type name ‘__unused’
src/core.c: In function ‘proxy_getaddrinfo’:
src/core.c:881:3: error: implicit declaration of function ‘proxy_getserverbyname’ [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make: *** [src/core.o] Error 1

doesn't work with atom

Hi,

I try the follow command, but it doesnt work.

proxychains atom

But,

proxychains chromium-browser 

works fine.

Segmentation fault while resolving local hostname

Hi, I'm getting segfault while connecting to any server by domain:

tom@hotmeal:~/workspace/proxychains_haad$ ./proxychains4 telnet google.com 80
[proxychains] config file found: /home/tom/workspace/proxychains_haad/proxychains.conf
[proxychains] preloading ./libproxychains4.so
DEBUG:init_lib_wrapper called from gcc_init
DEBUG:added localnet: netaddr=127.0.0.0, netmask=255.0.0.0
[proxychains] DLL init
DEBUG:loaded symbol 'connect' real addr 0x7fee8271ebd0  wrapped addr 0x7fee8342088a
DEBUG:loaded symbol 'gethostbyname' real addr 0x7fee82736bf0  wrapped addr 0x7fee83420c97
DEBUG:loaded symbol 'getaddrinfo' real addr 0x7fee826f89b0  wrapped addr 0x7fee83420dc9
DEBUG:loaded symbol 'freeaddrinfo' real addr 0x7fee826f9430  wrapped addr 0x7fee83420e7e
DEBUG:loaded symbol 'gethostbyaddr' real addr 0x7fee82736660  wrapped addr 0x7fee8342107f
DEBUG:loaded symbol 'getnameinfo' real addr 0x7fee8273ca90  wrapped addr 0x7fee83420efd
DEBUG:gethostbyname: tomhouse
Segmentation fault (core dumped)

While exploring the code I found that 'proxy_gethostbyname' returns a partially zeroed structure when trying to resolve local hostname, so it causes segfault in telnet (I think so).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.