sing/transport/udp/options.go
2022-04-11 12:46:23 +08:00

11 lines
235 B
Go

package udp
import "github.com/sagernet/sing/common/redir"
type Option func(*Listener)
func WithTransproxyMode(mode redir.TransproxyMode) Option {
return func(listener *Listener) {
listener.tproxy = mode == redir.ModeTProxy
}
}