Add option to convert x.com links to xcancel.com links
Describe the problem you're trying to solve
There are many links to x.com posted to SN. Since I decided to move to NOSTR, and deleted the X app, when I tap a link to x.com in the SN PWA, I get this on mobile Safari:
One work-around is to replace x.com in the URI with xcancel.com. To take 1296130 as an example:
https://xcancel.com/AusBTCIndBody/status/1994885813705085375
From the XCancel About page:
XCancel is an instance of Nitter.
Nitter is a free and open source alternative Twitter front-end focused on privacy and performance. The source is available on GitHub at https://github.com/zedeus/nitter
- No JavaScript or ads
- All requests go through the backend, client never talks to Twitter
- Prevents Twitter from tracking your IP or JavaScript fingerprint
- Uses Twitter's unofficial API (no developer account required)
- Lightweight (for @nim_lang, 60KB vs 784KB from twitter.com)
- RSS feeds
- Themes
- Mobile support (responsive design)
- AGPLv3 licensed, no proprietary instances permitted
- Nitter's GitHub wiki contains instances and browser extensions maintained by the community.
Why use Nitter?
It's impossible to use Twitter without JavaScript enabled, and as of 2024 you need to sign up. For privacy-minded folks, preventing JavaScript analytics and IP-based tracking is important, but apart from using a VPN and uBlock/uMatrix, it's impossible. Despite being behind a VPN and using heavy-duty adblockers, you can get accurately tracked with your browser's fingerprint, no JavaScript required. This all became particularly important after Twitter removed the ability for users to control whether their data gets sent to advertisers.
Using an instance of Nitter (hosted on a VPS for example), you can browse Twitter without JavaScript while retaining your privacy. In addition to respecting your privacy, Nitter is on average around 15 times lighter than Twitter, and in most cases serves pages faster (eg. timelines load 2-4x faster).
So aside from the links not working without an X account in some instances, there are other good reasons to use Xcancel.com.
Describe the solution you'd like
I propose an option in Settings that allows users to auto-convert x.com links to xcancel.com ones. Maybe it could be called User Nitter for x.com links.
If enabled, x.com links in the user's feed would automatically be converted to xcancel.com ones.
Another idea would be to add it to the Post options, so that when the user enters an x.com URL, an option appears:
- [x] Convert x.com link to xcancel.com?
I'm also going to ask the Nitter project to get themselves an LNAddress, so users can easily Zap them some sats. If this idea gets implemented on SN, their traffic will go up, and generous SN users may help with their hosting costs.
Describe alternatives you've considered
No response
Additional context
No response
I used to run a bot that replies with xcancel links.
I have plans to run it again, but I am currently migrating my machines to NixOS.
If there's support for adding this feature, I'll work on it.
I propose an option in Settings that allows users to auto-convert x.com links to xcancel.com ones.
I'm a fan of introducing a [proxy] link next to the original link.
I'll prepare a PR just to see if it's something we actually want to have.
I tried bringing the bot back online, but it's blocked by https://github.com/stackernews/stacker.news/issues/2666.
Note that xcancel.com is not the official instance, nitter.net is, and it doesn't require a JavaScript-based anti-bot check.
I think it would be better to rotate on all the compatible nitter instances instead of sending the load to one instance: https://status.d420.de/.
xcancel works without JavaScript, you just have to pass a simple CAPTCHA if you are not running JavaScript.
I don’t think the traffic from SN is significant for the xcancel instance, and so far xcancel has been very reliable.
When this changes, I’ll consider doing something.
Thanks for your feedback.
You even haven't asked the owner of the instance if such thing is OK to implement? That's the first thing one should do when implementing a feature that uses the public service of another person.
Do you know if I asked the owner?
Update
Ok, I assume you do, since you're a moderator in the Nitter matrix channel.
However, I assumed you don't, because you first suggested to use even more instances without asking any of them for permission.
I also now see that zedeus is an admin in the Nitter matrix channel, and they also haven't mentioned asking for permission first.
I also don't see any Terms of Service on xcancel.com.
I have asked for permission now.
Again thanks for your feedback.
I also suggested to configure xcancel's lightning address (if/when they have one) as the lightning address of the bot:
Hello @chr15m, I saw you are running https://twiiit.com/, a redirecting proxy for nitter instances.
I think this is exactly what I should use for this nitter bot!
It replies to twitter links with a nitter link, but it currently always uses xcancel.com. If I replace xcancel.com with twiiit.com, your site will automatically select a random nitter instance.
Example: https://twiiit.com/murchandamus/status/1996343310894645754
Would that be okay with you?
As suggested above with xcancel.com, if/when you have a lightning address, I would then also use that for the bot so any sats it receives would go to you.
I will also donate to @zedeus and the owner of xcancel.com, since they have been doing a great job and I know how thankless FOSS work can be.
I'm mentioning this publicly to potentially inspire others to do so as well.
Redirecting proxy is the purpose of twiiit, so no problem there.
Cool, thanks! I'll update my bot to point to your site then.