{"id":13539555,"url":"https://github.com/p3nt4/invoke-socksproxy","last_synced_at":"2025-04-04T13:08:37.918Z","repository":{"id":41203179,"uuid":"110075830","full_name":"p3nt4/Invoke-SocksProxy","owner":"p3nt4","description":"Socks proxy, and reverse socks server using powershell. ","archived":false,"fork":false,"pushed_at":"2021-03-21T21:00:40.000Z","size":71,"stargazers_count":785,"open_issues_count":0,"forks_count":168,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-28T12:04:33.822Z","etag":null,"topics":["network","powershell","proxy","socks","socks-proxy"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p3nt4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["p3nt4"]}},"created_at":"2017-11-09T06:20:40.000Z","updated_at":"2025-03-23T00:11:54.000Z","dependencies_parsed_at":"2022-07-14T10:31:21.632Z","dependency_job_id":null,"html_url":"https://github.com/p3nt4/Invoke-SocksProxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p3nt4%2FInvoke-SocksProxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p3nt4%2FInvoke-SocksProxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p3nt4%2FInvoke-SocksProxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p3nt4%2FInvoke-SocksProxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p3nt4","download_url":"https://codeload.github.com/p3nt4/Invoke-SocksProxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247179035,"owners_count":20896958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["network","powershell","proxy","socks","socks-proxy"],"created_at":"2024-08-01T09:01:27.800Z","updated_at":"2025-04-04T13:08:37.900Z","avatar_url":"https://github.com/p3nt4.png","language":"PowerShell","funding_links":["https://github.com/sponsors/p3nt4"],"categories":["\u003ca id=\"1a9934198e37d6d06b881705b863afc8\"\u003e\u003c/a\u003e通信\u0026\u0026代理\u0026\u0026反向代理\u0026\u0026隧道","\u003ca id=\"d03d494700077f6a65092985c06bf8e8\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"f932418b594acb6facfc35c1ec414188\"\u003e\u003c/a\u003eSocks\u0026\u0026ShadowSocksXx","\u003ca id=\"57b8e953d394bbed52df2a6976d98dfa\"\u003e\u003c/a\u003eSocks"],"readme":"# Invoke-SocksProxy\nCreates a local or \"reverse\" Socks proxy using powershell.\n\nThe local proxy is a simple Socks 4/5 proxy.\n\nThe 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.\n\n# Examples\n\n## Local \n\nCreate a Socks 4/5 proxy on port 1080:\n```\nImport-Module .\\Invoke-SocksProxy.psm1\nInvoke-SocksProxy -bindPort 1080\n```\n\nIncrease the maximum number of threads from 200 to 400\n```\nImport-Module .\\Invoke-SocksProxy.psm1\nInvoke-SocksProxy -threads 400\n```\n## Reverse\n\nCreate a \"reverse\" Socks 4/5 proxy on port 1080 of a remote host:\n```\n# On the remote host: \n# Generate a private key and self signed cert\nopenssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout private.key -out cert.pem\n\n# Get the certificate fingerprint to verify it:\nopenssl x509 -in cert.pem -noout -sha1 -fingerprint | cut -d \"=\" -f 2 | tr -d \":\"\n\n# Start the handler\npython3 ReverseSocksProxyHandler.py 443 1080 ./cert.pem ./private.key\n\n# On the local host:\nImport-Module .\\Invoke-SocksProxy.psm1\nInvoke-ReverseSocksProxy -remotePort 443 -remoteHost 192.168.49.130 \n\n# Go through the system proxy:\nInvoke-ReverseSocksProxy -remotePort 443 -remoteHost 192.168.49.130 -useSystemProxy\n\n# Validate certificate\nInvoke-ReverseSocksProxy -remotePort 443 -remoteHost 192.168.49.130 -certFingerprint '93061FDB30D69A435ACF96430744C5CC5473D44E'\n\n# Give up after a number of failed connections to the handler:\nInvoke-ReverseSocksProxy -remotePort 443 -remoteHost 192.168.49.130 -maxRetries 10\n\n```\n\nCredit for the System Proxy trick: https://github.com/Arno0x/PowerShellScripts/blob/master/proxyTunnel.ps1\n\n\n# Limitations\n- 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.\n- When the Socks Proxy runs out of available threads, new connections cannot be established until a thread is freed.\n- New features will be implemented in the future. PR are welcome.\n\n# Disclaimer\nThis project is intended for security researchers and penetration testers and should only be used with the approval of system owners.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp3nt4%2Finvoke-socksproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp3nt4%2Finvoke-socksproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp3nt4%2Finvoke-socksproxy/lists"}