add tls and ws listener

This commit is contained in:
ginuerzh
2021-03-31 23:24:51 +08:00
parent b74e4cc8a4
commit 4e04e7ed86
18 changed files with 518 additions and 42 deletions

17
server/listener/option.go Normal file
View File

@ -0,0 +1,17 @@
package listener
import (
"github.com/go-gost/gost/logger"
)
type Options struct {
Logger logger.Logger
}
type Option func(opts *Options)
func LoggerOption(logger logger.Logger) Option {
return func(opts *Options) {
opts.Logger = logger
}
}