feature.go 707 B

1234567891011121314151617
  1. package features
  2. import "github.com/xtls/xray-core/common"
  3. //go:generate go run github.com/xtls/xray-core/common/errors/errorgen
  4. // Feature is the interface for Xray features. All features must implement this interface.
  5. // All existing features have an implementation in app directory. These features can be replaced by third-party ones.
  6. type Feature interface {
  7. common.HasType
  8. common.Runnable
  9. }
  10. // PrintDeprecatedFeatureWarning prints a warning for deprecated feature.
  11. func PrintDeprecatedFeatureWarning(feature string) {
  12. newError("You are using a deprecated feature: " + feature + ". Please update your config file with latest configuration format, or update your client software.").WriteToLog()
  13. }