Open ramizdemiurge opened 5 years ago
You can configure this servlet to use an HTTP Proxy Server, if that's what you mean. This can be done with standard Java system properties, or you could subclass and configure it explicitly.
you could subclass and configure it explicitly
Well, that is what I need because there are a lot of proxies to choose from in real time. What class I should extend? Can you help me with this?
Thank you!
I can't really help other than point you in a useful direction. You could investigate the Apache HttpClient API to see what options it offers. The servlet uses that to do the request, and that API is very rich/extensive. That's where most of the work will probably be. Once you've figured out how to make HttpClient do dynamic proxy'ing, then all you'd have to do with the servlet is override to configure your customized HttpClient in createHttpClient()
.
Can I use a proxy server for this? And is it possible to dynamically add a proxy to the chain? I will try to explain what I want to say: There is a Glype program written in php. It allows you to surf the Internet with another ip. I have a proxy list with which I want to use this library.
I use Spring boot