51sec / CF-Herokus

2 stars 3 forks source link

How to use this? #1

Open askfriends opened 3 years ago

askfriends commented 3 years ago

Hello; seems like a really handy script, but i wonder how to use it?

For example i have two workers as worker1.domain.workers.dev worker2.domain.workers.dev so now where to put your script code? i dont have custom domain btw.

AmirulAndalib commented 3 years ago

Hello; seems like a really handy script, but i wonder how to use it?

For example i have two workers as worker1.domain.workers.dev worker2.domain.workers.dev so now where to put your script code? i dont have custom domain btw.

simply paste the code to cloudflare workers and edit line 2 and line 4 according to your heroku app link .

askfriends commented 3 years ago

Hello; seems like a really handy script, but i wonder how to use it? For example i have two workers as worker1.domain.workers.dev worker2.domain.workers.dev so now where to put your script code? i dont have custom domain btw.

simply paste the code to cloudflare workers and edit line 2 and line 4 according to your heroku app link .

You mean paste this code to both workers? And Thanks for the quick response.

AmirulAndalib commented 3 years ago

Hello; seems like a really handy script, but i wonder how to use it? For example i have two workers as worker1.domain.workers.dev worker2.domain.workers.dev so now where to put your script code? i dont have custom domain btw.

simply paste the code to cloudflare workers and edit line 2 and line 4 according to your heroku app link .

You mean paste this code to both workers? And Thanks for the quick response.

if you have two heroku apps then do it accordingly for two cf workers

51sec commented 3 years ago

Hi Katper,

You will just need to create one worker, and paste the code in.

I updated the description and includes some steps how to create worker.

https://github.com/51sec/CF-Herokus/

Check it again and see if it is much clearer now.

Regards,

Johnny http://blog.51sec.org YouTube https://www.youtube.com/c/Netsec?sub_confirmation=1 https://51sec.org

On Fri, 1 Oct 2021 at 08:52, Katper @.***> wrote:

Hello; seems like a really handy script, but i wonder how to use it? For example i have two workers as worker1.domain.workers.dev worker2.domain.workers.dev so now where to put your script code? i dont have custom domain btw.

simply paste the code to cloudflare workers and edit line 2 https://github.com/51sec/CF-Herokus/blob/main/cf-herokus.js#L2 and line 4 https://github.com/51sec/CF-Herokus/blob/main/cf-herokus.js#L2 according to your heroku app link .

You mean paste this code to both workers? And Thanks for the quick response.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/51sec/CF-Herokus/issues/1#issuecomment-932199626, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4C3K4NN4AEENIVNET6U33UEWVH5ANCNFSM5FESHLNA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

askfriends commented 3 years ago

Hi Katper, You will just need to create one worker, and paste the code in. I updated the description and includes some steps how to create worker. https://github.com/51sec/CF-Herokus/ Check it again and see if it is much clearer now. Regards, Johnny http://blog.51sec.org YouTube https://www.youtube.com/c/Netsec?sub_confirmation=1 https://51sec.org On Fri, 1 Oct 2021 at 08:52, Katper @.***> wrote: Hello; seems like a really handy script, but i wonder how to use it? For example i have two workers as worker1.domain.workers.dev worker2.domain.workers.dev so now where to put your script code? i dont have custom domain btw. simply paste the code to cloudflare workers and edit line 2 https://github.com/51sec/CF-Herokus/blob/main/cf-herokus.js#L2 and line 4 https://github.com/51sec/CF-Herokus/blob/main/cf-herokus.js#L2 according to your heroku app link . You mean paste this code to both workers? And Thanks for the quick response. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4C3K4NN4AEENIVNET6U33UEWVH5ANCNFSM5FESHLNA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Thank you so much once again and now it makes sense, earlier i was mixing heroku apps with cloudflare worker but that detailed guide cleared all the doubts.

Now i want to understand the concept behind it. After doing this, Lets say app1.herokuapp.com is slected for DAY1, so here my app2.herokuapp.com will spare 24 hours bcoz its not yet selected? IF yes than how it will happen because your code doesnt turn it off heroku resources, it just changes from app1 to app2 on alternative days. Sorry if it bother you too much to explain.

51sec commented 3 years ago

Heroku resource will be automatically turned it off after 30 minutes no activity (no hit).

AmirulAndalib commented 3 years ago

Heroku resource will be automatically turned it off after 30 minutes no activity (no hit).

no it wont There is a trick

askfriends commented 3 years ago

Heroku resource will be automatically turned it off after 30 minutes no activity (no hit).

Heroku resource will be automatically turned it off after 30 minutes no activity (no hit).

no it wont There is a trick

ohh alright..seems cool.

can we apply this code to tg bot as well? btw it remains on even if i dont use it, it just gets reset after 24 hours