0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-15 21:07:15 +03:00

Core: Export the running bool (#4775)

This commit is contained in:
Tamim Hossain
2025-06-06 07:48:19 +06:00
committed by GitHub
parent 1f49bfc6a5
commit d0c80fc80d

View File

@ -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)