dotnet / dotnet/yarp

Tunneling with YARP

Open
#1,618 37 comments 29 reactions 0 assignees View on GitHub
Type: Idea
Dominant language
C#
Stars
9.6k
Forks
933
Avg merge
12d 18h
Merged PRs (30d)
2

Description

How awesome would it be if we could use YARP as a reverse proxy over WebSockets?

I have one public facing ASPNETCORE server. Then I have multiple small blazor-server applications running on multiple machines in customers infrastructure (behind firewall etc). It would be great if I could setup YARP as a reverse proxy over websockets/signlar so I can reach the sites from public facing server.

ASPNETCORE Server (domain.com):
```c#
.AddYarpWebSocketServerEndpoint("/someSite1");
.AddYarpWebSocketServerEndpoint("/someSite2");
.AddYarpWebSocketServerEndpoint("/someSite3");
```
NETCOREAPP adding YARP on Client machine 1 proxy app:
```c#
.AddYarpWebSocketClient("https://domain.com/someSite1", "http://192.168.1.100:5000" );
.AddYarpWebSocketClient("https://domain.com/someSite2", "http://192.168.1.101:5000" );
```
NETCOREAPP adding YARP on Client machine 2 proxy app:
```c#
.AddYarpWebSocketClient("https://domain.com/someSite3", "http://192.168.1.100:5000" );
```

Browser (domain.com/someSite1)->Public server (WebSocket/SignalR-server-Hub) | Client(WebSocket/SignalR) -> 192.168.1.100 (blazor server app)

This article explains it pretty well: https://dev.to/hgsgtk/reverse-http-proxy-over-websocket-in-go-part-1-13n4

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.