update tunnel handler

This commit is contained in:
ginuerzh
2023-10-27 08:48:16 +08:00
parent e5fa371586
commit bcc75c5ba4
5 changed files with 228 additions and 385 deletions

View File

@ -16,19 +16,16 @@ import (
type metadata struct {
readTimeout time.Duration
noDelay bool
hash string
directTunnel bool
entryPoint string
entryPointProxyProtocol int
entryPointID relay.TunnelID
entryPointProxyProtocol int
directTunnel bool
ingress ingress.Ingress
muxCfg *mux.Config
}
func (h *tunnelHandler) parseMetadata(md mdata.Metadata) (err error) {
h.md.readTimeout = mdutil.GetDuration(md, "readTimeout")
h.md.noDelay = mdutil.GetBool(md, "nodelay")
h.md.directTunnel = mdutil.GetBool(md, "tunnel.direct")
h.md.entryPoint = mdutil.GetString(md, "entrypoint")
@ -71,7 +68,5 @@ func (h *tunnelHandler) parseMetadata(md mdata.Metadata) (err error) {
h.md.muxCfg.Version = 2
}
h.md.hash = mdutil.GetString(md, "hash")
return
}