【问题标题】:Squid config different proxy ruleSquid 配置不同的代理规则
【发布时间】:2015-08-14 01:51:03
【问题描述】:

我想创建一个代理服务器,当我尝试访问某些 url 时,服务器连接到另一台服务器,而其他 url 将保持常规代理服务。有谁知道如何在 squild 中设置这个?

【问题讨论】:

    标签: squid


    【解决方案1】:

    在 acl 中指定域(我尝试访问一些 url,服务器连接到另一个服务器,其他 url 将维护常规代理服务。)。

    如果你想连接到其他服务器进行 google 请求,将 acl 定义为

    acl alloweddomains dstdomain google.com google.co.uk

    你可以简单地在一个文本文件中指定所有域并在acl中加载它

    acl alloweddomains dstdomain "<path>/domains.txt"
    

    然后使用 cache_peer 选项。

    cache_peer next_server_ip parent 80 0 no-query originserver name=allowserver
    cache_peer_access allowserver allow alloweddomains 
    cache_peer_access deny all
    

    【讨论】:

    • 这不是我想要的。 alloweddomains 不是我需要的。我需要类似 mycomputer(转到 google)-->myproxy(连接到 google)和 mycomputer(转到 yahoo)-->proxy-->另一个代理-->yahoo
    【解决方案2】:

    通过你的解释,我意识到:

    You would need dual or more proxy set on source client.
    If this is true ; 
    
    so this is not valid configuration .
    

    您的想法的完美解决方案;

    1. 您应该在客户端设置一个代理
    2. 代理的另一端(例如 Squid 代理服务器)
    3. 您可以配置到其他代理服务器的隧道。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多