Replies: 1 comment
-
Also, don't forget to take a backup before making any changes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the Marzban panel, it's typically not possible to restrict an admin to a specific protocol or block a specific protocol for a particular admin. However, I’ll provide you with a method to block a specific protocol for a specific admin, so they cannot use it. You can also use different queries to limit a specific inbound (I encountered issues when I tried this).
To do this, you need to migrate your Marzban database from SQLite to MySQL and enable phpMyAdmin. Refer to the Marzban documentation for this migration process.
After migrating to MySQL:
http://192.168.0.1:8010
Enter the following command in the MySQL console:
NAME
with the event name.VMess
with your desired protocol (ensure the first letter is capitalized, e.g., "Vless").ADMIN
with the admin's username.This command creates an event that runs a query every second, effectively blocking a protocol for a specific admin, preventing them from using it. You can create multiple events to restrict multiple admins. To change the interval from seconds to minutes, replace
SECOND
withMINUTE
.If you don’t have access to the SQL console, you can manually create this through MySQL.
marzban
database and open theEvents
tab.Create new Event
.enable
.RECURRING
.Second
(orMinute
if you prefer).Now the query will run every second:
VMess
with your desired protocol.ADMIN
with the admin's username.Definer
field toroot@%
.Finally, click
Go
.And that’s it!
Beta Was this translation helpful? Give feedback.
All reactions