• 请不要在回答技术问题时复制粘贴 AI 生成的内容
brookepe
V2EX  ›  程序员

咨询一个代理的问题

  •  
  •   brookepe · Jul 26, 2024 · 2025 views
    This topic created in 720 days ago, the information mentioned may be changed or developed.

    各位大佬 我现在有一个需求是

    A 服务器请求 https://graph.facebook.com 会加上代理服务器 B 然后由 B 服务器请求到 https://graph.facebook.com 中间会再加一层代理

    现在就 https 这一层被挡住了 不知道咋写了

    9 replies    2024-07-26 18:06:32 +08:00
    kxg3030
        1
    kxg3030  
       Jul 26, 2024
    你是自己写代理还是用别人的,如果是 B 再转发一次,你需要手动处理 B 的上层代理的 tls 握手
    Yanickkk
        2
    Yanickkk  
       Jul 26, 2024
    tool2dx
        3
    tool2dx  
       Jul 26, 2024
    你又不做中间人,无脑转发就行可以。
    zagfai
        4
    zagfai  
       Jul 26, 2024
    iptable port forward
    yinmin
        5
    yinmin  
       Jul 26, 2024
    用 sni proxy 最简单
    brookepe
        6
    brookepe  
    OP
       Jul 26, 2024
    直接端口转发的话 header 中的 proxy-authorization 参数好像会丢失
    因为业务的原因 认证参数 也会携带 想一并转发到新的代理上去
    yinmin
        7
    yinmin  
       Jul 26, 2024
    docker run -d --name=sniserver --restart=always -p 443:443 ginuerzh/gost -L sni://:443 -F <proxyip>:1080

    然后/etc/hosts 将 graph.facebook.com 指向 docker 服务器 ip 。内网架一台 SNI Server ,用起来爽歪歪呢。

    @brookepe
    brookepe
        8
    brookepe  
    OP
       Jul 26, 2024
    @raviscioniemeche 代理是别人的 因为网络的原因 我会在香港那边做一次代理
    brookepe
        9
    brookepe  
    OP
       Jul 26, 2024
    @yinmin #7 这种不行 我还要加一层代理
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5576 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 57ms · UTC 08:28 · PVG 16:28 · LAX 01:28 · JFK 04:28
    ♥ Do have faith in what you're doing.