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

Proxy configuration not used for websocket connections #10743

Open
dguggemos opened this issue May 18, 2021 · 6 comments
Open

Proxy configuration not used for websocket connections #10743

dguggemos opened this issue May 18, 2021 · 6 comments
Labels
bug Something isn't working correctly ext/websocket related to the ext/websocket crate

Comments

@dguggemos
Copy link

Proxy configuration provided via environment variables seems not be used for websocket connections. This would however be very useful, especially in corporate environments where a proxy is in place.

@kitsonk kitsonk transferred this issue from denoland/deno May 18, 2021
@lucacasonato
Copy link
Member

Do you mean the WebSocket global?

@dguggemos
Copy link
Author

I have configured the environment variables as described here: https://deno.land/manual/linking_to_external_code/proxies#proxies

Then I try to create a WebSocket connection (to an endpoint only accessible via proxy):

var ws = new WebSocket("ws://echo.websocket.org");

@geglock
Copy link

geglock commented May 18, 2021

I noticed this missing proxy support also recently with the (Web Standard) WebSocket client of deno: https://doc.deno.land/builtin/stable#WebSocket

So probably this issue is not (yet) about the WebSocket server in "deno_std/ws".

@geglock
Copy link

geglock commented May 21, 2021

@kitsonk should this issue be moved again to denoland/deno?

@lucacasonato lucacasonato transferred this issue from denoland/std May 21, 2021
@lucacasonato lucacasonato added bug Something isn't working correctly ext/websocket related to the ext/websocket crate labels Jun 8, 2021
@Officialstrike
Copy link

Officialstrike commented Apr 16, 2022

Currently the websocket library tungstenite doesn't support proxies, would have to wait for issue snapview/tungstenite-rs#177 to be resolved.

technically they use tokio_tungstenite however that's just a wrapper around tungstenite to make it async.

@crowlKats crowlKats added the upstream Changes in upstream are required to solve these issues label May 13, 2022
@crowlKats crowlKats removed the upstream Changes in upstream are required to solve these issues label Nov 30, 2023
@lucacasonato
Copy link
Member

We do not use tungstenite anymore. We now use fastwebsockets. We should be able to add proxy support using the proxy handling that we also use for fetch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly ext/websocket related to the ext/websocket crate
Projects
None yet
Development

No branches or pull requests

6 participants