You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
355 B

package gost
import (
"net"
)
type Handler interface {
Handle(net.Conn)
}
type DefaultHandler struct {
server Server
}
func (h *DefaultHandler) Handle(conn net.Conn) {
var handler Handler
switch h.server.Options().BaseOptions().Protocol {
case "http":
case "ss": // shadowsocks
handler = ShadowHandler(h.server)
}
handler.Handle(conn)
}