Skip to content

Jokuuy/heroku-v2ray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

v2ray-heroku

heroku上部署v2ray

  • 支持VMess和VLESS两种协议
  • 支持自定义websocket路径
  • 伪装首页(3D元素周期表)
  • HTML5测速
  • 使用v2ray最新版构建

请求/,返回3D元素周期表

image

请求/speedtest/,html5-speedtest测速页面

image

请求/test/,文件下载速度测试

image

请求/ray(可配置)v2ray websocket路径

环境变量说明

名称 说明
PROTOCOL vmess
vless(可选)
协议:nginx+vmess+ws+tls或是nginx+vless+ws+tls
UUID uuid在线生成器 用户主ID
WS_PATH 默认为/ray 路径,请勿使用/speedtest//test 等已经被占用的请求路径

进阶

heorku可以绑卡(应用一直在线,不扣费),绑定域名,套cf,uptimerobot 定时访问防止休眠(只监控CF Workers反代地址好了,不然几个账户一起监控没几天就把时间耗完了)

CloudFlare Workers反代代码(可分别用两个账号的应用程序名(PROTOCOLUUIDWS_PATH保持一致),单双号天分别执行,那一个月就有550+550小时)

CloudFlare Workers单账户反代代码
addEventListener(
    "fetch",event => {
        let url=new URL(event.request.url);
        url.hostname="appname.herokuapp.com";
        let request=new Request(url,event.request);
        event. respondWith(
            fetch(request)
        )
    }
)
CloudFlare Workers单双日轮换反代代码
const SingleDay = 'app0.herokuapp.com'
const DoubleDay = 'app1.herokuapp.com'
addEventListener(
    "fetch",event => {
    
        let nd = new Date();
        if (nd.getDate()%2) {
            host = SingleDay
        } else {
            host = DoubleDay
        }
        
        let url=new URL(event.request.url);
        url.hostname=host;
        let request=new Request(url,event.request);
        event. respondWith(
            fetch(request)
        )
    }
)
CloudFlare Workers每五天轮换一遍式反代代码
const Day0 = 'app0.herokuapp.com'
const Day1 = 'app1.herokuapp.com'
const Day2 = 'app2.herokuapp.com'
const Day3 = 'app3.herokuapp.com'
const Day4 = 'app4.herokuapp.com'
addEventListener(
    "fetch",event => {
    
        let nd = new Date();
        let day = nd.getDate() % 5;
        if (day === 0) {
            host = Day0
        } else if (day === 1) {
            host = Day1
        } else if (day === 2) {
            host = Day2
        } else if (day === 3){
            host = Day3
        } else if (day === 4){
            host = Day4
        } else {
            host = Day1
        }
        
        let url=new URL(event.request.url);
        url.hostname=host;
        let request=new Request(url,event.request);
        event. respondWith(
            fetch(request)
        )
    }
)
CloudFlare Workers一周轮换反代代码
const Day0 = 'app0.herokuapp.com'
const Day1 = 'app1.herokuapp.com'
const Day2 = 'app2.herokuapp.com'
const Day3 = 'app3.herokuapp.com'
const Day4 = 'app4.herokuapp.com'
const Day5 = 'app5.herokuapp.com'
const Day6 = 'app6.herokuapp.com'
addEventListener(
    "fetch",event => {
    
        let nd = new Date();
        let day = nd.getDay();
        if (day === 0) {
            host = Day0
        } else if (day === 1) {
            host = Day1
        } else if (day === 2) {
            host = Day2
        } else if (day === 3){
            host = Day3
        } else if (day === 4) {
            host = Day4
        } else if (day === 5) {
            host = Day5
        } else if (day === 6) {
            host = Day6
        } else {
            host = Day1
        }
        
        let url=new URL(event.request.url);
        url.hostname=host;
        let request=new Request(url,event.request);
        event. respondWith(
            fetch(request)
        )
    }
)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published