README updates #9

Merged
Ayaka merged 5 commits from README-update into main 2024-06-28 00:34:03 +12:00

123
README.md
View File

@ -1,37 +1,45 @@
<img align="left" width="128" height="128" src="https://git.stardust.wtf/attachments/842086e3-b718-4379-b718-c3a542842152" alt="logo"> <img align="left" width="128" height="128" src="https://git.stardust.wtf/attachments/842086e3-b718-4379-b718-c3a542842152" alt="logo">
# Redsunlib # Redsunlib
> An alternative private front-end to Reddit, a fork of [Redlib](https://github.com/redlib-org/redlib) with some function and cosmetic changes. > An alternative private front-end to Reddit, a fork of [Redlib](https://github.com/redlib-org/redlib) with some <sup><sub>(minor)</sub></sup> function and cosmetic changes.
<br> <br>
![screenshot](https://git.stardust.wtf/attachments/7667e4e2-a32c-4269-9b5f-1d29cb3baf20) ![screenshot](https://git.stardust.wtf/attachments/7667e4e2-a32c-4269-9b5f-1d29cb3baf20)
## Table of Contents ### Disclaimer
1. [Redlib](#redlib) There are rapid changes/features in this fork that can<sup>(will)</sup> change without notice. If you want to host this version, be aware that it's likely to break at some point. I still wouldn't recommend it in a production environment unless you know what you're doing. Or like living on the edge.......
2. [Instances](#instances)
3. [About](#about) > I would also like to thank the maintainers and contributors of both [Redlib](https://github.com/redlib-org/redlib) and [Libreddit](https://github.com/libreddit/libreddit) for all the work they did while I just added some low quality tacky features. ❤️
---
## Table of Contents
1. [Redsunlib](#redsunlib)
- [Disclaimer](#disclaimer)
2. [Table of Contents](#table-of-contents)
3. [Instances](#instances)
4. [About](#about)
- [The Name](#the-name)
- [Built with](#built-with) - [Built with](#built-with)
- [How is it different from other Reddit front ends?](#how-is-it-different-from-other-reddit-front-ends) - [How is it different from other Reddit front ends?](#how-is-it-different-from-other-reddit-front-ends)
- [Teddit](#teddit) - [Teddit](#teddit)
- [Libreddit](#libreddit) - [Libreddit](#libreddit)
4. [Comparison](#comparison) 5. [Comparison](#comparison)
- [Speed](#speed) - [Speed](#speed)
- [Privacy](#privacy) - [Privacy](#privacy)
- [Reddit](#reddit) - [Reddit](#reddit)
- [Redlib](#redlib-1) - [Redlib](#redlib-1)
- [Server](#server) - [Server](#server)
5. [Deployment](#deployment) 6. [Deployment](#deployment)
- [Docker](#docker) - [Docker](#docker)
- [Docker Compose](#docker-compose) - [Docker Compose](#docker-compose)
- [Docker CLI](#docker-cli) - [Docker CLI](#docker-cli)
- [Binary](#binary) - [Binary](#binary)
- [Running as a systemd service](#running-as-a-systemd-service) - [Running as a systemd service](#running-as-a-systemd-service)
- [Building from source](#building-from-source) - [Building from source](#building-from-source)
- [Replit/Heroku/Glitch](#replit-heroku-glitch) 7. [Configuration](#configuration)
- [launchd (macOS)](#launchd-macos)
6. [Configuration](#configuration)
- [Instance settings](#instance-settings) - [Instance settings](#instance-settings)
- [Default user settings](#default-user-settings) - [Default user settings](#default-user-settings)
@ -39,14 +47,10 @@
# Instances # Instances
> [!TIP] > [!WARNING]
> 🔗 **Want to automatically redirect Reddit links to Redlib? Use [LibRedirect](https://github.com/libredirect/libredirect) or [Privacy Redirect](https://github.com/SimonBrazell/privacy-redirect)!** > 🔗 **Currently public Redsunlib instance are not available, consider using a [redlib](https://github.com/redlib-org/redlib-instances/blob/main/instances.md) instance if you are not comfortable running your own**
Outdated
Review

lmao just looked up the "guh" guy. turns out he is grade A redditor ohmygawd the Reddit brain is terminal. welp

image

reddit.

lmao just looked up the "guh" guy. turns out he is grade A redditor ohmygawd the Reddit brain is terminal. welp ![image](/attachments/c52d990e-00c5-4d5e-93ff-94d56e1e83d8) reddit.
An up-to-date table of instances is available in [Markdown](https://github.com/redlib-org/redlib-instances/blob/main/instances.md) and [machine-readable JSON](https://github.com/redlib-org/redlib-instances/blob/main/instances.json). You are more than welcome to host an instance and submit an issue if you want it added. That is, if you've read the [Disclaimer](#disclaimer) and it's within your "personal risk tolerance." ;)
Both files are part of the [redlib-instances](https://github.com/redlib-org/redlib-instances) repository. To contribute your [self-hosted instance](#deployment) to the list, see the [redlib-instances README](https://github.com/redlib-org/redlib-instances/blob/main/README.md).
For information on instance uptime, see the [Uptime Robot status page](https://stats.uptimerobot.com/mpmqAs1G2Q).
--- ---
@ -56,6 +60,13 @@ Redlib hopes to provide an easier way to browse Reddit, without the ads, tracker
Redlib currently implements most of Reddit's (signed-out) functionalities but still lacks [a few features](https://github.com/redlib-org/redlib/issues). Redlib currently implements most of Reddit's (signed-out) functionalities but still lacks [a few features](https://github.com/redlib-org/redlib/issues).
## The Name
**Red sun** in the sky + Red**lib** = Redsunlib
And at the time, I was reading an excerpt from Mao Zedong, so the name seemed appropriate. But paradoxically named since Reddit is basically the sinophobia capital of the internet :/
## Built with ## Built with
- [Rust](https://www.rust-lang.org/) - Programming language - [Rust](https://www.rust-lang.org/) - Programming language
@ -158,7 +169,7 @@ For configuration options, see the [Configuration section](#Configuration).
[Docker](https://www.docker.com) lets you run containerized applications. Containers are loosely isolated environments that are lightweight and contain everything needed to run the application, so there's no need to rely on what's installed on the host. [Docker](https://www.docker.com) lets you run containerized applications. Containers are loosely isolated environments that are lightweight and contain everything needed to run the application, so there's no need to rely on what's installed on the host.
Docker images for Redlib are available at [quay.io](https://quay.io/repository/redlib/redlib), with support for `amd64`, `arm64`, and `armv7` platforms. Docker images for Redsunlib are available at our [Gitea container registry](https://git.stardust.wtf/iridium/-/packages/container/redsunlib/latest), currently only with support for `amd64`, if you need `arm64`, or `armv7` platforms you can either build Redsunlib yourself or open an [issue](https://git.stardust.wtf/iridium/redsunlib/issues) :)
### Docker Compose ### Docker Compose
@ -184,15 +195,15 @@ docker logs -f redlib
Deploy Redlib: Deploy Redlib:
```bash ```bash
docker pull quay.io/redlib/redlib:latest docker pull git.stardust.wtf/iridium/redsunlib:latest
docker run -d --name redlib -p 8080:8080 quay.io/redlib/redlib:latest docker run -d --name redlib -p 8080:8080 git.stardust.wtf/iridium/redsunlib:latest
``` ```
Deploy using a different port on the host (in this case, port 80): Deploy using a different port on the host (in this case, port 80):
```bash ```bash
docker pull quay.io/redlib/redlib:latest docker pull git.stardust.wtf/iridium/redsunlib:latest
docker run -d --name redlib -p 80:8080 quay.io/redlib/redlib:latest docker run -d --name redlib -p 80:8080 git.stardust.wtf/iridium/redsunlib:latest
``` ```
If you're using a reverse proxy in front of Redlib, prefix the port numbers with `127.0.0.1` so that Redlib only listens on the host port **locally**. For example, if the host port for Redlib is `8080`, specify `127.0.0.1:8080:8080`. If you're using a reverse proxy in front of Redlib, prefix the port numbers with `127.0.0.1` so that Redlib only listens on the host port **locally**. For example, if the host port for Redlib is `8080`, specify `127.0.0.1:8080:8080`.
@ -205,19 +216,7 @@ docker logs -f redlib
## Binary ## Binary
If you're on Linux, you can grab a binary from [the newest release](https://github.com/redlib-org/redlib/releases/latest) from GitHub. Currently binaries are not supplied at this moment but will be at some point in the future but can be [built from source](#building-from-source)
Download the binary using [Wget](https://www.gnu.org/software/wget/):
```bash
wget https://github.com/redlib-org/redlib/releases/download/v0.31.0/redlib
```
Make the binary executable and change its ownership to `root`:
```bash
sudo chmod +x redlib && sudo chown root:root redlib
```
Copy the binary to `/usr/bin`: Copy the binary to `/usr/bin`:
@ -261,59 +260,13 @@ Before=nginx.service
## Building from source ## Building from source
To deploy Redlib with changes not yet included in the latest release, you can build the application from source. To deploy Redsunlib with changes not yet included in the latest release, you can build the application from source.
```bash ```bash
git clone https://github.com/redlib-org/redlib && cd redlib git clone https://git.stardust.wtf/iridium/redsunlib && cd redsunlib
cargo run cargo run
``` ```
## Replit/Heroku
> [!WARNING]
> These are free hosting options, but they are _not_ private and will monitor server usage to prevent abuse. If you need a free and easy setup, this method may work best for you.
<a href="https://repl.it/github/redlib-org/redlib"><img src="https://repl.it/badge/github/redlib-org/redlib" alt="Run on Repl.it" height="32" /></a>
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/redlib-org/redlib)
## launchd (macOS)
If you are on macOS, you can use the [launchd](https://en.wikipedia.org/wiki/Launchd) service available in `contrib/redlib.plist`.
Install it with `cp contrib/redlib.plist ~/Library/LaunchAgents/`.
Load and start it with `launchctl load ~/Library/LaunchAgents/redlib.plist`.
<!-- ## Cargo
Make sure Rust stable is installed along with `cargo`, Rust's package manager.
```bash
cargo install libreddit
``` -->
<!-- ## AUR
For ArchLinux users, Redlib is available from the AUR as [`libreddit-git`](https://aur.archlinux.org/packages/libreddit-git).
```bash
yay -S libreddit-git
```
## NetBSD/pkgsrc
For NetBSD users, Redlib is available from the official repositories.
```bash
pkgin install libreddit
```
Or, if you prefer to build from source
```bash
cd /usr/pkgsrc/libreddit
make install
``` -->
--- ---
# Configuration # Configuration
@ -343,7 +296,7 @@ REDLIB_DEFAULT_USE_HLS = "on"
> If using the Docker CLI, add ` --env-file .env` to the command that runs Redlib. For example: > If using the Docker CLI, add ` --env-file .env` to the command that runs Redlib. For example:
> >
> ```bash > ```bash
> docker run -d --name redlib -p 8080:8080 --env-file .env quay.io/redlib/redlib:latest > docker run -d --name redlib -p 8080:8080 --env-file .env git.stardust.wtf/iridium/redsunlib:latest
> ``` > ```
> >
> If using Docker Compose, no changes are needed as the `.env` file is already referenced in `compose.yaml` via the `env_file: .env` line. > If using Docker Compose, no changes are needed as the `.env` file is already referenced in `compose.yaml` via the `env_file: .env` line.
@ -367,6 +320,7 @@ Assign a default value for each user-modifiable setting by passing environment v
| Name | Possible values | Default value | | Name | Possible values | Default value |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------- | | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `THEME` | `["system", "light", "dark", "black", "dracula", "nord", "laserwave", "violet", "gold", "rosebox", "gruvboxdark", "gruvboxlight", "tokyoNight", "icebergDark"]` | `system` | | `THEME` | `["system", "light", "dark", "black", "dracula", "nord", "laserwave", "violet", "gold", "rosebox", "gruvboxdark", "gruvboxlight", "tokyoNight", "icebergDark"]` | `system` |
| `MASCOT` | `["BoymoderBlahaj", "redsunlib" ... Add more at ./static/mascots] ` | _(none)_ |
| `FRONT_PAGE` | `["default", "popular", "all"]` | `default` | | `FRONT_PAGE` | `["default", "popular", "all"]` | `default` |
| `LAYOUT` | `["card", "clean", "compact"]` | `card` | | `LAYOUT` | `["card", "clean", "compact"]` | `card` |
| `WIDE` | `["on", "off"]` | `off` | | `WIDE` | `["on", "off"]` | `off` |
@ -375,6 +329,7 @@ Assign a default value for each user-modifiable setting by passing environment v
| `SHOW_NSFW` | `["on", "off"]` | `off` | | `SHOW_NSFW` | `["on", "off"]` | `off` |
| `BLUR_NSFW` | `["on", "off"]` | `off` | | `BLUR_NSFW` | `["on", "off"]` | `off` |
| `USE_HLS` | `["on", "off"]` | `off` | | `USE_HLS` | `["on", "off"]` | `off` |
| `FFMPEG_VIDEO_DOWNLOADS` | `["on", "off"]` | `off` |
| `HIDE_HLS_NOTIFICATION` | `["on", "off"]` | `off` | | `HIDE_HLS_NOTIFICATION` | `["on", "off"]` | `off` |
| `AUTOPLAY_VIDEOS` | `["on", "off"]` | `off` | | `AUTOPLAY_VIDEOS` | `["on", "off"]` | `off` |
| `SUBSCRIPTIONS` | `+`-delimited list of subreddits (`sub1+sub2+sub3+...`) | _(none)_ | | `SUBSCRIPTIONS` | `+`-delimited list of subreddits (`sub1+sub2+sub3+...`) | _(none)_ |