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

RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
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
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

Other popular topics Top

jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement