From 6431cd8bb957ae41834bd0f9037f34491f8f1bdd Mon Sep 17 00:00:00 2001 From: ginuerzh Date: Fri, 20 Oct 2023 19:12:49 +0800 Subject: [PATCH] add path option for bypass --- bypass/bypass.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bypass/bypass.go b/bypass/bypass.go index e7b99e2..5f9612d 100644 --- a/bypass/bypass.go +++ b/bypass/bypass.go @@ -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.