Advertisement:

Navigation

SMF Mod Site

Mod Name:
Cloudflare IP Referral Support
Created By:
C. Davis
Type:
Feature Enhancement
First Created:
September 27, 2015, 05:48:14 AM
Last Modified:
September 30, 2015, 12:31:15 AM
Latest Version:
1.3
Compatible With:
2.0.11
Total Downloads:
1330

Download this mod

cloudflare_ip_refferal_support_tapatalk_v1.3.zip (3kB) [392]
cloudflare_ip_refferal_support_v1.3.zip (3kB) [935]
Manual Install Instructions for SMF

Description:

Introduction
Some of you may have been wanting to use Cloudflare with your forums and noticed that it uses the IP of your server as the $_SERVER["REMOTE_ADDR"] causing issues with banning people and even displaying people's IPs. I've found a VERY simple work around and implemented it in this simple mod. It pretty much checks if the Remote address is your server IP or inside of cloudflare's ip range that they own, it will change the $_SERVER["REMOTE_ADDR"] to the Cloudflare user address.

The IP ranges in the list come from here: https://www.cloudflare.com/ips

As far as I'm aware it is 100% working.

Installation Instructions

If you do not have Tapatalk installed, use only cloudflare_ip_refferal_support_v1.zip

If you have Tapatalk, use only cloudflare_ip_refferal_support_tapatalk_v1.zip

Changelog
v1.2-
Cloudflare IPs changed into an array

v1-
Initial Release

License

Code: [Select]
The MIT License (MIT)

Copyright (c) 2015 Connor Davis

Permission is hereby granted,
free of charge, to any person obtaining a copy
of this software and associated
documentation files (the "Software"), to deal
in the Software without restriction,
including without limitation the rights
to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell
copies of the Software, and to permit persons
to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in
all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED
"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE
SOFTWARE.