From cf4c425d1453d977954dc739671f7ce845f3ab77 Mon Sep 17 00:00:00 2001 From: Stepan Date: Mon, 13 Apr 2026 18:41:25 +0300 Subject: [PATCH] update --- code/proxy/app.py | 26 ++++++++++++++++++++++++++ code/proxy/main.sh | 4 ++++ 2 files changed, 30 insertions(+) create mode 100644 code/proxy/app.py create mode 100644 code/proxy/main.sh diff --git a/code/proxy/app.py b/code/proxy/app.py new file mode 100644 index 0000000..5c2676d --- /dev/null +++ b/code/proxy/app.py @@ -0,0 +1,26 @@ +import requests +import urllib3 + +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + +urlpr='http://vps-sni-site.site:507/api/random' +url='https://httpbin.org/ip' + +r = requests.get(urlpr, verify=False) +data = r.json() +text = data["proxy"] + +proxies = { + 'http': text, + 'https': text +} + +j = requests.get(url, proxies=proxies, verify=False) +data2 = j.json() +text2 = data2["origin"] + +f = requests.get(url, verify=False) +data3 = f.json() +text3 = data3['origin'] + +print(f'Прокси: {text2}\nБез прокси: {text3}') \ No newline at end of file diff --git a/code/proxy/main.sh b/code/proxy/main.sh new file mode 100644 index 0000000..87453e1 --- /dev/null +++ b/code/proxy/main.sh @@ -0,0 +1,4 @@ +sudo apt update && sudo apt install python3-pip +pip install requests --break-system-packages +pip install urllib3 --break-system-packages +pip install 'requests[socks]' --break-system-packages \ No newline at end of file