Coder Social home page Coder Social logo

Comments (7)

catern avatar catern commented on July 1, 2024

I got some extremely hacky modifications for this working, where, when a proxy needs to be used, I synchronously connect to the proxy, send a CONNECT, call gnutls-negotiate, then proceed with websocket.el's normal processing. I'll post the patch here in a few days once I feel a little more comfortable with it. But for now it seems to work.

from emacs-websocket.

ahyatt avatar ahyatt commented on July 1, 2024

I'll have to think about this - it seems like a good thing to have, but it'd be nice to do this in a way that wouldn't complicate the main websocket code. Let me know when you have a patch, and I'll take a look.

from emacs-websocket.

catern avatar catern commented on July 1, 2024

Here's the patch: #74

I did a lot of digging into url.el's proxy support, and was able to reuse a fair bit of functionality - the main thing that I couldn't reuse is url-https-proxy-after-change-function, but maybe there's a way... it would be nice if url had a way to say, "establish the connection, including proxy setup, then send the request, then just call my process filter and get out of the way".

from emacs-websocket.

ahyatt avatar ahyatt commented on July 1, 2024

Interesting. I don't think this is that hacky, however I'll have to think about this.

Also, do you have signed FSF papers? This probably is small enough that it doesn't matter, but I need to verify this if you don't.

from emacs-websocket.

catern avatar catern commented on July 1, 2024

Well, the main hacky bit is the sleep-for. Everything else is fine I suppose, but relies on that core hackiness...

I don't have signed FSF papers, but I've been meaning to for a while, so I'll go ahead and do that now, regardless of whether this is small enough or not.

from emacs-websocket.

dickmao avatar dickmao commented on July 1, 2024

How does failure manifest itself? It would seem from catern's changes that websocket-open simply can't connect, and that some kind of initial negotiation with the proxy is required before opening the network stream to the intended target. I have very little experience with proxies -- I barely know what they're for other than to make our lives more complicated. :)

In regard to millejoh/emacs-ipython-notebook#754 , the websocket from the emacs client does get through, it's just the remote server doesn't see an auth token in the json message. That is quite a mystery, but at first glance this PR wouldn't remedy that, or would it? A proxy presumably would not strip data from a message.

from emacs-websocket.

ahyatt avatar ahyatt commented on July 1, 2024

Yes, I think this sounds like a different problem. This problem should result in connection issues, not authentication issues. That said, I haven't tried replicating this - I don't have a proxy, or a websocket server that does auth checks using json. And I'm also not that knowledgeable about proxies.

from emacs-websocket.

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.