-
Notifications
You must be signed in to change notification settings - Fork 322
Issues reaching api.teletype.atom.io behind a proxy #236
Comments
@as-cii thanks for creating this |
@as-cii is there any other information or tests I could provide you? |
You are very welcome, @jrschumacher. Thank you for helping us investigate this problem. So my current thinking is that this might be a problem with the proxy credentials, as the 407 error is indicating. Perhaps Electron is trying to show an authentication dialog but Atom is preventing that? Electron exposes an A few things that might be worth trying to get a sanity check:
Depending on what the output of the above commands is, we should maybe experiment with the aforementioned Electron API. Thanks for your continued help on this, @jrschumacher! ⚡️ |
So teletype does not appear to be using the cert I've installed for our proxy. For pip to work, for example, I have to add configuration like:
Does teletype need something similar? |
Thanks for the feedback, @bac! Yes, it is possible that Electron needs to be configured to read that particular certificate. I think there are some APIs to allow that (https://electronjs.org/docs/api/session#sessetcertificateverifyprocproc), but we would need to experiment and see if they offer what we need for this issue. Have you got Chrome installed on your machine? If so, do you remember configuring the certificate in Chrome too? |
I got the same issue, but I've managed to resolve it. More infor here : https://chromium.googlesource.com/chromium/src/+/lkcr/docs/linux_cert_management.md |
@krzkowalczyk: Thanks for sharing this solution! 🙇 @bac @jrschumacher: Can you give this approach a try and let us know if it resolves this issue for you? |
Hi, I'm still having trouble with this. I tried making my own proxy (to... proxy through the proxy, if you follow, with a valid user/pass) which worked for talking to Teletype server, but not for Pusher (it didn't work entirely, only partially). I was curious more than anything. Anyway, now I'm experimenting with adding a proxy option to the Teletype config UI, and getting Teletype and Pusher to use that. I think that fetch will not work, since that will be stopped by the proxy, but maybe there's another way around it. |
@kevteljeur: Thanks for looking into this. If you find a solution that resolves the issue for you, or if you know of a way for us to reproduce the issue, please let us know. |
Actually, on closer inspection, I've hit a wall. I figured out how I could work with fetch to basically shim proxy support into the fetch call, so that it would function through a proxy (untested) but... Pusher is the web version, which doesn't have proxy support, and not the Node version, which does. Not sure where I can go from here. Teletype would be a great tool for what I'm doing with other devs, but that damn proxy issue. Updated to add what I'm trying to achieve: An additional field for specifying a proxy to use for Teletype (I looked at reading it from process.env, but that would be an assumption, especially if the developer had set up a local instance of Teletype server to use). |
So I've been trying to look at how a request via a proxy is structured; I don't know a lot about this, so I can't make effective use of the time I have available for it (I spent some time studying the npm Request module yesterday). Does anyone know if a request can be restructured for sending though a proxy in clientside JavaScript? If so, then it is possible, by modifying the fetch request (to Teletype server) and setting headers and URLs for Pusher.js. Combined with my suggested proxy field above, this is doable. I just don't know what modifications to make to the requests for that to be tested. Also, I see that Slack (using Electronjs for their app) is able to do it. But their app is not open. Does anyone know enough about proxies to be able to assist? I'd be happy to code up and field test any proposals. Teletype is a great feature, and I can't imagine that my team will be the only one benefitting from using Teletype behind an authenticated proxy. |
@jasonrudolph This only works for Linux it seems. I'm running on OSX High Sierra. |
@as-cii For Chrome I didn't need to add a custom cert. It uses the cert in the |
I've not gotten any further, partly due the inherent madness of trying to write a proxy to make this work. Is there no way to get Atom to play nicely with a proxy? I see that Slack (also an Electron app) does it... Hypothesis: When using window.fetch and they get a 407 response, they then ask for the proxy details, and store them. If Atom did this, or took them from the apm configuration, then it could handle this too. Does this sound reasonable to anyone? |
I met the same problem. mac os v10.13.1 solution: shutdown dnsmasq, shutdown shadowsocks, modify dns, 127.0.0.1 this row delete. reinstall OK. I hope could help you. |
@kevteljeur: Thanks for mentioning that. 🙇 That definitely sounds like it's worth investigating. To investigate that approach, we'll first need to find a way to reproduce the issue (#236 (comment)). So far, we haven't had any luck reproducing it. 😥 With that in mind, I'll make a brief plea for help on that front. 😇 📣🆘 Request for help reproducing this issue 🙏😅To help us diagnose the issue, if anyone here is able to provide a Alternatively, if anyone can provide detailed instructions for reproducing this issue by starting with a clean installation of a particular operating system and then setting up a proxy step-by-step, that would also be a big help. Once we have a way to reproduce the issue, we should have a much better chance of resolving it. 🤞 |
Funny enough, I was just think that I should check in and see if anything made it in to 0.7.0 on this. I should be able to help you there; I've tested Basically, the headers for a Maybe if you set up a proxy on your development machine (Node.js, for example) with a password and then set your system to use it - if your browser or Slack challenge you for the credentials, then you're in business. |
You might be overestimating my proxy skills. 🙈:wink: Can you point me toward some detailed instructions for setting up a proxy in a way that will reliably reproduce this issue? |
Good question. I'll see tomorrow. I'm not very knowledgeable about proxies myself, but something like this: https://github.com/nodejitsu/node-http-proxy using auth (Basic auth) would do it. I'll see tomorrow or Thursday if I can reproduce the effect using that Node library and if so then we'll be on the way. |
It looks like some of Atom's core functionality (e.g., checking for software updates) is also facing problems when using Atom behind a proxy:
With that in mind, I suspect that resolving these proxy issues for Teletype users will likely require an update in atom/atom. |
Well, it's important to separate between the apm use of the proxy (which is probably not going to change, because it works like npm) and the UI layer. But, that being said, the UI layer is obviously a problem too. Since I've just squeaked past a particular deadline, I can spare a minute to test this. |
When you ask the right question of Google, you may receive: https://discuss.atom.io/t/window-fetch-not-following-system-network-configuration/39139 |
"I got the same issue, but I've managed to resolve it. More infor here : https://chromium.googlesource.com/chromium/src/+/lkcr/docs/linux_cert_management.md" @krzkowalczyk can you please explain how u done it( adding certificates) and what certs are required? |
/xref microsoft/vscode#22369, which added proxy support in VS Code |
Well then. |
atom/atom#14866 - I tried this but it made no difference for me. |
Hi, any news on this, or still dependent on core? |
@kevteljeur: It's probably dependent on core. It's definitely dependent on having detailed steps for reproducing the issue. 😇 |
@jasonrudolph do you have access to adding an event listener (to the app resource) within a plugin? In other electron apps I have to prompt the user for login and password when the You'll also see this behavior in the the latest VSCode. |
@jrschumacher: Thanks for the idea. That might do the trick, but we'd still need a way to reliably reproduce this issue so that we can verify the fix. |
Yes I understand. Unfortunately in my corporate network I’m not involved
with its configuration, but I’ll do some research and see if I can find a
open source vpn which simulates this.
On Thu, Apr 12, 2018 at 14:23 Jason Rudolph ***@***.***> wrote:
@jrschumacher <https://github.com/jrschumacher>: Thanks for the idea.
That might do the trick, but we'd still need a way to reliably reproduce
this issue
<#236 (comment)> so
that we can verify the fix.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#236 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAC11WyDse8xON28KNz7mgOVHSyBElzhks5tn6m_gaJpZM4QiWQv>
.
--
*Ryan Schumacher*
software development
[image: tep.io] <http://tep.io/>
[image: tep.io on Facebook] facebook
<https://www.facebook.com/tepdotio> [image:
tep.io on LinkedIn] linkedin <http://www.linkedin.com/company/38pages>
cell 205.515.0911
office 205.291.2520
|
I was able to get teletype working by starting atom with the Trying to pass my proxy credentials via the URL (e.g. I was then able to start atom with the following command: atom . --proxy-server=http://localhost:3128 |
Checking in. I haven't looked at this in a while but my need for it is no less. Has anyone had any success? Or are we still tied to getting core Atom to play nicely with network proxies? I did take a look at the Code changes (referenced above) but I have to say that I didn't understand them well enough. |
I can reproduce this; I have env variables set: http_proxy=http://localhost:8888 As well as .apmrc: proxy=http://localhost:8888/ Atom seems to not recognize these. Starting atom with "--proxy-server=http://localhost:8888" works. apm 1.19.0 I'm behind a corporate proxy, that I forward with cntlm. |
Any word on this? |
Originally reported by @jrschumacher on Nov 15th 2017
Prerequisites
Description
When trying to start teletype in an environment which sits behind a firewall I get the following error:
This is a result of this query:
Note: I am running CNTLM which interfaces with the proxy. I have PROXY, HTTP_PROXY, HTTPS_PROXY, proxy, http_proxy, https_proxy configured. My local network settings are all configured to work with the proxy. Additionally
apm
is configured to work with my proxy settings.Steps to Reproduce
Expected behavior:
I expect the plug to enable without an error message
Actual behavior:
I receive the error message described above.
Reproduces how often:
100%
Versions
Additional Information
The text was updated successfully, but these errors were encountered: