mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-08 13:29:53 +00:00
25 lines
591 B
Python
25 lines
591 B
Python
import requests
|
|
|
|
proxies = {
|
|
'http': 'http://127.0.0.1:18080',
|
|
'https': 'http://127.0.0.1:18080',
|
|
}
|
|
|
|
|
|
def test_http(it):
|
|
for i in range(it):
|
|
r = requests.get('http://127.0.0.1:18081', proxies=proxies)
|
|
assert r.status_code == 200 and r.text == 'control is an illusion'
|
|
|
|
|
|
def test_https(it):
|
|
for i in range(it):
|
|
r = requests.get('https://127.0.0.1:18082',
|
|
proxies=proxies, verify=False)
|
|
assert r.status_code == 200 and r.text == 'control is an illusion'
|
|
|
|
|
|
if __name__ == '__main__':
|
|
test_http(10)
|
|
test_https(10)
|