diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 436e8c1..aae5079 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ -* Maintainers: [MW-Exodus Team](https://github.com/MW-Legacy) -* Founder: (Pasithea)[https://github.com/Pasiteha0] +* Founder: [movie-web Team](https://github.com/movie-web-archive) +* Maintainer: (Pasithea)[https://github.com/Pasiteha0] diff --git a/.github/workflows/github_pages.yml b/.github/workflows/github_pages.yml index 25e856c..c97269c 100644 --- a/.github/workflows/github_pages.yml +++ b/.github/workflows/github_pages.yml @@ -4,6 +4,7 @@ on: push: branches: - master + workflow_dispatch: jobs: build: @@ -13,7 +14,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v4 with: version: 8 @@ -24,7 +25,7 @@ jobs: cache: pnpm - name: Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install - name: Build run: pnpm build diff --git a/next.config.mjs b/next.config.mjs index f588b02..9c0b7f6 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -6,4 +6,5 @@ const withGuider = guider({ export default withGuider({ output: 'export', + basePath: '/docs', }); diff --git a/pages/backend/deploy.mdx b/pages/backend/deploy.mdx index b2fe2a0..d9c9e42 100644 --- a/pages/backend/deploy.mdx +++ b/pages/backend/deploy.mdx @@ -15,38 +15,38 @@ This method provides a straightforward setup with minimal configuration. For mor **Prerequisites** - **Docker:** If you don't have Docker installed, download it from the official website: [Docker installation](https://www.docker.com/get-started) -**Setup** + **Setup** **Create `docker-compose.yml`:** ```yaml - services: - postgres: - image: postgres - environment: - POSTGRES_USER: pstream_user - POSTGRES_DB: pstream - POSTGRES_PASSWORD: YourPasswordHere - ports: - - "5432:5432" - networks: - - p-stream-network - p-stream: - image: ghcr.io/dumbutdumber/backend:latest - environment: - DATABASE_URL: postgresql://pstream_user:YourPasswordHere@postgres:5432/pstream - CRYPTO_SECRET: 32CharacterLongStringHere - META_NAME: unofficial-backend - ports: - - "80:80" - depends_on: - - postgres - networks: - - p-stream-network - networks: - p-stream-network: - driver: bridge + services: + postgres: + image: postgres + environment: + POSTGRES_USER: pstream_user + POSTGRES_DB: pstream + POSTGRES_PASSWORD: YourPasswordHere + ports: + - "5432:5432" + networks: + - p-stream-network + p-stream: + image: ghcr.io/dumbutdumber/backend:latest + environment: + DATABASE_URL: postgresql://pstream_user:YourPasswordHere@postgres:5432/pstream + CRYPTO_SECRET: 32CharacterLongStringHere + META_NAME: unofficial-backend + ports: + - "80:80" + depends_on: + - postgres + networks: + - p-stream-network + networks: + p-stream-network: + driver: bridge ``` **Important:** * Replace `YourPasswordHere` with your secure database password. @@ -82,29 +82,29 @@ Railway offers a 30-day free trial that includes a one-time $5 credit. After the to the closest one possible. - - Click the [`Deploy on Railway`](https://railway.com/deploy/pstreambackend?referralCode=zvXFZF) button - above. - + + Click the [`Deploy on + Railway`](https://railway.com/deploy/pstreambackend?referralCode=zvXFZF) + button above. + - - Click on configure For the one that says Backend. - +Click on configure For the one that says Backend. - - Fill in the required variable META_NAME the rest are optional and can be set later on. - + + Fill in the required variable META_NAME the rest are optional and can be set + later on. + - - The `Deploy` button at the bottom of the template should be active, click on - it. - + + The `Deploy` button at the bottom of the template should be active, click on + it. + - - Once the `Backend` service has deployed, copy the URL from the `Deployments` - page. (Might take a second for it to be available after the service has - deployed) - + + Once the `Backend` service has deployed, copy the URL from the `Deployments` + page. (Might take a second for it to be available after the service has + deployed) + Congratulations! You have deployed the backend, you can now [set up the diff --git a/pages/backend/introduction.mdx b/pages/backend/introduction.mdx index 83b9c04..a0ab77f 100644 --- a/pages/backend/introduction.mdx +++ b/pages/backend/introduction.mdx @@ -4,25 +4,31 @@ title: 'Introduction' # Introduction to the backend -The backend is essentially just an account server. It handles user accounts, syncing, and other account related features. +Backend is a service you can run and use that syncs user data, for example what movie you watched, your settings, and your color theme. Along with other data like collecting metrics on things like a source's success rate. -## Recommended Community Backend +## Should you selfhost? -I recommend using the [official-backend](https://server.fifthwit.net/)! +There are pros and cons to selfhosting. If you're not a technical user, selfhosting the backend may be quite the chore, and involve more hassle than it's worth. On the flipside if you are technical, it can be a quite rewarding experience. + +If you host your own instance of P-Stream, it's best paired with your own backend, the latency could be better than using the community backend, you have more accurate metrics that measure what your instance's users are experience, and you control your own data! + +Another reason to selfhost is reliability. The community backend gets a lot of users, with that it can have higher latency, and is the target of DDoS attacks, which can lead to it being practically unusable on the occasion it is DDoS'd. ## Metrics The backend exposes an endpoint for [Prometheus metrics](https://prometheus.io/) which allows you to keep track of the backend more easily, it can be accessed on `/metrics`. Ex: https://server.fifthwit.net/metrics -To view these metrics properly, you can use the [P-Stream Metrics Dash](https://dash.pstream.mov/). +To view these metrics properly, you can use the [P-Stream Metrics Dash](https://github.com/p-stream/metrics-dash/). Or use a more powerful tool like [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) to better visualize data. + - This dash is not functioning properly right now. It does work but certain information - can be wrong or outdated. This will be fixed soon + Prometheus + Grafana typically require a VPS, which usually aren't free, so we + don't recommend you use Prometheus + Grafana unless you already have a VPS, or + solution to host them. ## Security -Optionally, is a security setting: +Currently we are working on integration with Cloudflare Turnstile to limit bot traffic. -- [Recaptcha support](./configuration.mdx#captcha), the server can verify Recaptcha v3 tokens on register and login. +If you have a domain with Cloudflare you can also use WAF to help secure your backend in the event it's being targeted. diff --git a/pages/client/introduction.mdx b/pages/client/introduction.mdx index 2b74702..24d0dc8 100644 --- a/pages/client/introduction.mdx +++ b/pages/client/introduction.mdx @@ -2,12 +2,11 @@ title: 'Introduction' --- + ### Self Hosters READ: -Most sources marked with πŸ”₯ or 🀝 are only avaliable on https://pstream.org - -Because these scrapers are getting harder and harder to maintain, as they get patched. We need to close-source them. This is unfortunate, but it's the reality of the pirating scene. Sites that we scrape are blocking us, and we keep losing them. Fortunately, P-Stream has partnered with many people who offered their services on the site. -You are still free to self-host; several sources are still usable, with more open-source ones coming soon. If you have experience coding, this is a great oppurtunity to develop your own scrapers. +Selfhosting is only recommended if you use the extension or are experienced in developing your own scrapers! + # Introduction to the client diff --git a/pages/extension.mdx b/pages/extension.mdx index f82d005..6324900 100644 --- a/pages/extension.mdx +++ b/pages/extension.mdx @@ -8,13 +8,19 @@ The P-Stream browser extension enhances streaming quality and makes it possible Check out this [explanation](https://rentry.co/htagcrv4) about what the extension does. -## 🧩 [Chrome Webstore](https://chromewebstore.google.com/detail/p-stream-extension/gnheenieicoichghfmjlpofcaebbgclh) +## [Chrome Webstore](https://chromewebstore.google.com/detail/p-stream-extension/gnheenieicoichghfmjlpofcaebbgclh) -## 🧩 [Firefox Add-on Store](https://addons.mozilla.org/en-US/firefox/addon/pstream-extension/) + +## Firefox AOM +The extension is not listed on the Firefox AOM, so you'll need to install the `.xpi` manually. + +Sorry, some loser keeps reporting the extension and getting it taken down. Λ™β— Λ™ + # Manual Installation -**Developer mode has to be enabled** to manually install the extension. +- [Chromium-based Installation](#chromium-based-installation) +- [Firefox-based Installation](#firefox-based-installation) Select one of the following methods to install the extension. Ensure that you download the files compatible with your browser. @@ -52,14 +58,21 @@ These installation steps are for any chromium-based browsers such as Microsoft E ## Firefox-based Installation -These installation steps are limited to **Firefox Extended Support Release (ESR), Firefox Developer Edition and Nightly versions** of Firefox -that will allow you to override the setting that enforces the extension signing requirement. +This extension requires disabling `xpinstall.signatures.required` in `about:config` in the following supported browsers: -### Loading an XPI file +### Supported Browsers +- **Librewolf** (recommended) +- **Iceraven** (Android) +- **Floorp** +- **Firefox Nightly** (May have some issues) +- **Firefox Developer Edition** +- **Zen Browser** + +### Installation Steps - Open your browser and type `about:config` into the address bar. + Open your supported Firefox browser and type `about:config` into the address bar. Click the `Accept the Risk and Continue` button. @@ -79,3 +92,43 @@ that will allow you to override the setting that enforces the extension signing When prompted, choose `Continue to Installation` and then `Add`. + +## Workarounds for Unsupported Browsers + +This extension works with unsupported browsers, but requires additional steps. Please see below. + +### Regular Firefox Tutorial + +#### How to use CRX Installer with regular Firefox +Complete guide for disabling signature verification in standard Firefox + +In the regular version of Firefox, setting `xpinstall.signatures.required` to `false` does not work correctly. This document explains how to disable this restriction. + +1. **Identify the path of omni.ja** + + omni.ja is located in the Firefox installation directory. + + The typical path is as follows: + ``` + C:/Program Files/Mozilla Firefox/omni.ja + C:/Program Files (x86)/Mozilla Firefox/omni.ja + /Applications/Firefox.app/omni.ja + /usr/lib/firefox/omni.ja + /usr/lib64/firefox/omni.ja + /opt/firefox/omni.ja + ``` + + You can also check the location of the installation directory from the `about:support` page. + +2. **Patch omni.ja** + + Download [omniPatcher.py](https://gist.github.com/Pasithea0/217edad61004d21a5a5e46454cdd6256) and run it as follows: + ``` + python omniPatcher.py /path/to/omni.ja + ``` + +3. **Remove startup cache** + + To apply the changes, open `about:support` and delete the startup cache from the button at the top right. + + This allows you to disable signature verification in the regular version of Firefox based on the value of `xpinstall.signatures.required`. diff --git a/pages/extra/selfhost.mdx b/pages/extra/selfhost.mdx index b13b03c..d857e06 100644 --- a/pages/extra/selfhost.mdx +++ b/pages/extra/selfhost.mdx @@ -14,29 +14,29 @@ Create a new file named `docker-compose.yml` in your project directory and paste the following content into it: ```yaml - services: - postgres: - image: postgres - environment: - POSTGRES_USER: pstream_user - POSTGRES_DB: pstream - POSTGRES_PASSWORD: YourPasswordHere - ports: - - "5432:5432" - networks: - - p-stream-network - p-stream: - image: ghcr.io/dumbutdumber/backend:latest - environment: - DATABASE_URL: postgresql://pstream_user:YourPasswordHere@postgres:5432/pstream - CRYPTO_SECRET: 32CharacterLongStringHere - META_NAME: unofficial-backend - ports: - - "80:80" - depends_on: - - postgres - networks: - - p-stream-network + services: + postgres: + image: postgres + environment: + POSTGRES_USER: pstream_user + POSTGRES_DB: pstream + POSTGRES_PASSWORD: YourPasswordHere + ports: + - "5432:5432" + networks: + - p-stream-network + p-stream: + image: ghcr.io/dumbutdumber/backend:latest + environment: + DATABASE_URL: postgresql://pstream_user:YourPasswordHere@postgres:5432/pstream + CRYPTO_SECRET: 32CharacterLongStringHere + META_NAME: unofficial-backend + ports: + - "80:80" + depends_on: + - postgres + networks: + - p-stream-network p-stream-frontend: build: @@ -72,7 +72,7 @@ * Replace `YourPasswordHere` with your secure database password. * Generate a strong session secret and replace `32CharacterLongStringHere`. * Replace `TMDBReadAPIKey` with your api key learn more [here](../client/tmdb.mdx). - * replace `yourDomainHere` with whatever you'll be using to access your main site, like pstream.org + * replace `yourDomainHere` with whatever you'll be using to access your main site, like pstream.mov * replace `meta__name` and `meta__description` diff --git a/pages/instances.mdx b/pages/instances.mdx index 2ee3e16..c825c21 100644 --- a/pages/instances.mdx +++ b/pages/instances.mdx @@ -15,7 +15,4 @@ This page showcases P-Stream instances hosted by the community. | Site | Host | Stats | | :------------------------------------------- | :----------------- | :------- | -| [pstream](https://pstream.org) | Pas | πŸ’ΎπŸ“±β­β­ | -| [movies.levrx.de](https://movies.levrx.de) | levrx | πŸ’ΎπŸ“±β­ | -| [movies.samj.app](https://movies.samj.app) | Samj | πŸ’ΎπŸ“±β­ -| [sudo-flix.nl](https://sudo-flix.nl/) | Chargonium | πŸ’ΎπŸ“± | +| | | | diff --git a/pages/links/weblate.tsx b/pages/links/weblate.tsx index 2206740..7d0e0a1 100644 --- a/pages/links/weblate.tsx +++ b/pages/links/weblate.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react'; const redirectTitle = 'Weblate'; -const redirectUrl = 'https://weblate.pstream.org/projects/p-stream/p-stream'; +const redirectUrl = 'https://github.com/p-stream/p-stream'; export default function WeblateRedirect() { const [countdown, setCountdown] = useState(5); @@ -107,21 +107,7 @@ export default function WeblateRedirect() { fontSize: '0.7em', }} > -

Β© 2024 P-Stream

- Follow us on{' '} - - (e.currentTarget.style.textDecoration = 'underline') - } - onMouseLeave={(e) => - (e.currentTarget.style.textDecoration = 'none') - } - > - Twitter - {' '} - and check out our{' '} diff --git a/pages/proxy/deploy.mdx b/pages/proxy/deploy.mdx index b530f61..5119d21 100644 --- a/pages/proxy/deploy.mdx +++ b/pages/proxy/deploy.mdx @@ -4,17 +4,105 @@ title: 'Deploy' # Deploying the proxy + +**USERS!** + +Please use the extension instead unless you are familiar with self hosting Docker images! + + **Selfhosting the client as well?** -Please read [THIS](./introduction.mdx) and use Method 4 (Docker) or Method 5 (Manual)! +Please read [THIS](./introduction.mdx) and use Method 1 (Docker) or Method 2 (Manual)! -Cloudflare and Netlify's IPs are blocked by FlixHQ and the proxy MUST be hosted on a VPS or other server. +Cloudflare and Netlify's IPs are blocked by most sites and the proxy MUST be hosted on a VPS or other server that is not IP/ASN banned. -## Method 1 - Cloudflare (Easy + Best) +## Method 1 - Docker (Recommended) + +This is the recommended method for deploying on a VPS or home server. Experience with Docker, domains and web hosting is recommended. + + + Experience with Docker, domains and web hosting is **highly recommended** for + this method.
+ You are exposing your server at your own risk! +
+ +P-Stream does not have a Docker image for the proxy, but there is a Dockerfile within the repo. + + + + Clone the repo on your server: + git clone https://github.com/p-stream/simple-proxy + + + + Locate the Dockerfile in the root folder. + + + + Build the Docker image: + docker build -t p-stream-proxy ./simple-proxy + + + + (Optional) Create and edit a .env file in the simple-proxy directory to configure secrets such as JWT_SECRET and other environment variables as documented in the configuration guide. + + + + Run the Docker container (replace values as needed): + docker run -d --name p-stream-proxy -p 3000:3000 --env-file .env p-stream-proxy + + + + (Optional) Configure your firewall or reverse proxy (such as NGINX or Caddy) to expose port 3000 or your desired HTTP/HTTPS port. + + + + +The container exposes the HTTP port (Without TLS/SSL) as `3000/TCP`. + +## Method 2 - Manual (Advanced) + +This method is for advanced users who want full control over their deployment. We recommend using automated package managers like nixpacks for easier deployment. + +Manually installing the proxy on your server. You may want to use an automated package manager like nixpacks to do this. + + + + Clone the repo on your server `git clone https://github.com/p-stream/simple-proxy` + + + + Navigate to the directory `cd simple-proxy` + + + + Install packages `pnpm i` + + + + Build the app `pnpm build` + + + + Start the proxy `pnpm start` + + + +You'll need to configure port forwarding and firewall settings. Good luck. + +--- + +# Deprecated Methods + + +**These methods are DEPRECATED** and should not be used for new deployments. Cloudflare, Netlify, and Railway IPs have been heavily abused and are now blocked by most streaming sites. Use Docker or Manual deployment on a VPS or home server with a residential/private IP instead. + + +## Method 3 - Cloudflare (DEPRECATED) Cloudflare has a generous free plan, so you don't need to pay anything unless you get thousands of users. @@ -55,7 +143,7 @@ Cloudflare has a generous free plan, so you don't need to pay anything unless yo -## Method 2 - Netlify (Easy) +## Method 4 - Netlify (DEPRECATED) Netlify has a very generous free plan, so you'll be able to host your proxy for free unless you get hundreds of users. @@ -91,7 +179,7 @@ Netlify has a very generous free plan, so you'll be able to host your proxy for -## Method 3 - Railway (Easy) +## Method 5 - Railway (DEPRECATED) Railway provides $5 in free credits once you verify your account. These credits expire after 1 month and are usually enough to keep the proxy running for about that time. (Tip: You can delete your account and create a new one to receive additional credits.) @@ -126,52 +214,8 @@ Railway provides $5 in free credits once you verify your account. These credits Once the proxy has deployed, copy the URL from the `Deployments` page. - + Congratulations! You have deployed the proxy, [you can now set up the client](../extra/streaming.mdx#method-1-self-hosted-proxy). - -## Method 4 - Docker -If you know what you are doing, you should know what to do with this information. If you don't, then please follow our Cloudflare guides. - - - Experience with Docker, domains and web hosting is **highly recommended** for - this method.
- [Deploying with Netlify](#method-1-netlify-easy) is easier and safer to do! You - are exposing your server at your own risk! -
- -P-Stream does not have a Docker image for the proxy yet. You can create one yourself or build from source. Alternatively, you can use the sudo-flix proxy Docker image found here: GitHub Container Registry under the image [`ghcr.io/sussy-code/sudo-proxy:latest`](https://ghcr.io/sussy-code/sudo-proxy:latest). It should work the same. - - -The container exposes the HTTP port (Without TLS/SSL) as `3000/TCP`. - -## Method 5 - Manual -If you know what you are doing, you should know what to do with this information. If you don't, then please follow our Cloudflare guides. - -Manually installing the proxy on your server. You may want to use an automated package manager like nixpacks to do this. - - - - Clone the repo on your server `git clone https://github.com/p-stream/simple-proxy` - - - - Navigate to the directory `cd simple-proxy` - - - - Install packages `pnpm i` - - - - Build the app `pnpm build` - - - - Start the proxy `pnpm start` - - - -You'll need to configure port forwarding and firewall settings. Good luck. diff --git a/pages/proxy/introduction.mdx b/pages/proxy/introduction.mdx index 50bddcc..aeb995e 100644 --- a/pages/proxy/introduction.mdx +++ b/pages/proxy/introduction.mdx @@ -4,15 +4,15 @@ title: 'Introduction' # Introduction to the proxy -The proxy has **two** functions and is **required** to self host the project entirely. - - -No. 2 only applies if you are also deploying the **client**. - +The proxy has **two** functions and is **required** to self host the project entirely. However, you do NOT need to set it up if all your users use the extension instead as it replaces this! 1. The proxy is used to bypass CORS-protected URLs on the client side, allowing users to make requests to CORS protected endpoints without a backend server. The proxy is made using [Nitro by UnJS](https://nitro.unjs.io/) which supports building the proxy to work on multiple providers including Cloudflare Workers, AWS Lambda and [more...](https://nitro.unjs.io/deploy) 2. For site admins (self hosters), the proxy is also used to bypass m3u8 stream header restrictions for sites with origin locked streams. Because of this active restriction, this proxy needs to be hosted on a VPS, platform, or home server that's IP is **NOT** blocked by the desired stream. -On the following page there are guides to set up the proxy on Cloudflare, Netlify, etc. However, due to this IP restriction the site admin cannot host there. Normal users are still able to. +On the following page there are guides to set up the proxy on VPS, home servers, or other hosting platforms. + + +Cloudflare and Netlify solutions are no longer effective because they have been heavily abused and most streaming sites now block their IPs. Instead, users and self-hosters should deploy the proxy on residential or private VPS IPs to avoid these ASN bans. +