Giter VIP home page Giter VIP logo

Comments (8)

cpsdqs avatar cpsdqs commented on June 2, 2024 1
Yes

espterm/espterm-front-end@0794030

from espterm-firmware.

MightyPork avatar MightyPork commented on June 2, 2024

I think we'll need more details to debug this.

I get server connection failed message from the terminal

is that a response from ESPTerm, it's output to the debug pin, or something else?

If you build the firmware with -DDEBUG_HTTP=1, it'll log any received connections, alternatively you could debug this with WireShark in promiscuous mode (or locally, if you can run it on the gateway).

I'm not familiar with stunnel, maybe if you tell me how to set it up, i'll be able to reproduce it

from espterm-firmware.

cpsdqs avatar cpsdqs commented on June 2, 2024

I just noticed an odd detail—https? Modern browsers block connections to any insecure protocol if the page was loaded via https, and ESPTerm uses ws

from espterm-firmware.

MightyPork avatar MightyPork commented on June 2, 2024

that's a good observation, sounds like the socket isn't correctly forwarded in this setup. I don't think there's anything we can do on our end - except fallback to ajax polling, but that will be horribly laggy and stress the server.

from espterm-firmware.

MightyPork avatar MightyPork commented on June 2, 2024

hmm 🤔

it's occured to me we have 'http://' hard-coded in some places, and also I'm not sure what will 'ws://' do if the page is loaded over https ...

screenshot_20171023_235627

edit: looks like we need wss there. this just might be fixable yet ...

from espterm-firmware.

schneemaier avatar schneemaier commented on June 2, 2024

All,

here are some more info and comments from my setup

I think we'll need more details to debug this.

I get server connection failed message from the terminal

is that a response from ESPTerm, it's output to the debug pin, or something else?

If you build the firmware with -DDEBUG_HTTP=1, it'll log any received connections, alternatively you could debug this with WireShark in promiscuous mode (or locally, if you can run it on the gateway).

I'm not familiar with stunnel, maybe if you tell me how to set it up, i'll be able to reproduce it

This is a message i got in the browser window
espterm

About stunnel: stunnel is TLS proxy service which provide encryption support for devices, services which does not support it out fromthe box. https://www.stunnel.org/index.html I use it with several services (like mjpg-streamer).

This is the stunnel config file:
root@abc:~$ cat /etc/stunnel/ser.dd.a.conf
pid=/tmp/ser2.pid
[ser.dd.a]
cert = /etc/letsencrypt/live/cb-cr.no-ip.org/fullchain.pem
key = /etc/letsencrypt/live/cb-a.no-ip.org/privkey.pem
sslVersion = all
client = no
accept = 4002
connect = ser.dd.a:80

it's occured to me we have 'http://' hard-coded in some places, and also I'm not sure what will 'ws://' do if the page is loaded over https ...

Would it be possible to implement a logic on the browser side: if page loded with https, then open socket with wss: instead of ws: ?

Hope this helps

from espterm-firmware.

schneemaier avatar schneemaier commented on June 2, 2024

Tried the new 2.3.0-pre1 and connection via https + port redirection with stunnel works nicelly. I will do more test later.

Thanks for the quick support!

from espterm-firmware.

MightyPork avatar MightyPork commented on June 2, 2024

good to hear, closing

from espterm-firmware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.