Osx

你能偽造一個 SOCKS5 代理嗎?

  • December 23, 2015

我想知道是否有可能做類似的事情

curl --socks5-hostname 127.0.0.1:8080 url.com

無需實際通過任何代理,只需正常的網際網路連接,這意味著您擁有正常的 IP 等。

好吧,如果您通過環回通過 ssh 登錄:

% ssh -D 8080 localhost

然後,您將為您創建 localhost:8080 socks 代理,該代理將使用您已經使用的相同主機/IP/路由。

來自ssh(1)

 -D [bind_address:]port
Specifies a local ``dynamic'' application-level port forwarding.  This
works by allocating a socket to listen to port on the local side,
optionally bound to the specified bind_address.  Whenever a connection
is made to this port, the connection is forwarded over the secure
channel, and the application protocol is then used to determine
where to connect to from the remote machine.  Currently the SOCKS4 and
SOCKS5 protocols are supported, and ssh will act as a SOCKS server.

否則,如果您不想擁有 SOCKS5 代理,您希望將什麼用作 SOCKS5 代理處理程序並不是很清楚。

引用自:https://unix.stackexchange.com/questions/251010