Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pgshow opened this issue Jan 17, 2021 · 2 comments
Open

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

pgshow opened this issue Jan 17, 2021 · 2 comments

Comments

@pgshow
Copy link

pgshow commented Jan 17, 2021

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

@pgshow
Copy link
Author

pgshow commented Jan 17, 2021

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

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

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

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

@pgshow
Copy link
Author

pgshow commented Jan 17, 2021

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 的备注写成一样的了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant