python-3.x - 为什么我的 HTTP 代理没有连接到 HTTPS 网站?
问题描述
我试图了解为什么代理没有连接到网站,而是显示我的 IP
import httpx
import asyncio
proxies = {"http": "http://34.91.135.38:80"}
async def main():
async with httpx.AsyncClient(proxies=proxies) as client:
s = await client.get('https://api.ipify.org')
print(s.text)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
当我尝试这样做时,它将显示我的 IP,而不是我选择的 IP。我希望能够使用我的代理连接到网站
解决方案
推荐阅读
- sql - FROM 子句中的@table
- c++ - 高兴导致 glfwSwapBuffers 返回错误消息
- wordpress - appengine 上的连接 FTP wordpress 问题
- reactjs - 如何在 React 中制作一个显示增量值的输入滑块?
- python - Python Gurobi:在优化停止之前输出 MIPGap、运行时和求解细节
- python - TensorFlow 不兼容的形状二进制分类
- spring-boot - 是否可以通过单击 JSP 页面上的按钮来控制循环(forEach)?
- rust - 字符串变量赋值期间的 E0308
- python - Heroku dyno 没有出现
- c# - asp.net - 如何从 post 方法中获取价值