Consider a jupyter notebook that's installed on a remote server on port 8888. Suppose this remote server has also a web server on port 80. Consider also the port 8888 is exposed to the public, but the port 80 not, it's accessible only from the localhost (where the jupyter notebook is running). Is there a way to navigate this local web server from a jupyter notebook opened in my local web browser?
I tried to find some solutions on stackoverflow, but I can't find something that's suitable for my situation.
I found a lot of stuffs like using IFrame from IPython.display, also something like using urlopen
stuffs, but it not works as I expected, I can't navigate in the web server as we do in a standard web browser.
I think I need something like a port forward, or a proxy, or a tunnel implemented in python that works in a jupyter notebook.
from six.moves.urllib.request import urlopen
url='http://localhost:80'
response = urlopen(url)
content = str(response.read())
from IPython.core.display import display, HTML
display(HTML(content))
It prints the HTML in the jupyter notebook, but we could not navigate as expected like using:
from IPython.display import IFrame
url = 'https://www.wikipedia.org'
IFrame(url, width=800, height=400)
Some suggestions?