add path option for bypass

This commit is contained in:
ginuerzh 2023-10-20 19:12:49 +08:00
parent d354cf2539
commit 6431cd8bb9

View File

@ -4,6 +4,7 @@ import "context"
type Options struct {
Host string
Path string
}
type Option func(opts *Options)
@ -14,6 +15,12 @@ func WithHostOpton(host string) Option {
}
}
func WithPathOption(path string) Option {
return func(opts *Options) {
opts.Path = path
}
}
// Bypass is a filter of address (IP or domain).
type Bypass interface {
// Contains reports whether the bypass includes addr.