Squid プロキシ - 複数の IP アドレス

Squid プロキシ - 複数の IP アドレス

Ubuntu VPS を入手しましたが、これを複数の IP アドレスを持つプロキシ サーバーに変えて、ボットに使用したいと考えています。

しかし、私が作成したプロキシの問題は、異なるポートを持つ 1 つの IP アドレスのみであり、その 1 つの IP アドレスからのリクエストが多すぎるため、Web サイトによってブロックされることです。

1 つのサーバーから複数の異なる IP アドレスを取得する方法はありますか?

これは私の設定です

http_port 3128
http_port 8000
http_port 8080
http_port 8001
http_port 8002
http_port 8003
http_port 8004
http_port 8005
http_port 8006
http_port 8007
http_port 8008
http_port 8009


http_port 49.12.xxx.101:3128 name=3128
http_port 49.12.xxx.101:8000 name=8000
http_port 49.12.xxx.101:8585 name=8080
http_port 49.12.xxx.101:8001 name=8001
http_port 49.12.xxx.101:8002 name=8002
http_port 49.12.xxx.101:8003 name=8003
http_port 49.12.xxx.101:8004 name=8004
http_port 49.12.xxx.101:8005 name=8005
http_port 49.12.xxx.101:8006 name=8006
http_port 49.12.xxx.101:8007 name=8007
http_port 49.12.xxx.101:8008 name=8008
http_port 49.12.xxx.101:8009 name=8009

acl user3 myportname 3128 src all
http_access allow 3128
tcp_outgoing_address 49.12.xxx.101 user3

acl user1 myportname 8000 src all
http_access allow user1
tcp_outgoing_address 2a01:4f8:1c17:6181::2 user1

acl user2 myportname 8080 src all
http_access allow 8080
tcp_outgoing_address 2a01:4f8:1c17:6181::3 user2

acl user3 myportname 8003 src all
http_access allow user3
tcp_outgoing_address 2a01:4f8:1c17:6181::4 user3

acl user4 myportname 8004 src all
http_access allow user4
tcp_outgoing_address 2a01:4f8:1c17:6181::5 user4

acl user5 myportname 8005 src all
http_access allow user5
tcp_outgoing_address 2a01:4f8:1c17:6181::6 user5

acl user6 myportname 8006 src all
http_access allow user6
tcp_outgoing_address 2a01:4f8:1c17:6181::7 user6

acl user7 myportname 8007 src all
http_access allow user7
tcp_outgoing_address 2a01:4f8:1c17:6181::8 user7

acl user8 myportname 8008 src all
http_access allow user8
tcp_outgoing_address 2a01:4f8:1c17:6181::9 user8

acl user9 myportname 8009 src all
http_access allow user9
tcp_outgoing_address 2a01:4f8:1c17:6181::10 user9

答え1

  • とにかく答えてみます。間違っていたら訂正してください。私は独学で学位も持っていませんが、この問題を解決する方法はいくつかあります。

    1. AWS、Linode などのほとんどの VPS プロバイダー/ホストでは、追加料金で複数の IP4 アドレスを追加できます。Linode にはネットワークの下にオプションがあり、1 回のクリックで追加の IP4 が得られるため、負荷が軽減されます。

    2. ポートはなぜこんなに多いのでしょうか? ポートは次のようになります: http_port 3128 http_port 1080 (Socks5 ポート) http_port 5001 (リバース プロキシ ポート)

    量ではなく質が求められます。他のポートは一般的にブロックされています。

    3. サーバーの ip6 ポートを追加の送信プロキシとして使用してみませんか? http_port ipv6#$# (IP6 は何でも構いません)

    一部のプロバイダーでは、サーバーに追加できる ip4 の数に制限がありますが、ip6 の提供には問題がないので、より多くの ipv6 を利用できる可能性があります。

    また、ボットの設定を組み込んだ squid.conf を次のように設定すると、より良い結果が得られるはずです。

    これは、必要な場所での調整の例にすぎません。

    http_port 3128 http_port 5001 http_port 1080 キャッシュすべて拒否 階層ストップリスト cgi-bin ?

    access_log なし cache_store_log なし cache_log /dev/null

    refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|?) 0 0% 0 refresh_pattern . 0 20% 4320

    #acl specialIP src (外部 IP から接続する場合のみ) acl localhost src 127.0.0.1/32 ::1 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

    acl SSL_ports ポート 1-65535 acl Safe_ports ポート 1-65535 acl CONNECT メソッド CONNECT acl siteblacklist dstdomain "/etc/squid/blacklist.acl" http_access allow manager localhost http_access deny manager

    http_access 拒否!セーフポート

    http_access deny CONNECT !SSL_ports http_access deny siteblacklist auth_param 基本プログラム /usr/lib/squid3/basic_ncsa_auth /etc/squid/passwd

    auth_param basic children 5 auth_param basic realm Squid proxy-caching web server auth_param basic credentialsttl 2 hours acl password proxy_auth REQUIRED http_access allow localhost http_access allow password http_access allow specialIP http_access deny all

    forwarded_for オフ request_header_access 許可 すべて許可 request_header_access 承認 すべて許可 request_header_access WWW-Authenticate すべて許可 request_header_access プロキシ承認 すべて許可 request_header_access プロキシ認証 すべて許可 request_header_access キャッシュ制御 すべて許可 request_header_access コンテンツエンコーディング すべて許可 request_header_access コンテンツ長 すべて許可 request_header_access コンテンツタイプ すべて許可 request_header_access 日付 すべて許可 request_header_access 有効期限 すべて許可 request_header_access ホスト すべて許可 request_header_access If-Modified-Since すべて許可 request_header_access Last-Modified すべて許可 request_header_access 場所 すべて許可 request_header_access プラグマ すべて許可 request_header_access 承諾 すべて許可 request_header_access 承諾-Charset すべて許可 request_header_access 承諾-Encoding すべて許可 request_header_access 承諾-Language すべて許可 request_header_access コンテンツ言語すべて許可 request_header_access Mime-Version すべて許可 request_header_access Retry-After すべて許可 request_header_access Title すべて許可 request_header_access Connection すべて許可 request_header_access Proxy-Connection すべて許可 request_header_access User-Agent すべて許可 request_header_access Cookie すべて許可 request_header_access すべて拒否

関連情報