more progress :D
This commit is contained in:
parent
d49131bc67
commit
c4524fb62e
6 changed files with 210 additions and 51 deletions
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace Server;
|
||||
|
||||
|
@ -8,6 +10,11 @@ public class Program
|
|||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// Generally this key would be static but since its not production yet we can generate it every time to make sure
|
||||
// the users has the key and could load it from file
|
||||
RSA key = RSA.Create(2048);
|
||||
File.WriteAllText("server_key.pem", key.ExportRSAPublicKeyPem());
|
||||
|
||||
int port = 12345;
|
||||
TcpListener server = new(IPAddress.Parse("0.0.0.0"), port);
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue