Code Monkey home page Code Monkey logo

Comments (19)

zizifn avatar zizifn commented on May 27, 2024 2

from edgetunnel.

zhaoguomanong avatar zhaoguomanong commented on May 27, 2024 1

我简单的实现了一下,说下我的思路: 1. cf workers改进 增加语句 if(new Date().getDate() > 15) { url.hostname="xx1.herokuapp.com"; } else { url.hostname="xx2.herokuapp.com"; } 2. 新增库和actions cron 库1: 每月1日部署和启动,每月15日停止 库2: 每月15日部署和启动,每月1日停止

其实根据日期在workers里面进行分流,上半月用domain1,下半个月用domain2 已经够用了。将两个domain对应的容器全部一直开启不用管他,超过半小时没访问自己就睡眠了。 在用domain1的时候没必要手动stop 另外一个。Heroku会自动帮你搞定。

from edgetunnel.

hzdlive avatar hzdlive commented on May 27, 2024 1

不好意思,我token复制时,把全部了的都复制进去了。后来仔细检查,只制复制token段就可以了。谢谢
可以删除我的发言。

from edgetunnel.

zizifn avatar zizifn commented on May 27, 2024

from edgetunnel.

honeyshine75 avatar honeyshine75 commented on May 27, 2024

github的action自带cron应该可以的,需要稍稍改造下,把现在的参数去掉,改成3个分开的action。其中stop和start需要设置cron规则。

from edgetunnel.

honeyshine75 avatar honeyshine75 commented on May 27, 2024

我简单的实现了一下,说下我的思路:
1. cf workers改进
增加语句
if(new Date().getDate() > 15) { url.hostname="xx1.herokuapp.com"; } else { url.hostname="xx2.herokuapp.com"; }
2. 新增库和actions cron
库1: 每月1日部署和启动,每月15日停止
库2: 每月15日部署和启动,每月1日停止

from edgetunnel.

zizifn avatar zizifn commented on May 27, 2024

我简单的实现了一下,说下我的思路: 1. cf workers改进 增加语句 if(new Date().getDate() > 15) { url.hostname="xx1.herokuapp.com"; } else { url.hostname="xx2.herokuapp.com"; } 2. 新增库和actions cron 库1: 每月1日部署和启动,每月15日停止 库2: 每月15日部署和启动,每月1日停止

其实根据日期在workers里面进行分流,上半月用domain1,下半个月用domain2 已经够用了。将两个domain对应的容器全部一直开启不用管他,超过半小时没访问自己就睡眠了。 在用domain1的时候没必要手动stop 另外一个。Heroku会自动帮你搞定。

自从我知道,app会自己休眠,我就没有一直没想好,怎么做这个功能。另外repo 已经支持,根据不同得github环境配置不同heroku 账户。

from edgetunnel.

honeyshine75 avatar honeyshine75 commented on May 27, 2024

我简单的实现了一下,说下我的思路: 1. cf workers改进 增加语句 if(new Date().getDate() > 15) { url.hostname="xx1.herokuapp.com"; } else { url.hostname="xx2.herokuapp.com"; } 2. 新增库和actions cron 库1: 每月1日部署和启动,每月15日停止 库2: 每月15日部署和启动,每月1日停止

其实根据日期在workers里面进行分流,上半月用domain1,下半个月用domain2 已经够用了。将两个domain对应的容器全部一直开启不用管他,超过半小时没访问自己就睡眠了。 在用domain1的时候没必要手动stop 另外一个。Heroku会自动帮你搞定。

这个特性有文档吗?如果这样的话只需要定期更新两个heroku就可以了

from edgetunnel.

zizifn avatar zizifn commented on May 27, 2024

我简单的实现了一下,说下我的思路: 1. cf workers改进 增加语句 if(new Date().getDate() > 15) { url.hostname="xx1.herokuapp.com"; } else { url.hostname="xx2.herokuapp.com"; } 2. 新增库和actions cron 库1: 每月1日部署和启动,每月15日停止 库2: 每月15日部署和启动,每月1日停止

其实根据日期在workers里面进行分流,上半月用domain1,下半个月用domain2 已经够用了。将两个domain对应的容器全部一直开启不用管他,超过半小时没访问自己就睡眠了。 在用domain1的时候没必要手动stop 另外一个。Heroku会自动帮你搞定。

这个特性有文档吗?如果这样的话只需要定期更新两个heroku就可以了

就在readme的开始部分。
image

from edgetunnel.

zhaoguomanong avatar zhaoguomanong commented on May 27, 2024

