rofl0r / proxychains-ng

proxychains ng (new generation) - a preloader which hooks calls to sockets in dynamically linked programs and redirects it through one or more socks/http proxies. continuation of the unmaintained proxychains project. the sf.net page is currently not updated, use releases from github release page instead.
http://sourceforge.net/projects/proxychains-ng/files
GNU General Public License v2.0
9.82k stars 1.08k forks source link

Test proxychains-ng directly without using the conf file. #550

Closed hongyi-zhao closed 9 months ago

hongyi-zhao commented 9 months ago

Suppose I have the following options in my conf file:

strict_chain
proxy_dns_daemon 127.0.0.1:1053
remote_dns_subnet 224
tcp_read_time_out 15000
tcp_connect_time_out 8000
 localnet 127.0.0.0/255.0.0.0
 localnet 10.0.0.0/255.0.0.0
 localnet 172.16.0.0/255.240.0.0
 localnet 192.168.0.0/255.255.0.0
[ProxyList]
socks5  127.0.0.1 18888

I want to test proxychains-ng by passing the above options directly from the command line, it this possible?

Regards, Zhao

hongyi-zhao commented 9 months ago

I tried as follows but failed:

werner@X10DAi:~$ proxychains4 -f <(echo -e "strict_chain\nproxy_dns\ntcp_read_time_out 15000\ntcp_connect_time_out 8000\n[ProxyList]\nsocks5 127.0.0.1 10100") /bin/git  clone git://git.lyx.org/lyx.git
[proxychains] config file found: /dev/fd/63
[proxychains] preloading /usr/local/lib/libproxychains4.so
[proxychains] DLL init: proxychains-ng 4.16-git-18-g1d0bc34
Cloning into 'lyx'...
[proxychains] Strict chain  ...  127.0.0.1:10100  ...  git.lyx.org:9418  ...  OK
[proxychains] DLL init: proxychains-ng 4.16-git-18-g1d0bc34
error: no valid proxy found in config
fatal: fetch-pack: invalid index-pack output

The proxy itself works:

werner@X10DAi:~$ curl --socks5 127.0.0.1:10100 http://google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
rofl0r commented 9 months ago

no, it is not possible. this has been requested multiple times in the past and denied.