2020-11-25 11:01:53 +00:00
package features
2024-06-29 18:32:57 +00:00
import (
"context"
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/common/errors"
)
2020-11-25 11:01:53 +00:00
2020-12-04 01:36:16 +00:00
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
2020-11-25 11:01:53 +00:00
// Feature is the interface for Xray features. All features must implement this interface.
// All existing features have an implementation in app directory. These features can be replaced by third-party ones.
type Feature interface {
common . HasType
common . Runnable
}
// PrintDeprecatedFeatureWarning prints a warning for deprecated feature.
func PrintDeprecatedFeatureWarning ( feature string ) {
2024-06-29 18:32:57 +00:00
errors . LogInfo ( context . Background ( ) , "You are using a deprecated feature: " + feature + ". Please update your config file with latest configuration format, or update your client software." )
2020-11-25 11:01:53 +00:00
}