LINUX.ORG.RU

История изменений

Исправление pfg, (текущая версия) :

тестанул из дома. ошибка у меня в строке нужно curl --socks5 127.0.0.1:1080 -v http://httpbin.org/ip вот ответ

$ curl --socks5 127.0.0.1:1080 -v http://httpbin.org/ip
*   Trying 127.0.0.1:1080...
* SOCKS5 connect to IPv4 18.207.88.57:80 (locally resolved)
* SOCKS5 request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 8456 (#0)
> GET /ip HTTP/1.1
> Host: httpbin.org
> User-Agent: curl/7.81.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Wed, 12 Oct 2022 20:25:54 GMT
< Content-Type: application/json
< Content-Length: 33
< Connection: keep-alive
< Server: gunicorn/19.9.0
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Credentials: true
< 
{
  "origin": "***.***.228.214"
}
* Connection #0 to host 127.0.0.1 left intact

«***.***.228.214» это адрес удаленного ssh-сервера, значит socks-прокси через ssh -D работает.

Исходная версия pfg, :

тестанул из дома. ошибка у меня в строке нужно curl --socks5 127.0.0.1:1080 -v http://httpbin.org/ip вот ответ

$ curl --socks5 127.0.0.1:1080 -v http://httpbin.org/ip
*   Trying 127.0.0.1:1080...
* SOCKS5 connect to IPv4 18.207.88.57:80 (locally resolved)
* SOCKS5 request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 8456 (#0)
> GET /ip HTTP/1.1
> Host: httpbin.org
> User-Agent: curl/7.81.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Wed, 12 Oct 2022 20:25:54 GMT
< Content-Type: application/json
< Content-Length: 33
< Connection: keep-alive
< Server: gunicorn/19.9.0
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Credentials: true
< 
{
  "origin": "***.***.228.214"
}
* Connection #0 to host 127.0.0.1 left intact

«***.***.228.214» это адрес удаленного сервера, значит socks-прокси через ssh -D работает.