phpgao/proxy_pool

random api 会把低分的代理提取出来

Opened this issue · 2 comments

我设置的ScoreAtLeast 为70, 但是 http://127.0.0.1:8088/random 也会提取出低分的代理,比如30的,40的,50的

我明白了,需要使用 /random?score=60 才能让最低分数条件生效。

另外
"score": string(util.ServerConf.ScoreAtLeast),

会使最低分数值为 F,以至于把低分的代理都缓存了,改成以下函数就好了

"score": strconv.Itoa(util.ServerConf.ScoreAtLeast),

UlimitMax int default:"65535" //ulimit
ScoreAtLeast int default:"60" //随机选择的最小分数
MaxProxy int default:"2000" //最大代理个数
MaxRetry int default:"3" //最大代理个数
ProxyCacheTimeOut int default:"60" //代理缓存失效时间
EnableApi bool default:"true" //启动API服务

MaxProxy 和 MaxRetry 的备注写成一样的了