-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thorium behind a proxy : not working #1904
Comments
How can I use Thorium behind a company proxy ? |
Hello, we will need to create an environment where we can reproduce the behaviour you are observing. Otherwise we won't be able to track the source of the problem down. |
Hello |
A second comment from a system administrator: one of the users has mentionned a problem with the Thorium Reader app. Whenever they try to access a book (epub file), they get an error mentionning their connection failed due to the websocket disconnecting before a TLS connection could be established, which we presume is most likely due to the fact the application is getting denied by the proxy we have in place. In this case, the proxy uses Active Directory login information through NTLMSSP. Note sure "request" handles ntlm, a pure MS protocol. |
I did some experiments on using an outgoing proxy. This is what I tried: I start a local http proxy (tried Burp / Mitmproxy, also installing their CA. Be careful, allows MITM) Then I tried starting Thorium these ways and nothing passes through proxy:
But I learned about NODE_DEBUG that logs on stdout http traffic
To add more confusion: MLOL has its own desktop reader app, based on Thorium code, and with that I can run
This allows me to see traffic with webviews and other private api, but not the traffic relative to LCP servers (license download, publication download, license status, etc) |
From @NachoParra Hi, Yesterday I started to play around Thorium so I can play licensed audiobooks from my public library, and it looks great as a default ebook reader app for the laptop. I have a Calibre library on my NAS, which is served over HTTPS with COPS and Calibre-web. I tried to add these two as catalogs, as well as the gutenberg opds feed and I get always the same error: I suspect that the problem lies on my corporate transparent MITM proxy. On my corporate laptops we have a MITM proxy that signs with it's own corporate certificate all HTTPS connections. As on W11 and Firefox the corporate certificate has been added, no problem, but no inside Thorium and it's chromium browser, so whenever I try to connect to any OPDS library, I got the error. Is there any way to add root certificates to Thorium? If not, can we somehow tell chromium not to validate any or a list of https certicates? Thanks! |
Yeah, I was on the verge to post it here, but because mine is more a certificate problem (I think), I created a new ticket... How can I see the full logs on the compiled version? Or it's better to setup a dev environment to do so? |
Possible technical solution: https://github.com/TooTallNate/proxy-agents/tree/main/packages/proxy-agent |
|
Developer notes: in the latest Electron revisions (including version 29 which Thorium is now based on) there are changes / additions related to proxy managment: |
Just side thoughts about "node fetch": there are well-known memory leak issues in server-side native Fetch and Unidici (which do not occur in the same way in the client-side https://github.com/node-fetch/node-fetch/issues?q=is%3Aissue+is%3Aopen+leak https://github.com/nodejs/undici/issues?q=is%3Aissue+is%3Aopen+leak I still think the choice of the |
The OpenAI folks are discussing migrating from node-fetch to Unidici with a view to ease the transition to native NodeJS Fetch when the API becomes stable (at which point Unidici could just be a lightweight shim): |
Note: although https://github.com/gajus/global-agent?tab=readme-ov-file#supported-libraries For example: (would need to handle import * as globalAgent from 'global-agent';
process.env["GLOBAL_AGENT_HTTP_PROXY"] = process.env.HTTP_PROXY || "http://proxy.com:1234";
globalAgent.bootstrap(); |
Simple implementation: https://github.com/delvedor/hpagent |
Will be fixed via #2108 |
Thorium v2.2.0 on a company laptop W10/W11
We use a proxy to connect to internet.
I open a lcpl file with Thorium and the message error is :
If I use the link
https://lcp.numilog.com:443/publication/70858e1c-db44-4de3-ba89-9ac37b4b5c7f]
in Firefox or Edge, the file is downloaded.If I understand well the #1314 issue, it seems that Thorium don't care about a proxy : nor in the UI neither using the system environment variables.
The text was updated successfully, but these errors were encountered: