Need help with Invoke-SocksProxy?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

631 Stars 146 Forks MIT License 61 Commits 0 Opened issues


Socks proxy, and reverse socks server using powershell.

Services available


Need anything else?

Contributors list

# 45,708
56 commits
# 366,311
2 commits


Creates a local or "reverse" Socks proxy using powershell.

The local proxy is a simple Socks 4/5 proxy.

The reverse proxy creates a tcp tunnel by initiating outbond SSL connections that can go through the system's proxy. The tunnel can then be used as a socks proxy on the remote host to pivot into the local host's network.



Create a Socks 4/5 proxy on port 1080:

Import-Module .\Invoke-SocksProxy.psm1
Invoke-SocksProxy -bindPort 1080

Increase the maximum number of threads from 200 to 400

Import-Module .\Invoke-SocksProxy.psm1
Invoke-SocksProxy -threads 400


Create a "reverse" Socks 4/5 proxy on port 1080 of a remote host: ```

On the remote host:

Generate a private key and self signed cert

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout private.key -out cert.pem

Get the certificate fingerprint to verify it:

openssl x509 -in cert.pem -noout -sha1 -fingerprint | cut -d "=" -f 2 | tr -d ":"

Start the handler

python3 443 1080 ./cert.pem ./private.key

On the local host:

Import-Module .\Invoke-SocksProxy.psm1 Invoke-ReverseSocksProxy -remotePort 443 -remoteHost

Go through the system proxy:

Invoke-ReverseSocksProxy -remotePort 443 -remoteHost -useSystemProxy

Validate certificate

Invoke-ReverseSocksProxy -remotePort 443 -remoteHost -certFingerprint '93061FDB30D69A435ACF96430744C5CC5473D44E'

Give up after a number of failed connections to the handler:

Invoke-ReverseSocksProxy -remotePort 443 -remoteHost -maxRetries 10

Credit for the System Proxy trick:


  • This is only a subset of the Socks 4 and 5 protocols: It does not support authentication, It does not support UDP or bind requests.
  • When the Socks Proxy runs out of available threads, new connections cannot be established until a thread is freed.
  • New features will be implemented in the future. PR are welcome.


This project is intended for security researchers and penetration testers and should only be used with the approval of system owners.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.