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.83k stars 1.08k forks source link

doesn't work in macos 12.1 (x86_64) #419

Closed 1amfine2333 closed 2 years ago

1amfine2333 commented 2 years ago

Environment: macOS 112.1 x86_64, SIP disabled image

rofl0r commented 2 years ago

paste your config.mak

you need to use curl from homebrew, not from system path

1amfine2333 commented 2 years ago

paste your config.mak

you need to use curl from homebrew, not from system path

No problem with the config, i use curl installed through brew, but it doesn’t work。 image

1amfine2333 commented 2 years ago

By compiling from source it works !

Environment

  • Shell Version zsh 5.8 (x86_64-apple-darwin21.0)
  • macOS Monterey Version 12.1 x86_64
  • SIP disabled

Steps to reproduce

➜  ~ wget -P ~/Downloads https://github.com/rofl0r/proxychains-ng/archive/refs/heads/master.zip
➜  ~ unzip ~/Downloads/master.zip -d ~/Downloads
➜  ~ cd ~/Downloads/proxychains-ng-master
➜  ~ sh configure
➜  ~ make && make install

paste your config.mak @rofl0r

➜  ~ cat ~/Downloads/proxychains-ng-master/config.mak 

CC=cc
CPPFLAGS=-I/usr/local/opt/zlib/include
USER_LDFLAGS=-L/usr/local/opt/zlib/lib
prefix=/usr/local
exec_prefix=/usr/local
bindir=/usr/local/bin
libdir=/usr/local/lib
includedir=/usr/local/include
sysconfdir=/usr/local/etc
CPPFLAGS+= -DSUPER_SECURE
CPPFLAGS+=  -DHAVE_CLOCK_GETTIME
NO_AS_NEEDED=
LD_SET_SONAME = -Wl,-install_name,
LIBDL = -ldl
PTHREAD = -lpthread
LDSO_SUFFIX=dylib
MAC_CFLAGS+=-DIS_MAC=1
CFLAGS+=-DMONTEREY_HOOKING
➜  ~ 
  • Compiling from source created the following utility paths

    • /usr/local/lib/libproxychains4.dylib
    • /usr/local/bin/proxychains4-daemon
    • /usr/local/bin/proxychains4
  • Configuration looks like this
➜  ~ cat /usr/local/etc/proxychains.conf
# proxychains.conf  VER 4.x
dynamic_chain
proxy_dns
tcp_read_time_out 15000
tcp_connect_time_out 8000
[ProxyList]
socks4    127.0.0.1 9050
socks5    127.0.0.1 9050
➜  ~ 

It works !

  • Run Tor successfully
➜  ~ brew services run tor
==> Successfully ran `tor` (label: homebrew.mxcl.tor)
➜  ~ 
  • Run proxychains successfully
➜  ~ /usr/local/bin/proxychains4 curl https://check.torproject.org/api/ip
[proxychains] config file found: /usr/local/etc/proxychains.conf
[proxychains] preloading /usr/local/lib/libproxychains4.dylib
[proxychains] DLL init: proxychains-ng 4.15
[proxychains] Dynamic chain  ...  127.0.0.1:9050  ...  127.0.0.1:9050 <--denied
[proxychains] Dynamic chain  ...  127.0.0.1:9050  ...  check.torproject.org:443  ...  OK
{"IsTor":true,"IP":"xxx.xxx.xxx.xxx"}%                                                                                                                                              ➜  ~ 

It works ! Add CFLAGS+=-DMONTEREY_HOOKINGat the end of config.mak,thanks! image