monkeyWie / proxyee

HTTP proxy server,support HTTPS&websocket.MITM impl,intercept and tamper HTTPS traffic.
MIT License
1.51k stars 566 forks source link

请问怎么设置别的http代理服务器? #153

Closed design365 closed 1 year ago

design365 commented 3 years ago

首先感谢这个项目,我想用这个proxyee去请求一个另外的代理服务器(http、https, 含有用户名和密码验证),代码里怎么设置?

monkeyWie commented 3 years ago

设置前置代理就可以了:

new HttpProxyServer()
    .proxyConfig(new ProxyConfig(ProxyType.SOCKS5, "127.0.0.1", 1085))
    .start(9999);
siwee commented 3 years ago

@monkeyWie 大佬,请问有没有办法根据Request设置不同的Proxy呀?我有一个代理IP池,但是对不同的Request有响应的策略,请问改如何实现呀? 有没有思路吗?谢谢

monkeyWie commented 3 years ago

@aomsweet 可以的,参考下这个PR:https://github.com/monkeyWie/proxyee/pull/121 在pipeline里可以动态设置ProxyConfig的

siwee commented 3 years ago

@monkeyWie 谢谢大佬,看起来可行哦,我先试试