Olej писал(а): ↑17 сен 2023, 02:12
К вопросу о скорости (замедлении) при использовании TOR-прокси...
К скорости...
На клиенте работает TOR-стек:
Код: Выделить всё
olej@nvme:~$ ps -A | grep tor
627 ? 00:00:00 tor
olej@nvme:~$ sudo netstat -tunlp | grep tor
tcp 0 0 127.0.0.1:9050 0.0.0.0:* LISTEN 627/tor
На сервере (за 4000 км) запускаю iperf3 на открытый брандмауэром порт:
Код: Выделить всё
olej@277938:~$ iperf3 -s -p 8080
-----------------------------------------------------------
Server listening on 8080
-----------------------------------------------------------
...
Прямое подключение:
Код: Выделить всё
olej@nvme:~$ iperf3 -c linux-ru.ru -p8080
Connecting to host linux-ru.ru, port 8080
[ 5] local 192.168.1.241 port 54664 connected to 90.156.230.27 port 8080
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 5.01 MBytes 42.0 Mbits/sec 0 1.30 MBytes
[ 5] 1.00-2.00 sec 5.00 MBytes 41.9 Mbits/sec 516 732 KBytes
[ 5] 2.00-3.00 sec 6.25 MBytes 52.4 Mbits/sec 0 790 KBytes
[ 5] 3.00-4.00 sec 6.25 MBytes 52.4 Mbits/sec 0 830 KBytes
[ 5] 4.00-5.00 sec 5.00 MBytes 41.9 Mbits/sec 0 854 KBytes
[ 5] 5.00-6.00 sec 6.25 MBytes 52.4 Mbits/sec 0 868 KBytes
[ 5] 6.00-7.00 sec 5.00 MBytes 41.9 Mbits/sec 0 874 KBytes
[ 5] 7.00-8.00 sec 6.25 MBytes 52.4 Mbits/sec 0 874 KBytes
[ 5] 8.00-9.00 sec 6.25 MBytes 52.4 Mbits/sec 29 615 KBytes
[ 5] 9.00-10.00 sec 5.00 MBytes 41.9 Mbits/sec 0 703 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 56.3 MBytes 47.2 Mbits/sec 545 sender
[ 5] 0.00-10.12 sec 53.6 MBytes 44.4 Mbits/sec receiver
iperf Done.
Всё верно - 50 Mbits/sec это скорость, которую я оплачиваю своему
провайдеру
P.S. Со стороны сервера хостер обеспечивает:
Код: Выделить всё
olej@277938:~$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from LLC masterhost (90.156.230.27)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by FishNet.kz (Shymkent) [2731.45 km]: 45.892 ms
Testing download speed................................................................................
Download: 96.44 Mbit/s
Testing upload speed......................................................................................................
Upload: 90.95 Mbit/s
Что не вносит дополнительных ограничений
Теперь на тех же конечных точках трассы, но через TOR-цепочку хостов (TOR SOCKS):
Код: Выделить всё
olej@nvme:~$ export SOCKS4_SERVER=127.0.0.1:9050; socksify iperf3 -c linux-ru.ru -p8080
Connecting to host linux-ru.ru, port 8080
[ 5] local 0.0.0.0 port 0 connected to 90.156.230.27 port 8080
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 7.50 MBytes 62.9 Mbits/sec 1 4.50 MBytes
[ 5] 1.00-2.00 sec 0.00 Bytes 0.00 bits/sec 0 4.50 MBytes
[ 5] 2.00-3.00 sec 1.25 MBytes 10.5 Mbits/sec 1 639 KBytes
[ 5] 3.00-4.00 sec 0.00 Bytes 0.00 bits/sec 0 639 KBytes
[ 5] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 0 639 KBytes
[ 5] 5.00-6.00 sec 0.00 Bytes 0.00 bits/sec 0 639 KBytes
[ 5] 6.00-7.00 sec 0.00 Bytes 0.00 bits/sec 0 639 KBytes
[ 5] 7.00-8.00 sec 0.00 Bytes 0.00 bits/sec 0 639 KBytes
[ 5] 8.00-9.00 sec 0.00 Bytes 0.00 bits/sec 1 639 KBytes
[ 5] 9.00-10.00 sec 1.25 MBytes 10.5 Mbits/sec 0 639 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 10.0 MBytes 8.39 Mbits/sec 3 sender
[ 5] 0.00-10.58 sec 1.65 MBytes 1.31 Mbits/sec receiver
iperf Done.
На сервере iperf3 при этом мы видим для 2-х случаев картины:
Код: Выделить всё
olej@277938:~$ iperf3 -s -p 8080
-----------------------------------------------------------
Server listening on 8080
-----------------------------------------------------------
iperf3: error - unable to receive parameters from client: Cannot allocate memory
-----------------------------------------------------------
Server listening on 8080
-----------------------------------------------------------
Accepted connection from 193.28.177.116, port 54650
[ 5] local 90.156.230.27 port 8080 connected to 193.28.177.116 port 54664
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 1.29 MBytes 10.8 Mbits/sec
[ 5] 1.00-2.00 sec 6.12 MBytes 51.3 Mbits/sec
[ 5] 2.00-3.00 sec 5.75 MBytes 48.3 Mbits/sec
[ 5] 3.00-4.00 sec 5.75 MBytes 48.2 Mbits/sec
[ 5] 4.00-5.00 sec 5.75 MBytes 48.3 Mbits/sec
[ 5] 5.00-6.00 sec 5.75 MBytes 48.3 Mbits/sec
[ 5] 6.00-7.00 sec 5.75 MBytes 48.3 Mbits/sec
[ 5] 7.00-8.00 sec 5.75 MBytes 48.3 Mbits/sec
[ 5] 8.00-9.00 sec 5.70 MBytes 47.8 Mbits/sec
[ 5] 9.00-10.00 sec 5.25 MBytes 43.9 Mbits/sec
[ 5] 10.00-10.12 sec 694 KBytes 48.4 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.12 sec 53.6 MBytes 44.4 Mbits/sec receiver
-----------------------------------------------------------
Server listening on 8080
-----------------------------------------------------------
Accepted connection from 104.244.77.192, port 41624
[ 5] local 90.156.230.27 port 8080 connected to 104.244.77.192 port 41638
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 71.1 KBytes 582 Kbits/sec
[ 5] 1.00-2.00 sec 195 KBytes 1.60 Mbits/sec
[ 5] 2.00-3.00 sec 267 KBytes 2.18 Mbits/sec
[ 5] 3.00-4.00 sec 76.9 KBytes 630 Kbits/sec
[ 5] 4.00-5.00 sec 205 KBytes 1.68 Mbits/sec
[ 5] 5.00-6.00 sec 180 KBytes 1.48 Mbits/sec
[ 5] 6.00-7.00 sec 247 KBytes 2.02 Mbits/sec
[ 5] 7.00-8.00 sec 56.6 KBytes 464 Kbits/sec
[ 5] 8.00-9.00 sec 140 KBytes 1.15 Mbits/sec
[ 5] 9.00-10.00 sec 120 KBytes 980 Kbits/sec
[ 5] 10.00-10.58 sec 128 KBytes 1.81 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.58 sec 1.65 MBytes 1.31 Mbits/sec receiver
-----------------------------------------------------------
Server listening on 8080
-----------------------------------------------------------
Вряд ли скорость 1.31 Mbits/sec здесь можно соотносить хоть как-то со скоростью канала 50 Mbits/sec - она будет у разных клиентов в разной геолокации на такой цепочке...