当前位置:网站首页>squid代理服务+ip代理池
squid代理服务+ip代理池
2022-07-22 21:23:00 【武念】
分两个服务:
一个是提供所有ip和随机ip,删除那些维护ip池功能的api服务。
参考:先搭建好代理池用http提供接口
http://www.spiderpy.cn/blog/detail/13
https://xz.aliyun.com/t/7718
https://github.com/jhao104/proxy_pool
一个是隧道ip池,写代码时就可以固定一个隧道ip代理。
参考:
然后通过squid来提供代理ip转发切换功能
https://blog.csdn.net/aaronjny/article/details/87865942
https://www.jianshu.com/p/130083146c8f
https://github.com/AaronJny/open_proxy_pool
如果systemctl start squid.service启动服务失败,用squid -k parse检查配置格式等问题,即使报ERROR: Ignoring unknown cache_peer option其实也是可以正常启动的
启动服务出现:Failed to make swap directory /var/spool/squid,就修改权限chown squid:squid /var/spool/squid
请求返回:ERROR:The requested URL could not be retrieved,可能是squid.conf里代理ip没配置好或无效
查看systemctl status squid.service启动情况,如果出现FATAL: ERROR: cache_peer 1.1.1.1 specified twice是配置多个代理条目,相同ip不同port报错,在cache_peer最后加上 name=proxy-90随机。参考https://www.cnblogs.com/my8100/p/7441501.html
https://xnathan.com/2017/03/02/squid-proxy-pool/
搭建ip池,使用 Squid 提供的父代理功能,自动将爬虫服务器的请求转发给代理服务器。Squid提供了自动轮询功能,自动验证并剔除不可用的代理。减少了我们多余的验证步骤。
请求获取代理,然后直接写入squid配置:https://github.com/xNathan/squid_proxy_pool
实测做的是,直接拿redis里ip配置到squid,使用的是这个项目:https://github.com/AaronJny/open_proxy_pool
Squid 就会自动检测每个代理的有效性
http://blog.itpub.net/31557738/viewspace-2679380/
squid做访问控制,就是一个ip均衡使用?
nginx也可以实现同样功能?
边栏推荐
- 我在京东使用工厂模式,一文说清楚工厂模式
- Codeforces Round #807 (Div. 2) A - D
- Talk about 12 business scenarios of concurrent programming
- 升级poi-tl版本1.12.0与旧版poi(4.1.2)、easyexcel之间的依赖冲突解决
- 【翻译】宣布Krius--加速你对Kubernetes的监控采用
- 一次 MySQL 误操作导致的事故,「高可用」都顶不住了
- 局域网SDN技术硬核内幕 8 从二层交换到三层路由
- Mysql的索引为什么用B+树而不是跳表?
- 【无标题】
- Delete the duplicate items in the array (keep the last duplicate elements and ensure the original order of the array)
猜你喜欢

ROS based navigation framework

I use the factory mode in jd.com and explain the factory mode clearly

Wechat hotel reservation applet graduation project (8) graduation project thesis template

一文深入浅出理解国产开源木兰许可系列协议

Trees and binary trees

JS determines the scrolling element and solves the tab to switch the scrolling position independently

(五)数电——公式化简法

6-14漏洞利用-rpcbind漏洞利用

第二篇如何使用SourceTree更新代码到本地

Leetcode 20有效的括号、33搜索旋转排序数组、88合并两个有序数组(nums1长度为m+n)、160相交链表、54螺旋矩阵、415字符相加(不能直接转Int)、reverse()函数
随机推荐
【无标题】
Part I sourcetree installation
JS determines the scrolling element and solves the tab to switch the scrolling position independently
聊聊并发编程的12种业务场景
Wechat hotel reservation applet graduation project (5) assignment
LAN SDN technology hard core insider 6 distributed anycast gateway
避错,常见Appium相关问题及解决方案
Excel displays the link URL of the picture as picture to
局域网SDN技术硬核内幕 7 从二层到大二层
Patrick McHardy事件对开源社区的影响
2022就业季惊喜来袭!正版Adobe软件,终于能正经白嫖一把了
Leetcode 20有效的括号、33搜索旋转排序数组、88合并两个有序数组(nums1长度为m+n)、160相交链表、54螺旋矩阵、415字符相加(不能直接转Int)、reverse()函数
【刷题记录】18. 四数之和
ETL tool (data synchronization)
6-13漏洞利用-smtp暴力破解
我在京东使用工厂模式,一文说清楚工厂模式
局域网SDN技术硬核内幕 5 虚拟化网络的实现
golang--module
How to use the order flow analysis tool (in)
局域网SDN硬核技术内幕 21 亢龙有悔——规格与限制(中)