mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-08 14:13:22 +00:00
API: Add ListRule() for routing (#5569)
https://github.com/XTLS/Xray-core/pull/5569#issuecomment-3766310407
This commit is contained in:
@@ -16,6 +16,7 @@ type Router interface {
|
||||
PickRoute(ctx Context) (Route, error)
|
||||
AddRule(config *serial.TypedMessage, shouldAppend bool) error
|
||||
RemoveRule(tag string) error
|
||||
ListRule() []Route
|
||||
}
|
||||
|
||||
// Route is the routing result of Router feature.
|
||||
@@ -65,6 +66,11 @@ func (DefaultRouter) RemoveRule(tag string) error {
|
||||
return common.ErrNoClue
|
||||
}
|
||||
|
||||
// ListRule implements Router.
|
||||
func (DefaultRouter) ListRule() []Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Start implements common.Runnable.
|
||||
func (DefaultRouter) Start() error {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user