Gozargah / Marzban

Unified GUI Censorship Resistant Solution Powered by Xray
https://t.me/gozargah_marzban
GNU Affero General Public License v3.0
3.22k stars 456 forks source link

Update user api request BUG #1249

Open voono opened 3 weeks ago

voono commented 3 weeks ago

I have multiple Marzban panels and i manage them with my own personal bot based on Marzban API. In the largest one with over 600 users, when you update a disabled user to make it enable, the changes will be made with no problem and are visible in the panel but the user can not connect to any node (including Master) until i restart the core via panel.

the data i send for update user api request:

      "expire": expire,
      "data_limit": data_limit,
      "status": "active"
erfjab commented 3 weeks ago

We are refactoring the Marzban APIs. We will check.

M03ED commented 3 weeks ago

I have multiple Marzban panels and i manage them with my own personal bot based on Marzban API. In the largest one with over 600 users, when you update a disabled user to make it enable, the changes will be made with no problem and are visible in the panel but the user can not connect to any node (including Master) until i restart the core via panel.

the data i send for update user api request:

      "expire": expire,
      "data_limit": data_limit,
      "status": "active"
  • OS: ubuntu 20
  • i have tried both ARM and x64 VPS (Hetzner)
  • it happens in the last 2 or 3 Marzban updates.

this happen every time or only when you send request with your bot?

voono commented 3 weeks ago

I have multiple Marzban panels and i manage them with my own personal bot based on Marzban API. In the largest one with over 600 users, when you update a disabled user to make it enable, the changes will be made with no problem and are visible in the panel but the user can not connect to any node (including Master) until i restart the core via panel. the data i send for update user api request:

      "expire": expire,
      "data_limit": data_limit,
      "status": "active"
  • OS: ubuntu 20
  • i have tried both ARM and x64 VPS (Hetzner)
  • it happens in the last 2 or 3 Marzban updates.

this happen every time or only when you send request with your bot?

Every time i use "my own bot" that i created using the Marzban api, i did not try the official Marzban bot. it happens when i use the api, the front-end panel works well. i also sent the update request data sample i use, in the message above. it only happens when i update and enable disabled users.

ImMohammad20000 commented 2 weeks ago

Do you use library's for api request? something like marzpy?

ImMohammad20000 commented 2 weeks ago

Do you use dev version ?

voono commented 2 weeks ago

Do you use library's for api request? something like marzpy?

no im not using any library beside python request. requests.put(url, json=data, headers=headers)

and im not using dev version

fodhelper commented 2 weeks ago

What version of Xray-core do you use? Is there any error log? Is this problem happens when you update the user using Dashboard too, or it's only when you use your Bot?

fodhelper commented 2 weeks ago

Every time i use "my own bot" that i created using the Marzban api, i did not try the official Marzban bot. it happens when i use the api, the front-end panel works well.

Then it's your Bot problem, make your request identical to the Dashboard's request