두 개의 .NET 엔드포인트를 종단간 암호화로 연결하기 — 5분.
Get an end-to-end-encrypted connection between two .NET endpoints, across NAT, in five minutes.
In your project directory:
dotnet add package RemoteViewer.ConnectKit
Sign up at ck.remote-viewer.com → enter a company id + email → confirm the emailed link. You'll get your Company and TenantKey. The coordination host is sig.ck.remote-viewer.com:1618.
지금 가입 · Sign upA console app that accepts a peer and echoes every message back, uppercased:
using ConnectKit;
using System.Text;
await using var ck = new ConnectKitClient(new ConnectKitOptions {
Secret = "our-shared-secret", // you choose this; both sides must match
Signaling = "sig.ck.remote-viewer.com:1618",
Company = "your-company", // from step 2
TenantKey = "ck_...", // from step 2
DeviceName = "my-device", // the name the client dials
});
Console.WriteLine("Waiting for a peer…");
await using var channel = await ck.AcceptAsync();
Console.WriteLine($"Connected! encrypted={channel.IsEncrypted}");
channel.OnData += bytes => {
var msg = Encoding.UTF8.GetString(bytes);
channel.Send(Encoding.UTF8.GetBytes(msg.ToUpperInvariant())); // echo back
};
Console.ReadLine(); // keep the app aliveSame Secret, Company, TenantKey — it dials the device by name:
using ConnectKit;
using System.Text;
await using var ck = new ConnectKitClient(new ConnectKitOptions {
Secret = "our-shared-secret", // must match the device
Signaling = "sig.ck.remote-viewer.com:1618",
Company = "your-company",
TenantKey = "ck_...",
});
await using var channel = await ck.ConnectAsync("my-device");
Console.WriteLine($"Connected! encrypted={channel.IsEncrypted}");
channel.OnData += bytes => Console.WriteLine("Echo: " + Encoding.UTF8.GetString(bytes));
channel.Send(Encoding.UTF8.GetBytes("hello"));
await Task.Delay(1000);Run the device on one machine and the client on another (or two terminals). The client prints:
Connected! encrypted=True Echo: HELLO
Send(bytes), OnData,
OnClosed. What rides it (screen frames, files, control) is up to your app.Full reference & all transports: NuGet package page · Questions: jhhan@yu.ac.kr