最有效Heroku Yes

实战

注册

Heroku | Sign up

1
The domain qq.com has been blocked.

qq邮箱不行,用yandex邮箱

Registration (yandex.com)

Fork

bclswl0827/v2ray-heroku: 用于在 Heroku 上部署 V2Ray WebSocket。 (github.com)

image-20211101030612448

部署

1
https://dashboard.heroku.com/new?template=https://github.com/w6l/daydayup

Deploy

成功

打开

1
https://yourapp.herokuapp.com/

返回

1
Bad Request

套cloudflare

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

Cloudflare - Web Performance & Security

创建Worker

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)
)
}
)

反代成功

进阶

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

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

CloudFlare Workers单账户反代代码

1
2
3
4
5
6
7
8
9
10
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单双日轮换反代代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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每五天轮换一遍式反代代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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一周轮换反代代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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)
)
}
)

heroku还有这些有趣的项目

在线vscode:https://github.com/bpmct/deploy-code-server/blob/main/guides/heroku.md 试过
bitwarden: https://elements.heroku.com/buttons/mutouxia/bitwardenrs_heroku 试过
搭建自己的搜索引擎(基于Google): https://elements.heroku.com/buttons/benbusby/whoogle-search 试过
万能镜像站(可镜像几乎所有网站,部分网站支持登录): https://elements.heroku.com/buttons/binary-person/womginx 试过
wordpress博客: https://elements.heroku.com/buttons/philippheuer/wordpress-heroku 试过
onemanager: https://github.com/qkqpttgf/OneManager-php 试过
hostloc签到: https://github.com/laogui2008/heroku_hostloc_get_points2
Office 全局管理程序(PHP) : https://github.com/testnobody/office_admin_heroku
cloudreve : https://elements.heroku.com/buttons/useblue/cloudreve-heroku
mega网盘挂载: https://elements.heroku.com/buttons/developeranaz/mega.nz-rclone-index-heroku
我的世界服务器: https://elements.heroku.com/buttons/jkutner/heroku-buildpack-minecraft
rsshub: https://elements.heroku.com/buttons/diygod/rsshub
有图比-dl(下载ytb视频): https://elements.heroku.com/buttons/andrewstech/有图比-dl-api-server

1
2
3
4
5
6
7
8
干货插眼

hostloc签到Python脚本 之 Heroku 篇
https://github.com/laogui2008/heroku_hostloc_get_points2
Office 全局管理程序(PHP) Heroku 一键部署
https://github.com/testnobody/office_admin_heroku
用heroku搭建一个随机"色图"
https://dashboard.heroku.com/new ... 4740/randpic-heroku

参考文献

suikaremilia/Heroku-v2ray - Buttons - Heroku Elements