circuitpython / web-editor

Online web editor for CircuitPython
https://code.circuitpython.org
MIT License
30 stars 16 forks source link

Can not access from NAT (ngrok) #102

Open StreakingJerry opened 1 year ago

StreakingJerry commented 1 year ago

CircuitPython Version

Adafruit CircuitPython 8.1.0 on 2023-05-22; ESP32-S3-Box-Lite with ESP32S3

Workflow(s)

WEB

Browser(s)

Google Chrome 113.0.5672.127

Console Log

No response

Steps

1, Install Ngrok/oray or any NAT app on the router. 2, Forward Circuitpython device port 80 to the public internet port 8333 . 3, Access NAT domin (ex: 84c5df439d74.ngrok-free.dev:8333) from the public internet. 4, After I see the Welcome page, click the full code editor.

Description

In the code editor, it shows my devices can not be connected. But both welcome page and file browser work fine. I guess maybe the reason is repl in full code editor use another port to connect? Most of free NAT support only 1 port access.

Additional information

No response

makermelissa commented 1 year ago

Hmm, tricky one. So it sounds like you're trying to port-forward your device and update it remotely. I think that may not be possible due to a combination of CORS and CircuitPython not handling HTTPS.

StreakingJerry commented 1 year ago

Well actually I can just use http. Currently the Welcome page and file browser works.

Don't need to worry about the https things. Because the services provider such as Oray will automaticlly remap the NAT domin to your local machine.