http_factory.go 368 B

1234567891011121314
  1. package http
  2. import (
  3. "github.com/v2ray/v2ray-core/app"
  4. "github.com/v2ray/v2ray-core/proxy"
  5. "github.com/v2ray/v2ray-core/proxy/internal"
  6. )
  7. func init() {
  8. internal.MustRegisterInboundConnectionHandlerCreator("http",
  9. func(space app.Space, rawConfig interface{}) (proxy.InboundHandler, error) {
  10. return NewHttpProxyServer(space, rawConfig.(*Config)), nil
  11. })
  12. }