代码片段: https://gist.github.com/jan-bar/b856c271712a6481260131dd66dd7ffe
测试命令如下
```sh
# http CONNECT proxy method
curl -v -x http://127.0.0.1:1080 https://cn.bing.com https://www.baidu.com https://www.sina.com
# http direct proxy method
curl -v -x http://127.0.0.1:1080 cn.bing.com www.baidu.com www.sina.com
# socks5 proxy method
curl -v -x socks5://127.0.0.1:1080 https://cn.bing.com https://www.baidu.com https://www.sina.com
# socks5h proxy method
curl -v -x socks5h://127.0.0.1:1080 https://cn.bing.com https://www.baidu.com https://www.sina.com
```
还可以在 func proxyDial 方法中添加连接二级代理服务器的代码。 |
|