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 05-29-2005 08:51 PM

Quote:

Originally Posted by tmhall
Aha, now that I've used this a bit I see what the others meant about the WOL not working. Paul, I know your hack doesn't make any changes to the WOL list, but version 3.1 of the old hack does. But for some reason that doesn't work anymore after upgrading to your version.

The way it used to work is when you looked at the WOL list, if a user was behind a proxy their real IP would show up (as it still does) but next to it would be the blue question mark graphic which you could mouseover to see the proxyip. I don't know how that would be terribly useful, but it explains what people mean by there being a missing icon in the WOL anyway.

Well this was never meant to work with the other proxy hack - the only reason it's mentioned is because we had the proxy 3.0 version installed on our forum at the time I decided to develop this - therefore it made sense to use part of the 3.0 code we already had (mainly for storing the extra IP in the database). In reality, had I written it from scratch then the code would pretty much have been the same anyway.

I have never actually looked at the 3.1 version so I have no idea what it does to the WOL, or why it would stop it working but I'll take a peek and see if it's obvious.

zetetic 05-29-2005 08:58 PM

Quote:

Originally Posted by Paul M
I have never actually looked at the 3.1 version so I have no idea what it does to the WOL, or why it would stop it working but I'll take a peek and see if it's obvious.

One of the attachments available on that hack thread is just the WOL changes, so that should make it pretty easy to spot any differences. :)

Paul M 05-29-2005 09:20 PM

Quote:

Originally Posted by tmhall
One of the attachments available on that hack thread is just the WOL changes, so that should make it pretty easy to spot any differences. :)

I can see no reason why it would stop working - if you already have the proxy hack 3.1 WOL code installed - then installing this hack should have no effect. The PH3.1 WOL works by storing the detected proxyip in the sessions table, this hack would not affect this.

zetetic 05-29-2005 10:46 PM

Quote:

Originally Posted by Paul M
I can see no reason why it would stop working - if you already have the proxy hack 3.1 WOL code installed - then installing this hack should have no effect. The PH3.1 WOL works by storing the detected proxyip in the sessions table, this hack would not affect this.

