update selector

This commit is contained in:
ginuerzh
2022-09-04 13:24:32 +08:00
parent 05bfeb8a0f
commit a04c8b45f3
19 changed files with 97 additions and 81 deletions

View File

@ -81,7 +81,7 @@ func (h *http2Handler) Handle(ctx context.Context, conn net.Conn, opts ...handle
log.Error(err)
return err
}
md := v.GetMetadata()
md := v.Metadata()
return h.roundTrip(ctx,
md.Get("w").(http.ResponseWriter),
md.Get("r").(*http.Request),

View File

@ -118,7 +118,7 @@ func (h *tapHandler) Handle(ctx context.Context, conn net.Conn, opts ...handler.
log.Debugf("%s >> %s", conn.RemoteAddr(), target.Addr)
}
config := v.GetMetadata().Get("config").(*tap_util.Config)
config := v.Metadata().Get("config").(*tap_util.Config)
h.handleLoop(ctx, conn, raddr, config, log)
return nil
}

View File

@ -68,7 +68,7 @@ func (h *tunHandler) Handle(ctx context.Context, conn net.Conn, opts ...handler.
log.Error(err)
return err
}
config := v.GetMetadata().Get("config").(*tun_util.Config)
config := v.Metadata().Get("config").(*tun_util.Config)
start := time.Now()
log = log.WithFields(map[string]any{