~lastrosade/MNC

d9b7f4551a7c904228ffaac963b67e6b58e8701f — jeremy.shields 5 years ago eef7222
TLS in README
1 files changed, 52 insertions(+), 0 deletions(-)

M README.md
M README.md => README.md +52 -0
@@ 42,6 42,58 @@ eg: ```netcat localhost 44033```
* [CRC](https://www.npmjs.com/package/crc)
* [net](https://www.npmjs.com/package/net)

## TLS

Using [stunnel](https://www.stunnel.org/)

Generate a certificate

```openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem```

Create Stunnel config files

p1.stunnel
```
; TLS front-end to a web server
fips=no

[https]
accept=44034
connect=44033
cert=/path/to/certificate.pem
key=/path/to/key.pem
```

p2.stunnel
```
; TLS front-end to a web server
fips=no

[https]
accept=44045
connect=44044
cert=/path/to/certificate.pem
key=/path/to/key.pem
```

Start the two stunnel instances

```stunnel p1.stunnel```

```stunnel p2.stunnel```

Then users can connect with

```openssl s_client -connect domain.tld:44034```

```openssl s_client -connect domain.tld:44045```

or

```gnutls-cli domain.tld -p 44034```

```gnutls-cli domain.tld -p 44045```

## Author

[**Jeremy Lee Shields**](http://jeremylee.sh/)