add path option for bypass
This commit is contained in:
parent
d354cf2539
commit
6431cd8bb9
@ -4,6 +4,7 @@ import "context"
|
|||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Host string
|
Host string
|
||||||
|
Path string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Option func(opts *Options)
|
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).
|
// Bypass is a filter of address (IP or domain).
|
||||||
type Bypass interface {
|
type Bypass interface {
|
||||||
// Contains reports whether the bypass includes addr.
|
// Contains reports whether the bypass includes addr.
|
||||||
|
Loading…
Reference in New Issue
Block a user