1 server, 2 clients
Install Wireguard on all machines.
1 server, 2 clients
Install Wireguard on all machines.
// https://medium.com/@mlowicki/http-s-proxy-in-golang-in-less-than-100-lines-of-code-6a51c2f2c38c | |
// #!/usr/bin/env bash | |
// case `uname -s` in | |
// Linux*) sslConfig=/etc/ssl/openssl.cnf;; | |
// Darwin*) sslConfig=/System/Library/OpenSSL/openssl.cnf;; | |
// esac | |
// openssl req \ | |
// -newkey rsa:2048 \ | |
// -x509 \ |
a.myhost.com { | |
tls off | |
root /var/www/ | |
proxy / localhost:8091 | |
log log/access.a.log | |
} | |
b.myhost.com { | |
tls off | |
root /var/www/ |
package main | |
import ( | |
"bufio" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"fmt" | |
"io" | |
"io/ioutil" |