add network for bypass

This commit is contained in:
ginuerzh
2023-09-30 17:48:40 +08:00
parent b0bd45c1b8
commit bf3b76a273
4 changed files with 41 additions and 9 deletions

View File

@ -4,6 +4,18 @@ import (
"context"
)
type Chainer interface {
Route(ctx context.Context, network, address string) Route
type RouteOptions struct {
Host string
}
type RouteOption func(opts *RouteOptions)
func WithHostRouteOption(host string) RouteOption {
return func(opts *RouteOptions) {
opts.Host = host
}
}
type Chainer interface {
Route(ctx context.Context, network, address string, opts ...RouteOption) Route
}