Convert Figma logo to code with AI

Jrohy logomulti-v2ray

v2ray/xray多用户管理部署程序

6,974
2,438
6,974
110

Top Related Projects

A platform for building proxies to bypass network restrictions.

66,794

A GUI client for Windows, support Xray core and v2fly core and others

34,334

A V2Ray client for Android, support Xray core and v2fly core

24,231

Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.

Quick Overview

Jrohy/multi-v2ray is a V2Ray management tool designed for easy installation and configuration of V2Ray, a platform for building proxies to bypass network restrictions. It provides a user-friendly interface for managing V2Ray instances, including features like multi-user support, traffic statistics, and automatic updates.

Pros

  • Easy installation and configuration process
  • Supports multiple users and protocols
  • Provides a web-based management interface
  • Automatic updates for V2Ray core and geo files

Cons

  • Limited to V2Ray protocol, not supporting other proxy types
  • May require some technical knowledge to fully utilize all features
  • Documentation is primarily in Chinese, which may be a barrier for non-Chinese speakers
  • Potential security risks if not properly configured

Getting Started

To install multi-v2ray, run the following command:

source <(curl -sL https://multi.netlify.app/v2ray.sh) --zh

After installation, you can access the management interface by running:

v2ray

To start the web panel, use:

v2ray --user

Then access the web panel at http://your_server_ip:65432 with the username and password provided during installation.

Competitor Comparisons

A platform for building proxies to bypass network restrictions.

Pros of v2ray-core

  • Core functionality and protocol implementation
  • Highly customizable and extensible
  • Better performance and resource efficiency

Cons of v2ray-core

  • Steeper learning curve for configuration
  • Lacks user-friendly management interface
  • Requires manual setup and maintenance

Code Comparison

v2ray-core (Go):

type User struct {
    Level uint32
    Email string
}

type Account struct {
    Id      string
    AlterId uint32
}

multi-v2ray (Python):

class User:
    def __init__(self, email, uuid, alter_id=0, level=0):
        self.email = email
        self.uuid = uuid
        self.alter_id = alter_id
        self.level = level

v2ray-core is the official core implementation of the V2Ray protocol, offering robust functionality and performance. It's highly customizable but requires more technical expertise to set up and manage.

multi-v2ray is a user-friendly management tool built on top of v2ray-core, providing an easier interface for configuration and user management. It simplifies the setup process but may not offer the same level of customization as the core project.

v2ray-core is written in Go, focusing on performance and efficiency, while multi-v2ray is written in Python, prioritizing ease of use and management features. The code comparison shows the different approaches to user and account management in both projects.

66,794

A GUI client for Windows, support Xray core and v2fly core and others

Pros of v2rayN

  • User-friendly GUI for Windows users
  • Supports multiple protocols and configurations
  • Regular updates and active community support

Cons of v2rayN

  • Limited to Windows platform
  • May have a steeper learning curve for beginners

Code Comparison

multi-v2ray (Python):

def gen_client_json(self, port, aid=0):
    client_config = {
        "id": self.password,
        "alterId": aid,
        "email": self.email
    }
    return client_config

v2rayN (C#):

public static int GenerateRandomNumber()
{
    return new Random().Next(10000, 60000);
}

The code snippets show different approaches:

  • multi-v2ray focuses on generating client configurations
  • v2rayN includes utility functions like random number generation

Both projects serve different purposes:

  • multi-v2ray is a server-side management tool
  • v2rayN is a client-side application for Windows users

While multi-v2ray offers more flexibility for server setup and management, v2rayN provides a user-friendly interface for connecting to V2Ray servers on Windows. The choice between them depends on whether you need server management capabilities or a client application for everyday use.

34,334

A V2Ray client for Android, support Xray core and v2fly core

Pros of v2rayNG

  • User-friendly Android app with a graphical interface
  • Supports multiple protocols and configurations
  • Regular updates and active community support

Cons of v2rayNG

  • Limited to Android platform
  • May have higher resource usage compared to command-line tools

Code Comparison

multi-v2ray (Python):

def gen_client():
    client_config = {
        "v": "2",
        "ps": "",
        "add": "",
        "port": "",
        "id": "",
        "aid": "",
        "net": "",
        "type": "",
        "host": "",
        "path": "",
        "tls": ""
    }
    # ... (code to populate client_config)
    return base64.b64encode(json.dumps(client_config).encode()).decode()

v2rayNG (Kotlin):

fun getConfigString(): String {
    val config = JSONObject().apply {
        put("v", "2")
        put("ps", remarks)
        put("add", address)
        put("port", port)
        put("id", id)
        // ... (additional fields)
    }
    return Base64.encodeToString(config.toString().toByteArray(), Base64.NO_WRAP)
}
24,231

Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.

Pros of Xray-core

  • More advanced protocol support, including VLESS and XTLS
  • Better performance and lower latency due to optimized core
  • Active development with frequent updates and improvements

Cons of Xray-core

  • Steeper learning curve for configuration and setup
  • Less user-friendly interface compared to multi-v2ray
  • May require more manual configuration for advanced features

Code Comparison

multi-v2ray:

class V2ray:
    def __init__(self):
        self.config = Config()
        self.service = Service()

    def restart(self):
        self.service.restart()

Xray-core:

type Instance struct {
    access             sync.Mutex
    features           []Feature
    featureResolutions []resolution
    running            bool
}

func New(config *Config) (*Instance, error) {
    // Implementation details
}

The code snippets show that multi-v2ray is written in Python and focuses on a higher-level management interface, while Xray-core is implemented in Go and provides a lower-level, more performant core functionality.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

multi-v2ray

V2ray/Xray多用户管理脚本,向导式管理[新增|删除|修改]传输协议
Downloads Downloads

中文 English

特色

  • 支持Xray管理, v2ray和xray相互独立, 不同命令(v2ray/xray)进入不同的core管理
  • 调用v2ray官方api进行流量统计
  • 多用户, 多端口管理, 混合传输协议管理不再是梦
  • 首次安装时产生随机端口,默认配置mkcp + 随机一种 (srtp | wechat-video | utp | dtls | wireguard) header伪装;
     安装完成显示配置信息;
  • 查看配置信息显示vmess/vless字符串(v2rayN的分享链接格式)
  • 生成Telegram的socks5/MTProto分享链接, 支持socks5 + tls组合
  • 支持http/2, 随机生成伪装h2 path
  • 开启关闭tcpFastOpen
  • 直接开启CDN
  • 开启关闭动态端口
  • 定时更新v2ray(需手动开启)
  • 支持新版v2ray配置文件格式(v4.1+)
  • 支持范围端口修改
  • 支持程序和**命令行参数**管理控制
  • 支持docker部署
  • 支持VLESS和Trojan以及XTLS(v4.31.0+)
  • 支持纯ipv6 vps
  • 禁止BT

功能

  • 一键 启动 / 停止 / 重启 V2ray 服务端
  • 流量统计(v2ray && iptables)
  • 命令行模式管理v2ray
  • 支持多用户, 多端口管理
  • 开启关闭动态端口
  • bittorrent的禁止与放行
  • 单端口, 范围端口的修改
  • 直接走Cloudcflare cdn
  • 开启关闭tcpFastOpen
  • 快速查看服务器连接信息, 常规配置修改
  • 自由更改**传输配置**:
    • 常规TCP
    • HTTP头部伪装
    • WebSocket流量
    • 常规mKCP流量
    • mKCP 伪装 FaceTime通话流量(srtp)
    • mKCP 伪装 BT下载流量(utp)
    • mKCP 伪装 微信视频通话流量(wechat-video)
    • mKCP 伪装 DTLS 1.2流量(dtls)
    • mKCP 伪装 WireGuard流量(wireguard)
    • HTTP/2的tls流量(h2)(需备域名)
    • Socks5
    • MTProto
    • Shadowsocks
    • Quic
    • VLESS_TCP
    • VLESS_TLS
    • VLESS_WS
    • VLESS_REALITY
    • Trojan

安装命令

source <(curl -sL https://multi.netlify.app/v2ray.sh) --zh

升级命令(保留配置文件更新)

source <(curl -sL https://multi.netlify.app/v2ray.sh) -k

卸载命令

source <(curl -sL https://multi.netlify.app/v2ray.sh) --remove

命令行参数

v2ray/xray [-h|help] [options]
    -h, help             查看帮助
    -v, version          查看版本号
    start                启动 V2Ray
    stop                 停止 V2Ray
    restart              重启 V2Ray
    status               查看 V2Ray 运行状态
    new                  重建新的v2ray json配置文件
    update               更新 V2Ray 到最新Release版本
    update [version]     更新 V2Ray 到指定版本
    update.sh            更新 multi-v2ray 到最新版本
    add                  新增端口组
    add [protocol]       新增一种协议的组, 端口随机, 如 v2ray add utp 为新增utp协议
    del                  删除端口组
    info                 查看配置
    port                 修改端口
    tls                  修改tls
    tfo                  修改tcpFastOpen
    stream               修改传输协议
    cdn                  èµ°cdn
    stats                v2ray流量统计
    iptables             iptables流量统计
    clean                清理日志
    log                  查看日志
    rm                   卸载core

Docker运行

默认创建mkcp + 随机一种伪装头配置文件(如果使用xray则换成镜像jrohy/xray):

docker run -d --name v2ray --privileged --restart always --network host jrohy/v2ray

自定义v2ray配置文件:

docker run -d --name v2ray --privileged -v /path/config.json:/etc/v2ray/config.json --restart always --network host jrohy/v2ray

查看v2ray配置:

docker exec v2ray bash -c "v2ray info"

warning: 如果用centos,需要先关闭防火墙

systemctl stop firewalld.service
systemctl disable firewalld.service

建议

安装完v2ray后强烈建议开启BBR等加速: one_click_script
使用Trojan和VLESS协议建议自行安装个nginx, 能让v2ray顺利Fallback到默认的80端口

依赖

v2ray docker: https://hub.docker.com/r/jrohy/v2ray
xray docker: https://hub.docker.com/r/jrohy/xray
pip: https://pypi.org/project/v2ray-util/
python3: https://github.com/Jrohy/python3-install
acme: https://github.com/acmesh-official/acme.sh