Giter Site home page Giter Site logo

gozargah / marzban Goto Github PK

View Code? Open in Web Editor NEW
2.5K 29.0 349.0 14.89 MB

Unified GUI Censorship Resistant Solution Powered by Xray

Home Page: https://t.me/gozargah_marzban

License: GNU Affero General Public License v3.0

Python 61.15% Mako 0.07% Dockerfile 0.08% TypeScript 29.49% HTML 7.64% SCSS 0.79% CSS 0.62% JavaScript 0.08% Shell 0.10%
v2ray xray censorship-resistant shadowsocks trojan vless vmess vpn api dashboard

marzban's People

Contributors

alirezaja1384 avatar alsuo avatar atomic8oy avatar bahram1249 avatar danialslm avatar dependabot[bot] avatar dimlaitman avatar fx505 avatar github-actions[bot] avatar govfvck avatar gozarman avatar hookzof avatar iambabyninja avatar immohammad20000 avatar kastov avatar m03ed avatar mahanmi avatar meaqese avatar muhammadashouri avatar oxiiio avatar oxj4ck avatar parasite249 avatar parhawm avatar reloadlife avatar saintshit avatar sm1ky avatar standbob avatar t3st3st3r0n avatar the-daishogun avatar zhongfq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

marzban's Issues

grpc

سلام آیا از grpc پشتیبانی میکند؟

نحوه نصب

سلام و عرض ادب

بنده میخوام این پروژه رو نصب کنم ولی متاسفانه نمی تونم و نمی دونم از کجا باید شروع کرد ! لطفا یه آموزش جامع نصب برروی اوبونتو قرار بدید!
اگر فیلم باشه خیلی بهتره
چون اصلا از توضیحات شما سر در نیاوردم

The Logout button does not work!

The Logout button in the dashboard does not work.
It is just linked to the dashboard/login page but it does not actually Logs out the user.

Duplicate username

Describe the bug
By default, Xray-core turns clients email lower case. yet, Marzban allows two identical usernames to be added if the capitalization of letters differs. This leads to the replacement of the first username with the second username.

To Reproduce
Steps to reproduce the behavior:

  1. Make a user named "mohammad"
  2. Make a user named "MoHaMmad"
  3. Check both users connectivity
  4. First user cannot connect anymore

Expected behavior
Both user should be able to connect

V2board integration

it would be graet to have users fetched from v2board. with maybe predefined config since v2board does not support that many protocols.

v2board endpoints (/api/v1/server/Deepbwork/user?node_id=51&token=token for example) send responses like:
{ "msg": "ok", "data": [ { "id": 2, "v2ray_user": { "uuid": "f7c3a7db-5313-4356-a40c-0fabedc90d13", "email": "[email protected]", "alter_id": 0, "level": 0 } }, ... ] }

and that could be inserted into x-ray inbounds without limitations since v2board itself handles traffic limit sent by the node in defined time periods.

Templates for create user button

Is your feature request related to a problem? Please describe.
It's very good to have some templates for user creation. for example, the admin could create a template with 30Gb of data usage, 1 month for the duration, and vless as the enabled proxy. anytime the admin clicks on this template, they would only enter the username and everything else would be filled automatically for that user.

Describe the solution you'd like
have a templates table to save these templates; users could add, remove, and edit these templates.
it would also need to be implemented in the front-end panel!

custom v2ray profile

as I see there are only 4 default layouts that we can only check or uncheck from create user menu.
if we want to take it easy
You should add some variables to the env file to set the custom v2ray profile for example (vmess+tcp+http).
The problem may be is a single-port tcp connection.
however, I don't know much about connections and how we can separate two tcp inbounds

I think this is one of the lightest UI panels I have seen and there are a lot of places for improvements

I am at the beginning of the programming path and trying to learn and participate in this project.

Subscription link file type

Please make the subscription link file type as txt so it can be opened in web and be compatible with cloudflare workers too.

problem in adding , changing protocols and enabling ssl

hi.
today I tried multi-port installation using docker but i can't change a single thing
I try to make more protocols for each user ( i add vless + grpc + tls and vmess + ws + tls ) and when I replace new xray_config.json file web panel doesn't show up again.
after that, i test changing xray_hosts in env file and after updating file i got the same issue after updating file.
last time I just make enable tls for vless and didn't change anything at all and I had the same problem.
{
"tag": "VLESS_INBOUND",
"listen": "0.0.0.0",
"port": 2083,
"protocol": "vless",
"settings": {
"clients": [],
"decryption": "none"
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/"
},
"security": "tls",
"tlsSettings": {
"serverName": "XXXXX.online",
"certificates": [
{
"ocspStapling": 3600,
"certificateFile": "/var/lib/marzban/certs/fullchain.pem",
"keyFile": "/var/lib/marzban/certs/key.pem"
}
],
"minVersion": "1.2",
"cipherSuites": "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
}
}
},
and please make options to change all these changeable from web panel.

Back : Add Webhook Events

Hi
Please add the Webhook Events feature as well. To send a request to an address in the following cases.

Enable / Disable User
To finish traffic or user time
Change time or user traffic

thank you

doc: readme completion

  • how to backup
  • more emphasis on using Docker
  • how to use API
  • how to enable telegram bot
  • donation

Change dashboard path

hi
Please add this feature to change the address of the panel.

Current address :
Domain/dashboard

For example :
Domain/MyAddress

thank you ♥

QR xray combination label

I think it would be best, while showing the QR code, a label to show the type of xray combination, would be extremally useful like Vmess/ws/tls

XTLS for VLESS and Domain Name Instead of Server IP

Hi
Is it possible to use xtls for vless? (I tried to change it in xray_config.json but my dashboard will become unreachable).
Also is there anyway to set my domain name instead of my server IP when I create users? I know I can change it later in v2ray apps, but I want it as default.
Thanks in advance.

اتصال به تانل

سلام این اسکریپت رو چطور میشه به تانل متصل کرد، آیا این اسکریپت با خودش xray-core رو نصب میکنه، اکر نصب میکنه چرا پوشه ها usr/local در قسمت داکیومنت خالیه
من فولدارها رو گشتم و چیزی پیدا نکردم
برای api به کجا و کدوم فولدر باید مراجعه کنم

Marzban-CLI Improvements

Due to we can have multiple admins in marzban It could be very helpful if there were something to show that each user has been created by which admin.
and the other thing that should be added it's to show the username that you have login with, It would be beneficial.

Bug title

سلام
من با پایتون تا حالا کار نکردم و نمیدونم این ارور موقع راه اندازی برای چیه
لطفا اگه میشه راهنمایی کنید تا پنل رو راه اندازی کنم
همه کتابخونه های لازم که تو فایل [requirements.txt] هستن رو نصب کردم

image

و در اخر برای پیشنهاد اگر میشه اسکریپت رو ارتقا بدید که اتوماتیک فرایند نصب اتوماتیک رو انجام بده.

مشکل در api

سلام وقت بخیر
امکانش هست ی نمونه اماده از api ساخت یوزر جدید برای php بزارین؟ یا با guzzle؟؟

inbounds

سلام وقتتون بخیر
خیلی ممنونم از زحماتی که می کشید
من یه درخواست داشتم که اگر امکانش هست پیاده سازی کنید در پنل ( دلیل اصلی من هم برای نصب نکردن مرزبان همین هست که چندباری تلاش کردم اما باعث شدم پنل کلا بالا نیاد و برام سخت هست )

اگر امکانش هست ، برای ساخت inbound نیازی نباشه که از طریق فایل xray configs اقدام کنیم ، این موضوع کمی پیچیده هست برای افراد مبتدی تر ( مخصوصا تو نسخه فول سینگل پورت )

مثلا پنل x-ui برای این کار راحت هستش

Screenshot_20230310_052623
Screenshot_20230310_052655

====================================================================================
یا مثلا در قسمتی که پروتکل رو برای کاربر انتخاب می کنیم ، طوری نباشه که همه Wmess ها براش ساخته بشه و بشه انتخاب کرد که کدوم Wmess ساخته بشه براش

photo_2023-03-10_05-51-38

با این کار قول میدم رشد کاربران پنل چند برابر خواهد شد و افراد مبتدی یا کسانی که آشنایی زیادی ندارن هم جذب پروژه میشن
اولین نفرش هم خود من :)

بازم ممنونم از زحمات شما 3>

An integrated Telegram bot

