Skip to content

代理问题 #56

@abadfox233

Description

@abadfox233

当使用OKhttp时,一个爬虫使用代理另一个爬虫不使用代理,不使用代理的爬虫仍然会使用代理。

原因:
问题根源在于OkHttpClientBuilderBox这个类设计不合理,所有爬虫处理时共用一个OkHttpClient.Builder。设置代理后的builder会被污染。

解决方案:
建议取消单例模式,不共用同一个builder

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions