All Projects → Cloet → SimpleSockets

Cloet / SimpleSockets

Licence: MIT license
Asynchronous TCP .NET library with reliable transmission and receipt of data, with an ssl implementation.

Programming Languages

C#
18002 projects
powershell
5483 projects

Projects that are alternatives of or similar to SimpleSockets

Watsontcp
WatsonTcp is the easiest way to build TCP-based clients and servers in C#.
Stars: ✭ 209 (+182.43%)
Mutual labels:  tls, ssl, nuget, messaging
SuperSimpleTcp
Simple wrapper for TCP client and server in C# with SSL support
Stars: ✭ 263 (+255.41%)
Mutual labels:  ssl, messaging, ssl-support
WatsonCluster
A simple C# class using Watson TCP to enable a one-to-one high availability cluster.
Stars: ✭ 18 (-75.68%)
Mutual labels:  ssl, nuget, messaging
XAsyncSockets
XAsyncSockets is an efficient Python/MicroPython library of managed asynchronous sockets.
Stars: ✭ 28 (-62.16%)
Mutual labels:  tls, ssl, client-server
Terraform Provider Acme Old
ACME (Let's Encrypt) Support for Terraform
Stars: ✭ 211 (+185.14%)
Mutual labels:  tls, ssl
Gmssl
支持国密SM2/SM3/SM4/SM9/ZUC/SSL的OpenSSL分支
Stars: ✭ 2,747 (+3612.16%)
Mutual labels:  tls, ssl
Ssl exporter
Exports Prometheus metrics for SSL certificates
Stars: ✭ 211 (+185.14%)
Mutual labels:  tls, ssl
Snuffy
Snuffy is a simple command line tool to inspect SSL/TLS data.
Stars: ✭ 236 (+218.92%)
Mutual labels:  tls, ssl
Tls Gen
Generates self-signed x509/TLS/SSL certificates useful for development
Stars: ✭ 196 (+164.86%)
Mutual labels:  tls, ssl
Sslyze
Fast and powerful SSL/TLS scanning library.
Stars: ✭ 2,623 (+3444.59%)
Mutual labels:  tls, ssl
Illustrated Tls
The Illustrated TLS Connection: Every byte explained
Stars: ✭ 2,751 (+3617.57%)
Mutual labels:  tls, ssl
tipi
Tipi - the All-in-one Web Server for Ruby Apps
Stars: ✭ 214 (+189.19%)
Mutual labels:  tls, ssl
Manuale
A fully manual Let's Encrypt/ACME client
Stars: ✭ 201 (+171.62%)
Mutual labels:  tls, ssl
Mitigating Obsolete Tls
Guidance for mitigating obsolete Transport Layer Security configurations. #nsacyber
Stars: ✭ 199 (+168.92%)
Mutual labels:  tls, ssl
docker-ssl-reverse-proxy
Easy-to-use auto-SSL reverse proxy as a Docker container based on Caddy and Let’s Encrypt
Stars: ✭ 22 (-70.27%)
Mutual labels:  tls, ssl
Rustls
A modern TLS library in Rust
Stars: ✭ 3,062 (+4037.84%)
Mutual labels:  tls, ssl
hudsucker
Intercepting HTTP/S proxy
Stars: ✭ 114 (+54.05%)
Mutual labels:  tls, ssl
dheater
D(HE)ater is a proof of concept implementation of the D(HE)at attack (CVE-2002-20001) through which denial-of-service can be performed by enforcing the Diffie-Hellman key exchange.
Stars: ✭ 142 (+91.89%)
Mutual labels:  tls, ssl
python-mbedtls
Cryptographic library with an mbed TLS back end
Stars: ✭ 64 (-13.51%)
Mutual labels:  tls, ssl
Badssl.com
🔒 Memorable site for testing clients against bad SSL configs.
Stars: ✭ 2,234 (+2918.92%)
Mutual labels:  tls, ssl

SimpleSockets

NuGet version

SimpleSockets is a .NET Standard 2.1 library with integrated framing and ssl support that provides an easy way to build fast and easy to use Tcp/Ip programs.

Table of Contents

Framing

Because Tcp/ip just sends a stream to a connected socket, it's impossible to know where a message starts and another one stops. To aid with easier messaging between sockets this library uses message framing. Wiki

Install

This project uses dotnetcore 2.1.
The latest version of the package can always be found on nuget.

PM> Install-Package SimpleSockets

or using .NET CLI

> dotnet add package SimpleSockets

Usage

Server

There are two different options of SimpleSocketListener

Server Description
SimpleSocketListener The base Listener class.
SimpleSocketTcpListener Server using Async calls without using Ssl.
SimpleSocketTcpSslListener Server using Async calls that uses a Ssl certificate to encrypt incoming & outgoing data.

To help authenticate connected clients on the server side, whenever a client connects to the server it will send an BasicAuth message -> this contains a GUID and the OSVersion the client is running. When the client sets 'EnableExtendedAuth' to true it will send a GUID, OSVersion, Pc Name and DomainName.

Wiki

Client

There are two different options of async client:

Client Description
SimpleSocketClient Base SimpleSocketClient class
SimpleSocketTcpClient Client using Async Calls without using Ssl.
SimpleSocketTcpSslClient An async client that uses an ssl certificate to encrypt incoming & outgoing data. By default the client does not need to authenticate. Only the server requires to be authenticated, the constructor has the option to require server and client authentication.

Wiki

Customization

I've added several classes that can be used to augment how the messaging of your sockets work.

Encryption

If you don't want to use Ssl, but don't want to send plaintext over the internet you can use the default Encryption added to the Library, which uses AES, the salt and key can be changed but have to correspond between client and server.
!! Warning ** This does not make your connection safe! If you're concerned with safety use Ssl !!

Custom Encryption
You can implement your own custom Encryption for client and server. Implement the interface IMessageEncryption and change the MessageEncryption of the client and server, if connected sockets are not using the same encryption it won't work.

Compression

By default folders will be compressed using ZIP compression before they are sent. All other types of messages won't be compressed. There are default classes for compressing, files, folders and Stream. Compression isn't always a good idea to use, if you're sending a small message there is a chance your message will actually increase in size when sending. (ByteCompressor is for all messages except files, folder).

Custom Compression
For folders: implement IFolderCompression and change the FolderCompressor of client, server.
For Files : implement IFileCompression and change the FileCompressor property of client, server.
For Stream : implement IByteCompression and change the ByteCompressor property of client, server.

Maintainers

@Cloet.

Contributing

Feel free to dive in! Open an issue or submit PRs.

Contributors

This project exists thanks to all the people who contribute.

License

MIT © Mathias Cloet

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].