Git Product home page Git Product logo

multi-v2ray's Introduction

multi-v2ray

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

特色

  • 支持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

multi-v2ray's People

Contributors

jrohy avatar kinue72 avatar radium-bit 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  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

multi-v2ray's Issues

修改配置时报错

1.更改email

2.更改UUID

3.更改alterID

4.更改主端口

5.更改传输方式

6.更改TLS设置

7.更改广告拦截功能

8.更改动态端口

9.更改Shadowsocks加密方式

10.更改Shadowsocks密码

请输入数字选择功能: 4

Traceback (most recent call last):
File "/usr/local/multi-v2ray/config_modify/port.py", line 3, in
import read_json
ImportError: No module named 'read_json'
Traceback (most recent call last):
File "/usr/local/multi-v2ray/base_util/open_port.py", line 4, in
import read_json
ImportError: No module named 'read_json'

MTPROTO问题

MTPROTO: PC端TG没问题, 手机端TG不行. 换成SOCKS5, PC和手机就都可以

Err when input v2ray in xshell(Debian 8 x86_64)

The script told me that input "v2ray" to mange the v2ray service, but when I did so following err message print out, it said "-bash: /usr/local/sbin/v2ray: No such file or directory". So some tips? Thanks!
multi-v2ray err

希望脚本能添加

小白们真不会希望大佬日后版本会有
希望脚本能添加限制流量

第一个star,哈哈

提几个建议 ,
希望脚本能自动更改系统的时间;
另外http/2不会弄啊,能不能加个wiki什么的。
谢谢作者。

遭遇 ModuleNotFoundError: No module named 'read_json'

vultr 上新安装的 ubuntu 18.04

运行 v2ray 进行配置或者修改时,出错,提示ModuleNotFoundError: No module named 'read_json'

我是使用非root用户,通过 sudo命令安装的。

运行 grep v2ray.fun ~/.bashrc 没有返回。

运行 echo "export PYTHONPATH=$PYTHONPATH:/usr/local/multi-v2ray" >> ~/.bashrc && source ~/.bashrc 之后, grep v2ray.fun ~/.bashrc 有返回,但依然遭遇 ModuleNotFoundError: No module named 'read_json'

打开流量统计时报错

Traceback (most recent call last): File "/usr/local/multi-v2ray/other_setting/stats_ctr.py", line 4, in <module> import write_json File "/usr/local/multi-v2ray/write_json.py", line 9, in <module> from base_util import tool_box File "/usr/local/multi-v2ray/base_util/tool_box.py", line 6, in <module> from OpenSSL import crypto ImportError: No module named 'OpenSSL'

脚本生成的链接,不能正常使用

脚本生成的链接,不能正常使用,具体如下:
配置为ws+tls
1,shadowrocket 2.1.10,pp助手上下载的,无法正常使用,导入链接后,没有ws协议,估计可能这个版本软件就不支持这种协议。
2,kitsunebi lite不能正常使用,链接识别以后,把伪装的域名填到路径的选项里面了,域名那一项空的。
3,app store下载的最新的shadowrocket 2.1.23可以正常用。
希望能够更新,使得kitsunebi lite能用,谢谢,请测试。

域名有效性判断有误

开启H2时,要求输入域名,使用的域名结尾为.co.uk,脚本只会提示域名无效,应该是判断出了问题,望作者检查一下,谢谢!

流量统计

作者大大你好,我想问下流量统计中,为什么需要有效email才可以使用呀?

导出客户端文件时出错

在导出各个用户的配置文件时,发现只会导出第一个用户的配置文件。
应该是导出配置文件保存的时候没法覆盖重名文件。

提示错误-bash: python3: command not found

提示错误-bash: python3: command not found。

V2Ray v3.43 is installed.
-bash: python3: command not found
-bash: python3: command not found
-bash: python3: command not found
Redirecting to /bin/systemctl restart v2ray.service
multi-v2ray 安装成功!
V2ray配置信息:
-bash: python3: command not found
输入 v2ray 回车即可进行服务管理
然后按提示,输入 v2ray 回车,出现以下:
[root@host ~]# v2ray

欢迎使用 multi-v2ray 管理程序

1.服务管理 2.用户管理

3.更改配置 4.查看配置

5.其他功能 6.更新V2Ray

7.生成客户端配置文件

请输入数字选择功能(按回车键退出): 4

/usr/local/bin/v2ray: line 353: python3: command not found

欢迎使用 multi-v2ray 管理程序

1.服务管理 2.用户管理

3.更改配置 4.查看配置

5.其他功能 6.更新V2Ray

7.生成客户端配置文件

不过选哪个数字,都只是显示“欢迎使用 multi-v2ray 管理程序”
备注:VPS系统是Centos 7 x86_64,尝试安装别的一键脚本没问题。
谢谢楼主的贡献。

将config.json改为对应ws+tls+nginx的传输方式之后,脚本报错

手动将config.json改为以下内容后,脚本报错

config.json
"streamSettings": { "network": "ws", "wsSettings": { "path": "/ray" } }

上述改动删除了默认的host部分,以对应ws+tls+nginx的传输方式(tls由nginx而非v2ray管理,客户端config.json中服务器名称填自己申请的域名,端口填443而非自定义的那个监听端口,并且开启tls,使用cloudflare cdn中转)

重启服务后,功能是没问题的,也实现了ws+tls+nginx的传输方式,就是每次运行v2ray管理脚本的时候按查看配置就会报错并且无法输出vmess链接:

Traceback (most recent call last):
File "/usr/local/multi-v2ray/server_info.py", line 3, in
import read_json
File "/usr/local/multi-v2ray/read_json.py", line 133, in
config = json.load(json_file)
File "/usr/lib/python3.4/json/init.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.4/json/init.py", line 318, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.4/json/decoder.py", line 343, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.4/json/decoder.py", line 359, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting property name enclosed in double quotes: line 72 column 1 (char 1255)

No package python34 available

No package python34 available.
Error: Nothing to do
-bash: python3: command not found
-bash: pip3: command not found

Centos7系统,安装出现上面错误,自己手动安装了python34,在更改配置的时候还是出现了错误;

socks5配置文件导出出错

Traceback (most recent call last):
File "/usr/local/v2ray.fun/base_util/gen_client.py", line 53, in
client_config[u"outbound"][u"settings"][u"vnext"][0][u"users"][0][u"alterId"]=mul_user_conf[user_index]['aid']
KeyError: 'aid'

流量统计报错

查看流量统计时,同一端口下第十个用户开始会报错,显示输入有误。

请输入所需要查看流量的组别(字母)或者序号(数字) 10
输入有误!

error

每天北京时间早上3点自动升级重启v2ray核心,是指vps重启吗?

传输方式从ws转到mkcp时失败

Traceback (most recent call last):
File "/usr/local/v2ray.fun/config_modify/stream.py", line 48, in
v2ray_util.choice_stream(new_stream_network, index_dict)
File "/usr/local/v2ray.fun/base_util/v2ray_util.py", line 23, in choice_stream
write_json.write_stream_network("mkcp","none", index_dict)
File "/usr/local/v2ray.fun/write_json.py", line 120, in write_stream_network
with open('json_template/kcp.json', 'r') as stream_file:
FileNotFoundError: [Errno 2] No such file or directory: 'json_template/kcp.json'
Redirecting to /bin/systemctl restart v2ray.service

查询流量统计时报错

Ext|Tools|Control: failed to call service StatsService.GetStats > rpc error: code = Unknown desc = App|Stats|Command: user>>>邮箱>>>traffic>>>downlink not found.

用户转移

大佬,如果要把所有用户和用户配置转移到另一个服务器里,如何操作呢

Centos 7.3 没有read_json

[root@mail tools]# v2ray 


欢迎使用 V2ray.fun 管理程序

1.服务管理               2.用户管理

3.更改配置               4.查看配置

5.其他设置               6.更新V2Ray

7.生成客户端配置文件

请输入数字选择功能(按回车键退出): 7

Traceback (most recent call last):
  File "/usr/local/v2ray.fun/base_util/gen_client.py", line 5, in <module>
    import read_json
ImportError: No module named 'read_json'
保存成功!(/root/config.json)



欢迎使用 V2ray.fun 管理程序

1.服务管理               2.用户管理

3.更改配置               4.查看配置

5.其他设置               6.更新V2Ray

7.生成客户端配置文件

请输入数字选择功能(按回车键退出): 

centos7.5安装成功,运行出错,service文件丢失

主机商:hiformance
系统:CentOS Linux release 7.5.1804 (Core)
内存:512M

[root@~]# v2ray start
Redirecting to /bin/systemctl start v2ray.service
Failed to start v2ray.service: Unit not found.
v2ray启动成功!
[root@~]#
[root@~]# v2ray status
Redirecting to /bin/systemctl status v2ray.service
Unit v2ray.service could not be found.
[root@~]#
[root@~]# ps aux | grep v2ray
root      1500  0.0  0.4 112716  2224 pts/0    S+   20:35   0:00 grep --color=auto v2ray

在hostdare的主机上是可以正常运行的,请作者帮看下这个问题,谢谢。

修改传输模式时报错

大佬,修改MTProto和Shadowsocks 都会报错,小白一枚,谢谢指导

请输入要改传输方式的节点Group字母:c
当前组的传输方式为:kcp dtls

1.普通TCP
2.HTTP伪装
3.WebSocket流量
4.普通mKCP
5.mKCP + srtp
6.mKCP + utp
7.mKCP + wechat-video
8.mKCP + dtls
9.mKCP + wireguard
10.HTTP/2
11.Socks5
12.MTProto
13.Shadowsocks
12
传输模式修改成功!

欢迎使用 multi-v2ray 管理程序

1.服务管理 2.用户管理

3.更改配置 4.查看配置

5.其他功能 6.更新V2Ray

7.生成客户端配置文件

请输入数字选择功能(按回车键退出): 4

Traceback (most recent call last):
File "/usr/local/multi-v2ray/server_info.py", line 3, in
import read_json
File "/usr/local/multi-v2ray/read_json.py", line 165, in
read_sin_user(detour_list, multiUserConf, index_dict)
File "/usr/local/multi-v2ray/read_json.py", line 113, in read_sin_user
sinUserConf['tcpFastOpen']=conf_stream_tfo
UnboundLocalError: local variable 'conf_stream_tfo' referenced before assignment

gcp的centos7安装没办法进入管理界面

脚本跑完以后输入v2ray提示:-bash: v2ray: command not found,已经重装系统换过服务器还是这样,Debian下面正常,腾讯云centos下正常,服务器为gcp的centos7.5!自动生成的链接是可以使用的,只是不能多用户也不能修改它的协议端口之类的,求大佬解决一下,刚从Debian跑到centos,对centos不太熟悉!
image

无法打开管理脚本

CentOS7下当重新连接服务器后无法使用 输入 v2ray + 回车 直接打开脚本。

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.