Reverse Proxy with HTMLViewer

Hi there, I am just exploring my first steps in Xojo and I was wondering if someone could help me. I am making a web app and I am trying to use the HTMLViewer control to display pages. What I am not sure on is if the IP would be the IP of the client machine that is accessing the app or if it would be the IP of the server (that would be appearing to the server).

So to try to explain that a bit better what I want is the HTMLViewer to display the webpage to the end user through the web app but I want the IP to be coming from the server (this is the IP that the remote site would see). This is so that I can enable access to websites that have IP restrictions (so in effect creating a bit of a simple reverse browser based proxy). Would the HTMLViewer do this by default? It seems as though its just an iframe so it would be the external IP of the client machine rather than the IP of the server that is running the web app.

Thanks for taking the time to take a look at my question look forward to seeing the suggestions / answers.

Thanks

You are correct.
HTML Viewer in the Web framework is an iframe.
The webpage displayed through the HTML Viewer would receive your user’s IP address.

Thanks Tim, is there a way to get this so that it can be presented from the servers IP address instead. I was thinking about doing that with HTTPSockets and feeding in the data to the HTMLViewer but was just wondering that there maybe a better way of doing it?

Thanks

If the user is restricted from seeing an IP address, the frame does you no good. The request is still coming from the user’s browser.

Thanks Gregg, I guess a real world example of what I am trying to do would make more sense. In essence what I would like to create in Xojo is something similar to https://www.php-proxy.com/

Is that possible / relatively easy to do in Xojo?

Thanks

Chris

[quote=294376:@Chris Large]Thanks Gregg, I guess a real world example of what I am trying to do would make more sense. In essence what I would like to create in Xojo is something similar to https://www.php-proxy.com/

Is that possible / relatively easy to do in Xojo?

Thanks

Chris[/quote]
I’ve checked the source code. You can convert/rewrite the php code to Xojo.

Thanks for the reply Asis, I’m not sure why I didn’t think of just looking at the PHP code since I know PHP! Sometimes you just miss the obvious and it takes a helpful someone to point it out to you! :slight_smile:

Thanks again.

Cheers

Chris