add config

This commit is contained in:
ginuerzh
2021-10-29 13:35:44 +08:00
parent 3351aa5974
commit 16ddfba1d1
36 changed files with 1024 additions and 207 deletions

View File

@ -9,11 +9,12 @@ import (
"github.com/go-gost/gost/pkg/chain"
"github.com/go-gost/gost/pkg/components/handler"
"github.com/go-gost/gost/pkg/logger"
"github.com/go-gost/gost/pkg/registry"
)
var (
_ handler.Handler = (*Handler)(nil)
)
func init() {
registry.RegisterHandler("http", NewHandler)
}
type Handler struct {
chain *chain.Chain
@ -21,7 +22,7 @@ type Handler struct {
md metadata
}
func NewHandler(opts ...handler.Option) *Handler {
func NewHandler(opts ...handler.Option) handler.Handler {
options := &handler.Options{}
for _, opt := range opts {
opt(options)

View File

@ -0,0 +1 @@
package http