GithubHelp home page GithubHelp logo

khodedawsh / marzneshin Goto Github PK

View Code? Open in Web Editor NEW
165.0 3.0 12.0 3.38 MB

A fork of Marzban aiming for scalability

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

License: GNU Affero General Public License v3.0

Dockerfile 0.02% Python 27.82% TypeScript 62.73% HTML 6.58% CSS 0.24% JavaScript 0.57% Mako 0.06% Shell 1.88% Makefile 0.07%
censorship-circumvention dashboard python shadowsocks typescript marzneshin xray-core xray

marzneshin's Introduction

Marzneshin

A Scalable and Comprehensive Proxy Engine management panel.



screenshots

Table of Contents

Overview

Marzneshin is a censorship circumvention tool utilizing other censorship circumvention tools.

Marzneshin controls the Marznodes connected to it; monitoring/disabling/enabling users on marznode instances while marznode manages and interacts with vpn backends (such as xray).

Docs

Marzneshin documentation may be found here.

Features

  • Web UI Dashboard
  • Multi Nodes support for traffic distribution, scalability, and fault tolerance
  • Supports protocols Vmess, VLESS, Trojan and Shadowsocks as provided by xray
  • Multi-protocol for a single user
  • Manage users' access to inbounds separately using services
  • Multi-user on a single inbound
  • Limit users' data and set exire dates
  • Reset traffic periodically (daily, weekly,...)
  • Subscription link compatible with V2ray (e.g. V2RayNG, OneClick, Nekoray, etc.), Clash and ClashMeta
  • Automated Share link and QRcode generator
  • System, nodes, traffic statistics, users monitoring
  • Integrated Command Line Interface (CLI)
  • Multi-admin support (WIP)
  • Marzneshin is decoupled from VPN backends
  • Resilient and fault tolerant node management

Deployment and Developer Kit:

  • REST-full API
  • Kubernetes and multiple deployment strategy and options (WIP)

Supported Languages

  • Russian (WIP)
  • English
  • Kurdish (Soranî, Kurmancî)
  • Persian

marznode

marznode is the backend needed to run proxy servers.

Donation

If you found Marzneshin useful and would like to support its development, you can make a donation in one of the following crypto networks:

  • Bitcoin network: 13ZDhE5KHGsfjM4A22eLTUgW98WpXhQTuF
  • TRON network (TRC20): TYxFCiRqJ3SiV6rAQAmJUd3DgVmJvEAfz4
  • TON network: EQB_VYiU73U1_wk-01I_MLg9-hx953VOf9Y36t2Z04WyUapD

Part of the donations would be tipped to contributors, the rest to collaborators.

May developers be rich.

License

Published under AGPL-3.0.

Contributors

We ❤️‍🔥 contributors! If you'd like to contribute, please check out our Contributing Guidelines and feel free to submit a pull request or open an issue. We also welcome you to join our Telegram group for either support or contributing guidance.

Check open issues to help the progress of this project.

Thanks to all contributors who have helped Marzneshin:

Made with contrib.rocks

marzneshin's People

Contributors

krr0ption avatar khodedawsh avatar dependabot[bot] avatar eryx0 avatar realartin avatar m0x61h0x64i avatar mahdim10 avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar Dead Flamingo avatar  avatar Orv avatar Skrill avatar Aria avatar  avatar  avatar Mole avatar Valentine avatar  avatar  avatar  avatar Dmitry Titov avatar Z3ROD avatar  avatar  avatar  avatar Mohammad Danaee nia avatar Aleksei Rubin avatar  avatar  avatar matin avatar  avatar Phong H. avatar MGTV avatar  avatar  avatar  avatar BrainFuck Developer avatar  avatar Elshad Guseynov avatar  avatar Artur avatar  avatar  avatar morteza avatar Daviddev avatar  avatar  avatar LonUp avatar  avatar morteza avatar Mohsen Nasiri avatar Farshad avatar NicA avatar  avatar AsanFillter avatar Alireza Nazari avatar  avatar Danial Keimasi avatar  avatar Ramin Rezaei avatar Mohammad avatar  avatar Reza Amirian avatar  avatar Amir Mohseninia avatar sotti avatar Ahmad Rezaei avatar deli avatar X-AMiR avatar  avatar naser zare avatar Pooya avatar Sina B avatar omid mesgarha avatar  avatar ZED avatar mc4 avatar alireza avatar  avatar Leo Keuo Afsar avatar  avatar DG-20MC avatar IRCF avatar  avatar real_kia avatar Иг avatar Alex avatar  avatar  avatar  avatar Ali avatar  avatar Ivan Vinokurov avatar Phoenix avatar DrlvlRF avatar  avatar  avatar  avatar Sajad Dehghani avatar Saeed Ghorbani avatar DevElf avatar  avatar  avatar

