Live data from Hacker News

Ntfy.sh – Send push notifications to your phone via PUT/POST

ntfy.sh

271–280 of 306 posts

Re: Ntfy.sh – Send push notifications to your phone via PUT/POST

#271
post #17

When I was making my IoT washing machine sensor, I used Blynk.io to push notifications to my phone but of course that service became commercialised and is no longer free. I could not find any nice easy to use alternative except for Telegram which is what I use now. This service looks exactly like what I would need and I appreciate the promise to keep it open source.

Got any more information on what you're doing with your washing machine? I have this[1] running for the past four years with Telegram without a hitch but I'm curious on what you're doing!

[1]https://github.com/jebeaudet/time-to-fold-alerter

Re: Ntfy.sh – Send push notifications to your phone via PUT/POST

#274
How do the JSON[0] and raw text[1] streams work? Doesn't that require there to be a thread running on the server for every connected client?

How does that not become a slowloris attack? [2]

[0] https://ntfy.sh/docs/subscribe/api/#subscribe-as-json-stream

[1] https://ntfy.sh/docs/subscribe/api/#subscribe-as-raw-stream

[2] https://en.wikipedia.org/wiki/Slowloris_(computer_security)

Re: Ntfy.sh – Send push notifications to your phone via PUT/POST

#276

Earlier quoted context omitted.

You can enable content security policy then hash all the javascripts and assets so only prebuilt and hashed stuff is allowed to be loaded in the web browser. There is no way to easily check that some one you trust did the hashing, but it is doable with an extension in the web browser.

"Enable content security policy" is something done by the web server (via a header in the response), so that doesn't solve the problem. In theory yes, you could probably create an extension that leverages Content Security Policy as a means of enforcing binary transparency. But at that point you'd basically just be implementing a slightly worse version of web packaging via an extension.

For me CSP is enough because the apps I need to trust only have one hash. So I do it manually. I will try to switch over to SXG trusting a signer is easier than having a list of trusted hashes, do you know if there some way to require/verify it that is visible on mobile?

Web Packaging seems to be vaporware to some extent, and I need something that works now.

Re: Ntfy.sh – Send push notifications to your phone via PUT/POST

#277
post #246

This is really great! I have plenty of uses for this. Here's a quick fish function for being able to call this from a shell like `alt my message` function alt curl -d "\"$argv\"" ntfy.sh/ end

I would actually do it with an SMS like this. $ cat /bin/awkmail #!/bin/gawk -f BEGIN { smtp="/inet/tcp/0/smtp.yourISP.com/25"; ORS="\r\n"; r=ARGV[1]; s=ARGV[2]; sbj=ARGV[3]; # /bin/awkmail to from subj 0) print |& smtp print "." |& smtp; smtp |& getline j; print j print "quit" |& smtp; smtp |& getline j; print j close(smtp) } # /inet/protocol/local-port/remote-host/remote-port $ echo ricki dont lose that number | aw…

One issue with carrier email-to-sms gateways is that they truncate messages at a relatively short number of characters.

Twilio SMS API, on the other hand, does not have that limit and you can send long SMS messages with a single 'curl' command:

  /usr/local/bin/curl -s -X POST -d "Body=$msg" -d "From=$from" -d "To=$to" "https://api.twilio.com/2010-04-01/Accounts/$accountsid/Messages" -u "$accountsid:$authtoken"
That's simplified - I actually pipeline through 'tidy5' and 'source-highlight' to make the output pleasing:

  /usr/local/bin/curl -s -X POST -d "Body=$msg" -d "From=$from" -d "To=$to" "https://api.twilio.com/2010-04-01/Accounts/$accountsid/Messages" -u "$accountsid:$authtoken" | tidy5 -xml -iq | source-highlight -s xml -f esc | awk 'xor(/TwilioResponse/,/Message/,/To/,/From/,/Body/,/Status/,/ErrorCode/,/ErrorMessage/)' | grep -v "/2010-04-01/Accounts/"

Re: Ntfy.sh – Send push notifications to your phone via PUT/POST

#278

Hey cool, this is my project. Happy to answer questions. Edit: I am also looking for a new opportunity. If you need a good Staff/Principal Engineer, check out my resume here: https://heckel.io/resume.pdf

I absolutely love this, and my mind's already buzzing with a bunch of ways I can use it. I love the simplicity, the docs, the pleasant experience of understanding and getting it running. (In like 10 seconds!) No logins, no user permissions management, no API keys and complicated auth creds, just a topic/password. So cool. I think it's cool for every once and awhile to push back against the trends for complication/over-engineering even if just to remind us of how simple/straightforward software can really be.

You've made a beautiful piece of software for your own enjoyment and the benefit of others. It is just what it needs to be. Bravo. In a world where projects get massively complicated and pumped full of VC funding, may efforts like this live on.

Re: Ntfy.sh – Send push notifications to your phone via PUT/POST

#279

Earlier quoted context omitted.

That can't be right, some of us have worked for IBM and no longer have souls.

IBM and Oracle have a soul-sharing deal signed.

They went to court over it and depending on the number of CPUs you use you might be forced to have one or two kids to pay the extra souls.
Post reply on HN