From 85071d7aa1555026658aeb456d0544f889b4a0e4 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 9 Mar 2026 17:48:57 +0100 Subject: [PATCH] allow service names with - in them in proxy --- src/proxy.rs | 5 +++-- src/service.rs | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/proxy.rs b/src/proxy.rs index c99c216..d5a3b0e 100644 --- a/src/proxy.rs +++ b/src/proxy.rs @@ -69,8 +69,9 @@ impl ActiveInstances { 80, ), // service with instance - 2 => { - let (name, service_name) = name.rsplit_once('-').unwrap(); + 2.. => { + let service_name = name.splitn(3, '-').last()?; + let name = &name[0..(name.len() - service_name.len() - 1)]; let cloud = Cloud::get_by_filter(&self.docker, Some(name.into()), &self.config) .await .ok()?; diff --git a/src/service.rs b/src/service.rs index 8874352..77ea246 100644 --- a/src/service.rs +++ b/src/service.rs @@ -208,6 +208,8 @@ pub enum ServiceType { Azure, /// Ldap user backend Ldap, + /// Ldap admin interface + LdapAdmin, /// OnlyOffice OnlyOffice, /// Libre office online @@ -304,6 +306,9 @@ impl Service { ServiceType::S3mb => Some(vec![Service::ObjectStore(ObjectStore::S3mb)]), ServiceType::Azure => Some(vec![Service::ObjectStore(ObjectStore::Azure)]), ServiceType::Ldap => Some(vec![Service::Ldap(Ldap), Service::LdapAdmin(LdapAdmin)]), + ServiceType::LdapAdmin => { + Some(vec![Service::Ldap(Ldap), Service::LdapAdmin(LdapAdmin)]) + } ServiceType::OnlyOffice => Some(vec![Service::OnlyOffice(OnlyOffice)]), ServiceType::Office => Some(vec![Service::Office(Office)]), ServiceType::Push => Some(vec![Service::Push(NotifyPush)]),