Open szarza opened 9 years ago
In my case, for a request "A" without any parameters, I get a complete URL "B" by an external service passing "A" as a parameter.
The "calculated" URL's are not known at init() time. I don't know any "template" for final URL either, and doesn't have to be homogeneous (final url can be http://a/b/c/d/e/h.mp3 or http://a/j.mp3 or any other form).
So the parameters for the template can't come from client request. The service (EJB)
sercomResources.getRecord(request.getParameter("id")).getUrl()
gives me the complete (full) final URL. The client knows nothing about final destination proxified.
For example, for client request http://play?id=345
, the final URL would be http://192.168.2.3/882/2015/04/23/83676dgdteye.mp3
and for client request http://play?id=346
, the final URL would be http://192.168.56.98/adada/2014/04/23/ueyhdbd.mp3
(different servers, paths, etc...)
Thanks.
Okay. If you can recommend API extensibility improvements that will help you, then send a pull request. Otherwise, it seems the proxy is working for you. It's expected you'd need to subclass to meet a requirement like this.
Just wonder if your proxy can handle winsocket. I have a requirement to proxy the winsocket in addition to http requests. I am new to the winsocket, so I am not sure.
For example, ws://localhost -> ws://localhost:59595
Moreover, my proxy mapping looks something like the following. The {port} is dynamically generated. So it doesn't seem I can use your code as is, I may need to modify the code a bit? http://localhost:8080/app -> http://localhost:{port}
Thanks, Denny
Denny, next time please create a new issue instead of commenting on an unrelated issue.
RE winsocket: I have no idea honestly. I've never heard of it.I looked at https://en.wikipedia.org/wiki/Winsock extremely briefly and I at least didn't see any URLs like that; it looks like an API, not a URL scheme. I dunno.
I meant websocket.
ws://host:port/ws
I have minimal knowledge with it, but we have a requirement to have reverse proxy for it.
Do you know if your proxy will work for websocket?
Thanks Denny
On Feb 2, 2016, at 10:32 PM, David Smiley notifications@github.com wrote:
Denny, next time please create a new issue instead of commenting on an unrelated issue.
RE winsocket: I have no idea honestly. I've never heard of it.I looked at https://en.wikipedia.org/wiki/Winsock extremely briefly and I at least didn't see any URLs like that; it looks like an API, not a URL scheme. I dunno.
— Reply to this email directly or view it on GitHub.
It appears not, as this proxy uses Apache HttpClient which has this open issue to support it (back from 2010) https://issues.apache.org/jira/browse/HTTPCLIENT-973
Hello: First, thank you very much for sharing your excellent work.
In my case, I need a proxy for which I get the full (complete) url through a service, like this: http://user:password@10.0.2.40/112/2015_04/file88d78d.mp3
For this case, your servlet does not work unless some methods are overridden, because you code assumes that
targetUri
andtargetHost
are fixed and initialized once.Then my solution working:
Thanks again. Regards.