Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使得该程序在V2ray 4.x版本可用 #1

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
c462f5c
尝试修复Bug,增加反代理功能
Apr 27, 2019
a613384
Fix Some Bugs
Apr 27, 2019
2b31015
Fix Some Bugs
Apr 27, 2019
0378cc4
Fix MANY Bugs
Apr 27, 2019
2525875
Fix
Apr 27, 2019
9580517
Fix Bugs(How Many Bugs!)
Apr 27, 2019
167e039
Final Fix(Almost)
Apr 27, 2019
dbc640a
Fix Bugs
Apr 27, 2019
92c1913
Apr 27, 2019
86eaf5b
Apr 27, 2019
7b40fb8
Apr 27, 2019
252f964
Apr 27, 2019
3a350f3
修复链接
unl89 Oct 2, 2019
c890e2c
Merge pull request #1 from unl89/patch-1
Oct 3, 2019
d76d87e
Create dockerimage.yml
Jan 17, 2020
0f90d7a
Update Dockerfile
Jan 17, 2020
a08e189
Merge branch 'master' of github.com:mnixry/v2ray-heroku-fix
Jan 17, 2020
e6753d7
Update Dockerfile
Jan 17, 2020
aeab978
Update Dockerfile
Jan 17, 2020
80ef00d
Update Dockerfile
Jan 17, 2020
efd9fea
Change how it works
Jan 18, 2020
2034fc5
Change workflow
Jan 18, 2020
c612912
Change workflow
Jan 18, 2020
5794181
Update workflow
Jan 18, 2020
4f97909
Update workflow
Jan 18, 2020
f71717b
Change workflow
Jan 18, 2020
8defc48
Update workflow
Jan 18, 2020
6ae35c6
Update workflow
Jan 19, 2020
9e9e68d
Update workflow
Jan 19, 2020
effcb8f
Separation Workflow Tasks
Jan 19, 2020
324fa3d
Repair workflow identification failure bug
Jan 19, 2020
1906a11
Change the way the workflow test
Jan 19, 2020
3a68f60
Repair apt-get permission issues
Jan 19, 2020
e26cb46
Fix permission issue
Jan 19, 2020
1704227
Modify the deployment of the main program
Jan 19, 2020
c638773
Repair test failure
Jan 19, 2020
0cbf3c4
Change the operating mode again
Jan 19, 2020
b67aef6
Modify operational failure
Jan 19, 2020
89464f1
Add environment variable
Jan 19, 2020
2fb7fc9
Update Dockerfile
Jan 19, 2020
36731ea
Fix Dockerfile issue
Jan 19, 2020
2856660
Trying to fix environment variable issue
Jan 19, 2020
eeb9938
Fix Permission issue
Jan 19, 2020
6d012ff
Revert the changes
Jan 19, 2020
59e6f11
Fix environment variable issue
Jan 19, 2020
02be003
Merge branch 'master' of github.com:mnixry/v2ray-heroku-fix
Jan 20, 2020
d2de3ed
Branch rollback
Jan 20, 2020
31af9bb
trying fix export issue
Jan 20, 2020
4e67778
Trying to fix environment variable issue
Jan 20, 2020
e682e6d
Add badge to README
Jan 20, 2020
183dc43
Update app.json
Jan 20, 2020
4afac27
Trying to fix running failed on heroku
Jan 20, 2020
0a553f3
fix workflow issue
Jan 20, 2020
eb3fb93
Heroku fix the problem on an infinite reboot
Jan 20, 2020
4ad987f
update run.sh
Jan 20, 2020
e1aaf4a
trying to fix deploy issue
Jan 20, 2020
faaa714
fix deploy issue
Jan 20, 2020
23e043d
fix name 'GetEnv' is not defined
Jan 20, 2020
db8e90d
Fix cannot unmarshal string into Go struct field VMessAccount.alterId…
Jan 20, 2020
b0771f7
Update README.md
May 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: V2ray Heroku Docker Image

on:
push:
schedule:
- cron: "0 0 * * 5"

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Build the Docker image
run: docker build . --file Dockerfile --tag v2heroku:$GITHUB_SHA

run:

needs: build
runs-on: ubuntu-latest

env:
AppName: test

steps:
- uses: actions/checkout@v1
- name: Prepare environment
run: |
sudo apt-get update -y
sudo apt-get install unzip python3 python3-pip -y
sudo pip3 install requests

- name: Run the program
run: |
cd ./worker
sudo -E python3 ./deploy.py
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM debian:sid
FROM python:3.7-stretch

RUN apt update -y \
&& apt upgrade -y \
&& apt install -y wget unzip qrencode
RUN apt-get update -y \
&& apt-get install -y unzip \
&& python3 -V \
&& pip3 install requests -U

ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD /entrypoint.sh
ADD worker /worker

