caddyserver / caddy

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
https://caddyserver.com
Apache License 2.0
56.97k stars 3.98k forks source link

TLS handshake error #3716

Closed tgulacsi closed 4 years ago

tgulacsi commented 4 years ago
caddy2[17034]: 2020/09/09 09:33:30 http: TLS handshake error from 212.108.234.137:53453: read tcp 192.168.1.1:443->212.108.234.137:53453: read: connection reset by peer

wss (TLS+websocket) reverse proxying works with Caddy v1, fails with Caddy v2. The client is a freshly compiled Go (github.com/jpillora/chisel) program, so should work with TLSv1.3 - checked, and uses the default &tls.TLSConfig{} config.

Both ends says the other closed the connection - I think it's a TLS config issue, but Caddy is quite tight-lipped.

Where should I look at?

mholt commented 4 years ago

Thanks for opening an issue! We'll look into this.

It's not immediately clear to me what is going on, so I'll need your help to understand it better.

Ideally, we need to be able to reproduce the bug in the most minimal way possible. This allows us to write regression tests to verify the fix is working. If we can't reproduce it, then you'll have to test our changes for us until it's fixed -- and then we can't add test cases, either.

I've attached a template below that will help make this easier and faster! This will require some effort on your part -- please understand that we will be dedicating time to fix the bug you are reporting if you can just help us understand it and reproduce it easily.

This template will ask for some information you've already provided; that's OK, just fill it out the best you can. :+1: I've also included some helpful tips below the template. Feel free to let me know if you have any questions!

Thank you again for your report, we look forward to resolving it!

Template

## 1. Environment

### 1a. Operating system and version

```
paste here
```

### 1b. Caddy version (run `caddy version` or paste commit SHA)

```
paste here
```

### 1c. Go version (if building Caddy from source; run `go version`)

```
paste here
```

## 2. Description

### 2a. What happens (briefly explain what is wrong)

### 2b. Why it's a bug (if it's not obvious)

### 2c. Log output

```
paste terminal output or logs here
```

### 2d. Workaround(s)

### 2e. Relevant links

## 3. Tutorial (minimal steps to reproduce the bug)

Helpful tips

  1. Environment: Please fill out your OS and Caddy versions, even if you don't think they are relevant. (They are always relevant.) If you built Caddy from source, provide the commit SHA and specify your exact Go version.

  2. Description: Describe at a high level what the bug is. What happens? Why is it a bug? Not all bugs are obvious, so convince readers that it's actually a bug.

    • 2c) Log output: Paste terminal output and/or complete logs in a code block. DO NOT REDACT INFORMATION except for credentials.
    • 2d) Workaround: What are you doing to work around the problem in the meantime? This can help others who encounter the same problem, until we implement a fix.
    • 2e) Relevant links: Please link to any related issues, pull requests, docs, and/or discussion. This can add crucial context to your report.
  3. Tutorial: What are the minimum required specific steps someone needs to take in order to experience the same bug? Your goal here is to make sure that anyone else can have the same experience with the bug as you do. You are writing a tutorial, so make sure to carry it out yourself before posting it. Please:

    • Start with an empty config. Add only the lines/parameters that are absolutely required to reproduce the bug.
    • Do not run Caddy inside containers.
    • Run Caddy manually in your terminal; do not use systemd or other init systems.
    • If making HTTP requests, avoid web browsers. Use a simpler HTTP client instead, like curl.
    • Do not redact any information from your config (except credentials). Domain names are public knowledge and often necessary for quick resolution of an issue!
    • Note that ignoring this advice may result in delays, or even in your issue being closed. 😞 Only actionable issues are kept open, and if there is not enough information or clarity to reproduce the bug, then the report is not actionable.

Example of a tutorial:

Create a config file: ``` { ... } ``` Open terminal and run Caddy: ``` $ caddy ... ``` Make an HTTP request: ``` $ curl ... ``` Notice that the result is ___ but it should be ___.
tgulacsi commented 4 years ago

I've downloaded from the caddyserver.com, with a few extra modules

