Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Proxy ip to real ip conversion Details »»
Proxy ip to real ip conversion
Version: 1.32, by Paul M Paul M is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.x Rating:
Released: 09-09-2004 Last Update: 05-28-2005 Installs: 161
 
No support by the author.

This modification is no longer available or supported.

A simple modification I did for our forum that was originally based on the Proxy Detector Hack (v3.0). Obviously, like all proxy server detection hacks, this will only work if the proxy server passes the appropiate http variables.

This hack makes the forum always use the members real ip when a proxy is detected, meaning that all existing ip functions continue to work, basically ignoring the proxy server (other than recording it's presence).

i.e.

* The real ip/host is displayed in who's online

* The real and proxy server ip's are accesible for each post, the button is red for members using a proxy.

* The real ip is searchable in the admin/mod cp, not the proxy ip.

* The real ip is bannable by admins (no moving to another proxy to avoid a ban).

etc etc.

The installation should take about 10-15 mins (4 file edits, 2 phrase changes, 1 new template, 1 sql query, 1 new image).

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
CarpCharacin

Comments
  #2  
Old 09-10-2004, 10:40 PM
???`S?LV?R???`'s Avatar
???`S?LV?R???` ???`S?LV?R???` is offline
 
Join Date: Aug 2003
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice
Reply With Quote
  #3  
Old 09-10-2004, 11:10 PM
Surtain23's Avatar
Surtain23 Surtain23 is offline
 
Join Date: Sep 2004
Location: Western New York
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool, I'm going to install this later after I work on vb ads for a while.
Reply With Quote
  #4  
Old 09-11-2004, 11:34 AM
BladeZ BladeZ is offline
 
Join Date: Feb 2003
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you! Very usefull
*clicks install*
Reply With Quote
  #5  
Old 09-11-2004, 11:50 AM
Bigwrenn's Avatar
Bigwrenn Bigwrenn is offline
 
Join Date: Mar 2004
Location: Florida, USA
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much!
Reply With Quote
  #6  
Old 09-11-2004, 01:53 PM
sacredfox sacredfox is offline
 
Join Date: Feb 2003
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wheres the original proxy hack that i need
Reply With Quote
  #7  
Old 09-11-2004, 02:22 PM
Beermonster Beermonster is offline
 
Join Date: Dec 2003
Location: England
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very good idea

[high]* Beermonster clicks install [/high]
Reply With Quote
  #8  
Old 09-11-2004, 02:34 PM
lcryan's Avatar
lcryan lcryan is offline
 
Join Date: Aug 2004
Location: Boston
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

kinda having trouble beleaving it can resolve the users real IP, but we will see
Reply With Quote
  #9  
Old 09-11-2004, 03:56 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sacredfox
wheres the original proxy hack that i need
In the Zip file, as it says.

Quote:
Originally Posted by lcryan
kinda having trouble beleaving it can resolve the users real IP, but we will see
As long as the proxy passes the client IP on in the standard http variables it will. Obviously it can't do anything about proxies that don't do this. I can't perform miracles.
Reply With Quote
  #10  
Old 09-21-2004, 11:15 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Paul - I've installed your hack as per the instructions, but I'm getting IP addresses being saved by proxy users in the post table such as
192.168.1.7, 82.
172.26.106.249,
unknown, 10.255.
10.20.5.2, 194.2

I'm regarding this is quite a serious error as IP information needs to be correct.

PHP Code:
I've looked at the bit of code which I think gets the real IP in init.php :
// ####################### HN getproxyip START########################
// Establish Proxy Server IP address (if it exists) and Real IP Address
// Make sure forum always uses real client IP address 
// Start of Paul Marsden Proxy Hack Modification
if ($_SERVER['
HTTP_X_FORWARDED_FOR'] != '') 

    $proxyip = $_SERVER['
HTTP_X_FORWARDED_FOR']; 

else if ($_SERVER['
HTTP_CLIENT_IP'] != '') 

    $proxyip = $_SERVER['
HTTP_CLIENT_IP']; 

else if ($_SERVER['
HTTP_FORWARDED'] != '') 

    $proxyip = $_SERVER['
HTTP_FORWARDED']; 

else 

    $proxyip = ''; 

$proxyip = preg_replace('
/javascript/i', 'java script', $proxyip); 
$proxyip = str_replace('"', '"', $proxyip); 
$proxyip = str_replace('
<', '&lt;', $proxyip); 
$proxyip = str_replace('
>', '&gt;', $proxyip); 
if (!preg_match("#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}#", $proxyip))
{
    $proxyip = ''; 
}
if ($proxyip == '')
{
    define('
PROXYIP', ''); 
    define('
IPADDRESS', $_SERVER['REMOTE_ADDR']);
}
else
{
    define('
PROXYIP', $_SERVER['REMOTE_ADDR']);
    define('
IPADDRESS', $proxyip); 
}
unset($proxyip); 
// End of Paul Marsden Proxy Hack Modification
// ####################### HN getproxyip END ######################## 
Is this code in error?
Please help!
Reply With Quote
Reply


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. The time now is 02:24 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04565 seconds
  • Memory Usage 2,303KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete