add webtransport tunnel
This commit is contained in:
@ -29,32 +29,27 @@ type metadata struct {
|
||||
|
||||
func (d *http3Dialer) parseMetadata(md mdata.Metadata) (err error) {
|
||||
const (
|
||||
authorizePath = "authorizePath"
|
||||
pushPath = "pushPath"
|
||||
pullPath = "pullPath"
|
||||
host = "host"
|
||||
|
||||
keepAlive = "keepAlive"
|
||||
keepAlive = "keepalive"
|
||||
keepAlivePeriod = "ttl"
|
||||
handshakeTimeout = "handshakeTimeout"
|
||||
maxIdleTimeout = "maxIdleTimeout"
|
||||
maxStreams = "maxStreams"
|
||||
)
|
||||
|
||||
d.md.authorizePath = mdutil.GetString(md, authorizePath)
|
||||
d.md.authorizePath = mdutil.GetString(md, "pht.authorizePath", "authorizePath")
|
||||
if !strings.HasPrefix(d.md.authorizePath, "/") {
|
||||
d.md.authorizePath = defaultAuthorizePath
|
||||
}
|
||||
d.md.pushPath = mdutil.GetString(md, pushPath)
|
||||
d.md.pushPath = mdutil.GetString(md, "pht.pushPath", "pushPath")
|
||||
if !strings.HasPrefix(d.md.pushPath, "/") {
|
||||
d.md.pushPath = defaultPushPath
|
||||
}
|
||||
d.md.pullPath = mdutil.GetString(md, pullPath)
|
||||
d.md.pullPath = mdutil.GetString(md, "pht.pullPath", "pullPath")
|
||||
if !strings.HasPrefix(d.md.pullPath, "/") {
|
||||
d.md.pullPath = defaultPullPath
|
||||
}
|
||||
|
||||
d.md.host = mdutil.GetString(md, host)
|
||||
d.md.host = mdutil.GetString(md, "host")
|
||||
if !md.IsExists(keepAlive) || mdutil.GetBool(md, keepAlive) {
|
||||
d.md.keepAlivePeriod = mdutil.GetDuration(md, keepAlivePeriod)
|
||||
if d.md.keepAlivePeriod <= 0 {
|
||||
|
Reference in New Issue
Block a user