From d0c80fc80d77ed0f7a5b83e495736060979dfb91 Mon Sep 17 00:00:00 2001 From: Tamim Hossain <132823494+CodeWithTamim@users.noreply.github.com> Date: Fri, 6 Jun 2025 07:48:19 +0600 Subject: [PATCH] Core: Export the running bool (#4775) --- core/xray.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/xray.go b/core/xray.go index 0cc56daa..58135c96 100644 --- a/core/xray.go +++ b/core/xray.go @@ -90,6 +90,11 @@ type Instance struct { ctx context.Context } +// Instance state +func (server *Instance) IsRunning() bool { + return server.running +} + func AddInboundHandler(server *Instance, config *InboundHandlerConfig) error { inboundManager := server.GetFeature(inbound.ManagerType()).(inbound.Manager) rawHandler, err := CreateObject(server, config)