-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
# golang-p2p-chat | ||
|
||
console chat with auto reconnection written in go | ||
console chat with auto reconnection and TLS encryption written in go | ||
|
||
### Installing | ||
|
||
``` | ||
go get github.com/faroyam/golang-p2p-chat | ||
``` | ||
|
||
## Getting Started | ||
|
||
1. Generate SSL keys for TSL | ||
``` | ||
bash makeCerts.sh | ||
``` | ||
2. Run chat | ||
``` | ||
go build chat.go && ./chat <username> <remote IP> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
mkdir certs 2>/dev/null | ||
rm certs/* 2>/dev/null | ||
echo "make server cert" | ||
openssl req -new -nodes -x509 -out certs/server.pem -keyout certs/server.key -days 3650 -subj "/C=RU/ST=MSK/L=MSK/O=Chat Company/OU=IT/CN=www.chat.com/emailAddress=$1" | ||
echo "make client cert" | ||
openssl req -new -nodes -x509 -out certs/client.pem -keyout certs/client.key -days 3650 -subj "/C=RU/ST=MSK/L=MSK/O=Chat Company/OU=IT/CN=www.chat.com/emailAddress=$1" | ||
echo "creating server cert" | ||
openssl req -new -nodes -x509 -out certs/server.pem -keyout certs/server.key -days 3650 -subj "/C=RU/ST=MSK/L=MSK/O=Chat Company/OU=IT/CN=www.chat.com/[email protected]" | ||
echo "creating client cert" | ||
openssl req -new -nodes -x509 -out certs/client.pem -keyout certs/client.key -days 3650 -subj "/C=RU/ST=MSK/L=MSK/O=Chat Company/OU=IT/CN=www.chat.com/[email protected]" | ||
echo "done" |