Browse Source

feat: use threads instead of GoRoutines (#6)

* feat: use threads instead of GoRoutines

* many improvements

* fix some bugs
Kévin Dunglas 2 years ago
parent
commit
796476d537
10 changed files with 482 additions and 462 deletions
  1. 1 0
      .gitignore
  2. 4 0
      .gitmodules
  3. 1 0
      C-Thread-Pool
  4. 56 2
      CONTRIBUTING.md
  5. 44 26
      Dockerfile
  6. 41 17
      README.md
  7. 104 23
      caddy/caddy.go
  8. 20 26
      caddy/caddy_test.go
  9. 79 73
      caddy/go.mod
  10. 132 295
      caddy/go.sum

+ 1 - 0
.gitignore

@@ -1,2 +1,3 @@
 .vscode/
 /caddy/frankenphp/frankenphp
+/internal/testserver/testserver

+ 4 - 0
.gitmodules

@@ -0,0 +1,4 @@
+[submodule "C-Thread-Pool"]
+	path = C-Thread-Pool
+	url = https://github.com/dunglas/C-Thread-Pool
+	branch = feat/mac-os-compat

+ 1 - 0
C-Thread-Pool

@@ -0,0 +1 @@
+Subproject commit d42cc5a2f750b0afe46dd24f48515bebf139d096

+ 56 - 2
CONTRIBUTING.md

@@ -1,5 +1,59 @@
 # Contributing
 
-## Compiling PHP
+## Running the test suite
 
-Pass the `--enable-debug` flag to compile PHP with debugging symbols.
+    go test -race -v ./...
+
+## Testing in live
+### With Docker (Linux)
+
+Prepare a dev Docker image:
+
+    docker build -t frankenphp .
+    docker run -p 8080:8080 -p 443:443 -v $PWD:/go/src/app -it frankenphp bash
+
+#### Caddy module
+
+Build Caddy with the FrankenPHP Caddy module:
+
+    cd /go/src/app/caddy/frankenphp/
+    go build
+
+Run the Caddy with the FrankenPHP Caddy module:
+
+    cd /go/src/app/testdata/
+    ../caddy/frankenphp/frankenphp run
+
+#### Minimal test server
+
+Build the minimal test server:
+
+    cd /go/src/app/internal/testserver/
+    go build
+
+Run the test server:
+
+    cd /go/src/app/testdata/
+    ../internal/testserver/testserver
+
+The server is listening on `127.0.0.1:8080`:
+
+    curl http://127.0.0.1:8080/phpinfo.php
+
+### Without Docker (Linux and macOS)
+
+Compile PHP:
+
+    ./configure --enable-debug --enable-zts
+    make -j6
+    sudo make install
+
+Build the minimal test server:
+
+    cd internal/testserver/
+    go build
+
+Run the test app:
+
+    cd ../../testdata/
+    ../internal/testserver/testserver

+ 44 - 26
Dockerfile

@@ -1,38 +1,56 @@
 FROM golang
 
-ARG PHP_VERSION=8.1.5
+ARG LIBICONV_VERSION=1.17
+ENV PHPIZE_DEPS \
+    autoconf \
+    dpkg-dev \
+    file \
+    g++ \
+    gcc \
+    libc-dev \
+    make \
+    pkg-config \
+    re2c
 
-# Sury doesn't provide ZTS builds for now
-#RUN apt-get update && \
-#    apt-get -y --no-install-recommends install apt-transport-https lsb-release&& \
-#    wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
-#    sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' && \
-#    apt-get update && \
-#    apt-get -y --no-install-recommends install php8.1-dev && \
-#    apt-get -y remove apt-transport-https lsb-release && \
-#    apt-get clean all
-#ENV CGO_CFLAGS="-I /usr/include/php/20200930 -I /usr/include/php/20200930/Zend -I /usr/include/php/20200930/TSRM -I /usr/include/php/20200930/main -I /usr/include/php/20200930/sapi/embed"
-
-# TODO: check the downloaded package using the provided GPG signatures
 RUN apt-get update && \
-    apt-get -y --no-install-recommends install libxml2 libxml2-dev sqlite3 libsqlite3-dev && \
-    apt-get clean && \
-    curl -s -o php-${PHP_VERSION}.tar.gz https://www.php.net/distributions/php-${PHP_VERSION}.tar.gz && \
-    tar -xf php-${PHP_VERSION}.tar.gz && \
-    cd php-${PHP_VERSION}/ && \
+    apt-get -y --no-install-recommends install \
+    $PHPIZE_DEPS \
+    libargon2-dev \
+    libcurl4-openssl-dev \
+    libonig-dev \
+    libreadline-dev \
+    libsodium-dev \
+    libsqlite3-dev \
+    libssl-dev \
+    libxml2-dev \
+    zlib1g-dev \
+    bison \
+    # Dev tools \
+    git \
+    gdb \
+    valgrind \
+    neovim && \
+    echo 'set auto-load safe-path /' > /root/.gdbinit && \
+    echo '* soft core unlimited' >> /etc/security/limits.conf \
+    && \
+    apt-get clean 
+
+RUN git clone https://github.com/dunglas/php-src.git && \
+    cd php-src && \
+    git checkout frankenphp-8.2 && \
     # --enable-embed is only necessary to generate libphp.so, we don't use this SAPI directly
-    ./configure --enable-zts --enable-embed --enable-debug && \
-    make && \
+    ./buildconf && \
+    ./configure --enable-embed=static --enable-zts --disable-zend-signals --enable-static --enable-debug && \
+    make -j6 && \
     make install && \
-    rm -Rf php-${PHP_VERSION}/ php-${PHP_VERSION}.tar.gz
-ENV LD_LIBRARY_PATH=/usr/local/lib/
+    #rm -Rf php-src/ && \
+    ldconfig && \
+    php --version
+
+RUN echo "zend_extension=opcache.so\nopcache.enable=1" > /usr/local/lib/php.ini
 
 WORKDIR /go/src/app
 
 COPY . .
 
 RUN go get -d -v ./...
-RUN go build -v
-#RUN cd cmd/frankenphp && go install -v ./...
-
-#CMD ["frankenphp"]

+ 41 - 17
README.md

@@ -15,45 +15,69 @@ docker build -t frankenphp .
 
 #### Install PHP
 
-Most distributions don't provide packages containing ZTS builds of PHP.
-Because the Go HTTP server uses goroutines, a ZTS build is needed.
+To use FrankenPHP, you currently need to compile a fork of PHP.
+Patches have been contributed upstream, and some have already
+been merged. It will be possible to use the vanilla version of PHP
+starting with version 8.3.
 
-Start by [downloading the latest version of PHP](https://www.php.net/downloads.php),
-then follow the instructions according to your operating system.
+First, get our PHP fork and prepare it:
 
-##### Linux
+```
+git clone https://github.com/dunglas/php-src.git
+cd php-src
+git checkout frankenphp-8.2
+./buildconf
+```
+
+Then, configure PHP for your platform:
+
+**Linux**:
 
 ```
 ./configure \
-    --enable-embed=static \
-    --enable-zts
-make -j6
-make install
+    --enable-embed \
+    --enable-zts \
+    --disable-zend-signals
 ```
 
-##### Mac
+**Mac**:
 
-The instructions to build on Mac and Linux are similar.
-However, on Mac, you have to use the [Homebrew](https://brew.sh/) package manager to install `libiconv` and `bison`.
-You also need to slightly tweak the configuration.
+Use the [Homebrew](https://brew.sh/) package manager to install
+`libiconv` and `bison`:
 
 ```
 brew install libiconv bison
 echo 'export PATH="/opt/homebrew/opt/bison/bin:$PATH"' >> ~/.zshrc
+```
+
+Then run the configure script:
+
+```
 ./configure \
     --enable-embed=static \
     --enable-zts \
-    --with-iconv=/opt/homebrew/opt/libiconv/ \
-    --without-pcre-jit
+    --disable-zend-signals \
+    --disable-opcache-jit \
+    --with-iconv=/opt/homebrew/opt/libiconv/
+```
+
+These flags are required, but you can add other flags (extra extensions...)
+if needed.
+
+Finally, compile PHP:
+
+```
 make -j6
 make install
 ```
 
 #### Compile the Go App
 
+You can now use the Go lib and compile our Caddy build:
+
 ```
-go get -d -v ./...
-go build -v
+cd caddy/frankenphp
+go build
 ```
 
 ## Misc Dev Resources

+ 104 - 23
caddy/caddy.go

@@ -4,10 +4,8 @@
 package caddy
 
 import (
-	"bytes"
 	"log"
 	"net/http"
-	"runtime"
 	"strconv"
 
 	"github.com/caddyserver/caddy/v2"
@@ -20,15 +18,36 @@ import (
 )
 
 func init() {
-	frankenphp.Startup()
-
 	caddy.RegisterModule(&FrankenPHPApp{})
 	caddy.RegisterModule(FrankenPHPModule{})
 	httpcaddyfile.RegisterGlobalOption("frankenphp", parseGlobalOption)
 	httpcaddyfile.RegisterHandlerDirective("php", parseCaddyfile)
 }
 
-type FrankenPHPApp struct{}
+type mainPHPinterpreterKeyType int
+
+var mainPHPInterpreterKey mainPHPinterpreterKeyType
+
+var phpInterpreter = caddy.NewUsagePool()
+
+type phpInterpreterDestructor struct{}
+
+func (phpInterpreterDestructor) Destruct() error {
+	log.Print("Destructor called")
+	frankenphp.Shutdown()
+
+	return nil
+}
+
+type workerConfig struct {
+	FileName string `json:"file_name,omitempty"`
+	Num      int    `json:"num,omitempty"`
+}
+
+type FrankenPHPApp struct {
+	NumThreads int            `json:"num_threads,omitempty"`
+	Workers    []workerConfig `json:"workers,omitempty"`
+}
 
 // CaddyModule returns the Caddy module information.
 func (a *FrankenPHPApp) CaddyModule() caddy.ModuleInfo {
@@ -38,30 +57,96 @@ func (a *FrankenPHPApp) CaddyModule() caddy.ModuleInfo {
 	}
 }
 
-func getGID() uint64 {
-	b := make([]byte, 64)
-	b = b[:runtime.Stack(b, false)]
-	b = bytes.TrimPrefix(b, []byte("goroutine "))
-	b = b[:bytes.IndexByte(b, ' ')]
-	n, _ := strconv.ParseUint(string(b), 10, 64)
-	return n
-}
+func (f *FrankenPHPApp) Start() error {
+	var opts []frankenphp.Option
+	if f.NumThreads != 0 {
+		opts = append(opts, frankenphp.WithNumThreads(f.NumThreads))
+	}
 
-func (*FrankenPHPApp) Start() error {
-	log.Printf("started! %d", getGID())
-	return frankenphp.Startup()
+	for _, w := range f.Workers {
+		num := 1
+		if w.Num > 1 {
+			num = w.Num
+		}
+
+		opts = append(opts, frankenphp.WithWorkers(w.FileName, num))
+	}
+
+	_, loaded, err := phpInterpreter.LoadOrNew(mainPHPInterpreterKey, func() (caddy.Destructor, error) {
+		if err := frankenphp.Init(opts...); err != nil {
+			return nil, err
+		}
+
+		return phpInterpreterDestructor{}, nil
+	})
+	if err != nil {
+		return err
+	}
+
+	if loaded {
+		frankenphp.Shutdown()
+		if err := frankenphp.Init(opts...); err != nil {
+			return err
+		}
+	}
+
+	log.Print("FrankenPHP started")
+
+	return nil
 }
 
 func (*FrankenPHPApp) Stop() error {
-	log.Printf("stoped!")
+	//frankenphp.Shutdown()
+	log.Print("FrankenPHP stopped")
 
-	frankenphp.Shutdown()
+	return nil
+}
+
+// UnmarshalCaddyfile implements caddyfile.Unmarshaler.
+func (f *FrankenPHPApp) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
+	for d.Next() {
+		for d.NextBlock(0) {
+			switch d.Val() {
+			case "num_threads":
+				if !d.NextArg() {
+					return d.ArgErr()
+				}
+
+				v, err := strconv.Atoi(d.Val())
+				if err != nil {
+					return err
+				}
+
+				f.NumThreads = v
+
+			case "worker":
+				if !d.NextArg() {
+					return d.ArgErr()
+				}
+
+				wc := workerConfig{FileName: d.Val()}
+				if d.NextArg() {
+					v, err := strconv.Atoi(d.Val())
+					if err != nil {
+						return err
+					}
+
+					wc.Num = v
+				}
+
+				f.Workers = append(f.Workers, wc)
+			}
+		}
+	}
 
 	return nil
 }
 
 func parseGlobalOption(d *caddyfile.Dispenser, _ interface{}) (interface{}, error) {
 	app := &FrankenPHPApp{}
+	if err := app.UnmarshalCaddyfile(d); err != nil {
+		return nil, err
+	}
 
 	// tell Caddyfile adapter that this is the JSON for an app
 	return httpcaddyfile.App{
@@ -117,11 +202,7 @@ func (f FrankenPHPModule) ServeHTTP(w http.ResponseWriter, r *http.Request, next
 		fc.Env[k] = repl.ReplaceKnown(v, "")
 	}
 
-	if err := frankenphp.ExecuteScript(w, fr); err != nil {
-		return err
-	}
-
-	return nil
+	return frankenphp.ServeHTTP(w, fr)
 }
 
 // UnmarshalCaddyfile implements caddyfile.Unmarshaler.

+ 20 - 26
caddy/caddy_test.go

@@ -11,37 +11,17 @@ import (
 
 func TestPHP(t *testing.T) {
 	var wg sync.WaitGroup
+	caddytest.Default.AdminPort = 2019
 	tester := caddytest.NewTester(t)
 	tester.InitServer(`
 		{
-			http_port     9080
-			https_port    9443
-
-			#frankenphp
+			admin localhost:2999
+			http_port 9080
+			https_port 9443
 		}
-		localhost:9080 {
-			route {
-				root * {env.PWD}/../testdata
-				# Add trailing slash for directory requests
-				@canonicalPath {
-					file {path}/index.php
-					not path */
-				}
-				redir @canonicalPath {path}/ 308
-
-				# If the requested file does not exist, try index files
-				@indexFiles file {
-					try_files {path} {path}/index.php index.php
-					split_path .php
-				}
-				rewrite @indexFiles {http.matchers.file.relative}
 
-				# Handle PHP files with FrankenPHP
-				@phpFiles path *.php
-				php @phpFiles
-		
-				respond 404
-			}
+		localhost:9080 {
+			respond "Hello"
 		}
 		`, "caddyfile")
 
@@ -54,3 +34,17 @@ func TestPHP(t *testing.T) {
 	}
 	wg.Wait()
 }
+
+func TestAutoHTTPtoHTTPSRedirectsImplicitPort(t *testing.T) {
+	tester := caddytest.NewTester(t)
+	tester.InitServer(`
+	{
+		http_port     9080
+		https_port    9443
+	}
+	localhost
+	respond "Yahaha! You found me!"
+  `, "caddyfile")
+
+	tester.AssertRedirect("http://localhost:9080/", "https://localhost/", http.StatusPermanentRedirect)
+}

+ 79 - 73
caddy/go.mod

@@ -1,138 +1,144 @@
 module github.com/dunglas/frankenphp/caddy
 
-go 1.18
+go 1.19
 
 replace github.com/dunglas/frankenphp => ../
 
-replace github.com/caddyserver/caddy/v2 => ../../caddy
-
 require (
-	github.com/caddyserver/caddy/v2 v2.5.1
+	github.com/caddyserver/caddy/v2 v2.6.1
 	github.com/dunglas/frankenphp v0.0.0-00010101000000-000000000000
-	go.uber.org/zap v1.21.0
+	go.uber.org/zap v1.23.0
 )
 
 require (
-	filippo.io/edwards25519 v1.0.0-rc.1 // indirect
+	filippo.io/edwards25519 v1.0.0 // indirect
 	github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
-	github.com/BurntSushi/toml v1.1.0 // indirect
+	github.com/BurntSushi/toml v1.2.0 // indirect
 	github.com/Masterminds/goutils v1.1.1 // indirect
 	github.com/Masterminds/semver/v3 v3.1.1 // indirect
 	github.com/Masterminds/sprig/v3 v3.2.2 // indirect
 	github.com/alecthomas/chroma v0.10.0 // indirect
-	github.com/antlr/antlr4 v0.0.0-20200503195918-621b933c7a7f // indirect
+	github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
 	github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b // indirect
+	github.com/benesch/cgosymbolizer v0.0.0-20190515212042-bec6fe6e597b // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
-	github.com/caddyserver/certmagic v0.16.1 // indirect
-	github.com/cenkalti/backoff/v4 v4.1.2 // indirect
+	github.com/caddyserver/certmagic v0.17.1 // indirect
+	github.com/cenkalti/backoff/v4 v4.1.3 // indirect
 	github.com/cespare/xxhash v1.1.0 // indirect
 	github.com/cespare/xxhash/v2 v2.1.2 // indirect
-	github.com/cheekybits/genny v1.0.0 // indirect
-	github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
-	github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
+	github.com/chzyer/readline v1.5.1 // indirect
+	github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
 	github.com/dgraph-io/badger v1.6.2 // indirect
 	github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
-	github.com/dgraph-io/ristretto v0.0.4-0.20200906165740-41ebdbffecfd // indirect
+	github.com/dgraph-io/ristretto v0.1.0 // indirect
 	github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
-	github.com/dlclark/regexp2 v1.4.0 // indirect
+	github.com/dlclark/regexp2 v1.7.0 // indirect
 	github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac // indirect
-	github.com/felixge/httpsnoop v1.0.2 // indirect
+	github.com/felixge/httpsnoop v1.0.3 // indirect
 	github.com/fsnotify/fsnotify v1.5.4 // indirect
 	github.com/go-chi/chi v4.1.2+incompatible // indirect
-	github.com/go-kit/kit v0.10.0 // indirect
+	github.com/go-kit/kit v0.12.0 // indirect
+	github.com/go-kit/log v0.2.1 // indirect
 	github.com/go-logfmt/logfmt v0.5.1 // indirect
-	github.com/go-logr/logr v1.2.2 // indirect
+	github.com/go-logr/logr v1.2.3 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
 	github.com/go-sql-driver/mysql v1.6.0 // indirect
 	github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
+	github.com/golang/glog v1.0.0 // indirect
+	github.com/golang/mock v1.6.0 // indirect
 	github.com/golang/protobuf v1.5.2 // indirect
 	github.com/golang/snappy v0.0.4 // indirect
-	github.com/google/cel-go v0.7.3 // indirect
+	github.com/google/cel-go v0.12.5 // indirect
 	github.com/google/uuid v1.3.0 // indirect
 	github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
+	github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect
 	github.com/huandu/xstrings v1.3.2 // indirect
-	github.com/imdario/mergo v0.3.12 // indirect
+	github.com/ianlancetaylor/cgosymbolizer v0.0.0-20220405231054-a1ae3e4bba26 // indirect
+	github.com/imdario/mergo v0.3.13 // indirect
+	github.com/inconshreveable/mousetrap v1.0.1 // indirect
 	github.com/jackc/chunkreader/v2 v2.0.1 // indirect
-	github.com/jackc/pgconn v1.10.1 // indirect
+	github.com/jackc/pgconn v1.13.0 // indirect
 	github.com/jackc/pgio v1.0.0 // indirect
 	github.com/jackc/pgpassfile v1.0.0 // indirect
-	github.com/jackc/pgproto3/v2 v2.2.0 // indirect
+	github.com/jackc/pgproto3/v2 v2.3.1 // indirect
 	github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
-	github.com/jackc/pgtype v1.9.0 // indirect
-	github.com/jackc/pgx/v4 v4.14.0 // indirect
-	github.com/klauspost/compress v1.15.4 // indirect
-	github.com/klauspost/cpuid/v2 v2.0.12 // indirect
+	github.com/jackc/pgtype v1.12.0 // indirect
+	github.com/jackc/pgx/v4 v4.17.2 // indirect
+	github.com/klauspost/compress v1.15.11 // indirect
+	github.com/klauspost/cpuid/v2 v2.1.1 // indirect
 	github.com/libdns/libdns v0.2.1 // indirect
-	github.com/lucas-clemente/quic-go v0.27.1 // indirect
+	github.com/lucas-clemente/quic-go v0.29.1 // indirect
 	github.com/manifoldco/promptui v0.9.0 // indirect
 	github.com/marten-seemann/qpack v0.2.1 // indirect
-	github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect
-	github.com/marten-seemann/qtls-go1-17 v0.1.1 // indirect
-	github.com/marten-seemann/qtls-go1-18 v0.1.1 // indirect
-	github.com/mattn/go-colorable v0.1.8 // indirect
-	github.com/mattn/go-isatty v0.0.13 // indirect
-	github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
+	github.com/marten-seemann/qtls-go1-18 v0.1.2 // indirect
+	github.com/marten-seemann/qtls-go1-19 v0.1.0 // indirect
+	github.com/mattn/go-colorable v0.1.13 // indirect
+	github.com/mattn/go-isatty v0.0.16 // indirect
+	github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
 	github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
-	github.com/mholt/acmez v1.0.2 // indirect
+	github.com/mholt/acmez v1.0.4 // indirect
 	github.com/micromdm/scep/v2 v2.1.0 // indirect
-	github.com/miekg/dns v1.1.49 // indirect
+	github.com/miekg/dns v1.1.50 // indirect
 	github.com/mitchellh/copystructure v1.2.0 // indirect
 	github.com/mitchellh/go-ps v1.0.0 // indirect
 	github.com/mitchellh/reflectwalk v1.0.2 // indirect
 	github.com/nxadm/tail v1.4.8 // indirect
 	github.com/onsi/ginkgo v1.16.5 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
-	github.com/prometheus/client_golang v1.12.2 // indirect
+	github.com/prometheus/client_golang v1.13.0 // indirect
 	github.com/prometheus/client_model v0.2.0 // indirect
-	github.com/prometheus/common v0.34.0 // indirect
-	github.com/prometheus/procfs v0.7.3 // indirect
-	github.com/rs/xid v1.2.1 // indirect
-	github.com/russross/blackfriday/v2 v2.0.1 // indirect
-	github.com/shopspring/decimal v1.2.0 // indirect
+	github.com/prometheus/common v0.37.0 // indirect
+	github.com/prometheus/procfs v0.8.0 // indirect
+	github.com/rs/xid v1.4.0 // indirect
+	github.com/russross/blackfriday/v2 v2.1.0 // indirect
+	github.com/shopspring/decimal v1.3.1 // indirect
 	github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
-	github.com/sirupsen/logrus v1.8.1 // indirect
-	github.com/slackhq/nebula v1.5.2 // indirect
-	github.com/smallstep/certificates v0.19.0 // indirect
-	github.com/smallstep/cli v0.18.0 // indirect
+	github.com/sirupsen/logrus v1.9.0 // indirect
+	github.com/slackhq/nebula v1.6.1 // indirect
+	github.com/smallstep/certificates v0.22.1 // indirect
+	github.com/smallstep/cli v0.22.0 // indirect
 	github.com/smallstep/nosql v0.4.0 // indirect
-	github.com/smallstep/truststore v0.11.0 // indirect
-	github.com/spf13/cast v1.4.1 // indirect
+	github.com/smallstep/truststore v0.12.0 // indirect
+	github.com/spf13/cast v1.5.0 // indirect
+	github.com/spf13/cobra v1.5.0 // indirect
+	github.com/spf13/pflag v1.0.5 // indirect
 	github.com/stoewer/go-strcase v1.2.0 // indirect
 	github.com/tailscale/tscert v0.0.0-20220316030059-54bbcb9f74e2 // indirect
-	github.com/urfave/cli v1.22.5 // indirect
-	github.com/yuin/goldmark v1.4.12 // indirect
+	github.com/urfave/cli v1.22.10 // indirect
+	github.com/yuin/goldmark v1.5.2 // indirect
 	github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594 // indirect
 	go.etcd.io/bbolt v1.3.6 // indirect
 	go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
-	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect
-	go.opentelemetry.io/otel v1.4.0 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.0 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.0 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.4.0 // indirect
-	go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect
-	go.opentelemetry.io/otel/metric v0.27.0 // indirect
-	go.opentelemetry.io/otel/sdk v1.4.0 // indirect
-	go.opentelemetry.io/otel/trace v1.4.0 // indirect
-	go.opentelemetry.io/proto/otlp v0.12.0 // indirect
-	go.step.sm/cli-utils v0.7.0 // indirect
-	go.step.sm/crypto v0.16.1 // indirect
-	go.step.sm/linkedca v0.15.0 // indirect
-	go.uber.org/atomic v1.9.0 // indirect
+	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.1 // indirect
+	go.opentelemetry.io/otel v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 // indirect
+	go.opentelemetry.io/otel/metric v0.32.1 // indirect
+	go.opentelemetry.io/otel/sdk v1.10.0 // indirect
+	go.opentelemetry.io/otel/trace v1.10.0 // indirect
+	go.opentelemetry.io/proto/otlp v0.19.0 // indirect
+	go.step.sm/cli-utils v0.7.5 // indirect
+	go.step.sm/crypto v0.19.0 // indirect
+	go.step.sm/linkedca v0.18.0 // indirect
+	go.uber.org/atomic v1.10.0 // indirect
 	go.uber.org/multierr v1.8.0 // indirect
-	golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898 // indirect
-	golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
-	golang.org/x/net v0.0.0-20220517181318-183a9ca12b87 // indirect
-	golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e // indirect
-	golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect
+	golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be // indirect
+	golang.org/x/exp v0.0.0-20220929160808-de9c53c655b9 // indirect
+	golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
+	golang.org/x/net v0.0.0-20220927171203-f486391704dc // indirect
+	golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect
+	golang.org/x/term v0.0.0-20220919170432-7a66f970e087 // indirect
 	golang.org/x/text v0.3.8-0.20211004125949-5bd84dd9b33b // indirect
-	golang.org/x/tools v0.1.10 // indirect
-	golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect
-	google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf // indirect
-	google.golang.org/grpc v1.44.0 // indirect
-	google.golang.org/protobuf v1.28.0 // indirect
+	golang.org/x/tools v0.1.12 // indirect
+	golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
+	google.golang.org/genproto v0.0.0-20220929141241-1ce7b20da813 // indirect
+	google.golang.org/grpc v1.49.0 // indirect
+	google.golang.org/protobuf v1.28.1 // indirect
 	gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
 	gopkg.in/square/go-jose.v2 v2.6.0 // indirect
 	gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
 	gopkg.in/yaml.v2 v2.4.0 // indirect
+	gopkg.in/yaml.v3 v3.0.1 // indirect
 	howett.net/plist v1.0.0 // indirect
 )

File diff suppressed because it is too large
+ 132 - 295
caddy/go.sum


Some files were not shown because too many files changed in this diff