add vhost for port forwarding

This commit is contained in:
ginuerzh
2022-11-11 22:23:36 +08:00
parent 81b6efc9b8
commit 1ff2bab1f0
12 changed files with 195 additions and 23 deletions

View File

@ -9,13 +9,16 @@ import (
type metadata struct {
readTimeout time.Duration
sniffing bool
}
func (h *forwardHandler) parseMetadata(md mdata.Metadata) (err error) {
const (
readTimeout = "readTimeout"
sniffing = "sniffing"
)
h.md.readTimeout = mdutil.GetDuration(md, readTimeout)
h.md.sniffing = mdutil.GetBool(md, sniffing)
return
}