CMD cd /worker \
&& python3 ./deploy.py \
&& bash ./run.sh
40 changes: 26 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
# 一键部署 v2ray 到 heroku
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
- - -
- - -
1.部署时配置 v2ray core 的版本、Vmess协议的UUID、AlterId、Path和连接缓存。
# <div align="center"> 一键部署 v2ray 到 Heroku </div>
**本程序[以GPL-3.0开源许可开源](https://github.com/mnixry/v2ray-heroku-fix/blob/master/LICENSE#L591),仅供学习交流参考使用,对于使用本程序造成的一切后果作者概不承担!**

2.如果输入AppName变量,则自动生成订阅地址和二维码,通过配置V2_QR_Path变量修改地址
二维码地址:https://test.herokuapp.com/1234/v2.png
订阅地址:https://test.herokuapp.com/1234 (test改成自己的app名称,如果更改了V2_QR_Path,同时也要将对应的1234改成修改后的)
![](https://github.com/mnixry/v2ray-heroku-fix/workflows/V2ray%20Heroku%20Docker%20Image/badge.svg)

3.服务端部署后,点 open app ,能正常显示网页,地址补上path后访问显示 Bad Request,表示部署成功。
---

4.更新 v2ray 版本,访问 https://dashboard.heroku.com/apps 选择部署好v2ray的app,如果VER变量为 latest。直接选择More --> Restart all dynos, 程序自动重启,可通过view Logs确认进度。(更新指定版本: Settings --> Reveal Config Varsapp -->VER,修改成需要的版本号,例如 3.21)
## 停止维护

# 参考
https://github.com/v2ray/v2ray-core
**由于Heroku的用户协议禁止作为代理使用,本项目停止更新**

https://github.com/wangyi2005/v2ray-heroku
**正在研究采用kubesail提供的服务实现类似功能**

https://github.com/1715173329/v2ray-heroku-undone

## 部署方法
1. 点击下方按钮跳转Heroku部署(需要注册账号)
- [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://dashboard.heroku.com/new?template=https://github.com/mnixry/v2ray-heroku-fix)

2. 跟着提示走吧(逃

3. 服务端部署后,点 `open app`,能正常显示反代理的网页,地址补上V2ray路径后访问显示`Bad Request`,表示部署成功。

4. 更新 v2ray 版本
- 访问 https://dashboard.heroku.com/apps 选择部署好v2ray的app
- 直接选择`More` --> `Restart all dynos`

## 参考链接:
> [V2ray-Core](https://github.com/v2ray/v2ray-core)

> [v2ray-heroku](https://github.com/wangyi2005/v2ray-heroku)

> [v2ray-heroku-undone](https://github.com/1715173329/v2ray-heroku-undone)
60 changes: 31 additions & 29 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
{
"name": "V2ray简易部署",
"name": "V2ray-Heroku部署",
"description": "Deploy V2ray to Heroku.",
"keywords": ["V2ray"],
"keywords": [
"V2ray"
],
"env": {
"AppName": {
"description": "请输入最上方填写的App Name,用于生成二维码和订阅链接,如果不想生成输入no",
"value": "no"
},
"VER": {
"description": "默认latest安装最新版本V2Ray (输入V2Ray 版本号 进行指定版本安装。例如:3.22)",
"value": "latest"
},
"description": "请输入最上方填写的App Name,用于订阅链接,必填!",
"value": ""
},
"Subscribe_Address": {
"description": "请输入查看订阅的地址,前面不用加`/`",
"value": "subscribe"
},
"UUID": {
"description": "Vmess协议默认UUID,请输入自己的UUID",
"value": "4890bd47-5180-4b1c-9a5d-3ef686543112"
},
"description": "请输入自己的UUID,如无程序会自动随机一份",
"value": "",
"required": false
},
"AlterID": {
"description": "AlterID大小,推荐10,数值越大内存占用越高",
"value": "10"
},
"description": "AlterID大小,推荐16,数值越大内存占用越高",
"value": "16",
"required": false
},
"V2_Path": {
"description": "Path路径,默认/FreeApp",
"value": "/FreeApp"
},
"V2_QR_Path": {
"description": "二维码和订阅地址路径,默认1234。如AppName变量为no,此变量没有作用",
"value": "1234"
},
"V2RAY_RAY_BUFFER_SIZE": {
"description": "每个连接的缓存大小,单位MB,默认10。如果感觉有断流现象,请考虑将缓存改成1",
"value": "10"
}
"description": "Path路径,默认留空则随机生成一份",
"value": "",
"required": false
},
"Anti_Proxy_Path": {
"description": "反代理的网站地址,默认为百度",
"value": "https://www.baidu.com",
"required": true
}
},
"website": "https://github.com/ki8852/v2ray-heroku-undone",
"repository": "https://github.com/ki8852/v2ray-heroku-undone",
"website": "https://github.com/mnixry/v2ray-heroku-fix",
"repository": "https://github.com/mnixry/v2ray-heroku-fix",
"stack": "container"
}
}
Binary file removed demo.tar.gz
Binary file not shown.
129 changes: 0 additions & 129 deletions entrypoint.sh

This file was deleted.

Loading