我简单的实现了一下,说下我的思路: 1. cf workers改进 增加语句 if(new Date().getDate() > 15) { url.hostname="xx1.herokuapp.com"; } else { url.hostname="xx2.herokuapp.com"; } 2. 新增库和actions cron 库1: 每月1日部署和启动,每月15日停止 库2: 每月15日部署和启动,每月1日停止

其实根据日期在workers里面进行分流,上半月用domain1,下半个月用domain2 已经够用了。将两个domain对应的容器全部一直开启不用管他,超过半小时没访问自己就睡眠了。 在用domain1的时候没必要手动stop 另外一个。Heroku会自动帮你搞定。

这个特性有文档吗?如果这样的话只需要定期更新两个heroku就可以了

我说的是app会自己睡眠,这个经过测试确实没访问半小时后自己就自动睡眠了。

from edgetunnel.

zizifn avatar zizifn commented on May 27, 2024

我简单的实现了一下,说下我的思路: 1. cf workers改进 增加语句 if(new Date().getDate() > 15) { url.hostname="xx1.herokuapp.com"; } else { url.hostname="xx2.herokuapp.com"; } 2. 新增库和actions cron 库1: 每月1日部署和启动,每月15日停止 库2: 每月15日部署和启动,每月1日停止

其实根据日期在workers里面进行分流,上半月用domain1,下半个月用domain2 已经够用了。将两个domain对应的容器全部一直开启不用管他,超过半小时没访问自己就睡眠了。 在用domain1的时候没必要手动stop 另外一个。Heroku会自动帮你搞定。

这个特性有文档吗?如果这样的话只需要定期更新两个heroku就可以了

我说的是app会自己睡眠,这个经过测试确实没访问半小时后自己就自动睡眠了。

https://devcenter.heroku.com/articles/free-dyno-hours#dyno-sleeping

from edgetunnel.

zizifn avatar zizifn commented on May 27, 2024

cloudflare tunnel 这一步我按教程走,但是Tunnels里status 一直显示inactive

麻烦您新开个issue,隐去信息,截个图?

from edgetunnel.

conancheng avatar conancheng commented on May 27, 2024

image
多账号一直出错。。。换了eu区也不行

from edgetunnel.

zizifn avatar zizifn commented on May 27, 2024

image 多账号一直出错。。。换了eu区也不行

看错误,你的 v2rayconan 环境,app 名字 应该和主环境一样了。。。或者是和其他人的名字一样了,请确保名字唯一性。。。

from edgetunnel.

conancheng avatar conancheng commented on May 27, 2024

环境名字和app名字都要跟原来的主环境不一样?

from edgetunnel.

zizifn avatar zizifn commented on May 27, 2024

环境名字和app名字都要跟原来的主环境不一样?

环境的意思,是你有多个heroku 账号,或者你想部署多个不同的heroku app。。。当然推荐不应该和主环境一致。。如果一样,就没有必要创建环境了。。你这个错误,大概率是 APP_NAME 和其他人的app名字重复。。APP_NAME必须不能和任何人的有重复。

from edgetunnel.

zizifn avatar zizifn commented on May 27, 2024

环境名字和app名字都要跟原来的主环境不一样?

环境的意思,是你有多个heroku 账号,或者你想部署多个不同的heroku app。。。当然推荐不应该和主环境一致。。如果一样,就没有必要创建环境了。。你这个错误,大概率是 APP_NAME 和其他人的app名字重复。。APP_NAME必须不能和任何人的有重复。

另外eu 是支持的,但是你必须先把自己的app 删除掉。。因为heroku 不支持app 直接切换区域。一个app 区域在创建时候就已经确定,后续deploy 改变不了。。

from edgetunnel.

conancheng avatar conancheng commented on May 27, 2024

环境名字和app名字都要跟原来的主环境不一样?

环境的意思,是你有多个heroku 账号,或者你想部署多个不同的heroku app。。。当然推荐不应该和主环境一致。。如果一样,就没有必要创建环境了。。你这个错误,大概率是 APP_NAME 和其他人的app名字重复。。APP_NAME必须不能和任何人的有重复。

嗯 改了后成功了。。。

from edgetunnel.

conancheng avatar conancheng commented on May 27, 2024

也是见鬼了。。。。部署成功后主的可以连的上 环境里的备用的死活连接不上
image
cloudflare里面我也单独设置了,出错的GET这个如下:
image
正常的这个GET如下:
image

难度US区环境里面不能用?需要部署到EU区才行?

from edgetunnel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.