【问题标题】:How use squid to change IP?如何使用squid更改IP?
【发布时间】:2019-10-29 03:19:56
【问题描述】:

我有一个带有 1 个主 IP 和 2 个附加 FO IP 的 VPS 服务器。我下载“squid”包来管理我的 IP 地址。我编辑了 /etc/squid/squid.conf 并添加了行(教程:https://tastyplacement.com/squid-proxy-multiple-outgoing-ip-addresses):

acl tasty3128 myportname 3128 src 51.75.50.116/24
http_access allow tasty3128
tcp_outgoing_address 51.75.50.116 tasty3128

acl tasty3129 myportname 3129 src 54.38.50.208/24
http_access allow tasty3129
tcp_outgoing_address 54.38.50.208 tasty3129

http_port 51.75.50.116:3128 name=3128
http_port 54.38.50.208:3129 name=3129

如何使用这个“鱿鱼”配置?我可以在哪里传递参数来使用taste3128 IP?我正在寻找有关此的信息,每个人都在谈论配置,而不是执行。将来我想通过 Python 脚本(或由 Python 执行的其他脚本)管理 IP。

【问题讨论】:

    标签: python networking server squid


    【解决方案1】:

    您的代码完全正确,但行的顺序不正确;

    在你的 squid.conf 中:

    • 首先配置:http_port 51.75.50.116:3128 name=3128
    • 然后配置:acl taste3128 myportname 3128 src 51.75.50.116/24 等等。

    【讨论】:

      猜你喜欢
      • 2014-03-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-01
      • 1970-01-01
      • 2020-04-25
      • 1970-01-01
      相关资源
      最近更新 更多