Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a video streaming application that utilizes a WebSocket for the server <-> client communication. My goal is to make the video streaming service available over the internet in the cases where neither the server nor client have public IPs.
One way to do this is over a VPN connection, but I prefer not to use a VPN at all. That's why I decided to try and forward the communication over an SSH server via remote port forwarding.
However I am facing an issue - forwarding the server socket is pretty straight-forward, but I have no way to know in advance what the randomly allocated client port will be, so the traffic will flow only in the direction client -> SSH server -> streaming server.
When the SSH relay point receives the responses from the streaming server it does not automatically route them back to the client and the WebSocket handshake cannot be completed.
Do you think it is possible to overcome this issue or should I drop the WebSocket altogether and revert to a normal HTTP / TCP connection?
My goal is to make the video streaming service available over the internet in the cases where neither the server nor client have public IPs.
"The Internet" simply requires routable IP addresses. This means that either you're skipping over "simple" solutions like exposing the stream via a load balancer like Haproxy (it will happily use backends that have non-routable LAN IP adresses) or you are not providing us with all the details we should have.
Unfortunately, both the video streaming server and client will be connecting to the Internet via a mobile network, so it will not be possible to use any form of proxy between them.
At the time of writing my original post, the idea was to put the WebSocket server on the same device as the video streaming server application, which turned out to be a completely inadequate solution to the problem...
So, instead of situating my WebSocket listener on the streaming server device, I will put it in a 'mid point', where both the streaming server and clients will be able to connect (so both of them will be WebSocket clients).
A piece of software will then handle the WebSocket connections and video streaming through a basic set of API commands and hopefully I will get what I want.
This type of architecture also makes a lot more sense with regard to the original purpose of the WebSocket design.
Unfortunately, both the video streaming server and client will be connecting to the Internet via a mobile network, so it will not be possible to use any form of proxy between them.
I did not say "proxy" I said load balancer.
Quote:
Originally Posted by Vlad.BG
So, instead of situating my WebSocket listener on the streaming server device, I will put it in a 'mid point', where both the streaming server and clients will be able to connect (so both of them will be WebSocket clients).
You're essentially saying the same as I did only phrased differently ;-p
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.