Watchers

sotti avatar BrainFuck Developer avatar  avatar

marzneshin's Issues

[REFACT] Split the existing useDashboard State manager into more manageable parts

We should split the useDashboard context for statement to more specific and less cluttered state manager.

Problem

  • The existing global statement does not follow single responsibility principle, because we have more pages compared to previous Marzban.

Solution

  • Separate State Management for Services
  • Separate State Management for Users
  • Separate State Management for Nodes
  • Separate State Management for Host
  • Separate State Management for Dashboard

Originally posted by @Krr0ptioN in #6

[FIX] Store node stats for users

Description

Marzneshin should fetch and store users usages periodically.

Technical Interface Specification

  • Marzneshin requests Marznode for stats, if Marznode isn't responsive nothing is done l. Otherwise saves stats to dB.

Tasks

  • #49
  • implement stats on Marzneshin side

[FEAT] Develop state manager and UI component for Nodes Settings and management page

Description

The node page is where Admin config nodes and add new nodes of system.

UI Specifications

Nodes Configuration Dialog

image

  • This dialog will open once you click on the specific node (nodes are represented as a row in the nodes table) in the table.

Changes:

  1. This accordion structure have to be removed and the dialog has to only show one node
  2. The certification section will be moved to table as actions buttons.
    • Button 1: copy the SSL certificate
    • Button 2: Downlaod the SSL certificate
  3. API ports must be removed.
  4. This button is comes with the accordion structure has to be removed.
  5. The yellow region is empty because previous implementation did not provide Dialog header title for modal. The header modal title must be "Nodes
  6. Another radio component must be added for nodes status manipulation

Tasks and specifications

Table

  • Nodes table which provide the available nodes
  • A button to show the certificate of the node
    - GET /api/node/settings provide the certificate
  • Every node has status where they are healthy, unhealthy, and disabled
  • Every node has Xray version
  • Table Filters field for Nodes table
  • English Translation for the table

Dialog

  • Remove the specified part of the dialog in specification
  • Modifiable node status
    - Empty means enable and "status": "disabled" disable the node
  • Every node in dialog have field to config the IP address and port
    - Port and IP address provided by GET /api/node/{node_id} and modified by PUT /api/node/{node_id}
  • English Translation for the dialog

Core Settings

[BUG] unable to revoke sub or reset usage and etc

  • لینک ساب یوزر ریووک نمیشه و حجمش هم ریست نمیشه. اما حجم و نوت و تاریخ یوزر قابل ادیته

  • and deleting a user takes a solid 20 seconds!

image

[FEAT] Edit services that the user is apart of in user dialog

Description

Implement the ability for admin to edit services that the user is a part of, within the user dialog.

UI Specification

  • Already joined services by user must be pre-selected and highlighted and prepared to be deselected if the admin aims to
  • Allow the user to add or remove services from their profile.

Tasks

  • Users can access the "Edit Services" feature from the user dialog.
  • The user can see a list of their current services.
  • The user can successfully add or remove services.
  • Changes made to services are reflected in the user's profile.

[TASK] Cypress and E2E testing

Tasks

  • Local E2E setup automation and configuration (test-container)
    • Marznode mocking
    • Database mocking
  • #273
  • Production CI E2E setup configuration

[EPIC] As Admin, I want to access and manage the services, users, and other objects in sperate page while I can access each page through a sidebar

Description

Implement admin functionality to access and manage services, users, and other objects through separate pages. Additionally, provide a sidebar for easy navigation between these pages.

UI Specification

  • Create separate pages for managing services, users, and other objects.
  • Design a sidebar for easy navigation with links to each page (services, users, etc.).
  • Each page, contain a table to view and modify the existing related object (e.g. Users page contain a table to control and update the users)

Technical Specification

  • Implement routing to handle navigation between the different admin pages.
  • Create service management in state zustand has to be updated

