1
0
mirror of https://codeberg.org/teddit/teddit synced 2024-12-22 08:19:42 +01:00
Un front-end alternativo a Reddit, gratuito, open source e incentrato sulla privacy. Ispirato al progetto Nitter. Nessun JavaScript o pubblicità Tutte le richieste passano attraverso il backend, il cliente non parla mai con Reddit https://lemmit.it
Go to file
2021-08-29 20:48:41 +02:00
.github Merge pull request #3 from sethsimmons/main [PR FROM GITHUB] 2021-03-26 20:55:24 +01:00
inc pass pref_quarantine_optin-cookie to get quarantined subreddits (fixes #224) 2021-08-18 22:07:29 +02:00
static Implement a central link object 2021-05-24 21:49:07 +02:00
views check if json.error_data exists 2021-08-03 08:12:37 +02:00
.dockerignore Added support for Docker, Docker-Compose 2020-12-07 12:57:20 -07:00
.gitignore simplify installation 2020-12-03 18:12:04 +01:00
app.js introduce a cache control: a way of keeping the cache directory under certain size (should fix #229) 2021-08-24 17:17:46 +02:00
cacheControl.js make the getUsage() function a bit more reliable, and fine-tune the amount of files to delete from static/ 2021-08-29 19:36:36 +02:00
CHANGELOG.md mention that the changelog is not updated anymore 2021-08-29 20:48:41 +02:00
config.js.template introduce a cache control: a way of keeping the cache directory under certain size (should fix #229) 2021-08-24 17:17:46 +02:00
docker-compose.yml Updated: image versions (docker) 2021-08-10 21:43:39 +02:00
Dockerfile Updated: image versions (docker) 2021-08-10 21:43:39 +02:00
LICENSE add AGPL 3.0 license 2020-12-01 16:11:22 +01:00
package-lock.json Add http(s) proxy support 2021-08-17 03:53:42 +09:00
package.json Add http(s) proxy support 2021-08-17 03:53:42 +09:00
README.md remove changelog section 2021-08-29 20:47:40 +02:00
routes.js add raw JSON parameter for teddit api (#220) 2021-07-28 22:05:42 +02:00

teddit

teddit.net

A free and open source alternative Reddit front-end focused on privacy. Inspired by the Nitter project.

  • No JavaScript or ads
  • All requests go through the backend, client never talks to Reddit
  • Prevents Reddit from tracking your IP or JavaScript fingerprint
  • Unofficial API (RSS & JSON support, no rate limits or Reddit account required)
  • Lightweight (teddit frontpage: ~30 HTTP requests with ~270 KB of data downloaded vs. Reddit frontpage: ~190 requests with ~24 MB)
  • Self-hostable. Anyone can setup an instance. An instance can either use Reddit's API with or without OAuth (so Reddit API key is not necessarily needed).

Join the teddit discussion room on Matrix: #teddit:matrix.org

XMR: 832ogRwuoSs2JGYg7wJTqshidK7dErgNdfpenQ9dzMghNXQTJRby1xGbqC3gW3GAifRM9E84J91VdMZRjoSJ32nkAZnaCEj

Instances

https://teddit.net - Official instance

Community instances:

Instance Onion Link Notes
teddit.ggc-project.de
teddit.kavin.rocks teddit4w6cmzmj5kimhfc...onion
teddit.zaggy.nl
teddit.namazso.eu
teddit.nautolan.racing
teddit.tinfoil-hat.net
teddit.domain.glass
snoo.ioens.is snoo.ioensistjs7wd746...onion
teddit.httpjames.space
ibarajztopxnuhabfu7f...onion
xugoqcf2pftm76vbznx4...i2p
teddit.alefvanoon.xyz
incogsnoo.com tedditfyn6idalzso5wam....onion I2P: http://teddit.i2p

<-- Remove the Changelog section, because the CHANGELOG.md is not updated anymore

Changelog

See CHANGELOG.md -->

Installation

Docker-compose method

git clone https://codeberg.org/teddit/teddit
cd teddit
docker-compose build
docker-compose up

Teddit should now be running at http://localhost:8080.

Docker image is available at https://hub.docker.com/r/teddit/teddit.

Environment Variables

The following variables may be set to customize your deployment at runtime.

Variable Description
domain Defines URL for Teddit to use (i.e. teddit.domain.com). Defaults to 127.0.0.1
use_reddit_oauth Boolean If true, "reddit_app_id" must be set with your own Reddit app ID. If false, Teddit uses Reddit's public API. Defaults to false
cert_dir Defines location of certificates if using HTTPS (i.e. /home/teddit/le/live/teddit.net). No trailing slash.
theme Automatically theme the user's browser experience. Options are auto, dark, sepia, or you can set white by setting the variable to empty ( '' ). Defaults to auto
flairs_enabled Enables the rendering of user and link flairs on Teddit. Defaults to true
highlight_controversial Enables controversial comments to be indicated by a typographical dagger (†). Defaults to true
api_enabled Teddit API feature. Might increase loads significantly on your instance. Defaults to true
video_enabled Enables video playback within Teddit. Defaults to true
redis_enabled Enables Redis caching. If disabled, does not allow for any caching of Reddit API calls. Defaults to true
redis_db Sets the redis DB name, if required
redis_host Sets the redis host location, if required. Defaults to 127.0.0.1
redis_password Sets the redis password, if required
redis_port Sets the redis port, if required. Defaults to 6379
ssl_port Sets the SSL port Teddit listens on. Defaults to 8088
nonssl_port Sets the non-SSL port Teddit listens on. Defaults to 8080
listen_address Sets the address Teddit listens for requests on. Defaults to 0.0.0.0
https_enabled Boolean Sets whether or not to enable HTTPS for Teddit. Defaults to false
redirect_http_to_https Boolean Sets whether to force redirection from HTTP to HTTPS. Defaults to false
redirect_www Boolean Redirects from www to non-www URL. For example, if true, Teddit will redirect https://www.teddit.com to https://teddit.com. Defaults to false
use_compression Boolean If set to true, Teddit will use the [https://github.com/expressjs/compression](Node.js compression middleware) to compress HTTP requests with deflate/gzip. Defaults to true
use_view_cache Boolean If this is set to true, view template compilation caching is enabled. Defaults to false
use_helmet Boolean Recommended to be true when using https. Defaults to false
use_helmet_hsts Boolean Recommended to be true when using https. Defaults to false
trust_proxy Boolean Enable trust_proxy if you are using a reverse proxy like nginx or traefik. Defaults to false
trust_proxy_address Location of trust_proxy. Defaults to 127.0.0.1
http_proxy Set http/https proxy to use for outgoing requests. See https-proxy-agent for details
nsfw_enabled Boolean Enable NSFW (over 18) content. If false, a warning is shown to the user before opening any NSFW post. When the NFSW content is disabled, NSFW posts are hidden from subreddits and from user page feeds. Note: Users can set this to true or false from their preferences. Defaults to true
videos_muted Boolean Automatically mute all videos in posts. Defaults to true
post_comments_sort Defines default sort preference. Options are confidence (default sorting option in Reddit), top, new, controversal, old, random, qa, live. Defaults to confidence
reddit_app_id If "use_reddit_oauth" config key is set to true, you have to obtain your Reddit app ID. For testing purposes it's okay to use this project's default app ID. Create your Reddit app here: https://old.reddit.com/prefs/apps/. Make sure to create an "installed app" type of app. Default is ABfYqdDc9qPh1w
domain_replacements Replacements for domains in outgoing links. Tuples with regular expressions to match, and replacement values. This is in addition to user-level configuration of privacyDomains. Defaults to []
cache_control Boolean If true, teddit will automatically try to keep the size of the cache directory under config.cache_max_size. Defaults to true
cache_max_size In Megabytes (MB), how much can we cache media files to the disk? Default is 3000 MB (~3 GB). Note: This is not perfectly exact limit. Defaults to 3000
cache_control_interval How often the size of the cache directory is checked. Default is every 30 minutes. Defaults to 1000 * 60 * 30

Manual

  1. Install Node.js.

  2. (Optional) Install redis-server.

    Highly recommended  it works as a cache for Reddit API calls.

  3. (Optional) Install ffmpeg.

    It's needed if you want to support videos.

    # Linux
    apt install redis-server ffmpeg
    
    # macOS
    brew install redis
    
  4. Clone and set up the repository.

    git clone https://codeberg.org/teddit/teddit
    cd teddit
    npm install --no-optional
    cp config.js.template config.js # edit the file to suit your environment
    redis-server
    npm start
    

Teddit should now be running at http://localhost:8080.