add port range support for service
This commit is contained in:
@ -35,7 +35,7 @@ func (h *tunHandler) handleClient(ctx context.Context, conn net.Conn, raddr stri
|
||||
|
||||
for {
|
||||
err := func() error {
|
||||
cc, err := h.router.Dial(ctx, "udp", raddr)
|
||||
cc, err := h.options.Router.Dial(ctx, "udp", raddr)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ func init() {
|
||||
type tunHandler struct {
|
||||
hop hop.Hop
|
||||
routes sync.Map
|
||||
router *chain.Router
|
||||
md metadata
|
||||
options handler.Options
|
||||
}
|
||||
@ -50,11 +49,6 @@ func (h *tunHandler) Init(md md.Metadata) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
h.router = h.options.Router
|
||||
if h.router == nil {
|
||||
h.router = chain.NewRouter(chain.LoggerRouterOption(h.options.Logger))
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user