vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Proxy ip to real ip conversion (https://vborg.vbsupport.ru/showthread.php?t=69295)

Paul M 01-16-2005 09:49 PM

Are you sure you have correctly done the edit to init.php and uploaded it ? - this is where those constants are defined.

Delphiprogrammi 01-17-2005 06:11 AM

Quote:

Originally Posted by Paul M
Are you sure you have correctly done the edit to init.php and uploaded it ? - this is where those constants are defined.

i did edited that file but there was a typo :tired: now it works fine i tested it with a normal proxy and with an anonymous one (the hack doesn't detect this type of proxys) but that's normal nothing you or anybody else cando about it

rgds

cyt0plas 02-09-2005 03:50 PM

So what if a regular user sends the X-Forwarded for header, specifying someone else's IP? Can the user avoid bans/etc?

Delphiprogrammi 02-09-2005 03:54 PM

Quote:

Originally Posted by cyt0plas
So what if a regular user sends the X-Forwarded for header, specifying someone else's IP? Can the user avoid bans/etc?

that's impossible unless you "spoof" an ip adress which isn't so easy ...

xheliox 02-12-2005 05:30 PM

Is there any way to ignore reserved private IP ranges? I have several users who show up has having 192.168.x.x or 10.0.x.x as their "real IP".

Great mod, btw.. :)

Paul M 02-12-2005 06:00 PM

Quote:

Originally Posted by xheliox
Is there any way to ignore reserved private IP ranges? I have several users who show up has having 192.168.x.x or 10.0.x.x as their "real IP".

Great mod, btw.. :)

What exactly do you mean by "ignore them" ?

xheliox 02-12-2005 07:05 PM

Quote:

Originally Posted by Paul M
What exactly do you mean by "ignore them" ?

Show the "real IP" as the proxy IP.

Paul M 02-12-2005 07:28 PM

Well I haven't tested it, but this should work ;

Find;
PHP Code:

    $proxyip $iplist[0]; 

Add below it ;
PHP Code:

    if (preg_match("#^(127|10|172\.(1[6-9]|2[0-9]|3[0-1])|192\.168|169\.254)\.#"$proxyip)) 

    {
        
$proxyip ''
    } 

Obviously this won't change any existing data.

Edit: Updated for full 172 range and 127 range as per posts below.

xheliox 02-12-2005 07:36 PM

That seemed to do the trick. Thank you kindly.

Any chance you'll be adding that to your next release?

xheliox 02-12-2005 07:40 PM

PS - the range is 172.16.0.0 through 172.31.255.255.. I'm a regex moron, how would I add that range?

preg_match("#^(10|172\.[16-31]|192\.168)\.#", $proxyip))

?


All times are GMT. The time now is 02:40 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01342 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete