add proxy protocol
This commit is contained in:
parent
5c46613716
commit
c546a6b711
@ -12,6 +12,7 @@ type Options struct {
|
||||
Auth *url.Userinfo
|
||||
TLSConfig *tls.Config
|
||||
Logger logger.Logger
|
||||
ProxyProtocol int
|
||||
}
|
||||
|
||||
type Option func(opts *Options)
|
||||
@ -34,6 +35,12 @@ func LoggerOption(logger logger.Logger) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func ProxyProtocolOption(ppv int) Option {
|
||||
return func(opts *Options) {
|
||||
opts.ProxyProtocol = ppv
|
||||
}
|
||||
}
|
||||
|
||||
type DialOptions struct {
|
||||
Host string
|
||||
NetDialer *dialer.NetDialer
|
||||
|
@ -21,6 +21,7 @@ type Options struct {
|
||||
Chain chain.Chainer
|
||||
Logger logger.Logger
|
||||
Service string
|
||||
ProxyProtocol int
|
||||
}
|
||||
|
||||
type Option func(opts *Options)
|
||||
@ -78,3 +79,9 @@ func ServiceOption(service string) Option {
|
||||
opts.Service = service
|
||||
}
|
||||
}
|
||||
|
||||
func ProxyProtocolOption(ppv int) Option {
|
||||
return func(opts *Options) {
|
||||
opts.ProxyProtocol = ppv
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user