gpt4 book ai didi

firefox - 如何使用curl 通过代理模拟来自Firefox 的请求?

转载 作者:行者123 更新时间:2023-12-02 14:12:27 25 4
gpt4 key购买 nike

特别是,当我将 Firefox 设置为使用 https 流量代理时,我试图复制 Firefox 的行为。

根据我的测试,Firefox 似乎向代理发送 CONNECT 请求,而以下curl 命令直接向代理发送 GET。

curl --proxy-basic mydomain.com:8001 https://www.google.com

如何使curl 的行为像firefox 一样用于HTTPS 连接代理的测试目的?

EDIT1:问题不在于用户代理,因为我并不想欺骗代理以为我是 Firefox,只是为了帮助代理以 Firefox 的方式运行。

最佳答案

我已经通过 Firebug 完成了此操作。

安装 Firebug 后,请按照以下步骤操作:

  1. 右键单击 Firefox 中的网页并选择此选项:

enter image description here

  • 选择网络选项卡
  • enter image description here

  • 刷新页面

  • 右键单击要模拟的 URL 请求

  • 选择复制为 cURL

  • enter image description here

  • 您要模拟的 URL 请求现已位于剪贴板中。
  • 关于firefox - 如何使用curl 通过代理模拟来自Firefox 的请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15333660/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com