Oh, I see what you mean. Now I realize the reason I'm not seeing that graphic is the $show[useragent] conditional which I apparently don't have set (and can't find). Anyway sorry to bother you.

Rukas 05-30-2005 01:47 AM

Seems to be working fine. Wont know until I come accross a proxy though I guess.

Question, when searching users IPs in the Admin CP, will it specify which is a proxy and which is real or will it just resolve the proxy into a real IP?

Paul M 05-30-2005 10:02 AM

Quote:

Originally Posted by tmhall
Oh, I see what you mean. Now I realize the reason I'm not seeing that graphic is the $show[useragent] conditional which I apparently don't have set (and can't find). Anyway sorry to bother you.

It's a setting at the bottom of each WOL page.

Quote:

Originally Posted by Rukas
Question, when searching users IPs in the Admin CP, will it specify which is a proxy and which is real or will it just resolve the proxy into a real IP?

Only the real ip is searchable, because the ACP code does not know that the proxip field exists.

Eagle Creek 05-30-2005 10:07 AM

You know what would be nice;

when the forum detects you are surfing a proxy it looks op your reall IP. If your reall IP's is banned; you don't have forum acces. Not even with proxy.

Paul M 05-30-2005 10:14 AM

Um, that's exactly what this does :)

Quote:

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

zetetic 05-30-2005 06:44 PM

Quote:

Originally Posted by Paul M
It's a setting at the bottom of each WOL page.

Wow. I went through every related php file and template twice before realizing what you mean. I can't believe I've never noticed that option before. Thanks!

Eagle Creek 05-30-2005 07:58 PM

Quote:

Originally Posted by Paul M
Um, that's exactly what this does :)

Huh? Well... if that's the case it's just great!

(huh? im really confused... when I asked the same question about, uuhm, 8 months ago people said to me "no that isn't possible". Maybe I'm confussing some hacks with each other! THX ANYWAY!)

Paul M 05-30-2005 09:34 PM

Quote:

Originally Posted by Eagle Creek
(huh? im really confused... when I asked the same question about, uuhm, 8 months ago people said to me "no that isn't possible". Maybe I'm confussing some hacks with each other! THX ANYWAY!)

You must have asked this about another hack - it was one of the reasons I developed this version. The real ip is extracted and assigned to the standard vB ipaddess static variable - this is what vB then uses in all it's ip related functions (wol, sessions, banning, ip searching etc).

sv1cec 06-10-2005 08:35 AM

Paul M,

I just installed your hack, but is there anyway to test it? I am sorry if this has been posted before, I skipped through some of the pages and didn't see a way to test it.

Rgds and many thanks

Paul M 06-10-2005 08:40 AM

You're not showing as having it installed ;)

The only test is to post via a proxy server (one that passes on the correct http headers). If you PM me a test account I can post on your forum - my ISP is ntl in the uk - who route all http traffic through such proxy servers. I will be here for about 15 mins, and then back again in a few hours.

MickDoneDee 06-10-2005 08:55 AM

Another option is to set up your browser with a temporary proxy address and then login to your site and make a post.

Get a free proxy address from http://www.freeproxy.ru/download/lists/goodproxy.txt

Go to your browser Internet Options in the Tools menu and select the Connections tab. Click the LAN settings button and tick the Proxy Server box and type in the address and port number. Click Okay and Apply. Now when you logon to your site you should see that proxy address in WOL and get a red icon when you post.

When the test is finished remove the proxy address from your browser.

All of the above presumes you don't already have a proxy address via your ISP as Paul does.

sv1cec 06-10-2005 09:09 AM

Quote:

Originally Posted by Paul M
You're not showing as having it installed

I know, LoL, I just wanted to test it first. OK, OK, I'll click install now.

My site is: http://forum.m1911.org

Just register under the name Paul M and post something in the Test Forum here:

http://forum.m1911.org/forumdisplay.php?f=85

Thanks, let's see what it does.

sv1cec 06-10-2005 09:17 AM

Neat, it works, thanks Paul M, nice hack.

Now let's wait for any ... offenders!

If I want to see who has used a proxy IP instead of a normal one, can I create a report which will compare the two columns in post? From what I read, if proxyip is not null, and the ipaddress is different than the proxyip, this meaans that this user is using a proxy to log in, right?

Paul M 06-10-2005 09:27 AM

Quote:

Originally Posted by sv1cec
If I want to see who has used a proxy IP instead of a normal one, can I create a report which will compare the two columns in post? From what I read, if proxyip is not null, and the ipaddress is different than the proxyip, this meaans that this user is using a proxy to log in, right?

You would have to make your own report or sql query to do this, but yes, if proxy is not null, and ip <> proxy then they have come in via a proxy server. In fact, if proxy is not null, it should never equal the real ip, that would be a seriously screwed set-up.

sv1cec 06-10-2005 09:40 AM

Thank you Sir, that's what I intended to do, create an Admin report. When I have it, I'll post it here, with your permission of course.

It looks as if this is a powerful tool for the admins, again, well done.

Paul M 06-10-2005 03:31 PM

Quote:

Originally Posted by sv1cec
Thank you Sir, that's what I intended to do, create an Admin report. When I have it, I'll post it here, with your permission of course.

Feel free. :)

bigdog829 07-27-2005 06:35 PM

Clicks install

bulbasnore 08-04-2005 12:36 AM

Clicks install.

So, if I ban the proxy IP, "what happen?!"

Paul M 08-04-2005 07:38 AM

If it's detected as a proxy then nothing. If it isn't detected as one, then it will get banned.

Eagle Creek 08-04-2005 10:32 AM

Will it work @ 3.5?

Paul M 08-04-2005 11:23 AM

I have a 3.5 version of this, which will be released in the last week of August (after my holiday).

MP3 08-21-2005 09:24 AM

In includes/functions_newpost.php

i didn't see:

PHP Code:

$DB_site->query("
            INSERT INTO " 
TABLE_PREFIX "post
                (threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie,
                 showsignature, ipaddress, iconid, visible, attach)
            VALUES
                (
$threadinfo[threadid]$parentid, '" addslashes($post['title']) . "',
                 '" 
addslashes($post['postusername']) . "', $bbuserinfo[userid], " TIMENOW ",
                 '" 
addslashes($post['message']) . "', $post[enablesmilies]$post[signature],
                 '" 
addslashes($post['ipaddress']) . "', $post[iconid]$post[visible]$totalattachments)
        "
); 


i run vb 308 :ermm:


also; If I installed the early version, what should I modify to upgrade it to the newest version? Knowing that I delete the early hack file from my pc so I can't look for the difference between both.

Paul M 08-21-2005 10:06 AM

Quote:

Originally Posted by MP3
In includes/functions_newpost.php

i didn't see:

i run vb 308 :ermm:

Well it seems to be there for me, about line 423 (under "// ### POST NEW POST ###")

Quote:

Originally Posted by MP3
also; If I installed the early version, what should I modify to upgrade it to the newest version? Knowing that I delete the early hack file from my pc so I can't look for the difference between both.

The early version of what ?

yoyoyoyo 08-21-2005 11:20 AM

The instructions say " "This hack makes the forum always use the members real ip when a proxy is detected,"" and then "Obviously, like all proxy server detection hacks, this will only work if the proxy server passes the appropiate http variables." So, the claims following it are a bit confusing. They are written as it if always works. But they are a bit "optimistic" as they only work if the conditions in the first paragraph are met.

I am wondering just how many people work with a "non-anonymous" proxy?

Paul M 08-21-2005 12:19 PM

It seems perfectly clear to me - when a proxy is detected, the real ip is used, not the proxy ip. A proxy can only be detected if it passes the correct http variables. Only you seem to be confused.

Quote:

Originally Posted by yoyoyoyo
I am wondering just how many people work with a "non-anonymous" proxy?

1.5 million ntl customers in the uk for starters, as well as many companies and other ISP's.

yoyoyoyo 08-21-2005 12:22 PM

Quote:

Originally Posted by Paul M
It seems perfectly clear to me - when a proxy is detected, the real ip is used, not the proxy ip. A proxy can only be detected if it passes the correct http variables. Only you seem to be confused.

1.5 million ntl customers in the uk for starters, as well as many companies and other ISP's.

I was not putting your hack down, so there is no need to be nasty about it. The reason I asked is because it seemed to be a contradiction, which confused me, and I wanted to understand how this great hack worked. When I install a modification on a board I like to try to understand how it works, rather than letting the "magic" of vb do the work. Thanks again for sharing your work.

Paul M 08-21-2005 12:31 PM

Quote:

Originally Posted by yoyoyoyo
I was not putting your hack down, so there is no need to be nasty about it.

There was no intention to be nasty, I'm sorry if you took it that way - I simply answered your questions. :)

yoyoyoyo 08-21-2005 12:38 PM

Quote:

Originally Posted by Paul M
There was no intention to be nasty, I'm sorry if you took it that way - I simply answered your questions. :)

In that case I apologize for taking it that way.

Can you explain which variable the http is passed through to check if it is a proxy IP? Is it simply checking the IP against the x-originating IP address, or is it doing something else as well?

Paul M 08-21-2005 03:28 PM

Proxy servers pass the originating ip in a variety of ways depending on the software they run (is there a standard I wonder ?). The most common ones are X_FORWARDED_FOR & CLIENT_IP. The hack checks these (and others) for a vailid IP address.

yoyoyoyo 08-21-2005 04:00 PM

Quote:

Originally Posted by Paul M
Proxy servers pass the originating ip in a variety of ways depending on the software they run (is there a standard I wonder ?). The most common ones are X_FORWARDED_FOR & CLIENT_IP. The hack checks these (and others) for a vailid IP address.

cool- thanks for the info. What are some of the "others"?

CP, 08-21-2005 04:32 PM

This seems like a very good hack, ive installed other hacks, but this one seems a little hard onto following some of the steps, im stuck at the second step already, anybody have or maybe got an easier translation for a newbie like me?? So i can follow clear instructions and details??

bjs144 08-24-2005 01:51 PM

Works really well.

Thanks again Paul.

chriswible 09-09-2005 01:46 AM

Great idea, great hack. Functionality is perfect.

Of course, it took a bit of modding to make this work with the "extra IP info" hack, but I managed. :p (I realize someone's probably done it already.)

Zephyrus 09-12-2005 11:02 AM

Hmm, I installed the extra IP info hack, and I don't know if it'll work with this, care to add me on MSN or AIM or YIM to teach me? Anyone?

Anyone will do.
MSN: szehan80@hotmail
AIM: szehan72
YIM: szehan72

Paul M 09-12-2005 11:57 AM

Quote:

Originally Posted by ZephNeo
Hmm, I installed the extra IP info hack, and I don't know if it'll work with this, care to add me on MSN or AIM or YIM to teach me? Anyone?

As far as functionality is concerned they will work fine, they do not intefere with each other. The only clash is the displayiing of the icon via postbit_ip template. One suggested solution to this is here.


Another solution, that I e-mailed to someone the other week, is to do this ;

Follow the proxy-to-real instructions and replace postbit_ip - ignore the ipinfo instructions that mention this template. Then in postbit template (or postbit_legacy if you use it)

Find ;

Code:

<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
Add this below ;

Code:

<tr><td class="vbmenu_option"><a href="ipinfo.php?$session[sessionurl]p=$post[postid]" target='_blank' >Display IP Information</a></td></tr>
After doing this you should be able to view the ip information for any post like this ;

Click on the posters name - this should display the DHTML list of options, at the bottom of the list (under "Add xxxx to Your Buddy List") should be "Display IP Information" - simply click on it.

Zephyrus 09-13-2005 12:53 PM

Theres another way, I just figured it out:
at step 3, theres this code, and..

Code:

<if condition="$show['ip']">
$vbphrase[ip]: $post[ip]
<else />
<if condition="($post[proxyip] != '')">
<a href="postings.php?$session[sessionurl]do=getip&amp;p=$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/ipp.gif" alt="$vbphrase[ip]" title="$post[ip]" border="0" /></a>
<else />

After this..
Code:

<a href="postings.php?$session[sessionurl]do=getip&amp;p=$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]" title="$post[ip]" border="0" /></a>
</else></if>
</if>

I'll replace it with the code that ipinfo tells me to
Code:

Find:
<a href="postings.php?$session[sessionurl]do=getip&amp;p=$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]" title="$post[ip]" border="0" /></a>
 
Replace with:
<a href="ipinfo.php?$session[sessionurl]p=$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]" title="$post[ip]" border="0" /></a>

This way, I'll see the ipinfo when a proxy is not detected, but when a proxy is detected, the "red ipp.gif" icon appears and I'll see the proxy info, hmm its probably all good. =)

Paul M 09-13-2005 04:05 PM

Like anything, there is usually more than one way to do something. :)


All times are GMT. The time now is 02:25 AM.

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.01440 seconds
  • Memory Usage 1,860KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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