init.go 260 B

123456789101112131415
  1. // +build !confonly
  2. package dns
  3. import (
  4. "context"
  5. "v2ray.com/core/common"
  6. )
  7. func init() {
  8. common.Must(common.RegisterConfig((*Config)(nil), func(ctx context.Context, config interface{}) (interface{}, error) {
  9. return New(ctx, config.(*Config))
  10. }))
  11. }