inlets / inletsctl

Create inlets servers on the top cloud platforms
https://docs.inlets.dev/
MIT License
457 stars 63 forks source link

Add HTTPS tunnel support for create command #92

Closed alexellis closed 3 years ago

alexellis commented 3 years ago

Signed-off-by: Alex Ellis (OpenFaaS Ltd) alexellis2@gmail.com

Description

Add HTTPS tunnel support for create command

This enables fast HTTPS tunnels to be provisioned.

How Has This Been Tested?

Tested with the staging issuer and a custom domain. This relies on a new service file, which will be published with each new inlets PRO binary release.

inlets-pro-http.service is fetched and the defaults file is populated with the Let's Encrypt data such as domain, email and issuer.

mkdir -p $GOPATH/src/github.com/inlets/
cd $GOPATH/src/github.com/inlets/
git clone https://github.com/inlets/inletsctl --branch=https-tunnels
cd inletsctl

# Change to "prod" or remove `--letsencrypt-issuer` to use the default
export ISSUER=staging

go build && ./inletsctl create \
  --letsencrypt-domain site1.alex.o6s.io \
  --letsencrypt-email contact@o6s.io \
  --letsencrypt-issuer staging \
  --access-token-file ~/.secrets/access-token

I've tested staging, I'd like someone else to leave that flag off, which should default to prod.

I then ran: doctl compute domain create site1.alex.o6s.io --ip-address 138.68.190.75 as fast as I could.

I connected a PythonSimpleHTTP server to the tunnel with the printed-out client command from inletsctl

staging-cert

How are existing users impacted? What migration steps/scripts do we need?

Create will always provision TCP tunnels, unless the --letsencrypt-* flags are given.

Checklist:

I have:

alexellis commented 3 years ago

Thank you. I've just seen this. Did you issue a production cert?