plutov / ultrafocus

CLI tool to block distracting websites and boost productivity.
MIT License
123 stars 7 forks source link

Redirect to a Focus Page #7

Closed newtoallofthis123 closed 2 months ago

newtoallofthis123 commented 2 months ago

Since ultrafocus blocks websites by binding them to 127.0.0.1 / loop back address, it would be interesting if it can run a small webserver on a go routine or some mechanism such as spawning to redirect blocked websites to a simple focus page

plutov commented 2 months ago

Good idea! I was thinking the same. Either to have a nice page on 127.0.0.1 or redirect to some public IP address with a nice focus message.

newtoallofthis123 commented 2 months ago

Yeah! That would be quite cool! Will be looking into it

plutov commented 2 months ago

I added running a server ins the background which returns a random motivational message. One TODO: serve TLS on :443

plutov commented 2 months ago

Done!