NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.36k stars 14.31k forks source link

Package request: FlareSolverr #294789

Closed Tanvir1337x closed 4 months ago

Tanvir1337x commented 8 months ago

Project description FlareSolverr is a proxy server to bypass Cloudflare and DDoS-GUARD protection.

Metadata

Misc Note FlareSolverr package/service would be a great addition for the Jackett package/service. Because some indexers are protected by CloudFlare or similar services and Jackett is not able to solve the challenges. For these cases, FlareSolverr has been integrated into Jackett. This service is in charge of solving the challenges and configuring Jackett with the necessary cookies.

Castone22 commented 8 months ago

provided you're willing to do a work around you can use oci with podman to run it by doing something like

{ lib, config, pkgs, ... }: 
{
  virtualisation = {
    podman = {
      enable = true;

      # Create a `docker` alias for podman, to use it as a drop-in replacement
      dockerCompat = true;

      # Required for containers under podman-compose to be able to talk to each other.
      defaultNetwork.settings.dns_enabled = true;
    };

    oci-containers = {
      backend = "podman";
      containers = {
        flare-solvarr = {
          image = "ghcr.io/flaresolverr/flaresolverr:latest";
          autoStart = true;
          ports = ["127.0.0.1:8191:8191"];
          environment = {
            LOG_LEVEL = "info";
            LOG_HTML = "false";
            CAPTCHA_SOLVER = "hcaptcha-solver";
            TZ="America/New_York";
          };
        };
      };
    };

  };
}
ghost commented 5 months ago

There is one on NUR https://github.com/nix-community/nur-combined/blob/master/repos/xddxdd/pkgs/uncategorized/flaresolverr/default.nix#L53

  systemd.services.flaresolverr = {
    after = [ "network.target" ];
    serviceConfig = {
      User = config.services.jackett.user;
      Group = config.services.jackett.group;
      Restart = "always";
      RestartSec = 5;
      TimeoutStopSec = 30;
      ExecStart = "${pkgs.nur.repos.xddxdd.flaresolverr}/bin/flaresolverr";
    };
    wantedBy = [ "multi-user.target" ];
  };