It's a good idea to have a Telegram bot integrated with Marzban that sends reports of users. and also, being able to get statistics of server or even managing users.

TODO:

  • report changes in users (bb7ee77)
  • command to see stats - (bb7ee77)
  • manage user commands

Bad Gateway After installing from docker

After installing the web app from docker, the panel won't be available on port 8880.
I tried on multiport management panel and get the "Bad Gateway" error!
Thanks

Bug in config vmess http

Hi, I added a vmess tcp http configuration, the problem is that when I add the configuration in the client, the harde type is set to none and it does not appear in http.
Can you help me solve the problem?

config code:

{
    "log": {
        "loglevel": "info"
    },
    "inbounds": [
        {
            "tag": "VMESS_INBOUND",
            "listen": "0.0.0.0",
            "port": 2053,
            "protocol": "vmess",
            "settings": {
                "clients": []
            },
            "streamSettings": {
                "network": "tcp",
                "tcpSettings": {
                    "header": {
                        "type": "http"

                    }
                }
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom",
            "settings": {},
            "tag": "DIRECT"
        },
        {
            "protocol": "blackhole",
            "settings": {},
            "tag": "BLOCK"
        }
    ],
    "routing": {
        "rules": [
            {
                "ip": [
                    "geoip:private"
                ],
                "outboundTag": "BLOCK",
                "type": "field"
            },
            {
                "domain": [
                    "localhost"
                ],
                "outboundTag": "BLOCK",
                "type": "field"
            }
        ]
    }
}

در قسمت آدرس

سلام و خسته نباشید - من از طریق داکر اسکریپت رو نصب کردم- لینک ها که دریافت میکنم (vless & vmess ...) به صورت ای پی ادرس در نرم افراز ست میشه - من که دومین ست کردم - دومینم در قسمت آدرس نمیاد - آی پی نشون میده ..
Untitled

Add option to reset user limit at different points in time

Hi, thank you for the amazing work you're doing 🙌🏼

how do you feel about adding an option to make user bandwith limit rest weekly or monthly or even yearly?

i can get started on the pull request if you feel this would be a good adition

بلاک کردن سایت های ایرانی

سلام وقت بخیر،ممنون میشم داکیومنت مربوط به بلاک کردن سایت های ایرانی رو کامل کنید،چون عملا با انجام تمام مراحل هنوز با VPN سایت های ایرانی بالا میان،با تشکر

Parent panel for managing

Hi, Thank you for your work) I think it is necessary to implement (perhaps later) a parent panel for managing multiple servers, because in reality you will not go far with one server)

I suggested this idea in advance so that such a possibility would be taken into account when building the application architecture, and then it would not hurt to make such extensions

front: Table Sort

Users must be able to sort based on

  • username
  • used_traffic
  • data_limit
  • expire
  • created_at

The api is ready

Show Marzban's version

Hi

Please add a section in the dashboard panel that displays the installed version.

thank you

Options must be added for user management

A TODO list of features requested on user modifying methods

  • Option to active / deactive user temporarily
  • Option to reset user's usage
    - [ ] Option to import / export backup of users
    - [ ] XTLS support for VLESS (flow), specially for xtls-rprx-vision
    - [ ] Option to add note on users

Feature title

سلام برادر . روزت بخیر دادا. اولا بابت زحماتت سپاسگزارم و دم شما خیلی گرمه.

جسارتا و بخاطر قلب بزرگ خودت که نوشتی نظرات رو بگیم، عرض میکنم:
اگه میشد داخل پنل مرزبان، تنظیمات قرار بگیرن و یو آی یوزرفرندلی تر باشه خیلی بهتره.
همینطور تنظیم اس اس ال اگه از داخل پنل باشه، قطعا پنل فراگیرتر و در نتیجه اختلالاتش زودتر مشخص میشه.
ضمن اینکه نسخه ایکس ری و آپدیت اون مشخص نیست و دلچسب تر میشه اگه باشه.
موضوع بعدی اینکه با اینکه در روند نصب و گرفتن اس اس ال، ساب دامینم رو معرفی کردم، اما همچنان کانفیگ ها بدون اس اس ال ارائه میشن و نمیدونم دقیقا چطور باید موضوع رو برطرف کنم.
سرت سلامت و ایشالا همیشه موفق باشی.
ارادت.

Feature ip limit

Hello
First of all, thank you for your very effective and interesting project
As a suggestion, I will announce a few features to add in the future if possible:

1- Limiting the number of simultaneous users (IP) for each user
2- Telegram bot to monitor and announce the expiration and remind users of the expiration time
3- Server management panel such as V2board, SSpanel
4- Documentation and completion of API and its endpoints
5- Support for tunneling several servers
6- Ability to enter predetermined periods such as: daily, monthly instead of entering the date

Xray process get stuck after core restart

Describe the bug
Users won't add to Xray-core on restart when having many users

Expected behavior
Marzban should firstly add users, then start listening proxy port

Option to use different certificates

Hi
Thanks for your great job,
It would be great to be able to use different certificates for different proxies, so we can use different certificates for direct and tunneled proxies.

Multiple port

I think it's a critical feature to be able to set up multiple standby ports for each inbound, as can be quickly done in a reverse proxy.
Also, the ability to share and update this port through the subscription link should be made.

Telegram bot won't show the response of user creation when creating users

Describe the bug
Telegram bot won't show the response of user creation when creating the user with it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the telegrom bot
  2. Click on 'create user'
  3. Enter the requested info
  4. select the desired protocols and click 'Done'
  5. user will be created in the database but the bot won't show any response

Expected behavior
when creating a new user from the telegram bot, the bot should create the user in the db and show the response of the operation to the user.

Machine details (please complete the following information):

  • OS: Ubuntu 22.04
  • Python version: 3.10.6

Additional context

Logs from the error:

2023-03-17 12:06:58,142 (__init__.py:960 Thread-1 (infinity_polling)) ERROR - TeleBot: "Infinity polling exception: Parent instance <User at 0x7fb6bc33dea0> is not bound to a Session; lazy l
oad operation of attribute 'proxies' cannot proceed (Background on this error at: https://sqlalche.me/e/14/bhk3)"
2023-03-17 12:06:58,143 (__init__.py:962 Thread-1 (infinity_polling)) ERROR - TeleBot: "Exception traceback:
Traceback (most recent call last):                                                           
  File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/__init__.py", line 955, in infinity_polling
    self.polling(non_stop=True, timeout=timeout, long_polling_timeout=long_polling_timeout,    
  File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/__init__.py", line 1043, in polling
    self.__threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,
  File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/__init__.py", line 1118, in __threaded_polling
    raise e                                                                                  
  File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/__init__.py", line 1074, in __threaded_polling
    self.worker_pool.raise_exceptions()
  File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/util.py", line 156, in raise_exceptions
    raise self.exception_info
  File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/util.py", line 100, in run  
    task(*args, **kwargs)   
  File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/__init__.py", line 6395, in _run_middlewares_and_handler
    result = handler['function'](message)                                                    
  File "/root/Marzban/app/telegram/admin.py", line 451, in confirm_user_command
    ', '.join([p.type for p in db_user.proxies])                                             
  File "/root/Marzban/.venv/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 482, in __get__
    return self.impl.get(state, dict_)
  File "/root/Marzban/.venv/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 942, in get
    value = self._fire_loader_callables(state, key, passive)                                   
  File "/root/Marzban/.venv/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 978, in _fire_loader_callables
    return self.callable_(state, passive)                                                    
  File "/root/Marzban/.venv/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 863, in _load_for_state
    raise orm_exc.DetachedInstanceError( 
sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <User at 0x7fb6bc33dea0> is not bound to a Session; lazy load operation of attribute 'proxies' cannot proceed (Background on this er
ror at: https://sqlalche.me/e/14/bhk3)

Disable subscription link

Please, if possible, do something so that the subscription link does not work for the user when the user's status is not active, and if the user is not active, give a config fake response. Thank you.

New features for Modify User in api

Hello..
After working with the api, I realized that it would be much better if it was possible to change 'used_traffic', and it would be great if it was possible to change the user's sub link or uuid randomly without sending a new value to the api.
Thanks

Docker container doesn't expose ports

I've installed Marzban with docker images tutorial, everything runs butter-smooth except that I don't get to have ports like 8880 open. Do I need to setup a reverse proxy or something? Also netstat -nlp shows nothing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.