micahrye

micahrye

Websocket client via proxy host

I need to use a standard websocket client on a network that uses a proxy host for all outbound traffic. I was wondering if people have recommendations for a websocket client library that can be configured for using a proxy host?

Most Liked

OvermindDL1

OvermindDL1

That is not really a websocket thing, but rather the underlying TCP connection kind of thing.

As for the websocket client, if it is in the browser then the proxy is handled by the browser, no way to control that from javascript, this generally defaults to the OS stock proxy.

If it is standalone program then it should also default to the OS stock proxy, which it probably is set if it is a proxy for ‘all’ outbound traffic. Otherwise setting it manually depends on the client language that the program is written in. :slight_smile:

micahrye

micahrye

OvermindDL1, appreciate the reply. I think part of my question is related to “what I don’t know :)” about the intricacies of tcp.

Hampered by my own lack of knowledge and misunderstandings, let me further explain. I have an application that is going to run on a clients network.

In developing a solution I spun up a proxy server using Squid on a linux box. Using nodejs websockts (faye-websocket) I can easily set proxy options and verify communications are routed through the local proxy server.

I would like to use elixir for this project, but I also need to make sure that I can support websockets via ssl and via a proxy. My current exploration of websocket libraries it has not been clear how to configure them for use with proxy. It maybe that I simply configure gen_tcp, but that has not been obvious either.

Pointers or clarifications welcome.

OvermindDL1

OvermindDL1

Is the proxy on the server side or the client side? If the server side then you don’t need to do anything as long as the proxy is half-decent. If the client side then you just need to setup the client to use the proxy (if not already built into the network stack of the OS you are running on).

Squid works fine, I barely even touched its config when I ran it. There should not need to be anything you do on the server side, not even ruby or node or so. If on the client side, well that depends on what language the client is in, what os, etc…

Where Next?

Popular in Questions Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 55125 245
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement