本代理池支持超高并发,自动预热代理池,托管式操作,一切以稳定,简单,实用为主。
核心逻辑在cn.ryan.proxy.ProxyPool.java,根据自己的业务重构该类,理论上可满足绝大部分代理需求。
基本参数 | |
---|---|
请求Url | http://120.131.82.46:8080/ProxyPool/get |
请求协议 | Get |
请求参数 | ||
---|---|---|
num[ 请求数量 ] | 是否必填 | 否 |
默认值 | 30 | |
type[ 请求类型 ] | 是否必填 | 否 |
可选值 | 0:HTTP,1:HTTPS(包含HTTP) | |
默认值 | HTTPS和HTTP | |
anonymity[ 匿名度 ] | 是否必填 | 否 |
可选值 | 0:透明,1:匿名,2:高匿 | |
默认值 | 透明,匿名,高匿 |
访问限制:30次/分钟
代理刷新频率:一分钟
说明:因代理池缓存一分钟刷新一次,固不保证代理100%可以使用,如对IP质量有较高要求可开启检验模式。
名称 | 说明 |
---|---|
originalIpPool | 原始代理池 |
userdIpPool | 使用过的代理池,附带IP质量评分 |
默认使用的RyanCrawler爬虫框架执行请求,可重写ProxyPool.openProxyConnection支持更多框架。
1.获取代理API接口需根据API数据结构做定制化重写getProxyList。 2.因代理池使用的是Jvm的内存,故建议每次API获取的代理数不要太大,否则会对代理池性能造成一定影响。 3.本源码只提供了核心(项目可正常运行),部分持久化/缓存等等功能需自己手动实现。