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

@ -7,6 +7,7 @@ import (
)
type SelectOptions struct {
Network string
Addr string
Host string
Protocol string
@ -14,6 +15,12 @@ type SelectOptions struct {
type SelectOption func(*SelectOptions)
func NetworkSelectOption(network string) SelectOption {
return func(so *SelectOptions) {
so.Network = network
}
}
func AddrSelectOption(addr string) SelectOption {
return func(o *SelectOptions) {
o.Addr = addr