MIPLimiter

Imposing restrictions on the number of IP addresses a user can simultaneously connect from. Works with latest version of Marzban.

MIT License

Static Badge

Features

  • Supports gozargah/marzban
  • Supports Marzban-Node
  • Easy on system resources

License

MIT This software comes with ABSOLUTELY NO WARRANTY.

Installation

Add the following to the xray-config.json of your master server

  "log": {
    "access": "",
    "loglevel": "error",
    "dnsLog": false
  }

You need Docker installed on your server

  curl -fsSL https://get.docker.com | sh

Clone this Repo

  git clone https://github.com/amirgi73/miplimiter.git
  cd miplimiter

Edit config.yml based on your needs

  • url: domain/subdomain of your Marzban Panel (ie. sub.example.com). Your Panel should have https enabled.
  • username: username of Marzban admin account
  • password: password of Marzban admin account In the users section you will write username of users, that you want to limit and the number of IPs, that they're allowed. for example hasan: 2 will limit username hasan with only 2 simultaneous IPs.

Run the app

docker compose up -d

Usage/Examples

Checking logs

cd miplimiter
docker compose logs -f

Stoping the app

cd miplimiter
docker compose down

Updating the app

cd miplimiter
docker compose down
docker compose pull
docker compose up -d

Acknowledgements

TO DO

  • Implementing REST API for adding/removing users to the list
  • Using a datatbase to store data