$ caddy2 version
v2.0.0-beta12 h1:LZnXOGDr1SbeJNyln8Xc/hXjWCa/a9qFpCbWt2iwJPw=
$ go version -m $(which caddy2)
/home/gthomas/bin/caddy2: go1.13.5
        path    caddy
        mod     caddy   (devel)
        dep     github.com/Masterminds/goutils  v1.1.0  h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg=
        dep     github.com/Masterminds/semver/v3        v3.0.1  h1:2kKm5lb7dKVrt5TYUiAavE6oFc1cFT0057UVGT+JqLk=
        dep     github.com/Masterminds/sprig/v3 v3.0.0  h1:KSQz7Nb08/3VU9E4ns29dDxcczhOD1q7O1UfM4G3t3g=
        dep     github.com/alecthomas/chroma    v0.7.0  h1:z+0HgTUmkpRDRz0SRSdMaqOLfJV4F+N1FPDZUZIDUzw=
        dep     github.com/andybalholm/brotli   v0.0.0-20190821151343-b60f0d972eeb      h1:ZSlUsEd11C/uRzhZHOgANARJ03fkwmjJEa6g2Cqjlo4=
        dep     github.com/caddyserver/caddy/v2 v2.0.0-beta12   h1:LZnXOGDr1SbeJNyln8Xc/hXjWCa/a9qFpCbWt2iwJPw=
        dep     github.com/cenkalti/backoff/v3  v3.1.1  h1:UBHElAnr3ODEbpqPzX8g5sBcASjoLFtt3L/xwJ01L6E=
        dep     github.com/cheekybits/genny     v1.0.0  h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE=
        dep     github.com/codahale/hdrhistogram        v0.0.0-20161010025455-3a0bb77429bd      h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w=
        dep     github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964      h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=
        dep     github.com/dlclark/regexp2      v1.1.6  h1:CqB4MjHw0MFCDj+PHHjiESmHX+N7t0tJzKvC6M97BRg=
        dep     github.com/dustin/go-humanize   v1.0.0  h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
        dep     github.com/go-acme/lego/v3      v3.2.0  h1:z0zvNlL1niv/1qA06V5X1BRC5PeLoGKAlVaWthXQz9c=
        dep     github.com/golang/groupcache    v0.0.0-20191002201903-404acd9df4cc      h1:55rEp52jU6bkyslZ1+C/7NGfpQsEc6pxGLAGDOctqbw=
        dep     github.com/golang/protobuf      v1.3.2  h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
        dep     github.com/google/uuid  v1.1.1  h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
        dep     github.com/hpcloud/tail v1.0.0  h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
        dep     github.com/huandu/xstrings      v1.2.0  h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0=
        dep     github.com/ilibs/json5  v1.0.1  h1:3e14wUQM8PyK6Hf1bM+zAQFxfG+N5oZj35x5vCNeQ58=
        dep     github.com/imdario/mergo        v0.3.8  h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ=
        dep     github.com/jsternberg/zap-logfmt        v1.2.0  h1:1v+PK4/B48cy8cfQbxL4FmmNZrjnIMr2BsnyEmXqv2o=
        dep     github.com/klauspost/compress   v1.8.6  h1:970MQcQdxX7hfgc/aqmB4a3grW0ivUVV6i1TLkP8CiE=
        dep     github.com/klauspost/cpuid      v1.2.2  h1:1xAgYebNnsb9LKCdLOvFWtAxGU/33mjJtyOVbmUa0Us=
        dep     github.com/lucas-clemente/quic-go       v0.14.1 h1:c1aKoBZKOPA+49q96B1wGkibyPP0AxYh45WuAoq+87E=
        dep     github.com/mailgun/timetools    v0.0.0-20141028012446-7e6055773c51      h1:Kg/NPZLLC3aAFr1YToMs98dbCdhootQ1hZIvZU28hAQ=
        dep     github.com/marten-seemann/chacha20      v0.2.0  h1:f40vqzzx+3GdOmzQoItkLX5WLvHgPgyYqFFIO5Gh4hQ=
        dep     github.com/marten-seemann/qpack v0.1.0  h1:/0M7lkda/6mus9B8u34Asqm8ZhHAAt9Ho0vniNuVSVg=
        dep     github.com/marten-seemann/qtls  v0.4.1  h1:YlT8QP3WCCvvok7MGEZkMldXbyqgr8oFg5/n8Gtbkks=
        dep     github.com/mholt/certmagic      v0.9.0  h1:dYh9sZPDBTcIiPhYM/Qtv3V623/zFH34FmpbrQTpMAc=
        dep     github.com/miekg/dns    v1.1.25 h1:dFwPR6SfLtrSwgDcIq2bcU/gVutB4sNApq2HBdqcakg=
        dep     github.com/mitchellh/copystructure      v1.0.0  h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
        dep     github.com/mitchellh/reflectwalk        v1.0.0  h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
        dep     github.com/muhammadmuzzammil1998/jsonc  v0.0.0-20190906142622-1265e9b150c6      h1:EajWCEv0scxMWyMHWxJbFK70brsPIl4TLQJ0zaOeOiI=
        dep     github.com/naoina/go-stringutil v0.1.0  h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks=
        dep     github.com/naoina/toml  v0.1.1  h1:PT/lllxVVN0gzzSqSlHEmP8MJB4MY2U7STGxiouV4X8=
        dep     github.com/onsi/ginkgo  v1.8.0  h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w=
        dep     github.com/spf13/cast   v1.3.0  h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
        dep     github.com/starlight-go/starlight       v0.0.0-20181207205707-b06f321544f3      h1:/fBh1Ot84ILt/ociFHO98wJ9LxIMA3UG8B0unUJPFpY=
        dep     github.com/vulcand/oxy  v1.0.0  h1:7vL5/pjDFzHGbtBEhmlHITUi6KLH4xXTDF33/wrdRKw=
        dep     github.com/yuin/goldmark        v1.1.17 h1:t7bl7JAmainKs/Uhmr1XZVkRJsgL2UwdTCtTuYL7RAY=
        dep     github.com/yuin/goldmark-highlighting   v0.0.0-20191202084645-78f32c8dd6d5      h1:QbH7ca1qtgZHrzvcVAEoiJIwBqrXxMOfHYfwZIniIK0=
        dep     go.starlark.net v0.0.0-20190919145610-979af19b165c      h1:WR7X1xgXJlXhQBdorVc9Db3RhwG+J/kp6bLuMyJjfVw=
        dep     go.uber.org/atomic      v1.3.2  h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
        dep     go.uber.org/multierr    v1.2.0  h1:6I+W7f5VwC5SV9dNrZ3qXrDB9mD0dyGOi/ZJmYw03T4=
        dep     go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM=
        dep     golang.org/x/crypto     v0.0.0-20191206172530-e9b2fee46413      h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g=
        dep     golang.org/x/net        v0.0.0-20191209160850-c0dbc17a3553      h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8=
        dep     golang.org/x/sys        v0.0.0-20191210023423-ac6580df4449      h1:gSbV7h1NRL2G1xTg/owz62CST1oJBmxy4QpMMregXVQ=
        dep     golang.org/x/text       v0.3.2  h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
        dep     gopkg.in/fsnotify.v1    v1.4.7  h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
        dep     gopkg.in/natefinch/lumberjack.v2        v2.0.0  h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
        dep     gopkg.in/square/go-jose.v2      v2.4.1  h1:H0TmLt7/KmzlrDOpa1F+zr0Tk90PbJYBfsVUmRLrf9Y=
        dep     gopkg.in/tomb.v1        v1.0.0-20141024135613-dd632973f1e7      h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
        dep     gopkg.in/yaml.v2        v2.2.2  h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=

