
我有一個 Ubuntu VPS,我想把它變成一個具有多個 IP 位址的代理伺服器,這樣我就可以將它用於機器人。
然而,我製作的代理的問題是,網站阻止了它,因為它只有一個具有不同連接埠的 IP 位址,並且來自該 IP 位址的請求太多。
有沒有辦法從一台伺服器取得多個不同的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
不管怎樣我會盡力回答,有錯誤請指正!我自我約束&&沒有學位,但有幾種方法可以解決這個問題。
大多數 VPS 供應商/主機(如 AWS、Linode 等)可讓您新增多個 ip4 位址(需額外付費)。 Linode在network下有一個選項,點擊一下,你就有了額外的ip4,從而釋放了負載。
你的端口,為什麼這麼多?您的連接埠應如下所示: 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 快取拒絕所有hierarchy_stoplist cgi-bin ?
access_log 無cache_store_log 無cache_log /dev/null
刷新模式 ^ftp: 1440 20% 10080 刷新模式 ^gopher: 1440 0% 1440 刷新模式 -i (/cgi-bin/|?) 0 0% 0 刷新模式 。 0 20% 4320
#aclspecialIP 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 允許管理員 localhost http_access 拒絕管理器
http_access 拒絕!
http_access 拒絕 CONNECT !SSL_ports http_access 拒絕 siteblacklist auth_param 基本程式 /usr/lib/squid3/basic_ncsa_auth /etc/squid/passwd
auth_param basicchildren 5 auth_parambasicrealm Squid 代理程式快取 Web 伺服器 auth_parambasiccredentialsttl 2 小時 acl 密碼 proxy_auth 必要 http_access 允許 localhost http_access 允許密碼 http_access 允許specialIP http_access 拒絕所有
forwarded_for off request_header_access 允許 允許所有 request_header_access 授權 允許所有 request_header_access WWW 驗證 允許所有 request_header_access 代理授權 允許所有 request_header_access 代理驗證 允許所有 request_header_access 代理授權 允許所有 request_header_access 代理身份驗證 允許所有 accquest_access 代理授權 允許所有 request_header_access 代理身份驗證 允許所有 accquest_acc 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 允許所有情況access Accept-Encoding允許所有request_header_access 接受語言允許所有request_header_access 內容語言允許所有request_header_access Mime-版本允許所有request_header_access 重試後允許所有request_header_access 標題允許所有request_header_access 連線允許所有request_header_access 代理程式連接允許所有request_header_access 連線允許所有request_header_access 代理程式連線允許所有 quest_