Hide Inbound Groups/Hosts: A PasarGuard Feature Request

by Dimemap Team 56 views

Hey guys! Today, we're diving into a feature request that could seriously level up PasarGuard's functionality. This is all about giving admins more control over what other users see, specifically concerning inbound groups and hosts. So, let's break down the issue, explore the proposed solution, and see why this could be a game-changer.

The Problem: Inbound Group and Host Visibility

Currently, PasarGuard has a bit of a visibility issue. Unlike Marzban, PasarGuard displays all inbound groups to every admin. Now, while transparency is usually a good thing, in this case, it can lead to some serious clutter and confusion. Imagine a scenario with multiple admins, each responsible for specific services or groups. Having everyone see everything can quickly become overwhelming.

This is where Marzban shines. It allows you to define which admin has access to which group (or service). This level of granularity is super helpful for maintaining order and security. It ensures that admins only see what they need to see, reducing the risk of accidental misconfigurations or unauthorized access.

Furthermore, when it comes to hosts, PasarGuard offers some decent control over how their status is displayed. You can configure under what conditions a host's status is shown, but there's no way to completely hide a host, similar to Marzban. While the status settings are useful, sometimes you just need a host to disappear from view altogether. Ideally, like Marzban, there would be a way to display a static message when a host is inactive, expired, or on hold, rather than having to configure this in the status settings. Honestly, the "On Hold" option in the host status section feels a bit redundant and the entire status section could even be streamlined.

Image Image

These images highlight the current visibility issue. Everyone sees everything, which isn't always ideal.

The Solution: Granular Visibility Control

So, what's the fix? The solution is to implement granular visibility control for both inbound groups and hosts. This means giving admins the ability to specify which users can see which groups and hosts. Think of it as a permissions system, but for visibility.

Here's what this could look like:

  • Inbound Groups: In the admin management section, there should be an option to assign specific inbound groups to specific admins. This would mimic the functionality found in Marzban, allowing for a more streamlined and secure management experience. This is crucial for larger setups where different admins handle different parts of the infrastructure.
  • Hosts: Similar to inbound groups, there should be an option to completely hide hosts from certain users. This could be a simple toggle or a more complex permission system. The key is to provide the flexibility to control who sees what. Furthermore, implementing a static message display for inactive hosts, like in Marzban, would be a significant improvement. This would provide a consistent and clear indication of a host's status without requiring convoluted status configurations.
Image Image

These images visually represent the desired solution: more control over what each admin can see.

Why This Matters

Implementing this feature would bring several key benefits:

  1. Improved Organization: By limiting the visibility of inbound groups and hosts, admins can focus on what's relevant to them, reducing clutter and making the interface more manageable. This is a big win for usability.
  2. Enhanced Security: Granular visibility control adds an extra layer of security. By restricting access to sensitive information, you reduce the risk of unauthorized modifications or accidental errors. Security is paramount, and this feature helps reinforce it.
  3. Simplified Management: With a clearer view of their responsibilities, admins can work more efficiently. They won't have to sift through irrelevant information, allowing them to address issues faster and more effectively. Time is money, guys! So, anything that simplifies management is a major plus.
  4. Feature Parity with Marzban: Bringing PasarGuard in line with Marzban in this area will make it a more compelling alternative for users who value fine-grained control over user permissions and visibility. Competition is good for everyone, and offering similar features makes PasarGuard a stronger contender.

Alternatives Considered

Okay, so what other options were on the table? Honestly, there aren't many great alternatives to granular visibility control. One could potentially try to manage visibility through naming conventions or tagging systems, but that's just a workaround. It's not a real solution. These approaches are clunky, prone to error, and don't provide the same level of security and control.

The best approach is to address the root cause of the problem, which is the lack of proper access control. Implementing granular visibility control is the most direct and effective way to achieve this.

Additional Context: Host Weighting (Bonus!)

While we're on the topic of host management, there's another feature in the screenshots worth mentioning: host weighting. This allows you to prioritize the order in which hosts are displayed in user configurations. This is pretty slick! It provides a way to influence the order of configurations from top to bottom, ensuring that the most important hosts are listed first.

Image

Although this feature isn't directly related to the visibility issue, it's a valuable tool for managing user configurations. It's worth highlighting, even though it might be a bit out of place in this particular feature request.

Conclusion: Let's Make PasarGuard Even Better!

In conclusion, the ability to hide inbound groups and hosts from specific users is a crucial feature for PasarGuard. It would improve organization, enhance security, simplify management, and bring PasarGuard closer to feature parity with Marzban. It's a win-win for everyone!

By implementing granular visibility control, PasarGuard can become an even more powerful and user-friendly platform. Let's hope the developers take this feature request seriously and bring it to life! What do you guys think? Let's discuss in the comments!