Git Product home page Git Product logo

v2ray_client's Introduction

v2ray_client

简介

一个基于Web的v2ray客户端控制面板

1 2 3 4

这个项目借鉴了很多人的**,有雨落无声大佬的v2ray.fun作为基础,还有github上很多开源项目的帮助,第一次做web项目,耗费时间一星期左右吧,基础功能试用成了,具体bug不清楚,待测试

使用方法

  • 注意:root权限下运行,不然无法修改v2ray配置
  • 注意:root权限下运行,不然无法修改v2ray配置
  • 注意:root权限下运行,不然无法修改v2ray配置

要求:python3环境,linux

切记切记:先修改config.py里的配置项,用户名和密码一定要改

  1. 运行 sudo ./install.sh
  2. 按照脚本操作后,将会部署到后台
  3. 部署完成后访问http://127.0.0.1:8000

开机自启自行部署:https://github.com/Supervisor/initscripts

启动停止方法

  1. 启动: supervisorctl start v2rayClient
  2. 停止: supervisorctl stop v2rayClient

配置方法

具体写入的日志和配置文件在config.py里自行修改

免责声明

本项目只是在闲暇之际对flask框架进行的学习,只为个人linux使用,其余事项与本人概无关系! 本项目只是在闲暇之际对flask框架进行的学习,只为个人linux使用,其余事项与本人概无关系! 本项目只是在闲暇之际对flask框架进行的学习,只为个人linux使用,其余事项与本人概无关系!

install_test.sh 是热心网友提供的一键安装脚本,会自动安装环境,下面两个安装脚本都一样的,下载方式不同而已,也可以进行测试安装.

wget -c https://github.com/NoOne-hub/v2ray_client/archive/master.tar.gz && tar xzf master.tar.gz && cd v2ray_client-master && ./install_test.sh
git clone https://github.com/NoOne-hub/v2ray_client.git && cd /v2ray_client && ./install_test.sh

启动停止方法

  1. 启动: supervisorctl -c /etc/supervisor/supervisord.conf start v2rayClient
  2. 停止: supervisorctl -c /etc/supervisor/supervisord.conf stop v2rayClient

v2ray_client's People

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

v2ray_client's Issues

ubuntu18.04 执行 install.sh 问题

我每次运行sudo ./install.sh 发现都会在脚本的71行左右停住,提示内容大概如下

Requirement already satisfied: meld3==2.0.0 in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 12))
Requirement already satisfied: python-dateutil==2.8.0 in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 13))
Requirement already satisfied: python-dotenv==0.10.3 in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 14))
Requirement already satisfied: python-editor==1.0.4 in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 15))
Requirement already satisfied: six==1.12.0 in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 16))
Requirement already satisfied: SQLAlchemy==1.3.8 in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 17))
Requirement already satisfied: Werkzeug==0.15.5 in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 18))
Requirement already satisfied: supervisor==4.0.4 in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 19))
kill: (10916): No such process

后续内容我注释掉kill那一行,再执行,就是以下提示,根据提示按了ctrl+d后,也没执行到最后install.sh脚本的打印信息。

Unlinking stale socket /tmp/supervisor.sock
接下来ctrl+d 退出
v2rayClient STARTING
supervisor>

shell问题

你应该是用win编写的脚本文件,没有改成unix格式,在centos上会报错误:
-bash: ./install.sh: /bin/bash^M: bad interpreter: No such file or directory
需要改一哈

ubuntu18.04 使用错误

建议教程写得更简洁点,比如写了两种不同的启动方式,能否详细说明两种的区别,不然用户不知道到底用哪种启动,有何区别。最好只留下最便捷的步骤 1234

我在ubuntu18.04 环境下使用,有2个问题:

  1. 按钮显示都是英文字母而不是图标
  2. 订阅添加服务器之后,打开连接,红色状态变绿色,此时访问youtube.com无法访问。

ubuntu16.04

Error: File contains parsing errors: /etc/supervisor/conf.d/v2rayClient.conf
[line 2]: ' command=gunicorn -b localhost:8000 -w 4 v2rayClient:app\n'
[line 3]: ' directory=/home/lumo/\xe6\xa1\x8c\xe9\x9d\xa2/v2ray_client-master\n'
[line 4]: ' user=root\n'
[line 5]: ' autostart=true\n'
[line 6]: ' autorestart=true\n'
[line 7]: ' stopasgroup=true\n'
[line 8]: ' killasgroup=true\n'
For help, use /usr/bin/supervisord -h
接下来输入update,然后ctrl+d 退出
supervisor> update
error: <class 'xmlrpclib.Fault'>, <Fault 92: "CANT_REREAD: File contains parsing errors: /etc/supervisor/conf.d/v2rayClient.conf\n\t[line 2]: ' command=gunicorn -b localhost:8000 -w 4 v2rayClient:app\n'\n\t[line 3]: ' directory=/home/lumo/\xe6\xa1\x8c\xe9\x9d\xa2/v2ray_client-master\n'\n\t[line 4]: ' user=root\n'\n\t[line 5]: ' autostart=true\n'\n\t[line 6]: ' autorestart=true\n'\n\t[line 7]: ' stopasgroup=true\n'\n\t[line 8]: ' killasgroup=true\n'">: file: /usr/lib/python2.7/xmlrpclib.py line: 800

您好,直接卡死了

请输入面板用户名(默认为NoOne-hub)

面板密码为(默认为1234567890):

Do you need to install v2rayCore?(Y/N)

./install.sh: 第 13 列: [: ==: 需要一元表示式
./install.sh: 第 13 列: [: ==: 需要一元表示式

Collecting alembic==1.1.0 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/9a/0f/a5e8997d58882da8ecd288360dddf133a83145de6480216774923b393422/alembic-1.1.0.tar.gz (1.0MB)
0% |▎ | 10kB 30kB/s eta 0:00:34^C
Operation cancelled by user

ubuntu18.04在依赖包安装完成后报错(急求帮助,万分感谢)

45到49行
function install_others() {
#安装依赖
install_v2ray
pip3 install -r requirements.txt
pip3 install gunicorn
之后

Error: File contains parsing errors: /etc/supervisor/conf.d/v2rayClient.conf
[line 2]: 'command=gunicorn -b localhost:8000 -w 4 v2rayClient:app\n'
... #此处还有5行提示
[line 8]: 'killasgroup=true\n'
#以上是路径 /etc/supervisor/conf.d 之中 v2rayClient.conf里的内容
For help, use /usr/bin/supervisord -h
接下来输入update,然后ctrl+d退出
unix:///var/run/supervisor.sock no such file #缺失文件??
然后可以输入 update 但接着报错:
error: <class 'socket.error'>, [Error 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 288
继续输入update依然如此
我就只能ctrl+d了,之后的步骤应该也没有完成。

image

在网上有找到类似相关问题:
https://blog.csdn.net/baidu_36639782/article/details/86304011
不知道有没有帮助。

现在可以提出点界面上的建议吗

两点使用上的改进:

网页中的on和off差别太小了,订阅规模大起来以后很难在一长串列表中找出那个on。
可能的改进方案:

  1. 增加一些排序、筛选功能,把on放在前面
  2. 用颜色或者图标区分
  3. 最简单的方法是把on改成长长的一串:*********on*********

建议增加一个功能
启动一个线路时,关闭其他线路连接
可以是一个放在列表顶端的开关,或者每个线路的行多出一个按钮(选择此线路并断开其他的)

关于python3.8的支持

搜了下似乎3.8删了些函数.
我不太懂WEB开发.
我是ubuntu server .
默认apt update
python 就会被更新的.

ImportError: cannot import name 'escape' from 'cgi' (/usr/lib/python3.8/cgi.py)

ubuntu 16.04 install error

Exception:
Traceback (most recent call last):                                                                                                                                                           
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 377, in _make_request                                                                  
    httplib_response = conn.getresponse(buffering=True)                                                                                                                                      
TypeError: getresponse() got an unexpected keyword argument 'buffering'                                                                                                                      

During handling of the above exception, another exception occurred:                                                                                                                          

Traceback (most recent call last):                                                                                                                                                           
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 379, in _make_request                                                                  
    httplib_response = conn.getresponse()                                                                                                                                                    
  File "/usr/lib/python3.5/http/client.py", line 1213, in getresponse                                                                                                                        
    response.begin()                                                                                                                                                                         
  File "/usr/lib/python3.5/http/client.py", line 307, in begin                                                                                                                               
    version, status, reason = self._read_status()                                                                                                                                            
  File "/usr/lib/python3.5/http/client.py", line 268, in _read_status                                                                                                                        
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")                                                                                                                                 
  File "/usr/lib/python3.5/socket.py", line 575, in readinto                                                                                                                                 
    return self._sock.recv_into(b)                                                                                                                                                           
  File "/usr/lib/python3.5/ssl.py", line 929, in recv_into                                                                                                                                   
    return self.read(nbytes, buffer)                                                                                                                                                         
  File "/usr/lib/python3.5/ssl.py", line 791, in read                                                                                                                                        
    return self._sslobj.read(len, buffer)                                                                                                                                                    
  File "/usr/lib/python3.5/ssl.py", line 575, in read                                                                                                                                        
    v = self._sslobj.read(len, buffer)                                                                                                                                                       
socket.timeout: The read operation timed out                                                                                                                                                 

During handling of the above exception, another exception occurred:                                                                                                                          

Traceback (most recent call last):                                                                                                                                                           
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 560, in urlopen                                                                        
    body=body, headers=headers)                                                                                                                                                              
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 381, in _make_request                                                                  
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)                                                                                                                          
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 309, in _raise_timeout                                                                 
    raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)                                                                                                   
requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Read timed out. (read timeout=15)                                    

During handling of the above exception, another exception occurred:                                                                                                                          

Traceback (most recent call last):                                                                                                                                                           
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 209, in main                                                                                                                
    status = self.run(options, args)                                                                                                                                                         
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 317, in run                                                                                                            
    requirement_set.prepare_files(finder)                                                                                                                                                    
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 360, in prepare_files                                                                                                       
    ignore_dependencies=self.ignore_dependencies))                                                                                                                                           
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 577, in _prepare_file                                                                                                       
    session=self.session, hashes=hashes)                                                                                                                                                     
  File "/usr/lib/python3/dist-packages/pip/download.py", line 810, in unpack_url                                                                                                             
    hashes=hashes                                                                                                                                                                            
  File "/usr/lib/python3/dist-packages/pip/download.py", line 649, in unpack_http_url                                                                                                        
    hashes)                                                                                                                                                                                  
  File "/usr/lib/python3/dist-packages/pip/download.py", line 842, in _download_http_url                                                                                                     
    stream=True,                                                                                                                                                                             
  File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 480, in get                                                                                 
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3/dist-packages/pip/download.py", line 378, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py", line 46, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/adapters.py", line 376, in send
    timeout=timeout
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 610, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 228, in increment
    total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

安装完成后,会报python不匹配错误

这里的原因应该是系统使用了py2,而你的事py3的原因,所以可不可以改变一下其中的配置,让其自动适应py3,这样的话在安装完成之后直接匹配py3,而不是py2,我用的系统是centos7

Uploading TIM图片20190920110246.png…

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.