Closed ghost closed 3 years ago
Hi, our lead dev is currently testing solutions which would allow the removal of the internal http server (which feeds the internal Chromium browser). If successful, this will solve this issue.
I didn't check the current port, but in the short term it could certainly be changed for something unused by major frameworks.
Amazing, thank you 🙏
Thorium uses a library that finds an unused port for launching the HTTP server (aka "streamer"): https://github.com/edrlab/thorium-reader/blob/8a9807bca7d34c05d9719d823ae55bbf2a250478/src/main/redux/sagas/streamer.ts#L31-L33
We can set start and end boundaries for the search range, but we cannot exclude commonly-used ports (as far as I know): https://github.com/http-party/node-portfinder#ports-search-scope
Once the Electron bugs are solved, we will switch to a non-HTTP "streamer": https://github.com/edrlab/thorium-reader/pull/1258#issuecomment-729247364
Looking at https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers it is true that finding free places is difficult.
Do you even need a server? Plenty of Electron apps don't ship with an active server. They build their projects then run the built files.
@alvinometric see https://github.com/edrlab/thorium-reader/pull/1258.
Do you even need a server?
To complete Laurent's answer: yes, Thorium needs to serve audio/video files via HTTP as streaming media is currently broken in Electron's custom URL protocol handler: https://github.com/edrlab/thorium-reader/pull/1258#issuecomment-729247364 We plan to remove the dependency on a HTTP server in a future Thorium release, once the audio/video bug is fixed.
Oh, I see. So the PR that fixes this has been merged but we're still waiting for it to be released as part of Electron 12. Did I understand that correctly?
The merged PR enables a new HTTP-less mode in Thorium, which is currently turned off (at build time). We will activate this new feature once video/audio streaming works in Electron registerStreamerProtocol()
(I have to run tests against v12 first, and note that Thorium currently builds on v11)
Because we will move to an HTTP-less mode asap, we will close this issue now.
👏
Hello,
Thank you so much for your work on this app. The Internet badly needs a good, cross-platform ebook reader.
I noticed that Thorium uses port
8000
even when it's downloaded as a standalone app.As a result you can't run code snippets that default to
http://localhost:8000/
like Django (a massively popular Python framework), for example.