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 02-12-2005 08:35 PM

Quote:

Originally Posted by xheliox
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))

?

I'm not sure that would work - regex gives me headaches - I'll look into it for you.

xheliox 02-12-2005 08:37 PM

Quote:

Originally Posted by Paul M
I'm not sure that would work - regex gives me headaches - I'll look into it for you.

Yeah, my way didn't work at all. It just broke the whole thing. :(

I appreciate it. :)

Paul M 02-12-2005 08:53 PM

Try this;
PHP Code:

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

:)

xheliox 02-13-2005 11:44 AM

That seems to work.. I'll keep an eye on it and let you know. Thanks again!

David Bott 02-15-2005 09:17 PM

I was just coming here to post about this same issue. I just had an issue with 127.0.0.1 and also some 10.X.X.X numbers. I do not think the above handles 127's. Somtimes hacks just work too good.

Paul M 02-15-2005 09:58 PM

Quote:

Originally Posted by David Bott
Somtimes hacks just work too good.

No, they work as designed. :)

I have no reason to exclude those addresses, so my hack doesn't. If you don't want them then use the extra code posted above, you can add 127.x.x.x to it easily enough as well.

David Bott 02-16-2005 08:42 AM

Hi Paul...Thanks for the reply. I am sorry to say I am not advanced enough to understand how to add in the 127 range. Can you please be so kind to advise.

Thank you in advance. (Currently dealing with a problem user.)

Paul M 02-16-2005 09:07 AM

Quote:

Originally Posted by David Bott
Hi Paul...Thanks for the reply. I am sorry to say I am not advanced enough to understand how to add in the 127 range. Can you please be so kind to advise.

Sure - I have updated the code in Post 98 for all the changes. :)

David Bott 02-16-2005 09:36 AM

Paul...Here is something for you to REALLY help in this case...

http://www.tcpipguide.com/free/t_IPR...ddresses-3.htm

It lists all the private IP's that could be used. (Not many)

Thank you for the updates!!!!

BTW...I am gussing that if the code finds any of these private IPs, it will just use the reported proxy IP like it did not find anything. (Thus we can choose to block the proxy if need be.)

BTW...Now running on TiVo Community (http://www.tivocommunity.com) and will be at AVS Forum after I convert that. (http://www.avsforum.com)

Paul M 02-16-2005 10:20 AM

Thanks - the only one really relevant in that list that was missing was the DHCP auto range of 169.254.x.x - I have added that.

BTW - you just reminded me to check my old Tivo userid out - I joined in 2002 !


All times are GMT. The time now is 08:26 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.01158 seconds
  • Memory Usage 1,740KB
  • 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
  • (1)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