krayneakkuraten
Member
Сабж проблемы: proxychains не хочет работать с браузером Firefox. Изначально стояла версия 3.17 и 4.хх по дефолту на Kali Linux и проблема была в том, что команда
приводит к тому, что браузер открывается, очень долго грузится и в итоге выдает посреди экрана Unable to connect.
А вот при команде curl результат был:
то есть IP менялся. Посёрфиф интернеты в поисках ответа пришёл к выводу, что мне нужен во-первых 100% рабочий прокси, который я и купил, и во-вторых мне нужна новая версия proxychains-ng (GitHub - 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.) которую я через git установил себе. Теперь у меня другая проблема и конкретно о ней ниже.
Конфиг proxychains4
Самый последний socks5 как раз купленный мной прокси-сервер (он рабочий).
Пробовал также в конфиге убирать коммент на
и наоборот комментить
- результат тот же.
Пробовал комментить
и раскомменчивать
запуская в одном терминале proxychains4-daemon, а во втором выполнять команду
результата так же не принесло.
Порядок моих действий:
запуск терминала, ввод
, проверка служб ТОР
. Результат
Проверка IP
Проверка IP через proxychains4
Запускаю в одном терминале proxychains4-daemon, а во втором firefox и получаю результат (это как раз при раскомменченной в конфиге строке proxy_dns_daemon 127.0.0.1:1053) :
Пошёл после этого проверять конфиг torrc
Система пишет, что с конфигурацией всё норм.
Попытки настроить прокси (платный, который и в конфиге проксичейн указан) внутри Firefox привели к успеху, там всё работает ОК.
Вопрос: почему не работает proxychains-ng. Ни с браузером, ни просто через curl? Просьба помочь подсказать куда копать, что сделать? Заранее всем откликнувшимся СПАСИБО.
Код с оформлением (BB-коды):
proxychains firefox duckduckgo.com
А вот при команде curl результат был:
Код:
proxychains curl 2ip.io
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.17
[proxychains] Dynamic chain ... 127.0.0.1:5090 ... timeout
[proxychains] Dynamic chain ... 208.65.90.21:4145 ... 174.75.211.222:4145 ... 70.166.167.55:57745 ... 2ip.io:80 ... OK
70.166.167.55
Конфиг proxychains4
Код:
# proxychains.conf VER 4.x
# HTTP, SOCKS4a, SOCKS5 tunneling proxifier with DNS.
# The option below identifies how the ProxyList is treated.
# only one option should be uncommented at time,
# otherwise the last appearing option will be accepted
#
dynamic_chain
#
# Dynamic - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# at least one proxy must be online to play in chain
# (dead proxies are skipped)
# otherwise EINTR is returned to the app
#
#strict_chain
#
# Strict - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# all proxies must be online to play in chain
# otherwise EINTR is returned to the app
#
#round_robin_chain
#
# Round Robin - Each connection will be done via chained proxies
# of chain_len length
# all proxies chained in the order as they appear in the list
# at least one proxy must be online to play in chain
# (dead proxies are skipped).
# the start of the current proxy chain is the proxy after the last
# proxy in the previously invoked proxy chain.
# if the end of the proxy chain is reached while looking for proxies
# start at the beginning again.
# otherwise EINTR is returned to the app
# These semantics are not guaranteed in a multithreaded environment.
#
#random_chain
#
# Random - Each connection will be done via random proxy
# (or proxy chain, see chain_len) from the list.
# this option is good to test your IDS :)
# Make sense only if random_chain or round_robin_chain
#chain_len = 2
# Quiet mode (no output from library)
#quiet_mode
## Proxy DNS requests - no leak for DNS data
# (disable all of the 3 items below to not proxy your DNS requests)
# method 1. this uses the proxychains4 style method to do remote dns:
# a thread is spawned that serves DNS requests and hands down an ip
# assigned from an internal list (via remote_dns_subnet).
# this is the easiest (setup-wise) and fastest method, however on
# systems with buggy libcs and very complex software like webbrowsers
# this might not work and/or cause crashes.
proxy_dns
# method 2. use the old proxyresolv script to proxy DNS requests
# in proxychains 3.1 style. requires `proxyresolv` in $PATH
# plus a dynamically linked `dig` binary.
# this is a lot slower than `proxy_dns`, doesn't support .onion URLs,
# but might be more compatible with complex software like webbrowsers.
#proxy_dns_old
# method 3. use proxychains4-daemon process to serve remote DNS requests.
# this is similar to the threaded `proxy_dns` method, however it requires
# that proxychains4-daemon is already running on the specified address.
# on the plus side it doesn't do malloc/threads so it should be quite
# compatible with complex, async-unsafe software.
# note that if you don't start proxychains4-daemon before using this,
# the process will simply hang.
#proxy_dns_daemon 127.0.0.1:1053
# set the class A subnet number to use for the internal remote DNS mapping
# we use the reserved 224.x.x.x range by default,
# if the proxified app does a DNS request, we will return an IP from that range.
# on further accesses to this ip we will send the saved DNS name to the proxy.
# in case some control-freak app checks the returned ip, and denies to
# connect, you can use another subnet, e.g. 10.x.x.x or 127.x.x.x.
# of course you should make sure that the proxified app does not need
# *real* access to this subnet.
# i.e. dont use the same subnet then in the localnet section
#remote_dns_subnet 127
#remote_dns_subnet 10
remote_dns_subnet 224
# Some timeouts in milliseconds
tcp_read_time_out 15000
tcp_connect_time_out 8000
### Examples for localnet exclusion
## localnet ranges will *not* use a proxy to connect.
## note that localnet works only when plain IP addresses are passed to the app,
## the hostname resolves via /etc/hosts, or proxy_dns is disabled or proxy_dns_old used.
## Exclude connections to 192.168.1.0/24 with port 80
# localnet 192.168.1.0:80/255.255.255.0
## Exclude connections to 192.168.100.0/24
# localnet 192.168.100.0/255.255.255.0
## Exclude connections to ANYwhere with port 80
# localnet 0.0.0.0:80/0.0.0.0
# localnet [::]:80/0
## RFC6890 Loopback address range
## if you enable this, you have to make sure remote_dns_subnet is not 127
## you'll need to enable it if you want to use an application that
## connects to localhost.
# localnet 127.0.0.0/255.0.0.0
# localnet ::1/128
## RFC1918 Private Address Ranges
# 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
### Examples for dnat
## Trying to proxy connections to destinations which are dnatted,
## will result in proxying connections to the new given destinations.
## Whenever I connect to 1.1.1.1 on port 1234 actually connect to 1.1.1.2 on port 443
# dnat 1.1.1.1:1234 1.1.1.2:443
## Whenever I connect to 1.1.1.1 on port 443 actually connect to 1.1.1.2 on port 443
## (no need to write :443 again)
# dnat 1.1.1.2:443 1.1.1.2
## No matter what port I connect to on 1.1.1.1 port actually connect to 1.1.1.2 on port 443
# dnat 1.1.1.1 1.1.1.2:443
## Always, instead of connecting to 1.1.1.1, connect to 1.1.1.2
# dnat 1.1.1.1 1.1.1.2
# ProxyList format
# type ip port [user pass]
# (values separated by 'tab' or 'blank')
#
# only numeric ipv4 addresses are valid
#
#
# Examples:
#
# socks5 192.168.67.78 1080 lamer secret
# http 192.168.89.3 8080 justu hidden
# socks4 192.168.1.49 1080
# http 192.168.39.93 8080
#
#
# proxy types: http, socks4, socks5, raw
# * raw: The traffic is simply forwarded to the proxy without modification.
# ( auth types supported: "basic"-http "user/pass"-socks )
#
[ProxyList]
# add proxy here ...
# meanwile
# defaults set to "tor"
socks4 127.0.0.1 9050
socks5 127.0.0.1 9050
socks5 1xx.0.xxx.xxx 1xxx0 userxxxxx xxxx7
Пробовал также в конфиге убирать коммент на
Код:
strict_chain
Код:
dynamic_chain
Пробовал комментить
Код:
proxy_dns
Код:
proxy_dns_daemon 127.0.0.1:1053
Код:
proxychains4 firefox duckduckgo.com
Порядок моих действий:
запуск терминала, ввод
Код:
sudo service tor start
Код:
sudo service tor status
Код:
tor.service - Anonymizing overlay network for TCP (multi-instance-master)
Loaded: loaded (/usr/lib/systemd/system/tor.service; disabled; preset: disabled)
Active: active (exited) since Fri 2024-08-02 хх:хх:хх ХХХ; 1h 7min ago
Invocation: a0ddab19915745e2хххххххххххххххх
Process: 7273 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 7273 (code=exited, status=0/SUCCESS)
Aug 02 01:хх:хх kali systemd[1]: Starting tor.service - Anonymizing overlay network for TCP (mul>
Aug 02 01:хх:хх kali systemd[1]: Finished tor.service - Anonymizing overlay network for TCP (mul>
Проверка IP
Код:
sudo curl 2ip.io
хх.153.хх.хх
Проверка IP через proxychains4
Код:
$ proxychains4 curl 2ip.io
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/libproxychains4.so
[proxychains] DLL init: proxychains-ng 4.17-git-2-g821249f
[proxychains] Dynamic chain ... 127.0.0.1:9050 ... 127.0.0.1:9050 <--denied
[proxychains] Dynamic chain ... 127.0.0.1:9050 ... xx6.0.xx1.1xx:14xx0 <--socket error or timeout!
[proxychains] Dynamic chain ... 127.0.0.1:9050 ... 2ip.io:80 <--socket error or timeout!
curl: (7) Failed to connect to 2ip.io port 80 after 1 ms: Couldn't connect to server
Запускаю в одном терминале proxychains4-daemon, а во втором firefox и получаю результат (это как раз при раскомменченной в конфиге строке proxy_dns_daemon 127.0.0.1:1053) :
Код:
proxychains4 firefox www.google.com
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/libproxychains4.so
[proxychains] DLL init: proxychains-ng 4.17-git-2-g821249f
[proxychains] DLL init: proxychains-ng 4.17-git-2-g821249f
[proxychains] DLL init: proxychains-ng 4.17-git-2-g821249f
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
[proxychains] DLL init: proxychains-ng 4.17-git-2-g821249f
[proxychains] DLL init: proxychains-ng 4.17-git-2-g821249f
[proxychains] DLL init: proxychains-ng 4.17-git-2-g821249f
[proxychains] DLL init: proxychains-ng 4.17-git-2-g821249f
[proxychains] DLL init: proxychains-ng 4.17-git-2-g821249f
[proxychains] DLL init: proxychains-ng 4.17-git-2-g821249f
[proxychains] DLL init: proxychains-ng 4.17-git-2-g821249f
[proxychains] Dynamic chain ... 127.0.0.1:9050 ... 1xx.x.2xx.1xx:1xxx0 <--socket error or timeout!
[proxychains] Dynamic chain ... 127.0.0.1:9050 ... www.google.com:443 <--socket error or timeout!
[proxychains] Dynamic chain ... 127.0.0.1:9050 ... firefox.settings.services.mozilla.com:443 ^CExiting due to channel error.
Exiting due to channel error.
Пошёл после этого проверять конфиг torrc
Код:
$ sudo /usr/bin/tor --defaults-torrc /usr/share/tor/tor-service-defaults-torrc -f /etc/tor/torrc --RunAsDaemon 0 --verify-config
Aug 04 21:08:12.903 [notice] Tor 0.4.8.12 running on Linux with Libevent 2.1.12-stable, OpenSSL 3.2.2, Zlib 1.3.1, Liblzma 5.6.2, Libzstd 1.5.6 and Glibc 2.38 as libc.
Aug 04 21:08:12.903 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
Aug 04 21:08:12.903 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Aug 04 21:08:12.903 [notice] Read configuration file "/etc/tor/torrc".
Configuration was valid
Попытки настроить прокси (платный, который и в конфиге проксичейн указан) внутри Firefox привели к успеху, там всё работает ОК.
Вопрос: почему не работает proxychains-ng. Ни с браузером, ни просто через curl? Просьба помочь подсказать куда копать, что сделать? Заранее всем откликнувшимся СПАСИБО.