Skip to content
/ v2ray-- Public
forked from zizifn/edgetunnel

利用github actions 实现v2ray-heroku的部署,停止,和启动

License

Notifications You must be signed in to change notification settings

tghewf/v2ray--

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

v2ray-heroku

首先查看别人的 youtube 教程,了解怎么配置 v2ray-heroku。如果你还想自动化你的 heroku,请查看下面的教程。

本项目是包含,

  • 一键部署 V2ray 到 heroku。
  • 利用 Github action 实现 重新部署/停止/启动。
  • 利用 cloudflare CDN 进行加速。
项目Dockerfile是基于V2fly 官方镜像制作。仅仅增加生产配置文件的脚本。后续,可以通过Actions 实现更新。

一键部署

Deploy

Github Actions 管理

请 Fork 本项目到自己的账户下。 Actions 需要以下 Secrets 才能正常工作,这些 Secrets 会被 workflow 中的 akhileshns/heroku-deploy 使用。

具体实现细节,请查看 workflow 配置文件.

Name Description
APP_NAME 就是你 heroku 项目的名字
EMAIL heroku 账户的 email
HEROKU_API_KEY heroku API key, 在 account 设置下可以找到
HEROKU_V2RAY_UUID V2rayUUID

Github Secrets

路径

项目Setting-->Secrets

Secrets

Heroku API key

路径

heroku Account settings-->API key

Secrets

Github Actions 界面

Actions

Actions

重新部署

点击 Run workflow, 输入 deploy。 然后就会重新 deploy。

deploy

停止

点击 Run workflow, 输入 stop。 然后就会 stop,不在计入小时数。 stop

启动

点击 Run workflow, 输入 start。 然后就会启动。

start

建立 cloudflare worker

可以参考 开头的视频。代码如下。

addEventListener("fetch", (event) => {
  let url = new URL(event.request.url);
  url.hostname = "你的heroku的hostname";
  let request = new Request(url, event.request);
  event.respondWith(fetch(request));
});

About

利用github actions 实现v2ray-heroku的部署,停止,和启动

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 92.2%
  • Dockerfile 7.8%