Repository navigation
Description
which error ?
generally it doesn't work.
version
$ brew info proxychains-ng
proxychains-ng: stable 4.10, HEAD
Hook preloader
https://sourceforge.net/projects/proxychains-ng/
/usr/local/Cellar/proxychains-ng/4.8.1 (8 files, 100K)
Built from source
/usr/local/Cellar/proxychains-ng/4.10 (8 files, 88K) *
Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/proxychains-ng.rb
==> Options
--universal
Build a universal binary
--HEAD
Install HEAD versiontestcase
Config
strict_chain
proxy_dns
remote_dns_subnet 224
tcp_read_time_out 15000
tcp_connect_time_out 8000
localnet 127.0.0.0/255.0.0.0
[ProxyList]
socks5 127.0.0.1 30039Test
$ proxychains4 curl http://ifconfig.co/
[proxychains] config file found: /Users/User/.proxychains/proxychains.conf
[proxychains] preloading /usr/local/Cellar/proxychains-ng/4.10/lib/libproxychains4.dylib
{{an ip resulted from DIRECT accessed http://ifconfig.co/ }}why does your proxychains not print version information ? (it should)
like [proxychains] DLL init: proxychains-ng 4.10 ?
on my non-el-capitan OS X, it does and it works
if that is so, someone needs to research which changes were introduced in 10.11 that breaks LD_PRELOAD and how to fix it.
possibly it's the guilt of this new "feature": https://en.wikipedia.org/wiki/System_Integrity_Protection
any idea how to fix it?
you could try to disable the system integrity protection (as described in the wikipedia article) temporarily to see if it makes proxychains work. if so, we can try to seek a permanent workaround.
yes, disabling it would led to success in working of proxy chains
Disabling SIP
Run csrutil disable in Recovery mode
@Willian-Zhang thanks for testing. now we can look if there's a way to disable the LD_PRELOAD "protection" "feature" for handpicked applications, in our case proxychains-ng.
@rofl0r any luck with this problem?
i haven't found any documentation about the LD_PRELOAD specific protection so far. we need to wait until more information is available (probably after the official release).
Activity
Willian-Zhang commentedon Sep 6, 2015
Logs above are moved from #74
[-]Not working on OS X 10.11 due to LD_PRELOAD protection[/-][+]Not working on OS X 10.11 due to SIP[/+]tais9 commentedon Sep 8, 2015
It only happens if you execute a system binary using proxychains, e.g. proxychains4 ssh user@server. For now, a workaround is to copy the executable to another location (e.g. cp /usr/bin/ssh ~/XXX), and use it (e.g. proxychains4 ~/XXX/ssh user@server). You can modify the path variable so that ~/XXX/ssh is executed instead of /usr/bin/ssh, when you just type "ssh".
Pikaurd commentedon Sep 17, 2015
@tais9 worked of me
thanks
kennel209 commentedon Oct 1, 2015
In OSX 10.11
something workaround is to turn off debug flag in SIP in recovery mode
csrutil enable --without debug
otherwise, proxychains cannot apply to /bin/* /usr/bin/* /System* ... unfortunately most script with #!/usr/bin/env XXX
cache0928 commentedon Oct 12, 2015
I find that if you move the executable file(proxychains4) to your home folder(like ~/bin), and then you need to change the PATH value. If you do this, you don't have to disable the SIP, , it will works with no error @Willian-Zhang
wd commentedon Nov 4, 2015
If do not want to disalbe SIP, you can use pyenv to solve this. Use pyenv install a local python version(of cuz, you can install a python use make && make install from source).
And then run command like this
proxychains4 ~/.pyenv/versions/2.7.9/bin/python /usr/local/Cellar/youtube-dl/2015.10.24/bin/youtube-dlWillian-Zhang commentedon Dec 11, 2015
Update
For those who's disabling SIP to make it work:
There is no need to disable all SIP:debug mode will also work
Disabling partial SIP
Run
csrutil enable --without debugin Recovery modeMatzFan commentedon Feb 22, 2016
For those like me who do not wish to disable SIP, note that it is possible to use proxychains-ng with Homebrew-installed executables (or linked dupes) as SIP doesn't cover /usr/local. E.g. to use Homebrew's curl (with Tor in the .conf file here):
$ brew install curlThen:
Perhaps this could be added to the README section where this issue is mentioned?
rofl0r commentedon Feb 22, 2016
@MatzFan please elaborate on "linked dupes". is there a possibility to use e.g. ssh with a softlink or a hardlink ?
MatzFan commentedon Feb 22, 2016
Using the curl example you can do
brew link --force curlwhich will use Homebrew's curl before system installed version (as Homebrew insists /usr/local/bin comes before /usr/bin in your $PATH). If you do that you can simply do$ proxychains4 curl http://ifconfig.co/. Generally not advised to override (dupe) system binaries like this - hence my example using path to the Homebrew Cellar. Homebrew call this Keg only I think.Not tried ssh, but any Homebrew-installed binary should work with proxychains like this on El Cap., as SIP doesn't affect the directory where all brewed symlinks go.
MatzFan commentedon Feb 23, 2016
Homebrew openssh seems to work (using Tor in my .conf file):
meritozh commentedon Mar 31, 2016
because of SIP, you can't use proxychains-ng to proxy a execute which is in system dir like /usr/bin. But /usr/local/bin can works. Something like youtube-dl with call python which is in /usr/bin, install a Homebrew python or others can solve it.
zanjs commentedon Nov 18, 2016
5 remaining items
JasonQSY commentedon Jan 18, 2017
For
git, usesudo proxychains4 git cloneworks for me.liftliftlift commentedon Mar 10, 2017
Acorrding to Apple we should use path like /usr/local instead of /usr or /usr/bin etc since OS X El Capitan. See https://support.apple.com/en-us/HT204899.
And my solved steps at OSX 10.11.6:
==> Downloading https://homebrew.bintray.com/bottles/proxychains-ng-4.12_1.el_ca
Already downloaded: /Users/futeli/Library/Caches/Homebrew/proxychains-ng-4.12_1.el_capitan.bottle.tar.gz
==> Pouring proxychains-ng-4.12_1.el_capitan.bottle.tar.gz
🍺 /usr/local/Cellar/proxychains-ng/4.12_1: 8 files, 74.8KB
Proxychains-ng now has been installed at path /usr/local/Cellar
brew install curl
==> Downloading https://homebrew.bintray.com/bottles/curl-7.53.1.el_capitan.bott
######################################################################## 100.0%
==> Pouring curl-7.53.1.el_capitan.bottle.tar.gz
==> Caveats
(here has some caveats I don't use this time)
==> Summary
🍺 /usr/local/Cellar/curl/7.53.1: 390 files, 2.7MB
Huang-Libo commentedon Oct 26, 2017
@tais9
You helped me!
rickygu commentedon Jan 11, 2019
On mac 10.14.2,
csrutil enable --without debugdoesn't work. I had to disable completely to kind of work.I would often get this error warning but everything works fine.
How do I get rid of this error?
heany commentedon Feb 2, 2019
In mac 10.14, why ? and how do I solve this error?
theblackturtle commentedon Feb 11, 2019
I have this problem too.
ilyamochalov commentedon Apr 4, 2019
same problem for me on
macOS 10.13.6,
ShadowsocksX-NG 1.7.1
proxychains-ng 4.14
peiyaoli commentedon Apr 16, 2019
same issues here
Neboer commentedon Jun 4, 2019
I am using Ubuntu 19.04 and I still can't launch GUI programme in a graphic way.
I saw the above discussion and the problem seems have been solved, but in your last release Release 4.14 the problem still occurs. Please find out a solution and solve it, thank you very much.
rofl0r commentedon Jun 4, 2019
you volunteer? great!
btw, your comment has nothing to do with the issue discussed here, so post further updates about your work in a new issue/PR.
kk580kk commentedon Oct 18, 2019
I can solve this problem!!!!
Problem
first
Gitl clone https://github.com/rofl0r/proxychains-ng.gitthen make
./configure --prefix=/usr/local --sysconfdir=/etcsudo make installinstalled in
/usr/local/bin/proxychains4but
/usr/local/bin/proxychains4 curl -v -L https://ip.cn/returns
{"ip": "xxx.xxx.xxx.xxx", "country": "上海市", "city": "移动”}
Same problem there
Solve it
install curl by brew
brew install curlthen do it
/usr/local/bin/proxychains4 /usr/local/opt/curl/bin/curl -v -L https://ip.cnSolved
{"ip": "xxx.xxx.xxx.xxx", "country": "美国", "city": "阿里云”}
Finally
In case I use zsh.
echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.zshrcThen
proxychains4 curl -v -L https://ip.cn/Got
{"ip": "xxx.xxx.xxx.xxx", "country": "美国", "city": "阿里云"}
Goal
omidraha commentedon Nov 22, 2020
Same issue, fixed for some commands as @tais9 said.
lupguo commentedon Apr 22, 2023
MacOS Ventura 13.2.1,
proxychains curl ipinfo.iogot unexpected result (no pass by proxy),butproxychains wget google.comis ok!Brew install an new curl on mac then using proxychains with the new curl filepath to solove this problem.
godspeedcurry commentedon Jul 31, 2023
install
for people who doesn't want to disable SIP, you can type
brew install curl opensshworks fine for ssh、scp、curl
verify
you can type the following command to verify
which ssh && which scp && which curlPS: remember to add their path to
~/.zshrcor~/.bashrc