Guide To Create Your Own Pirate Bay Proxy Site

Pirate Bay Proxy

This guide will detail the different methods with steps involved in setting up a pirate bay proxy site.

We have outlined some of the critical things to remember when creating a proxy, along with suggestions on the kind of hosting and webserver to use to run a worry-free proxy site.

METHOD 1: NGINX

Here, we will be using a web server called Nginx. Also, this is our preferred method since Nginx is one of the best and fastest web servers amongst others having advanced reverse proxy features required for proxying the pirate bay.

Minimum Requirements

  • Linux VPS
    A Linux VPS having a minimum of 2 GB RAM with 2 cores and Debian or RedHat-based distribution installed.
  • Enough Bandwidth
    VPS should have enough bandwidth support per traffic needs.
  • Free Port 80
    Make sure port 80 is available and do not run any other applications on port 80.
  • Do Not Use a Precompiled Binary
    Do not install Nginx from the precompiled binary available from your distribution's repository. Because these precompiled binaries do not contain all the required modules needed for reverse proxying. So, follow our steps below to install Nginx.

Steps

  1. Once the server is up and running, the first step is to get the latest version of Nginx installed, but before that, let's get the dependencies.
    • If you're using a Debian based OS (e.g., Ubuntu), run this:
      apt-get install libpcre3 libpcre3-dev zlib1g zlib1g-dev openssl libssl-dev gcc make git
    • If you're using a RedHat-based OS (e.g., Centos), run this:
      yum install pcre-devel zlib-devel openssl-devel gcc make subversion
  2. Download Nginx source. The latest stable version can be found here.
    wget https://nginx.org/download/nginx-1.18.0.tar.gz
  3. Now, let us download the substitutions4nginx module source using git.
    git clone git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git
  4. Extract the downloaded Nginx source,
    tar xzvf nginx-1.18.0.tar.gz
    cd nginx-1.18.0
  5. Get ready to compile by configuring. Change the path of the ngx_http_substitutions_filter_module directory to where you've downloaded it to. If you haven't changed the path and are logged in as root, it will probably be: /root/ngx_http_substitutions_filter_module/
    ./configure --with-http_ssl_module --add-module=/path/to/ngx_http_substitutions_filter_module
  6. Now compile it with the below commands. By default, it will get installed to this path: /usr/local/nginx/
    make
    make install
  7. Start the Nginx server with the below commands. And test if the server is running by typing in the server's IP on a browser window. You should be able to see a 'Welcome to Nginx' message.
    cd /usr/local/nginx/
    ./sbin/nginx
  8. Once you confirm that the server is up and running, let's stop it to configure it further.
    ./sbin/nginx -s stop
  9. Now let's create a copy of the config file to have a backup if something goes wrong.
    cd conf
    mv nginx.conf nginx.conf-backup
  10. Now copy the below configurations into nginx.conf file (and replace 'yourdomainname.com' highlighted below with your domain name).
    worker_processes auto;
    events {
    worker_connections 1024;
    }
    http {
    include mime.types;
    default_type application/octet-stream;
    sendfile on;
    gzip on;
    server {
    listen 80;
    server_name yourdomainname.com;
    location / {
    proxy_pass https://pirateproxy.ml/;
    proxy_set_header Accept-Encoding "";
    proxy_set_header Host pirateproxy.ml;
    proxy_set_header CF-Connecting-IP "";
    proxy_set_header Via "$host";
    proxy_ssl_verify off;
    proxy_ssl_server_name on;
    subs_filter 'pirateproxy.ml' $host;
    }
    }
    }
  11. Now test if the configurations made are working by starting the Nginx server. Once the server is started, head over to your domain and check if the site proxies properly. If you face any errors, check the Nginx logs generated at path /usr/local/nginx/logs/ to determine the reason for any problems and fix them.
    ./usr/local/nginx/sbin/nginx
  12. If everything works well, submit your proxy to our pirate bay proxy list using our proxy submission form.
  13. We recommend setting up an init script, so it will be easy to start/stop/reload/restart the Nginx server without having to get to its root directory every time. To get created, check the Nginx Init Script guide. It is also best to have Nginx auto-start on boot. There are plenty of resources available on the internet which you can refer to and get it done.

METHOD 2: PHP

In this method, we will be using a PHP script capable of unblocking the pirate bay. You can go for this method if you don't have a VPS or dedicated server setup for this task.

Requirements

  • Web Hosting
    A reliable web hosting plan based on traffic needs.
  • PHP5 and cURL Support
    Ensure that the hosting provider supports PHP5 and cURL.

The Script (Unblocked Piratebay Clean)

This is a PHP script capable of proxying the pirate bay without creating much load on the host.

The script uses Javascript and AJAX requests to load the content of each page. All of the primary functions are handled by the main.js file found in the static folder. To load the site content, a request is sent to the TPB API through the api.php file. The response from the API request is used to generate the page content.

The static content (e.g., images, CSS) is already included in the repository, so it is unnecessary to proxy it. Therefore, the only external content being loaded through the script is through the API.

Download from GitHub here!

TIPS: FOR A WORRY-FREE PIRATE BAY PROXY SITE

Below are some of the essential tips for you to consider when building a pirate bay proxy site.

VPS / Web host

When you plan on buying a VPS or Web hosting plan to host the pirate bay proxy, make sure you do some research and buy from a provider that ignores DMCA takedown notices. To find such vendors, you may google keywords like 'DMCA Ignored,' 'VPS,' 'hosting,' etc.

Use CDN (Content Delivery Networks)

It is recommended that you use CDN like Cloudflare to speed up page loading time and protect your server's IP address from being exposed. With Cloudflare CDN, you will get a free SSL certificate, so you don't have to worry about setting up SSL for yourself.

WhoisGuard Privacy Protection

When you buy a domain, make sure you opt for WhoisGuard protection to protect your personal data. Registrars like Namecheap provides free WhoisGuard protection to their customers on every domain purchase.

Domain Registration

Go for domain registrars like NameCheap, Hover, or EasyDNS and avoid registrars like Godaddy, web.com, etc.

Use SSL Certificate

It's important to use SSL these days for a variety of reasons. Apart from protecting the privacy of your users, it also helps in bypassing certain filters and ISP blocks so your site will be accessible to many.

If you are using Cloudflare, you have the option to opt for the free SSL they provide. This eliminates the need for setting up an SSL certificate on your own. If you plan to use your own custom certificate, make sure you follow the basic SSL best practices like using modern ciphers and enabling HSTS.

Monitor Uptime of Your Proxy

Use free website monitoring services like Uptime Robot, Montastic, etc., to minimize downtime.

Pirate Bay Proxy