Skip to content
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

New Feature - Websocket support #212

Closed
gromanev opened this issue Jan 31, 2018 · 10 comments · Fixed by #273

Comments

@gromanev
Copy link

@gromanev gromanev commented Jan 31, 2018

Hello. Tell me, does Ocelot work with a websocket? And if it works, tell me how to configure your server to work with it?

My config:

{
"DownstreamPathTemplate": "/signalr/{everything}",
"DownstreamScheme": "ws",
"DownstreamPort": 5000,
"DownstreamHost": "localhost",
"UpstreamPathTemplate": "/signalr/{everything}",
"UpstreamHttpMethod": [ "Get", "Post", "Options" ]
},

@TomPallister

This comment has been minimized.

Copy link
Member

@TomPallister TomPallister commented Jan 31, 2018

@gromanev Thanks for your interest in the project.

Ocelot doesnt have any websockets support at the moment, this is something that may be added in the future. If you need it now I would suggest finding another piece of software that supports it or study the Ocelot source code and implement the functionality!

@gromanev

This comment has been minimized.

Copy link
Author

@gromanev gromanev commented Jan 31, 2018

@TomPallister Thanks for the answer. I already use the nginx as a reverse proxy for the websocket. But I do not particularly like this decision, but if the plans to implement support for a web-site - it will be wonderful. Hardly I can help with the implementation, since my programming level is unfortunately weak.

@TomPallister

This comment has been minimized.

Copy link
Member

@TomPallister TomPallister commented Jan 31, 2018

@gromanev no one is weak! Just need time and experience to learn :)

@TomPallister

This comment has been minimized.

@geffzhang

This comment has been minimized.

Copy link
Contributor

@geffzhang geffzhang commented Feb 12, 2018

This Project has a websocket Middleware https://github.com/radu-matei/websocket-manager

TomPallister pushed a commit that referenced this issue Mar 5, 2018
@TomPallister TomPallister changed the title How to configure Ocelot for work with Websocket New Feature - Websocket support Mar 16, 2018
TomPallister pushed a commit that referenced this issue Mar 18, 2018
TomPallister pushed a commit that referenced this issue Mar 19, 2018
TomPallister pushed a commit that referenced this issue Mar 19, 2018
Tom Gardham-Pallister
TomPallister pushed a commit that referenced this issue Mar 19, 2018
Tom Gardham-Pallister
TomPallister pushed a commit that referenced this issue Mar 21, 2018
TomPallister pushed a commit that referenced this issue Mar 21, 2018
…sing on my mac, probably fail on windows...yey..more to do
@SrikanthNalam

This comment has been minimized.

Copy link

@SrikanthNalam SrikanthNalam commented Mar 22, 2018

@TomPallister. Any further update on this regarding the implementation of Web-sockets in Ocelot Package ?

@TomPallister

This comment has been minimized.

Copy link
Member

@TomPallister TomPallister commented Mar 23, 2018

@SrikanthNalam I have something working that takes the websocket request and sets up a proxy with a downstream server also listening for websockets. Basically a websockets proxy. Is this what you are looking for?

TomPallister added a commit that referenced this issue Mar 23, 2018
TomPallister added a commit that referenced this issue Mar 23, 2018
TomPallister added a commit that referenced this issue Mar 23, 2018
TomPallister added a commit that referenced this issue Mar 23, 2018
* #212 - hacked websockets proxy together

* faffing around

* #212 hacking away :(

* #212 websockets proxy middleware working

* #212 map when for webockets working

* #212 some test refactor

* #212 temp commit

* #212 websockets proxy working, tests passing...need to do some tidying and write docs

* #212 more code coverage

* #212 docs for websockets

* #212 updated readme

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* stuck a warning in about logging levels into docs!
@TomPallister TomPallister reopened this Mar 23, 2018
@TomPallister

This comment has been minimized.

Copy link
Member

@TomPallister TomPallister commented Mar 24, 2018

Just released version 5.3.0 that has the websockets proxy support...check out the docs http://ocelot.readthedocs.io/en/latest/features/websockets.html

TomPallister added a commit that referenced this issue Apr 7, 2018
* #212 - hacked websockets proxy together

* faffing around

* #212 hacking away :(

* #212 websockets proxy middleware working

* #212 map when for webockets working

* #212 some test refactor

* #212 temp commit

* #212 websockets proxy working, tests passing...need to do some tidying and write docs

* #212 more code coverage

* #212 docs for websockets

* #212 updated readme

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* changing logging levels and logging like ms reccomends with structured data rather than strings

* more faffing

* more fafin

* #287 ocelot logger now only takes strings as it did take params then just turned them to strings, misleading, unit tests for logger and diagnosticlogger

* #287 errors now logged as they happen

* #287 more detail for logs requested in issue

* #287 tidy up

* #287 renamed

* #287 always log context id

* #287 fixed me being an idiot

* #287 removed crap websockets unit test that isnt a unit test

* #287 removed crap websockets unit test that isnt a unit test
@ogomaemmanuel

This comment has been minimized.

Copy link

@ogomaemmanuel ogomaemmanuel commented May 11, 2018

@TomPallister Does it work with signalr

@TomPallister

This comment has been minimized.

Copy link
Member

@TomPallister TomPallister commented May 11, 2018

@ogomaemmanuel not yet. There is another issue open for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.