Setup Pirate Bay Proxy

Guide To Setup Your Own Pirate Bay Proxy Site

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

We have outlined some of the key things to remember when creating a proxy along with suggestions on the kind of hosting and web server 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 minimum 2 GB RAM with 2 cores and Debian or Red Hat 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, first step is to get the latest version of Nginx installed, but before that, let's get the dependancies.

    • 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 Red Hat based OS (e.g. Centos), run this:

      yum install pcre-devel zlib-devel openssl-devel gcc make subversion

  2. Download Nginx source. Latest stable version can be found here.

    wget https://nginx.org/download/nginx-1.18.0.tar.gz

  3. Now, let us download 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. Now, start the Nginx server with 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, now let's stop it to configure further.

    ./sbin/nginx -s stop

  9. Now let's create a copy of the config file, so we will 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. At this point if you face any issues are errors, check the Nginx logs generated at path /usr/local/nginx/logs/ to determine the reason for any issues and fix them.

    ./usr/local/nginx/sbin/nginx

  12. If everything works well, then submit your proxy to our pirate bay proxy list by going to this link.

  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 everytime. To get started check this link. It is also best to have Nginx auto start on boot, there are plenty of resources available on 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. This is the method you can go for 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 that is 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 major 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 there is no need 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 important 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 thepiratebay proxy, make sure you do some research and buy from a provider that ignores DMCA takedown notices. You may google with keywords like 'DMCA Ignored', 'VPS', 'hosting', etc. to find such vendors.

Use CDN (Content Delivery Networks)

It is recommended that you use CDN like Cloudflare to speed up page loading time, also to 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 since 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 of setting up an SSL certificate on your own. If you are planning on using 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.

Submit Your Proxy

Once you have the pirate bay proxy setup and usable, you can submit your site to get reviewed and added to our Pirate Bay Proxy List.

Submit Your Proxy