Setup a Proxy
In this article, you may find out how to install your own The Pirate Bay proxy website. This can be useful in the countries where The Pirate Bay is blocked.
First of all, we should mention the web server called NGINX. This is one of the best methods as it is quick, doesn’t need huge resources, and provides a lot of enhanced reverse proxy features. This server is intended to provide minimal memory usage and high performance. Instead of creating new processes for every web request, NGINX uses an unsynchronized, event-driven approach where requests are processed in one stream. It was piloted on Red Hat based and Debian based distributions; however, it works on almost all UNIX-based systems. Your server must not have anything else running on port 80 though. Moreover, it requires sufficient capacity. Avoid using a previously-compiled binary from your distributions repos (for example,
apt-get install package) as it may not have the necessary modules.
Moreover, there are two PHP scripts for proxifying The Pirate Bay, which can be used on shared hosting.
1. After setting up your server, you should get to the installation of NGINX.
a) If you use a Debian based OS (for example, Ubuntu):
apt-get install libpcre3 libpcre3-dev zlib1g zlib1g-dev openssl libssl-dev gcc make git
b) In case that you use a Red Hat based OS (e.g. Centos):
yum install pcre-devel zlib-devel openssl-devel gcc make subversion
2. Download the source code. Pay attention to the version - you may go here
for the additional info.
3. Download the substitutions4nginx source with the use of subversion.
git clone git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git
4. Unpack the source.
tar xzvf nginx-1.14.2.tar.gz
5. Change the path of the ngx_http_substitutions_filter_module directory to where you've downloaded it to. If you entered the system as root it may be
./configure --with-http_ssl_module --add-module=/path/to/ngx_http_substitutions_filter_module
6. Compile it. It will be directed to
/usr/local/NGINX by default.
7. Make sure NGINX is functioning by launching it then typing in your server IP in your Internet browser. You must see the message indicating "Welcome to NGINX!".
8. If it works properly, you can start to configure it.
./sbin/NGINX -s stop
9. Change the name of the default config file to get a copy in case something goes wrong.
mv nginx.conf nginx.conf-backup
10. Copy the next configuration and insert it into
11. Make sure your configuration works properly by launching NGINX. See that nothing else is working on your web port (for example, Apache). If you see any errors, something should be changed. Generally, the result will show you the right path. It is also possible to check the error log at
/usr/local/NGINX/logs. If you can't sort it out, surf the Internet because there are many resources at this topic.
12. If it works properly, submit it
These two PHP scripts are intended to ensure access to The Pirate Bay. This is a perfect solution in the absence of a dedicated server that could perform this task. You will need cURL and PHP5.
Unblocked Pirate Bay PHP Script
It is an advisable PHP script, which proxifies The Pirate Bay. The script doesn’t use .htaccess and is probably more compatible with Internet servers.
Just download it to your web host and change includes/config.php. It is also possible to configure the start page by editing home.html
PHP The Pirate Bay Proxy
Your server will have to run Apache Web Server to make the .htaccess file work.
If the script doesn't function properly, ensure that the .htaccess file is located in the same directory as proxy.php. If it doesn’t help, try to delete the RewriteBase line from the htaccess file.
To install the script, simply extract it and upload the files to your hosting.
Find a perfect web host.
Find a provider which ignores DMCA requests and is not located in the United Kingdom or USA. Certain hosts (also in Europe) will implement DMCA takedowns. Therefore, it would be helpful to conduct a study. Do a Google search for keywords like: VPS, offshore, etc.
Try a CDN
Use a complimentary CDN service (for example, Cloudflare) to accelerate your website and reduce the pressure on your server. Moreover, it will hide the real location of your server. Another free-of-charge option is Incapsula.
Remark: If you use Cloudflare, you’ll have to add proxy_set_header CF-Connecting-IP ''; to your NGINX configuration to make it work. Failing this, you may get DNS errors.
In addition to protecting the confidentiality of your users, SSL can get around various blocks from ISP's. For this reasons, you are strongly encouraged to use SSL for your proxy.
Cloudflare automatically delivers a SSL certificate for your webpage so you can just add https in front of your domain.
In case you purchase your own certificate, make sure to comply with the SSL best practices, like providing HSTS and using advanced encryptions.
Choose the best Domain Registrar
We suggest that you try Hover, NameCheap or EasyDNS.
Don’t use Register.com, Network Solutions, Web.com and GoDaddy.
Use WHOIS privacy on your domain name
After registering a domain, your account/registration data is generally becomes visible in the publicly available WHOIS database. Thus, anyone can enter a Whois search engine and review your domain.
Certain domains don’t support WHOIS privacy and may request your contact information to be open. In such case, user may try to type in the false data. Nevertheless, you should know that this might contradict the provisions of your domain name registration.
Receive a free domain name
If you use FreeDNS, you can get a free subdomain name (for example, subdomain.domain.com). It is free of charge and doesn't oblige you to pass registration or pay for a normal domain. Nevertheless, as this is a subdomain, you can’t control the domain name servers or combine it with such services as Cloudflare.
The other alternative is to receive a free domain from Freenom. As these represent regular domains (for example, domain.tk), you can install the name servers to point at services like Cloudflare.
Control your website
Following are some free solutions for monitoring the working condition of your website: Uptime Robot, Monitor.us and Montastic.
Watch for updates
If the TPB servers make some changes, you will have to update the configuration or code to make the proxy operational. If you use the PHP script, you can monitor the Github site. However, for NGINX, watch this website periodically for updates.
What is the next step?
After installing your proxy, make sure it is working. Then submit it