Python example added
This commit is contained in:
17
README.md
17
README.md
@@ -32,6 +32,23 @@ my $sock = IO::Socket::SOCKS->new(
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### python
|
||||||
|
```bash
|
||||||
|
pip install requests[socks]
|
||||||
|
```
|
||||||
|
|
||||||
|
```python
|
||||||
|
import requests
|
||||||
|
|
||||||
|
proxies = {
|
||||||
|
'http': 'socks5://127.0.0.1:1080',
|
||||||
|
'https': 'socks5://127.0.0.1:1080'
|
||||||
|
}
|
||||||
|
|
||||||
|
response = requests.get('https://httpbin.org/ip', proxies=proxies)
|
||||||
|
print(response.json())
|
||||||
|
```
|
||||||
|
|
||||||
### nodejs
|
### nodejs
|
||||||
```bash
|
```bash
|
||||||
npm install socks-proxy-agent
|
npm install socks-proxy-agent
|
||||||
|
|||||||
Reference in New Issue
Block a user