-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathsetup.html
210 lines (204 loc) · 14.7 KB
/
setup.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Setup a Pirate Bay proxy</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="assets/css/docs.css" rel="stylesheet">
<style>body{background: #282828;}.footer{background-color: #282828;}</style>
<link rel="image_src" href="assets/img/piratebaylogo.gif">
<link href="assets/ico/favicon.ico" rel="shortcut icon" type="image/x-icon">
<meta name="description" content="Setup a Pirate Bay proxy site to help others bypass the block.">
<meta name="keywords" content="pirate, bay, proxy, list, setup, bypass, thepiratebay.la, proxybay.co, piratebay, blocked, unblocked, censorship, brein, bpi">
</head>
<body data-spy="scroll" data-target=".bs-docs-sidebar">
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="/">The Proxy Bay</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="index.html"><i class="icon-home"></i> Home</a></li>
<li><a href="alternate-methods.html"><i class="icon-th"></i> Alternate methods</a></li>
<li class="active"><a href="setup.html"><i class="icon-wrench"></i> Setup a Proxy</a></li>
<li><a href="submit.html"><i class="icon-plus"></i> Submit a Proxy</a></li>
<li><a href="contact.html"><i class="icon-user"></i> Contact</a></li></ul></div></div></div></div>
<div class="container">
<div class="row">
<div class="span3 bs-docs-sidebar">
<ul class="nav nav-list bs-docs-sidenav">
<li><a href="#Overview"><i class="icon-chevron-right"></i> Overview</a></li>
<li><a href="#Nginx"><i class="icon-chevron-right"></i> NGINX</a></li>
<li><a href="#PHP"><i class="icon-chevron-right"></i> PHP</a></li>
<li><a href="#Tips"><i class="icon-chevron-right"></i> Tips</a></li>
<li><a href="#what-next"><i class="icon-chevron-right"></i> Next steps</a></li>
</ul>
</div>
<div style="margin-top:30px;" class="span9">
<section class="hero-unit" id="Overview">
<div class="page-header">
<h1>Overview</h1>
</div>
<p><strong>Update - May 31, 2015</strong> - If you're already running a proxy, please update your <a href="#Nginx">NGINX</a> config or <a href="#PHP">PHP</a> script</p>
<p>This guide will explain how to set up your own Pirate Bay proxy site. A proxy site will help users in countries where The Pirate Bay has been blocked.</p>
<p>For most of the article we'll be using a web server called <a href="http://wiki.nginx.org/" target="_blank">Nginx</a>. NGINX is our recommended method since it is fast, requires few resources, and has many advanced reverse proxy features. It has been tested on Red Hat based and Debian based distributions but it works on pretty much all UNIX-based systems. Your server should not have anything else running on port 80 though, and of course it needs sufficient bandwidth. Don't use a precompiled binary from your distributions repos (e.g. apt-get install package) since it will not have the required modules.</p>
<p>There are also two PHP scripts that proxy The Pirate Bay that have been designed specifically for this and can be used on web hosting packages (i.e. does not require a server dedicated to it).</p>
</section>
<section class="hero-unit" id="Nginx">
<div class="page-header">
<h1>NGINX</h1>
</div>
<p>1. Once you've got your server set up and online you'll want to get nginx installed.</p>
<p>a) If you're using a Debian based OS (e.g. Ubuntu), run this:</p>
<pre><code class="notranslate">apt-get install libpcre3 libpcre3-dev zlib1g zlib1g-dev openssl gcc make subversion</code></pre>
<p>b) If you're using a Red Hat based OS (e.g. Centos), run this:</p>
<pre><code class="notranslate">yum install pcre-devel zlib-devel openssl-devel gcc make subversion</code></pre>
<p>2. Download the source. You can find the latest version <a href="http://nginx.org/en/download.html" target="_blank">here</a>.</p>
<pre><code class="notranslate">wget http://nginx.org/download/nginx-1.8.0.tar.gz</code></pre>
<p>3. Download the substitutions4nginx source using subversion.</p>
<pre><code class="notranslate">svn checkout http://substitutions4nginx.googlecode.com/svn/trunk/ substitutions4nginx-read-only</code></pre>
<p>4. Extract the source.</p>
<pre><code class="notranslate">tar xzvf nginx-1.8.0.tar.gz
cd nginx-1.8.0</code></pre>
<p>5. Get ready to compile by configuring. Change the path of the substitutions4nginx-read-only directory to where you've downloaded it to. If you haven't changed the path and are logged in as root it'll probably be /root/substitutions4nginx-read-only/</p>
<pre><code class="notranslate">./configure --with-http_ssl_module --add-module=/path/to/substitutions4nginx-read-only</code></pre>
<p>6. Compile it. It'll be installed to /usr/local/nginx/ by default.</p>
<pre><code class="notranslate">make
make install</code></pre>
<p>7. Test nginx is working by starting it then typing in your server IP in your web browser. You should see the "Welcome to nginx!" message.</p>
<pre><code class="notranslate">cd /usr/local/nginx/
./sbin/nginx</code></pre>
<p>8. If it's working, we'll stop it so we can configure it.</p>
<pre><code class="notranslate">./sbin/nginx -s stop</code></pre>
<p>9. Rename the default config file so we've got a copy just in case something isn't quite right.</p>
<pre><code class="notranslate">cd conf
mv nginx.conf nginx.conf-backup</code></pre>
<p>10. Copy the following config and insert it into nginx.conf <strong>(Updated May 31, 2015)</strong></p>
<pre><code class="notranslate">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 yourdomain.com;
location / {
proxy_pass https://thepiratebay.la/;
proxy_set_header Accept-Encoding "";
proxy_set_header Host thepiratebay.la;
proxy_set_header CF-Connecting-IP "";
proxy_ssl_verify off;
proxy_ssl_server_name on;
subs_filter '<strong id="howdl">.*<\/strong>' '<strong id="howdl"><a href="https://proxybay.co">List of Pirate Bay proxies</a></strong><br>' r;
subs_filter 'thepiratebay.la' $host;
subs_filter 'https://piratebay.org' "//$host/pborg";
}
location /pborg {
proxy_pass https://piratebay.org/;
proxy_set_header Accept-Encoding '';
proxy_set_header CF-Connecting-IP '';
proxy_set_header Host piratebay.org;
proxy_ssl_verify off;
proxy_ssl_server_name on;
subs_filter_types text/css;
subs_filter 'https://piratebay.org' "//$host/pborg";
}
}
}</code></pre>
<p>11. Test your config works by starting nginx. It's a good idea to make sure nothing else is running on your web port (e.g. Apache). If you get errors, something needs changing. Usually the output will point you in the right direction. You can also check the error log by going to /usr/local/nginx/logs/. If you can't figure it out, try searching the internet as there are a lot of resources</p>
<pre><code class="notranslate">./usr/local/nginx/sbin/nginx</code></pre>
<p>14. If it works then submit it to The Proxy Bay by going to <a href="submit.html">This Link</a>.</p>
<p>15. You can set up an init script to start/stop/reload/restart nginx more easily. See how <a href="http://wiki.nginx.org/InitScripts">here</a>. It's also a good idea to make nginx start at boot. <a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-services-chkconfig.html">For Redhat based distros</a> and for <a href="https://www.debian-administration.org/article/28/Making_scripts_run_at_boot_time_with_Debian">Debian based distros</a>.</p>
</section>
<section class="hero-unit" id="PHP">
<div class="page-header">
<h1>PHP</h1>
</div>
<p>These two PHP scripts are designed specifically for providing access to The Pirate Bay. A great solution if you do not have a server that you can dedicate to the task. They require PHP5 and cURL.</p>
<br>
<h4>Unblocked Pirate Bay PHP Script</h4>
<p>This is the recommended PHP script that proxies The Pirate Bay. This script does not use .htaccess and is likely to be more compatible with web servers</p>
<p>Simply upload it to your web host and modify includes/config.php. You can also customize the home page by editing home.html</p>
<p><a href="https://github.com/piratebayproxy/UnblockedPiratebayClean">Download from Github here</a></p>
<br>
<h4>PHP The Pirate Bay Proxy</h4>
<p>This script uses .htaccess to load the proxy script and modify the URL's. Therefore, your server will need to run Apache for the .htaccess file to work</p>
<p>If the script doesn't work, make sure the .htaccess file exists in the same directory as proxy.php. You can also try removing the RewriteBase line from the htaccess file as well to see if that helps. Otherwise, try the alternative script below</p>
<p>To install, just unzip it and upload the files to your web server.</p>
<p><a href="https://github.com/piratebayproxy/PHP-The-Pirate-Bay-Proxy">Download from Github here</a></p>
</section>
<section class="hero-unit" id="Tips">
<div class="page-header">
<h1>Tips</h1>
</div>
<h3>Find a good Web Host</h3>
<p>Try looking for a provider that ignores DMCA requests and is not based in the USA or UK. Some hosts (even in Europe) will honour DMCA takedowns, so it's good to do your research. Try doing a Google search for keywords such as: offshore, vps, dmca.</p>
<p>Here are two hosts that I recommend: <a target="_blank" href="https://www.bahnhof.net/">Bahnhof</a> and <a target="_blank" href="http://swedendedicated.com/">Sweden Dedicated</a></p>
<br>
<h3>Use a CDN</h3>
<p>Use a free CDN service such as <a target="_blank" href="https://www.cloudflare.com/">Cloudflare</a> to help speed up your site and lessen the load on your server. It will also conceal the true location of your server. Another free CDN provider is <a target="_blank" href="http://www.incapsula.com/">Incapsula</a></p>
<p><strong>Note:</strong> If you are using Cloudflare, you will need to add <code>proxy_set_header CF-Connecting-IP '';</code> to your Nginx config for it to work. Otherwise, you will get DNS errors</p>
<br>
<h3>Use SSL</h3>
<p>Aside from protecting the privacy of your users, using SSL can also bypass a lot of blocks from ISP's. Therefore, it is highly recommended to use SSL for your proxy</p>
<p>Cloudlfare automatically provides an SSL certificate for your site so you can simply add https in front of your domain.</p>
<p>If you buy your own certificate, be sure to follow the SSL best practices, such as enabling HSTS and using modern ciphers. Here is a guide for <a href="https://t37.net/a-poodle-proof-bulletproof-nginx-ssl-configuration.html" target="_blank">NGINX</a></p>
<br>
<h3>Use NGINX</h3>
<p>NGINX is the fastest and most reliable proxy method available. Otherwise, the Apache method is also a good option. The PHP scripts should be used if you are unable to setup the other options</p>
<p>Take a look at the <a href="http://nginx.org/en/docs/" target="_blank">NGINX Documentation</a> to further configure it to your needs</p>
<p><a href="https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration" target="_blank">Here</a> is a guide on how to optimize NGINX</p>
<br>
<h3>Find a good Domain Registrar</h3>
<p>I recommend <a target="_blank" href="https://www.hover.com/" title="Hover">Hover</a>, <a target="_blank" href="https://www.easydns.com/" title="EasyDNS">EasyDNS</a>, or <a target="_blank" href="https://www.namecheap.com/" title="Namecheap">NameCheap</a>.</p>
<p>Avoid GoDaddy, Register.com, Network Solutions and Web.com</p>
<br>
<h3>Use WHOIS privacy on your domain name</h3>
<p>When you register a domain name, your billing/registration information usually becomes public in the public WHOIS database. Therefore, anyone can go on a <a href="http://who.is/" target="_blank">Whois search</a> site and lookup your domain.</p>
<p>Some domain names do not support WHOIS privacy and will require your contact details to be public. In that case, you can try inputting fake data. However, be aware that this might be against the terms of your domain registration. Here is <a target="_blank" href="http://www.hover.com/blog/why-whois-privacy-is-kind-of-a-big-deal/" title="More Information">More information</a>.</p>
<br>
<h3>Get a Free Domain Name</h3>
<p>Using <a target="_blank" href="https://freedns.afraid.org/">FreeDNS</a>, you can register a free subdomain name (e.g. subdomain.domain.com). This is free and doesn't require you to register or pay for a regular domain. However, since it's a subdomain, you don't control the name servers and cannot use it with services like Cloudflare</p>
<p>Another option is to get a free domain from <a href="http://freenom.com/" target="_blank">Freenom</a>. Since these are regular domains (e.g. domain.tk), you can set up name servers to point at services such as Cloudflare</p>
<br>
<h3>Monitor your site</h3>
<p>Here are some free options to monitor the uptime of your site: <a target="_blank" href="https://www.montastic.com/">Montastic</a>, <a target="_blank" href="http://www.monitor.us">Monitor.us</a>, <a target="_blank" href="http://uptimerobot.com/">Uptime Robot</a></p>
<br>
<h3>Check for updates</h3>
<p>In the case that something changes with the TPB servers or setup, you may need to update the config or code to make the proxy work. If you're using the PHP script, you can monitor the Github page. Othewise, for NGINX, check this page occasionally for updates</p>
</section>
<section class="hero-unit" id="what-next">
<div class="page-header">
<h1>What next?</h1>
</div>
<p class="lead">Once you have set up your proxy and can confirm it is working, submit it to The Proxy Bay</p>
<a class="btn btn-large btn-primary" href="./submit.html" >Submit your proxy</a>
</section>
</div>
</div>
</div>
<footer class="footer" style="text-align:center;margin-top:20px;">
<div class="container">
<p xmlns:dct="http://purl.org/dc/terms/"><a href="#">Back to top</a> <a rel="license" href="http://creativecommons.org/publicdomain/mark/1.0/">
<img src="https://i.creativecommons.org/p/mark/1.0/88x31.png"style="border-style: none;" alt="Public Domain Mark" /></a></p>
</div>
</footer>
<script src="assets/js/jquery.js"></script>
<script src="assets/js/bootstrap-transition.js"></script>
<script src="assets/js/bootstrap-collapse.js"></script>
<script src="assets/js/bootstrap-scrollspy.js"></script>
<script src="assets/js/bootstrap-affix.js"></script>
<script src="assets/js/application.js"></script>
</body>
</html>