Using HTTP Proxy without specifically tunnelling/port forwarding
Hi all.
Just wondering if it's possible to use a HTTP proxy for a session without specifically doing any port forwarding, just sending all traffic for that session down the proxy, just like you would a regular web browser.
I am trying to set up web browser sessions to Lenovo XClarity for our servers, and port forwarding will allow me to get there, but remote console won't work because it attempts to connect on a different port, which isn't tunnelled.
In a browser, I simply set a HTTP proxy for all traffic and away you go, I can browse anything and it will traverse the proxy. I would like to do the same thing for a session within RDM, so I click the session, it connects to the proxy and just sends all traffic for that session down it (including popup windows from that session), rather than having to map ports and then connect to 'localhost'.
Is that possible?
Thanks
Hi,
When you say a session, do you have a specific type in mind? I'm assuming the Web Browser entry? If so, sadly, specifically for what you are asking for (proxying all communication done in a WebBrowser entry), it is not supported in the WebKit WebView component (the component used for embedded Web Browser entries). Web proxy in macOS are handled globally by the system, so you'd have to set them in System Preferences -> Network -> Advanced -> Proxies and they would affect all communications (which is most likely not what you want). I'm not aware of any way to isolate proxy settings to a single WebView.
Sorry for not providing a better solution.
Best regards,
Xavier Fortin
Hi Xavier.
Thanks for replying so quickly!
Yes, you're right, it's a web browser session. Ah ok that makes sense. So is there no way to just send the traffic through a proxy rather than setting up a port forward? The problem with the port forward is that it only works for one port that you specify. If the browser directs you to another port (as it does for remote console on port 3900) then of course that doesn't work because it's not forwarded. I realise I could add a separate proxy tunnel session for that port to ensure it's forwarded, but then that would only work for one session at a time. If I want to connect to multiple servers, then I can't. Do you know of an alternative way to achieve this?
Right now, I have to dedicate one browser (Firefox) for these purposes and configure the proxy in that browser for all HTTP traffic. I was thinking perhaps I could then use Firefox as the browser engine for website sessions in RDM and use those. I tried that but it doesn't work. I guess it doesn't pull the proxy settings from Firefox?
Thanks
Frank
Yes, you're right, it's a web browser session. Ah ok that makes sense. So is there no way to just send the traffic through a proxy rather than setting up a port forward? The problem with the port forward is that it only works for one port that you specify. If the browser directs you to another port (as it does for remote console on port 3900) then of course that doesn't work because it's not forwarded. I realise I could add a separate proxy tunnel session for that port to ensure it's forwarded, but then that would only work for one session at a time. If I want to connect to multiple servers, then I can't. Do you know of an alternative way to achieve this?
That problem your hitting (of website redirecting to different ports) is the exact same problem we've hit when investigating this. WebKit WebView does not expose any supported way of intercepting and replacing the web requests it makes (which would have allowed us to configure a proxy on each of them). And the way provided by Apple to developer to intercept such requests is in the context of the entire application, not an individual WebView sessions (it's not even limited to WebView, any requests made using Apple standard process (i.e. NSUrlSession) are affected). While not specifically implemented in RDM Mac, this would work like the previously mentioned System Preferences -> Network settings, but limited to RDM instead of the whole system. If your using the same proxy for all of your sessions, does configuring it in System Preferences -> Network not work?
Right now, I have to dedicate one browser (Firefox) for these purposes and configure the proxy in that browser for all HTTP traffic. I was thinking perhaps I could then use Firefox as the browser engine for website sessions in RDM and use those. I tried that but it doesn't work. I guess it doesn't pull the proxy settings from Firefox?
In embedded mode, Web Browser entries in RDM only support Safari. The "Web browser" popup button should be disabled. If you don't mind launching your session in external mode, you can configure them as such (General tab -> Display -> External). You can then specify the browser you want (Web Browser tab -> Web browser -> Firefox) and your sessions will then be launched externally in Firefox. If you still want credential autofill, you will need Devolutions Web Login installed on Firefox.
Xavier Fortin
Unfortunately for me setting the proxy system wide isn't an option as the proxy is only there for managing these servers and is located in another country.
Ok I think I might have to settle for going external with these sessions then. The most important thing really is just having all my administration shortcuts in RDM and at least that would be achieved that way, although just not the most elegant!
Thanks Xavier. Really appreciate the assistance :-)
Sorry for not having a more satisfactory solution for you. If ever we find a way of implementing this, be sure that we will, that would be a really nice feature.
That being said, if you encounter any other issues, please do not hesitate to get back in touch.
Best regards,
Xavier Fortin
Hi wtg-fg
Have you tried enabling Automatic Proxy Configuration (in Network preferences) and writing a PAC file to use the proxy just for these specific servers?
I haven't tried it, and it's a non-RDM specific answer, but it might lead you in the right direction.
Thanks and kind regards,
Richard Markievicz
Hi Richard.
I think I'm going to give that a go. That's a good suggestion and I've just spoken to a colleague who is funnily enough doing exactly that.
Thanks!