Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kssytsrk/nx-freestance-handler
nx-freestance-handler, a redirector from the mainstream sites (Youtube, Twittter, Instagram, Reddit) to their privacy-supporting mirrors
https://github.com/kssytsrk/nx-freestance-handler
extension nyxt privacy
Last synced: 3 months ago
JSON representation
nx-freestance-handler, a redirector from the mainstream sites (Youtube, Twittter, Instagram, Reddit) to their privacy-supporting mirrors
- Host: GitHub
- URL: https://github.com/kssytsrk/nx-freestance-handler
- Owner: kssytsrk
- License: gpl-3.0
- Created: 2020-10-03T18:47:27.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-29T17:55:18.000Z (over 2 years ago)
- Last Synced: 2024-08-01T03:41:12.401Z (6 months ago)
- Topics: extension, nyxt, privacy
- Language: Common Lisp
- Homepage:
- Size: 47.9 KB
- Stars: 29
- Watchers: 5
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nx-freestance-handler
nx-freestance-handler is a redirector from mainstream websites to their privacy-supporting mirrors for the [Nyxt browser](https://github.com/atlas-engineer/nyxt). The code was inspired by [this issue](https://github.com/atlas-engineer/nyxt/issues/930).
It is currently able to redirect from Youtube to [Invidious](https://github.com/iv-org/invidious), from Reddit to [Teddit](https://codeberg.org/teddit/teddit), from Instagram to [Bibliogram](https://sr.ht/~cadence/bibliogram/), from Medium to [Scribe](https://git.sr.ht/~edwardloveall/scribe) and from Twitter to [Nitter](https://github.com/zedeus/nitter).
## Installation
Clone this repository to `~/common-lisp` with:
```bash
$ git clone https://github.com/kssytsrk/nx-freestance-handler
```## Usage
To turn the handler on, add something like this to your Nyxt `init.lisp` file:
```common-lisp
(defvar *my-request-resource-handlers* '())(load-after-system :nx-freestance-handler
(nyxt-init-file "freestance.lisp"))(define-configuration web-buffer
((request-resource-hook
(reduce #'hooks:add-hook
(mapcar #'make-handler-resource
*my-request-resource-handlers*)
:initial-value %slot-default%))))
```Then, create `freestance.lisp` file in `~/.config/nyxt` with these contents:
```common-lisp
;; to add all handlers/redirectors (youtube to invidious, reddit to teddit,
;; instagram to bibliogram, medium to scribe, twitter to nitter)
(setq *my-request-resource-handlers*
(nconc *my-request-resource-handlers*
nx-freestance-handler:*freestance-handlers*));; alternatively, you may add each separately
;; (push #'nx-freestance-handler:invidious-handler *my-request-resource-handlers*)
;; (push #'nx-freestance-handler:nitter-handler *my-request-resource-handlers*)
;; (push #'nx-freestance-handler:bibliogram-handler *my-request-resource-handlers*)
;; (push #'nx-freestance-handler:teddit-handler *my-request-resource-handlers*)
;; (push #'nx-freestance-handler:scribe-handler *my-request-resource-handlers*);; to set your preferred instance, either invoke SET-PREFERRED-[name of website]-INSTANCE
;; command in Nyxt (the effect lasts until you close Nyxt), or write something like this:
;; (setf nx-freestance-handler:*preferred-invidious-instance* "https://invidious.snopyta.org")
```By default, for Invidious this handler redirects to the healthiest (i.e, with best uptime) instance available. For Teddit it redirects to the official teddit.net instance, for Scribe - to scribe.rip, for Nitter - to nitter.net and for Bibliogram - to bibliogram.art.
FYI, right now direct links to posts on Instagram are not redirected, as Bibliogram [doesn't seem to support](https://todo.sr.ht/~cadence/bibliogram-issues/26) them (yet?).
## Notes
All ideas, suggestions and bugreports are welcome in the "issues" section. Don't hesitate to open an issue if something's not working.