# 第五十四课：基于Powershell做Socks 4-5代理

**连载2：**\
在上一篇连载中讲到powershell可无缝来调.net framework。而在实战中，内网的代理尤其重要，如常见的端口转发被反病毒软件盯死。本章无图，其他同学如有环境测试，可补图。

介绍 github：\
<https://raw.githubusercontent.com/p3nt4/Invoke-SocksProxy/master/Invoke-SocksProxy.psm1>

## Examples

**Create a Socks 4/5 proxy on port 1234:**

```bash
Import-Module .\Invoke-SocksProxy.psm1 
Invoke-SocksProxy -bindPort 1234
```

**Create a simple tcp port forward:**

```bash
Import-Module .\Invoke-SocksProxy.psm1
Invoke-PortFwd -bindPort 33389 -destHost 127.0.0.1 -destPort 3389
```

可目前过大部分反病毒软件。

> Micropoor


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://micro8.gitbook.io/micro8/contents-1/51-60/54-ji-yu-powershell-zuo-socks45-dai-li.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
