update
This commit is contained in:
parent
9510dca32a
commit
cf4c425d14
|
|
@ -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}')
|
||||
|
|
@ -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
|
||||
Loading…
Reference in New Issue