Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Very Basic CloudFlare Guide.
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / General / Tutorials

Unknown User
2014-08-18 02:12:34
Ok after the talk about cloudflare either on the forums or in a private, I figured I would make this very very, very basic guide...

In this guide CF = Cloudflare. If you dont know what that is you prob dont need to follow this guide.

If you going to use CF with an torrent site then you prob should setup an tracker. sub domain on CF admin page.

This pic shows what I mean.



once you get the sub domain setup change your tracker info in backend/config.php

stock location is:

$site_config['announce_list'] = "http://changemydomain.com/announce.php"; //seperate via commaso it would then be
$site_config['announce_list'] = "http://tracker.changemydomain.com/announce.php"; //seperate via comma

Yes people will have to change the tracker url.from [url="http://changemydomain.com/announce.php"]http://changemydomain.com/announce.php[/url] to [url="http://tracker.changemydomain.com/announce.php"]http://tracker.changemydomain.com/announce.php[/url]

But one bonus is new torrents they download will already be the new url if you changed it in the config.

Its because CF is basically 1 big reverse proxy so when you try and seed and your main site is threw Cloudflare servers the ips will prob to reslove to the Cloudflare ips and not your tracker  :(

It also seems stock getip function does not work with CF.

in backend/functions.php change

function getip() {
return $_SERVER["REMOTE_ADDR"];
}
to

//== Updated getip with validation
function getip()
{
   if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
       $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
       return $ip;
   }
   foreach (array(
       'HTTP_CLIENT_IP',
       'HTTP_X_FORWARDED_FOR',
       'HTTP_X_FORWARDED',
       'HTTP_X_CLUSTER_CLIENT_IP',
       'HTTP_FORWARDED_FOR',
       'HTTP_FORWARDED',
       'HTTP_CF_CONNECTING_IP',
       'REMOTE_ADDR'
   ) as $key) {
       if (array_key_exists($key, $_SERVER) === true) {
           foreach (array_map('trim', explode(',', $_SERVER[$key])) as $ip) {
               if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) {
                   return $ip;
               }
           }
       }
   }
}

function is prob also in announce.php you have to change that one too.
This below may or may not be needed.. its helpfully cause then server logs would show real ips instead of the CF ones.

Why do my server logs show CloudFlare's IPs using CloudFlare?

I would advise people using cloudflare to also read this topic from them. [url="https://support.cloudflare.com/hc/en-us/articles/200170786"]https://support.cloudflare.com/hc/en-us/articles/200170786[/url]

This topic tells how to for different server setups --> [url="https://support.cloudflare.com/hc/en-us/sections/200038166-How-do-I-restore-original-visitor-IP-to-my-server-logs-"]https://support.cloudflare.com/hc/en-us/sections/200038166-How-do-I-restore-original-visitor-IP-to-my-server-logs-[/url]

The one most people want to look at is the apache mod.

Before people ask yes you can use ssl website with CF but its only in the paid plan  :(  I dont know why they do that I guess they need to find some way to pay the bills.

I have all my websites threw CF and you will be shocked the amount of spam ips blocked out  :P

This is the last 30 days  :P



I hope this helps people. Its just stuff I have learned the many years using CF.
2014-08-17_1017.png
2014-08-17_1017.png
2014-08-17_2101.png
2014-08-17_2101.png
Unknown User
2014-08-18 06:03:58
Great Guide, thanks for sharing...
Unknown User
2014-08-18 08:39:57
Well i already did that but tracker stopped working.
Unknown User
2014-08-18 12:41:38
Not sure what to tell you. I know tracker.siteurl address is pretty much mandatory if you put your traphic threw CF just cause of the fact, think about this. If your traphic is going threw CF when someone trys to contact the tracker in there client to announce it will get the ip address of CF from dns and will fail and also could false flag in CF that they are getting an ddos cause of the amount of it..

LOL imagine my 3k seeds ROFL!!!

ps you can name tracker. what ever name.. I use "tracker." just to tell its well the tracker lol...
2020-07-04 12:29:27
The new function works perfectly. Solved all my logout issues completely, and adding to announce I’ve now made strictly private torrents connectable without DHT. They never connected before adding this. Big thanks!! :D
2022-04-13 20:05:22
100000 milion euros to you my friend!!

thxxxx
2023-08-02 16:04:30
blank page


should use
Quote:
((Page Rules))
Page Rules let you control which Cloudflare settings trigger on a given URL. Only one Page Rule will trigger per URL, so it is helpful if you sort Page Rules in priority order, and make your URL patterns as specific as possible.


i dnot know how use it
2023-08-02 17:56:07
I did this for all my endpoints.

/index/<whatever it is>/
/user<same idea>/

etc etc
2023-10-08 11:28:12
blank page ((solved))

problem it was setting clodeflare
2023-11-03 22:39:12
I want to tracker it on a different domain

Is there an admin in C Panel or Direct?
I put specific files for the domain

i show many web site doing like this tracker on different domain
also it privet
2024-02-01 05:06:19
its working
dont change  this line in config.php
$site_config['PASSKEYURL'] =  "$site_config[SITEURL]/announce.php?passkey=%s"; // Announce URL to use for passkey


solved
100%
every thing work
Last edited by leech24 on 2024-02-03 21:14:00
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728