forked from BoBiene/ReverseTunnel.Yarp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
29 lines (23 loc) · 1.24 KB
/
Program.cs
File metadata and controls
29 lines (23 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using UFX.Relay.Tunnel;
using UFX.Relay.Tunnel.Listener;
Console.WriteLine(@"
██████╗██╗ ██╗███████╗███╗ ██╗████████╗
██╔════╝██║ ██║██╔════╝████╗ ██║╚══██╔══╝
██║ ██║ ██║█████╗ ██╔██╗ ██║ ██║
██║ ██║ ██║██╔══╝ ██║╚██╗██║ ██║
╚██████╗███████╗██║███████╗██║ ╚████║ ██║
╚═════╝╚══════╝╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝
UFX.Relay Sample Client started
");
var builder = WebApplication.CreateBuilder(args);
builder.WebHost.AddTunnelListener(includeDefaultUrls: true);
builder.Services.AddTunnelClient(options =>
{
options.TunnelHost = "wss://localhost:7200";
options.TunnelId = "123";
});
var app = builder.Build();
app.MapGet("/", () => builder.Environment.ApplicationName);
app.MapGet("/client", () => "Hello from Client");
await app.RunAsync();