1
0
Fork 0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-12 22:38:41 +00:00

Write server functionality for listing inbound and outbound tags.

This commit is contained in:
Sergey Gorbunov 2025-05-13 16:21:36 +03:00
parent 72170d8b6b
commit 7cb8cfb9eb
No known key found for this signature in database
GPG key ID: A8C3D74066B8E768
8 changed files with 661 additions and 278 deletions
app/proxyman/inbound

View file

@ -89,6 +89,21 @@ func (m *Manager) RemoveHandler(ctx context.Context, tag string) error {
return common.ErrNoClue
}
// ListHandlers implements inbound.Manager.
func (m *Manager) ListHandlers(ctx context.Context) []inbound.Handler {
m.access.RLock()
defer m.access.RUnlock()
var response []inbound.Handler
copy(m.untaggedHandler, response)
for _, v := range m.taggedHandlers {
response = append(response, v)
}
return response
}
// Start implements common.Runnable.
func (m *Manager) Start() error {
m.access.Lock()