-
Notifications
You must be signed in to change notification settings - Fork 57
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
Skewering HTTPS (mixed-mode loading problems) #56
Comments
This is one of the weak spots of Skewer, especially as the web moves |
Would it be possible to solve this by using something like socat to forward an ssl socket to emacs? |
That's very likely to be possible. When Emacs is compiled without GnuTLS Since I don't need this myself at the moment, it's not something I plan |
I've used hitch as a workaround. Run this once:
and run this after run-skewer:
In your web browser, go to https://localhost:38443/skewer and accept the self-signed cert, then change your bookmarklet to have the right port:
(Make sure to reload the page first if you used your old bookmarklet – it'll point to the wrong port.) I suppose we could add this as a function |
Since @unhammer has reminded me of this thread, I'll also mention that a
couple months ago I experimented with using stunnel as a seemless
front-end to Skewer. I captured the gist of it here:
https://github.com/skeeto/dotfiles/blob/46c31aac041ee6f7b66083ed2512a21f02ce1987/_bashrc#L97
However its a bit flaky and I never quite sorted it out:
* Sometimes stunnel prematurely terminates the connection and I don't
know why. This happens with the Python server, too, so it's not just
some issue with Skewer.
* It relies specifically on stunnel3. Later (?) versions of stunnel
(e.g. stunnel4) have a different interface and don't seem to support
this mode.
* Modern browsers *really* hate self-signed certs and no longer handle
them gracefully (i.e. no more "store and allow this cert next time").
This is a messy issue to solve.
|
Hm, I haven't noticed hitch doing any premature termination – maybe give that a try? It's quite small:
Why create a new cert on every startup? (Isn't that just creating more work for yourself?) |
Hitch certainly seems like a cleaner solution than stunnel. I'll have to spend some time with it.
That particular example is just for a throwaway sever. Plus, for documentation purposes, it captures the cert generation procedure (I can never remember). For Skewer it would probably make sense for a more persistent cert, hence it's important that the browser remembers the cert.
Oops, you're right. Upon closer examination I see that it's just my current configuration preventing the "permanently store" checkbox. |
Btw, for Chromium, I opened "Manage certificates → Authorities → Import" and selected my .pem file, ticking off "Trust this certificate for identifying websites". A bit more involved, but i can control Chromium too from Emacs now :) Though for some reason, it sometimes first says |
Is there a way to tell skewer to use https when skewering pages that are already https? Would make skewer-everything.js much more useful.
Thanks for creating this great emacs mode!
The text was updated successfully, but these errors were encountered: