Bravo List
Register
Go Back   > Bravo List > P2P > Forum > Community Cafe
Notices

Reply
Thread Tools
  #1  
Old 4th June 2024, 22:59
leech24 leech24 is offline
Senior Member
 
Join Date: Feb 2015
Posts: 29
Default I want to use Cloudflare for my torrents tracker
what change should we do?
how make Announce URL out domain
Reply With Quote
  #2  
Old 24th June 2024, 21:02
mogo mogo is offline
Senior Member
 
Join Date: Jun 2020
P2P
Posts: 147
Default Cloudflare
First you have to look up Cloudflares supported ports, use one that works for you. There's a list here:

By default, Cloudflare proxies traffic destined for the HTTP/HTTPS ports listed below.

HTTP ports supported by Cloudflare:

80
8080
8880
2052
2082
2086
2095
HTTPS ports supported by Cloudflare:

443
2053
2083
2087
2096
8443

Then you need to put Nginx in front of your torrent tracker. For example if you use Xbt Tracker you need to use Nginx rewrite like this, in "default.conf" or whatever you'd like to name it .conf in the conf.d folder:
PHP Code:
server {

listen       8080;

server_name  localhost;
  
location / {
  
rewrite ^(.*)$ $1?ip=$remote_addr break; 
    
proxy_pass http://127.0.0.1:2052/;
    
proxy_redirect     off;
    
proxy_set_header   Host                  $http_host;
proxy_set_header   X-Real-IP        $remote_addr;
proxy_set_header   X-Forwarded-For  $remote_addr;
access_log off;
log_not_found off;
  }

Basically you would be running your tracker from port 2052 for example and then run Nginx proxied from port 8080. And then you would insert port 8080 in your torrents.

I think that's about it, you can look up how to add more options to Nginx like the amount of workers and keep alive time.

If you don't put Nginx in front of your tracker then the tracker will get all Cloudflare ip addresses and won't be able to communicate and track properly.

Also make another file in the Nginx conf.d folder called cloudflare.conf and put the following inside, this will allow you to get the real ips:

set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 131.0.72.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;

set_real_ip_from 2400:cb00::/32;
set_real_ip_from 2405:8100::/32;
set_real_ip_from 2405:b500::/32;
set_real_ip_from 2606:4700::/32;
set_real_ip_from 2803:f800::/32;
set_real_ip_from 2c0f:f248::/32;
set_real_ip_from 2a06:98c0::/29;

real_ip_header CF-Connecting-IP;
Reply With Quote
The Following User Says Thank You to mogo For This Useful Post:
Fynnon (24th June 2024)
  #3  
Old 26th June 2024, 21:11
MicroMonkey's Avatar
MicroMonkey MicroMonkey is offline
Senior Member
 
Join Date: Jun 2016
P2P
Posts: 55
Default
using cloudflare, as far as Im aware, just keeps a snapshot of your server if its down so visitors can still see your pages as it was before going down. The tracker itself wouldnt be running, so no tracking can be done anyways, so there is no point and would be more confusing than if the site just gave a 404 or 502. In my opinion, dont waste your time
__________________
More torrenttrader stuff at https://torrenttrader.uk
Reply With Quote
  #4  
Old 27th June 2024, 11:40
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,251
Default
you dont need to put nginx in front of apache
it works normally without if you just install mod_remoteip and configure it with coudflare ips classes
a full tutorial can be found on their own wiki
__________________
Need HELP!? I can install:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. Multiple source code engines
  5. Linux Server Administration (security, cryptography/encryption, proxy, load balancer, custom ddos firewall)
Reply With Quote
Reply

Tags
cloudflare , wany


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 04:50. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2025, vBulletin Solutions Inc.