Tasks

  • #14
    • Design and implement a sidebar component for navigation.
    • Move the existing user management components from Home page to User Management page.
    • Create separate pages for service, user, and other object management.
  • #11
  • #41
  • #12
  • #13
  • #51

Bugs

[FEAT] make Xray logs available for each node

Description

Xray logs should be accessible through the api for each node

Technical Interface Specification

  • Marzneshin gets logs from marznode using a grpc stream and passes it to api clients using websocket

Tasks

  • make logs stream available on marznode
  • create logs websocket api for marzneshin nodes

[BUG] Host API endpoints are not functional

Description

Host modification/update/delete is not functional due to changes in database structure

Technical Interface Specification

  • Host model should evolve to use the newly added relation with inbound(inbound_id). the relation used to be with inbound_tag

Tasks

  • fix host modification and creation

Re-structure the telegram bot

Background
Marzban telegram bot is poorly structured and needs restructuring.
This includes applying changes related to 1: removing user templates & 2: replacing proxies with services

[REFACTOR] Migrating to a proper monorepo ecosystem such as Nx

Description

Problem

The existing folder structure lacks clarity and alignment with standard tooling's.

Solution

  • Utilizing existing monorepo structures and tooling's such as Nx with python plugin.
  • Using modern packaging tools such as Poetry.
  • Moving python backend powered by FastAPI to apps/api and disecting it's

عدم هماهنگی سرویس ها با تم دارک

Describe the bug
دکمه هر سرویس در صورت روشن کردن تم دارک همچنان سفید نمایش داده میشوند

Expected behavior
تم دارک روی دکمه سرویس تاثیر بگذارد

Screenshots
image

[BUG] User links aren't generated

After adding marznode user links don't work since they used to depend on local xray config data
marzneshin should now hold inbound data in the db and use it to generate the configs.

[BUG]: Relocate the menu items to their own page as page component

image

اگه کاربر توی صفحه home باشه هیچکدوم از اینا کار نمیکنن (هر کدوم برای کار کردن لازمه کاربر وارد اون صفحه مربوط توی سایدبار بشه)

مثلا توی صفحه هومبا زدن reset all usages اتفاقی نمیفته، و همین که کاربر وارد صفحه users بشه صفحه ای باز میشه برای ریست مصرف ها

یا host settings کار نمیکنه، و همین که وارد صفحه host سایدبار بشیم و بعدش هاست ها رو باز کنیم صفحه سیاه و not found میشه(صفحه هاست ستینگز غیرقابل دسترسی و استفاده است)

دکمه core settings هم فقط وقتی توی صفحه Nodes باشیم باز میشه

[FEAT] Develop state manager and UI component for Host Settings page

Description

UI Specification

  1. Dropdowns are not styled properly according to the UI and component system

Image

  • Font must be bigger
  • Rounded and less edgy

Technical Interface Specification

  1. Show ALPN and fingerprint fields only when security is TLS
    • ALPN and fingerprint shoudn't be shown as they are dependent whether the security is TLS.

Tasks

  • #89
  • #35 Inbound component for sidebar
  • #90
  • #92
    • List the Inbounds a small sidebar, 2
    • In the Hosts table it should be indicated whether the inbound is correctly configured or not

[IMPRO] better synchronization with nodes

Description

Marzneshin aims to synchronize users stored on nodes as efficient and fast as possible

Technical Interface Specification

Currently RepopulateUsers is only called on startup and when the connection fails on a call, However it should also be called when node restarts

[REFACTOR] Xray core should be controlled and executed only in nodes rather than Marzneshin

How it is
Right now Marzneshin controls all xray cores, across all nodes; It also runs an internal xray core on the main server.

How it should be
Marzneshin should control nodes rather than the Xray-core inside them. and that should be the only job Marzneshin has; there should not be an Xray-core executed inside Marzneshin.

Pros

  • Performance benefits when restarting marzban, less libraries are imported and needed to run Marzneshin
  • In case Marzneshin fails to start, or lose it's functionality, nodes would continue working as long as they store a list of users
  • Less connections/requests between Marzneshin and the node means more stability in conditions with bad network
  • the connection could be better customized e.g. proxied or connect with different transports
  • code-base would be cleared of xray_api and xray config generation

Cons

  • Users would have to run two containers, or a container running both Marzneshin and Marzneshin-node in case they want their main server to also be a proxy

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.