From 5144c906055cc4a080fed1f52730987f0b252ca1 Mon Sep 17 00:00:00 2001 From: ArcticLampyrid Date: Sat, 9 Mar 2024 17:43:06 +0800 Subject: [PATCH] docs: add note on proxy type --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 51b93a1..a99175c 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,29 @@ ```bash docker run -d -p 40000:40000 qiqiworld/warp-socks5 -``` \ No newline at end of file +``` + +## Note +This image exposes just a SOCKS5 proxy, not a mixed proxy server. + +You **CANNOT** use this server as a HTTP/HTTPS proxy. + +## Usage +### Python +First, install the requests library. + +```bash +pip install requests[socks] +``` + +Then, you can access the proxy server with the following code. + +```python +import requests +proxies = { + 'http': 'socks5://127.0.0.1:40000/', + 'https': 'socks5://127.0.0.1:40000/', +} +response = requests.get('https://www.cloudflare.com/cdn-cgi/trace', proxies=proxies) +print(response.text) +```