Embedding a website with IPython.display.IFrame creates an HTML iframe. The browser displaying the notebook then navigates to that URL using the browser’s own route.

A Requests call in a remote kernel is a different operation: that HTTP client runs where the kernel runs. Setting proxy variables in the kernel does not configure the browser’s iframe request.

If the browser should use an authorized remote machine as its exit, an existing SSH account can supply a local SOCKS listener:

ssh -N -D 127.0.0.1:1080 [email protected]

Then configure the intended browser traffic to use SOCKS5 at 127.0.0.1:1080, including remote destination DNS if required. Keep the SSH session running. SSH opens destination connections from its remote side; confirm that this host has the intended route, especially when the notebook kernel runs in another container or machine.

The notebook server’s own URL may need a direct browser exception so the new route does not break access to the notebook. A website’s iframe restrictions also remain in force: changing the network exit does not grant permission to embed a page that rejects framing.

متعلقہ مضامین