Go version
go version go1.21.1 darwin/amd64
Output of go env in your module/workspace:
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/nmaharja/Library/Caches/go-build'
GOENV='/Users/nmaharja/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS='-buildvcs=false'
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/nmaharja/go/pkg/mod'
GONOPROXY='github.office.opendns.com'
GONOSUMDB='github.office.opendns.com'
GOOS='darwin'
GOPATH='/Users/nmaharja/go'
GOPRIVATE='github.office.opendns.com'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.21.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/nmaharja/projects/clean/ProxyConnectTools/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/fv/c8jghnc95_vgn57t5w9hvvlh0000gn/T/go-build1530722529=/tmp/go-build -gno-record-gcc-switches -fno-common'
What did you do?
I tried to create a UDP connection through HTTP2 protocol. For HTTP2 connection, the RFC suggests to use CONNECT method with following headers
HEADERS
:method = CONNECT
:protocol = connect-udp
:scheme = https
:path = /.well-known/masque/udp/192.0.2.6/443/
:authority = example.org
I do not see see protocol, scheme and path header being set. The encodeHeaders method only sets scheme and path, when non CONNECT method is being used.
RFC doc link: https://datatracker.ietf.org/doc/rfc9298/
What did you see happen?
The server decided to use TCP protocol instead of UDP.
What did you expect to see?
I expected to see UDP connection.
Go version
go version go1.21.1 darwin/amd64
Output of
go envin your module/workspace:What did you do?
I tried to create a UDP connection through HTTP2 protocol. For HTTP2 connection, the RFC suggests to use
CONNECTmethod with following headersI do not see see
protocol,schemeandpathheader being set. TheencodeHeadersmethod only setsschemeandpath, when nonCONNECTmethod is being used.RFC doc link: https://datatracker.ietf.org/doc/rfc9298/
What did you see happen?
The server decided to use TCP protocol instead of UDP.
What did you expect to see?
I expected to see UDP connection.