Find a file
2024-12-07 09:31:13 -03:00
.github/workflows commit inicial 2024-11-22 17:41:07 -03:00
app se o dominio usa selenium, ignorar outras tentativas 2024-12-07 09:31:13 -03:00
.gitignore criada pasta de tarefas cli com analisador de logs 2024-11-27 10:11:41 -03:00
default.conf remove configuração de csp para resolver conflito com cdn do tailwind 2024-12-05 14:51:29 -03:00
docker-compose.yml s3_proxy para s3_folder, para facilitar configuração 2024-11-28 15:41:45 -03:00
docker-entrypoint.sh adiciona suporte a requisição via selenium gurizada 2024-12-07 00:05:51 -03:00
Dockerfile atualização do php para dar suporte a sdk da aws 2024-11-28 15:38:47 -03:00
LICENSE.md commit inicial 2024-11-22 17:41:07 -03:00
opcache.ini implementação do opcache 2024-11-28 14:32:33 -03:00
README.en.md dns padrão para cloudflare e google 2024-12-05 14:06:30 -03:00
README.md dns padrão para cloudflare e google 2024-12-05 14:06:30 -03:00
TEST_URLS.md adiciona suporte a requisição via selenium gurizada 2024-12-07 00:05:51 -03:00

🛠️ Marreta

en pt-br

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 name
  • SITE_DESCRIPTION: Tell what it's for
  • SITE_URL: Where it will run, full address with https://
  • DNS_SERVERS: Which DNS servers to use 1.1.1.1, 8.8.8.8

Now you can run docker compose up -d

Development

  1. First, clone the project:
git clone https://github.com/manualdousuario/marreta/
cd marreta
  1. Create the configuration file:
cp app/.env.sample app/.env
  1. 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
  1. 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 rules
  • global_rules.php: Rules that apply to all sites
  • blocked_domains.php: List of blocked sites
  • user_agents.php: User Agents configurations
  • messages.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!