This commit is contained in:
Stepan 2026-04-13 18:41:25 +03:00
parent 9510dca32a
commit cf4c425d14
2 changed files with 30 additions and 0 deletions

26
code/proxy/app.py Normal file
View File

@ -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}')

4
code/proxy/main.sh Normal file
View File

@ -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