-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
V2ray.Fun Maintainer
committed
Feb 12, 2019
0 parents
commit e67e237
Showing
38 changed files
with
14,731 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.swp | ||
*.pyc |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<h1 align="center">V2ray.fun</h1> | ||
|
||
[![Telegram Group][tgbadge]][tggroup] | ||
[![License][licensebadge]][licenselink] | ||
[![PRs Welcome][prbadge]][prlink] | ||
![Made With Love][lovebadge] | ||
|
||
> 术业有专攻,一部分人一辈子都不会搞懂这些网络,但是他们仍然有权利自由地访问互联网,懂技术的人不一定可以通过技术改变世界。 | ||
V2ray 控制脚本,向导式更改端口,加密方式,传输协议,享受 V2ray 的乐趣~ | ||
|
||
## 功能 | ||
|
||
- 一键 启动 / 停止 / 重启 V2ray 服务端 | ||
- 自动随机生成 UUID | ||
- 自助修改端口 | ||
- 快速查看服务器连接信息 | ||
- 一键下载客户端配置文件和二维码 | ||
- 自由更改传输配置: | ||
- 常规 TCP | ||
- HTTP 头部伪装 | ||
- WebSocket 流量 | ||
- 常规 mKCP 流量 | ||
- mKCP 伪装 FaceTime 通话流量 | ||
- mKCP 伪装 BT 下载流量 | ||
- mKCP 伪装 微信视频通话流量 | ||
|
||
**WebSocket 不包括 Nginx 分流,请自行安装 Nginx 来分流。** | ||
|
||
## 安装命令 | ||
|
||
```bash | ||
bash -c "$(curl -fsSL https://git.io/vpOeN)" | ||
``` | ||
|
||
## 升级命令 | ||
```bash | ||
bash -c "$(curl -fsSL https://git.io/vpOex)" | ||
``` | ||
|
||
## 卸载命令 | ||
```bash | ||
bash -c "$(curl -fsSL https://git.io/vpOep)" | ||
``` | ||
|
||
|
||
## 截图 | ||
|
||
![1](1.png) | ||
|
||
![2](2.png) | ||
|
||
![3](3.png) | ||
|
||
![4](4.png) | ||
|
||
## 系统要求 | ||
|
||
- Debian 7 | ||
- Debian 8 | ||
- Ubuntu 14 | ||
- Ubuntu 16 | ||
- CentOS 7 | ||
|
||
## 致谢 | ||
|
||
上游原作者[雨落无声](https://github.com/YLWS-4617) | ||
|
||
本 Fork 的作者与贡献者 | ||
|
||
每一位用户 | ||
|
||
[tgbadge]: https://img.shields.io/badge/Telegram-Group-3faee8.svg?style=for-the-badge&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTkuNzgsMTguNjVMMTAuMDYsMTQuNDJMMTcuNzQsNy41QzE4LjA4LDcuMTkgMTcuNjcsNy4wNCAxNy4yMiw3LjMxTDcuNzQsMTMuM0wzLjY0LDEyQzIuNzYsMTEuNzUgMi43NSwxMS4xNCAzLjg0LDEwLjdMMTkuODEsNC41NEMyMC41NCw0LjIxIDIxLjI0LDQuNzIgMjAuOTYsNS44NEwxOC4yNCwxOC42NUMxOC4wNSwxOS41NiAxNy41LDE5Ljc4IDE2Ljc0LDE5LjM2TDEyLjYsMTYuM0wxMC42MSwxOC4yM0MxMC4zOCwxOC40NiAxMC4xOSwxOC42NSA5Ljc4LDE4LjY1WiIgLz48L3N2Zz4= | ||
[tggroup]: https://t.me/vimchina | ||
[licensebadge]: https://img.shields.io/github/license/v2ray-fun/v2ray.fun.svg?style=for-the-badge&logo=gnu&logoColor=white | ||
[licenselink]: https://github.com/tracyone/v2ray.fun/blob/master/LICENSE | ||
[prlink]: https://github.com/v2ray-fun/v2ray.fun/pulls | ||
[prbadge]: https://img.shields.io/badge/PRs-Welcome-28a745.svg?style=for-the-badge&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTYsM0EzLDMgMCAwLDEgOSw2QzksNy4zMSA4LjE3LDguNDIgNyw4LjgzVjE1LjE3QzguMTcsMTUuNTggOSwxNi42OSA5LDE4QTMsMyAwIDAsMSA2LDIxQTMsMyAwIDAsMSAzLDE4QzMsMTYuNjkgMy44MywxNS41OCA1LDE1LjE3VjguODNDMy44Myw4LjQyIDMsNy4zMSAzLDZBMywzIDAgMCwxIDYsM002LDVBMSwxIDAgMCwwIDUsNkExLDEgMCAwLDAgNiw3QTEsMSA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gMjIsNS40MSAyMiw4LjVDMjIsMTIuMjcgMTguNiwxNS4zNiAxMy40NSwyMC4wM0wxMiwyMS4zNVoiIC8+PC9zdmc+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# Change alterID | ||
import readjson | ||
import writejson | ||
from utils import is_number | ||
|
||
print "当前AlterID为:{}".format(str(readjson.ConfAlterId)) | ||
alterID = raw_input("请输入新的alterID: ") | ||
|
||
if (is_number(alterID)): | ||
writejson.WriteAlterId(alterID) | ||
else: | ||
print("输入错误,请检查是否为数字") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import readjson | ||
import writejson | ||
|
||
rules = readjson.ConfRouting[u"settings"][u"rules"] | ||
|
||
if rules[1][u"outboundTag"] == "direct": | ||
if_open_ad_function = "广告拦截功能: 未开启" | ||
else: | ||
if_open_ad_function = "广告拦截功能: 开启" | ||
|
||
print("") | ||
print(if_open_ad_function) | ||
|
||
print("") | ||
print("1. 开启") | ||
print("2. 关闭") | ||
|
||
choice = raw_input("请选择: ") | ||
|
||
if choice == "1": | ||
writejson.WriteAD("on") | ||
elif choice == "2": | ||
writejson.WriteAD("off") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
import readjson | ||
import writejson | ||
from utils import is_number | ||
|
||
|
||
# 主要程序部分 | ||
print("当前主端口为:%s") % str(readjson.ConfPort) | ||
print("请输入新端口:") | ||
newport = raw_input() | ||
if (is_number(newport)): | ||
writejson.WritePort(newport) | ||
else: | ||
print("输入错误,请检查是否为数字") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
import readjson | ||
import writejson | ||
from utils import is_number | ||
|
||
# 主要程序部分 | ||
print("当前加密方式为:%s") % str(readjson.ConfSecurity) | ||
print("请选择新的加密方式:") | ||
print("1.aes-128-cfb") | ||
print("2.aes-128-gcm") | ||
print("3.chacha20-poly1305") | ||
print("4.auto") | ||
print("5.none") | ||
newsecurity = raw_input() | ||
|
||
if (not is_number(newsecurity)): | ||
print("输入错误,请检查输入是否为数字") | ||
exit | ||
else: | ||
if (newsecurity == "1"): | ||
writejson.WriteSecurity("aes-128-cfb") | ||
elif(newsecurity == "2"): | ||
writejson.WriteSecurity("aes-128-gcm") | ||
elif(newsecurity == "3"): | ||
writejson.WriteSecurity("chacha20-poly1305") | ||
elif(newsecurity == "4"): | ||
writejson.WriteSecurity("auto") | ||
elif(newsecutity == "5"): | ||
writejson.WriteSecurity("none") | ||
else: | ||
print("请输入1-5之间的数字!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
import readjson | ||
import writejson | ||
from utils import is_number | ||
|
||
# 读取配置文件信息 | ||
mystreamnetwork = str(readjson.ConfStreamNetwork) | ||
if readjson.ConfStreamNetwork == "kcp": | ||
if(readjson.ConfStreamHeader == "kcp srtp"): | ||
mystreamnetwork = "mKCP 伪装 FaceTime通话" | ||
elif(readjson.ConfStreamHeader == "kcp utp"): | ||
mystreamnetwork = "mKCP 伪装 BT下载流量" | ||
elif(readjson.ConfStreamHeader == "kcp wechat-video"): | ||
mystreamnetwork = "mKCP 伪装 微信视频流量" | ||
else: | ||
mystreamnetwork = "mKCP" | ||
elif readjson.ConfStreamNetwork == "http": | ||
mystreamnetwork = "HTTP伪装" | ||
elif readjson.ConfStreamNetwork == "ws": | ||
mystreamnetwork = "WebSocket" | ||
|
||
# 显示当前配置 | ||
print("当前传输方式为:%s") % mystreamnetwork | ||
|
||
# 选择新的传输方式 | ||
print("请选择新的传输方式:") | ||
print("1.普通TCP") | ||
print("2.HTTP伪装") | ||
print("3.WebSocket流量") | ||
print("4.普通mKCP") | ||
print("5.mKCP 伪装 FaceTime通话") | ||
print("6.mKCP 伪装 BT下载流量") | ||
print("7.mKCP 伪装 微信视频流量") | ||
|
||
newstreamnetwork = raw_input() | ||
|
||
if (not is_number(newstreamnetwork)): | ||
print("请输入数字!") | ||
exit | ||
else: | ||
if not (newstreamnetwork > 0 and newstreamnetwork < 8): | ||
|
||
if(newstreamnetwork == "1"): | ||
writejson.WriteStreamNetwork("tcp", "none") | ||
elif(newstreamnetwork == "2"): | ||
print("请输入你想要为伪装的域名(不不不需要http):") | ||
host = raw_input() | ||
writejson.WriteStreamNetwork("tcp", str(host)) | ||
elif(newstreamnetwork == "3"): | ||
print("请输入你的服务器绑定域名(不不不需要http):") | ||
host = raw_input() | ||
writejson.WriteStreamNetwork("ws", str(host)) | ||
elif(newstreamnetwork == "4"): | ||
writejson.WriteStreamNetwork("mkcp", "none") | ||
elif(newstreamnetwork == "5"): | ||
writejson.WriteStreamNetwork("mkcp", "kcp srtp") | ||
elif(newstreamnetwork == "6"): | ||
writejson.WriteStreamNetwork("mkcp", "kcp utp") | ||
elif(newstreamnetwork == "7"): | ||
writejson.WriteStreamNetwork("mkcp", "kcp wechat-video") | ||
else: | ||
print("请输入有效数字!") | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
import readjson | ||
import getssl | ||
import writejson | ||
import urllib2 | ||
|
||
|
||
def get_ip(): | ||
myip = urllib2.urlopen('https://api.ipify.org/').read() | ||
myip = myip.strip() | ||
return str(myip) | ||
|
||
|
||
def open_tls(): | ||
print("请将您的域名解析到本VPS的IP地址,否则程序会出错!!") | ||
print("本机器IP地址为:" + get_ip()) | ||
inputdomain = str(raw_input("请输入您绑定的域名:")) | ||
print("") | ||
print("正在获取SSL证书,请稍等。") | ||
getssl.getssl(inputdomain) | ||
writejson.WriteTLS("on", inputdomain) | ||
print("操作完成!") | ||
|
||
|
||
def close_tls(): | ||
writejson.WriteTLS("off", "") | ||
print("操作完成!") | ||
|
||
|
||
if (readjson.ConfStreamSecurity == "tls"): | ||
mystreamsecurity = "TLS:开启" | ||
else: | ||
mystreamsecurity = "TLS:关闭" | ||
|
||
print("当前状态:\n" + mystreamsecurity) | ||
print("") | ||
print("1.开启TLS") | ||
print("2.关闭TLS") | ||
|
||
choice = int(input("请输入数字选择功能:")) | ||
|
||
if choice == 1: | ||
open_tls() | ||
elif choice == 2: | ||
close_tls() | ||
else: | ||
print("输入错误,请重试!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
import uuid | ||
import readjson | ||
import writejson | ||
|
||
print("当前UUID为:%s") % str(readjson.ConfUUID) | ||
print("是否要随机生成一个新的UUID (Y/n):") | ||
genUUID = raw_input() | ||
|
||
if genUUID == "y" or genUUID == '': | ||
newuuid = uuid.uuid1() | ||
print "新的UUID为:{}".format(newuuid) | ||
writejson.WriteUUID(newuuid) | ||
elif genUUID == "n": | ||
print("已取消生成新的UUID,未执行任何操作") | ||
else: | ||
print("输入不正确,请输入 y 或 n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
import writejson | ||
import readjson | ||
import sys | ||
from utils import is_number | ||
|
||
|
||
# 主要程序部分 | ||
print("是否使能动态端口(y/n)") | ||
ans = raw_input() | ||
if ans == 'y' or ans == '': | ||
print("使能动态端口") | ||
writejson.EnDynPort(1) | ||
elif ans == 'n': | ||
print("禁止动态端口") | ||
writejson.EnDynPort(0) | ||
sys.exit() | ||
else: | ||
print("输入错误,输入y或者n") | ||
|
||
print("是否修改端口范围?(Y/n)") | ||
ans = raw_input() | ||
if ans == 'y' or ans == '': | ||
print("请输入最小端口号") | ||
min_port = int(raw_input()) | ||
if not is_number(min_port): | ||
print("请输入数字!") | ||
sys.exit() | ||
print("请输入最大端口") | ||
max_port = int(raw_input()) | ||
if not is_number(max_port): | ||
print("请输入数字!") | ||
sys.exit() | ||
writejson.UpdateDynPort(min_port, max_port) | ||
main_port = int(readjson.ConfPort) | ||
while main_port > max_port or main_port < min_port: | ||
print("当前主端口%d 不在这个%d-%d之内,请修改主端口" % (main_port, min_port, max_port)) | ||
print("请输入新端口:") | ||
newport = raw_input() | ||
if (is_number(newport)): | ||
writejson.WritePort(newport) | ||
main_port = int(newport) | ||
else: | ||
print("输入错误,请检查是否为数字") | ||
|
||
elif ans == 'n': | ||
print("终止修改") | ||
else: | ||
print("输入错误,输入y或者n") |
Oops, something went wrong.