.github/workflows | ||
app | ||
.gitignore | ||
default.conf | ||
docker-compose.yml | ||
docker-entrypoint.sh | ||
Dockerfile | ||
LICENSE.md | ||
opcache.ini | ||
README.en.md | ||
README.md | ||
TEST_URLS.md |
🛠️ Marreta
Marreta is a tool for analyzing URLs and accessing web content without hassle.
✨ Features
- Automatically cleans and fixes URLs
- Removes annoying tracking parameters
- Forces HTTPS to keep everything secure
- Changes user agent to avoid blocks
- Smart DNS
- Keeps HTML clean and optimized
- Fixes relative URLs automatically
- Allows custom styles
- Removes unwanted elements
- Cache, cache!
- Blocks domains you don't want
- Allows custom headers and cookies configuration
- Everything with SSL/TLS
- PHP-FPM
- OPcache enabled
🐳 Docker
Prerequisites
You only need:
- Docker and docker compose
Production
curl -o ./docker-compose.yml https://raw.githubusercontent.com/manualdousuario/marreta/main/docker-compose.yml
If needed
nano docker-compose.yml
services:
marreta:
container_name: marreta
image: ghcr.io/manualdousuario/marreta/marreta:latest
ports:
- "80:80"
environment:
- SITE_NAME=
- SITE_DESCRIPTION=
- SITE_URL=
- DNS_SERVERS=
SITE_NAME
: Your Marreta's nameSITE_DESCRIPTION
: Tell what it's forSITE_URL
: Where it will run, full address withhttps://
DNS_SERVERS
: Which DNS servers to use1.1.1.1, 8.8.8.8
Now you can run docker compose up -d
Development
- First, clone the project:
git clone https://github.com/manualdousuario/marreta/
cd marreta
- Create the configuration file:
cp app/.env.sample app/.env
- Configure it your way in
app/.env
:
SITE_NAME="Marreta"
SITE_DESCRIPTION="Paywall hammer!"
SITE_URL=http://localhost
DNS_SERVERS=1.1.1.1, 8.8.8.8
DEBUG=true
- Run everything:
docker-compose up -d
Done! It will be running at http://localhost
🎉
The DEBUG
option when true
will not generate cache!
⚙️ Customization
The configurations are organized in data/
:
domain_rules.php
: Site-specific rulesglobal_rules.php
: Rules that apply to all sitesblocked_domains.php
: List of blocked sitesuser_agents.php
: User Agents configurationsmessages.php
: System messages
S3 Cache
Cache storage support in S3. Configure the following variables in your .env
:
S3_CACHE_ENABLED=true
S3_ACCESS_KEY=access_key
S3_SECRET_KEY=secret_key
S3_BUCKET=bucket_name
S3_REGION=us-east-1
S3_FOLDER_=cache/
S3_ACL=private
S3_ENDPOINT=
Possible configurations:
## R2
S3_ACCESS_KEY=access_key
S3_SECRET_KEY=secret_key
S3_BUCKET=bucket_name
S3_ENDPOINT=https://{TOKEN}.r2.cloudflarestorage.com
S3_REGION=auto
S3_FOLDER_=cache/
S3_ACL=private
## DigitalOcean
S3_ACCESS_KEY=access_key
S3_SECRET_KEY=secret_key
S3_BUCKET=bucket_name
S3_ENDPOINT=https://{REGION}.digitaloceanspaces.com
S3_REGION=auto
S3_FOLDER_=cache/
S3_ACL=private
🛠️ Maintenance
Logs
See what's happening:
docker-compose logs app
Clearing the cache
When you need to clear:
docker-compose exec app rm -rf /app/cache/*
Made with ❤️! If you have questions or suggestions, open an issue and we'll help! 😉
Thanks to the project https://github.com/burlesco/burlesco which served as the basis for several rules!
Public instance at marreta.pcdomanual.com!