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

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
vac
Hi, I’m quite new in Elixir and I’m trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and I...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
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
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Other popular topics Top

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
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
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
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
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
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
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement