Use SOCKS proxy mode
The socks backend mode creates a SOCKS5 proxy for dynamic port forwarding to multiple destinations through a single
share. Use this when you need to access multiple services on a remote network.
-
On the remote machine, create a private share in SOCKS mode:
zrok2 share private --backend-mode socks -
On your local machine, bind the share to a local SOCKS5 port:
zrok2 access private --bind 127.0.0.1:1080 <share-token> -
Configure your applications to use the SOCKS5 proxy at
127.0.0.1:1080. For example:curl:
curl --socks5-hostname 127.0.0.1:1080 http://internal-server:8080/apiSSH (to access any host reachable from the remote machine):
ssh -o ProxyCommand='nc -x 127.0.0.1:1080 %h %p' user@internal-hostBrowser: Configure your browser's proxy settings to use SOCKS5 proxy
127.0.0.1:1080to browse internal web applications.