2018-10-11 14:43:37 -04:00
package features
2022-01-02 10:16:23 -05:00
import "github.com/v2fly/v2ray-core/v5/common"
2018-10-11 14:43:37 -04:00
2022-01-02 10:16:23 -05:00
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
2018-10-13 09:15:49 -04:00
2018-10-11 14:43:37 -04:00
// Feature is the interface for V2Ray 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 {
2018-10-12 17:57:56 -04:00
common . HasType
2018-10-11 14:43:37 -04:00
common . Runnable
}
2018-10-13 09:15:49 -04:00
// PrintDeprecatedFeatureWarning prints a warning for deprecated feature.
func PrintDeprecatedFeatureWarning ( feature string ) {
newError ( "You are using a deprecated feature: " + feature + ". Please update your config file with latest configuration format, or update your client software." ) . WriteToLog ( )
}
2021-06-19 04:27:46 -04:00
2021-06-19 05:50:30 -04:00
// TaggedFeatures unstable
2021-06-19 04:27:46 -04:00
type TaggedFeatures interface {
GetFeaturesByTag ( tag string ) ( Feature , error )
2021-06-19 05:50:30 -04:00
common . Runnable
2021-06-19 04:27:46 -04:00
}