go build -o goencrypt main.go
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
go mod edit -module {NEW_MODULE_NAME} | |
-- rename all imported module | |
find . -type f -name '*.go' \ | |
-exec sed -i -e 's,{OLD_MODULE},{NEW_MODULE},g' {} \; |
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
server { | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
server_name yourdomain | |
ssl_certificate /etc/ssl/localcerts/yourdomain.crt; | |
ssl_certificate_key /etc/ssl/localcerts/yourdomain.key; | |
ssl_ecdh_curve prime256v1; | |
ssl_session_cache builtin:1000 shared:SSL:10m; |
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
package main | |
import ( | |
"crypto/tls" | |
"encoding/base64" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/smtp" | |
"strings" |