Closed upsampled closed 1 month ago
Honestly, WithIntercept
might be a good solution. However, we could probably make a change that would allow you to pass in a custom WebSocketClient
, but it wouldn't work in the same way because there is nothing like builder.Services.AddWsClient
.
Therefore, it would just be something like WithCustomWsClient(clientGenerator: Func<IWsClient>)
, though I don't think IWsClient
exists.
I think the WithCustomWsClient
is a worth while feature. Unix Sockets may be a bit exotic but this would also allow for WebSockets to be proxied to HTTP3 Web Transport over QUIC. You would think this would become a more popular use-case as HTTP3 starts to roll out.
I am attempting to port
go
code using AspNetCore.Proxy. The basic function being ported is to redirect http and ws connections through Unix Sockets. For typical HTTP proxying I am attempting this with something like:The issue I am having is that I would also like to support WebSockets the same way, but the websocket proxy builder does not have anything like the
WithHttpClientName
method. Is there any way mimic this behavior for websockets? Can/should I try to switch both HTTP and WS Proxies over toWithIntercept
handlers?