Sth like

cd /tmp/ && go get github.com/jpillora/chisel

chisel server --host 127.0.0.1 -p 18080 --reverse -v &
caddy2 reverse-proxy -from https://localhost:1443 -to http://127.0.0.1:18080 &
chisel client -v https://127.0.0.1:1443 R:2443:www.caddyserver.com:443 &

curl https://127.0.0.1:2443

should work - here the reverse-proxy configuration is simplified and does not have a proper domain name, so I get TLS version errors...

I can compile caddy, so if you point me where to put some extra printfs, I can give you more information.

mholt commented 4 years ago

Caddy 2.0.0-beta12 is really really old. Can you please try with the latest release (or even the latest on master) and see if it still happens?

tgulacsi commented 4 years ago

Sorry, that was another binary...

$ caddy2 version
v2.1.1 h1:X9k1+ehZPYYrSqBvf/ocUgdLSRIuiNiMo7CvyGUQKeA=
:gthomas@redpath: ~
$ go version -m $(which caddy2)
/home/gthomas/bin/caddy2: go1.14.5
        path    caddy
        mod     caddy   (devel)
        dep     cloud.google.com/go     v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0=
        dep     github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9      h1:HD8gA2tkByhMAwYaFAX9w2l7vxvBQ5NMoxDrkhqhtn4=
        dep     github.com/Masterminds/goutils  v1.1.0  h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg=
        dep     github.com/Masterminds/semver/v3        v3.1.0  h1:Y2lUDsFKVRSYGojLJ1yLxSXdMmMYTYls0rCvoqmMUQk=
        dep     github.com/Masterminds/sprig/v3 v3.1.0  h1:j7GpgZ7PdFqNsmncycTHsLmVPf5/3wJtlgW9TNDYD9Y=
        dep     github.com/alecthomas/chroma    v0.7.4-0.20200517063913-500529fd43c1    h1:9jsf8ot7rz1BywS9yYLkSiIeqU8LQw1D8gXVgdqsbvs=
        dep     github.com/antlr/antlr4 v0.0.0-20200503195918-621b933c7a7f      h1:0cEys61Sr2hUBEXfNV8eyQP01oZuBgoMeHunebPirK8=
        dep     github.com/beevik/etree v1.1.0  h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs=
        dep     github.com/caddy-dns/gandi      v1.0.0  h1:gnR5nvRrNGg9tCMM9Lja1IH+YqdFqnH3IQHe7HE+mgU=
        dep     github.com/caddyserver/caddy/v2 v2.1.1  h1:X9k1+ehZPYYrSqBvf/ocUgdLSRIuiNiMo7CvyGUQKeA=
        dep     github.com/caddyserver/certmagic        v0.11.2 h1:nPBqyuFNHJEf2FwC1ixJjArtTKWyPqpaH6k4jl7gxYI=
        dep     github.com/cenkalti/backoff/v4  v4.0.2  h1:JIufpQLbh4DkbQoii76ItQIUFzevQSqOLZca4eamEDs=
        dep     github.com/cespare/xxhash       v1.1.0  h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
        dep     github.com/cheekybits/genny     v1.0.0  h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE=
        dep     github.com/chzyer/readline      v0.0.0-20180603132655-2972be24d48e      h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=
        dep     github.com/cpuguy83/go-md2man/v2        v2.0.0  h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
        dep     github.com/crewjam/httperr      v0.0.0-20190612203328-a946449404da      h1:WXnT88cFG2davqSFqvaFfzkSMC0lqh/8/rKZ+z7tYvI=
        dep     github.com/crewjam/saml v0.4.0  h1:gvSlboe4BO1APaU2eDdsbql3itRat310Q5qs2Seim2k=
        dep     github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964      h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=
        dep     github.com/dgraph-io/badger     v1.5.3  h1:5oWIuRvwn93cie+OSt1zSnkaIQ1JFQM8bGlIv6O6Sts=
        dep     github.com/dgraph-io/badger/v2  v2.0.1-rc1.0.20200413122845-09dd2e1a4195        h1:n8KbImHW5qZCXv1y3tHjz5yz418/eTxeRJZ2ZuDm1ZU=
        dep     github.com/dgraph-io/ristretto  v0.0.2-0.20200115201040-8f368f2f2ab3    h1:MQLRM35Pp0yAyBYksjbj1nZI/w6eyRY/mWoM1sFf4kU=
        dep     github.com/dgrijalva/jwt-go     v3.2.0+incompatible     h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
        dep     github.com/dgryski/go-farm      v0.0.0-20190423205320-6a90982ecee2      h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA=
        dep     github.com/dlclark/regexp2      v1.2.0  h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk=
        dep     github.com/dustin/go-humanize   v1.0.1-0.20200219035652-afde56e7acac    h1:opbrjaN/L8gg6Xh5D04Tem+8xVcz6ajZlGCs49mQgyg=
        dep     github.com/francoispqt/gojay    v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk=
        dep     github.com/go-acme/lego/v3      v3.7.0  h1:qC5/8/CbltyAE8fGLE6bGlqucj7pXc/vBxiLwLOsmAQ=
        dep     github.com/go-chi/chi   v4.1.2+incompatible     h1:fGFk2Gmi/YKXk0OmGfBh0WgmN3XB8lVnEyNz34tQRec=
        dep     github.com/go-sql-driver/mysql  v1.5.0  h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
        dep     github.com/golang/groupcache    v0.0.0-20200121045136-8c9f03a8e57e      h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
        dep     github.com/golang/protobuf      v1.4.2  h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
        dep     github.com/golang/snappy        v0.0.1  h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
        dep     github.com/google/cel-go        v0.5.1  h1:oDsbtAwlwFPEcC8dMoRWNuVzWJUDeDZeHjoet9rXjTs=
        dep     github.com/google/go-cmp        v0.5.0  h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
        dep     github.com/google/uuid  v1.1.1  h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
        dep     github.com/googleapis/gax-go/v2 v2.0.5  h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM=
        dep     github.com/greenpau/caddy-auth-jwt      v1.0.6  h1:i4BBap3ntV5i3RXAeDSPu+TwiudaxBNZmLcxeEYNHFc=
        dep     github.com/greenpau/caddy-auth-saml     v1.2.1  h1:PLq6/7xVK1R4F8tJJwAFyqaFh99pjcjGebHO4qfVHeI=
        dep     github.com/greenpau/caddy-auth-ui       v1.0.2  h1:9uKkTJQCws78V94CIGY/JajGxavI3b34EmClwBiXFd8=
        dep     github.com/huandu/xstrings      v1.3.1  h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs=
        dep     github.com/imdario/mergo        v0.3.9  h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg=
        dep     github.com/jonboulle/clockwork  v0.1.0  h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
        dep     github.com/jsternberg/zap-logfmt        v1.2.0  h1:1v+PK4/B48cy8cfQbxL4FmmNZrjnIMr2BsnyEmXqv2o=
        dep     github.com/juju/ansiterm        v0.0.0-20180109212912-720a0952cc2a      h1:FaWFmfWdAUKbSCtOU2QjDaorUexogfaMgbipgYATUMU=
        dep     github.com/klauspost/compress   v1.10.10        h1:a/y8CglcM7gLGYmlbP/stPE5sR3hbhFRUjCBfd/0B3I=
        dep     github.com/klauspost/cpuid      v1.3.0  h1:2JqaNE1hGdABW2YbA3TenkO7RiPFRvSWnEnGqWh9sHE=
        dep     github.com/libdns/gandi v1.0.1  h1:BKNx7hlFuc8s/fn5/6zcZRHlJgHTc6/bhmcK2wTFyI8=
        dep     github.com/libdns/libdns        v0.0.0-20200501023120-186724ffc821      h1:663opx/RKxiISi1ozf0WbvweQpYBgf34dx8hKSIau3w=
        dep     github.com/lolPants/caddy-requestid     v1.0.0  h1:kH42zeTHIbMZ1rH3MtePmCK3Rag//MEVwCYjeLkI8gI=
        dep     github.com/lucas-clemente/quic-go       v0.17.1 h1:ezsH76xpn6hKugfsXUy6voIJBFmAOwnM/Oy9F4b/n+M=
        dep     github.com/lunixbochs/vtclean   v1.0.0  h1:xu2sLAri4lGiovBDQKxl5mrXyESr3gUr5m5SM5+LVb8=
        dep     github.com/manifoldco/promptui  v0.7.0  h1:3l11YT8tm9MnwGFQ4kETwkzpAwY2Jt9lCrumCUW4+z4=
        dep     github.com/marten-seemann/qpack v0.1.0  h1:/0M7lkda/6mus9B8u34Asqm8ZhHAAt9Ho0vniNuVSVg=
        dep     github.com/marten-seemann/qtls  v0.9.1  h1:O0YKQxNVPaiFgMng0suWEOY2Sb4LT2sRn9Qimq3Z1IQ=
        dep     github.com/mattn/go-colorable   v0.1.6  h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE=
        dep     github.com/mattn/go-isatty      v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
        dep     github.com/mholt/caddy-webdav   v0.0.0-20200713215817-5b6995d5a576      h1:cqtKSrA8o0BVuFOmWyZ+HFD+Pt/V/BD08JSeGUP6aGs=
        dep     github.com/miekg/dns    v1.1.29 h1:xHBEhR+t5RzcFJjBLJlax2daXOrTYtr9z4WdKEfWFzg=
        dep     github.com/mitchellh/copystructure      v1.0.0  h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
        dep     github.com/mitchellh/reflectwalk        v1.0.0  h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
        dep     github.com/naoina/go-stringutil v0.1.0  h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks=
        dep     github.com/naoina/toml  v0.1.1  h1:PT/lllxVVN0gzzSqSlHEmP8MJB4MY2U7STGxiouV4X8=
        dep     github.com/pkg/errors   v0.9.1  h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
        dep     github.com/rs/xid       v1.2.1  h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc=
        dep     github.com/russellhaering/goxmldsig     v0.0.0-20180430223755-7acd5e4a6ef7      h1:J4AOUcOh/t1XbQcJfkEqhzgvMJ2tDxdCVvmHxW5QXao=
        dep     github.com/russross/blackfriday/v2      v2.0.1  h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
        dep     github.com/samfoo/ansi  v0.0.0-20160124022901-b6bd2ded7189      h1:CmSpbxmewNQbzqztaY0bke1qzHhyNyC29wYgh17Gxfo=
        dep     github.com/satori/go.uuid       v1.2.0  h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
        dep     github.com/shurcooL/sanitized_anchor_name       v1.0.0  h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
        dep     github.com/sirupsen/logrus      v1.4.2  h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
        dep     github.com/smallstep/certificates       v0.15.0-rc.1.0.20200506212953-e855707dc274      h1:3rzfukPUfHp5K4gscalOzpCDAfnZJKETfZpmGLprFt4=
        dep     github.com/smallstep/cli        v0.14.4 h1:oaaGwY1iNSHmIC6baiJhdZoLGmXJ0rXyRcxl3Q73SDE=
        dep     github.com/smallstep/nosql      v0.3.0  h1:V1X5vfDsDt89499h3jZFUlR4VnnsYYs5tXaQZ0w8z5U=
        dep     github.com/smallstep/truststore v0.9.5  h1:KQ6bFXUadu3PG57sFSIBsu2pb/35NqO+MyS2Pvi62bA=
        dep     github.com/spf13/cast   v1.3.1  h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
        dep     github.com/urfave/cli   v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=
        dep     github.com/yuin/goldmark        v1.1.32 h1:5tjfNdR2ki3yYQ842+eX2sQHeiwpKJ0RnHO4IYOc4V8=
        dep     github.com/yuin/goldmark-highlighting   v0.0.0-20200307114337-60d527fdb691      h1:VWSxtAiQNh3zgHJpdpkpVYjTPqRE3P6UZCOPa1nRDio=
        dep     go.etcd.io/bbolt        v1.3.2  h1:Z/90sZLPOeCy2PwprqkFa25PdkusRzaj9P8zm/KNyvk=
        dep     go.opencensus.io        v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8=
        dep     go.uber.org/atomic      v1.6.0  h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
        dep     go.uber.org/multierr    v1.5.0  h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A=
        dep     go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM=
        dep     golang.org/x/crypto     v0.0.0-20200622213623-75b288015ac9      h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
        dep     golang.org/x/net        v0.0.0-20200625001655-4c5254603344      h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
        dep     golang.org/x/oauth2     v0.0.0-20200107190931-bf48bf16ab8d      h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw=
        dep     golang.org/x/sys        v0.0.0-20200413165638-669c56c373c4      h1:opSr2sbRXk5X5/givKrrKj9HXxFpW2sdCiP8MJSKLQY=
        dep     golang.org/x/text       v0.3.2  h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
        dep     google.golang.org/api   v0.20.0 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40=
        dep     google.golang.org/genproto      v0.0.0-20200526211855-cb27e3aa2013      h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY=
        dep     google.golang.org/grpc  v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk=
        dep     google.golang.org/protobuf      v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
        dep     gopkg.in/natefinch/lumberjack.v2        v2.0.0  h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
        dep     gopkg.in/square/go-jose.v2      v2.5.0  h1:OZ4sdq+Y+SHfYB7vfthi1Ei8b0vkP8ZPQgUfUwdUSqo=
        dep     gopkg.in/yaml.v2        v2.3.0  h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=

And with this, it Just Works! (must name the https server: chisel client -v https://localhost:1443 R:2443:www.caddyserver.com:443)

So, this is a configuration error, somewhere...

tgulacsi commented 4 years ago

Maybe its the corporate firewall - when allowing TLSv1.3, the connection is reset with

 TLS handshake error from 188.143.56.163:54976: read tcp 192.168.1.1:443->188.143.56.163:54976: read: connection reset by peer

with TLSv1.2 as max "tls protocols", it's now "websocket: bad handshake" - still not working, but a tad better.

tgulacsi commented 4 years ago

Ok, and the config error: the "classic" path matcher typo: here I need "/mantis/xxx/chisel", not "/mantis/xxx/chisel/*" - not what I plain replaced during the v1 -> v2 migration.

Sorry for the noise.

mholt commented 4 years ago

Excellent, thanks for doubling down and verifying!

(Part of the reason we use the bug report template is as a sanity check, more often than not going through the steps solves the problem!)