Created
October 19, 2012 12:24
-
-
Save metametaclass/3917988 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifdef WANT_IP_FROM_PROXY | |
| if( accesslist_isblessed( cookie->ip, OT_PERMISSION_MAY_PROXY ) ) { | |
| ot_ip6 proxied_ip; | |
| char *fwd = http_header( ws->request, ws->header_size, "x-forwarded-for" ); | |
| if( fwd && scan_ip6( fwd, proxied_ip ) ) { | |
| syslog(LOG_DAEMON | LOG_DEBUG,"ip_from_proxy %s",fwd); | |
| OT_SETIP( &ws->peer, proxied_ip ); | |
| } else | |
| OT_SETIP( &ws->peer, cookie->ip ); | |
| } else | |
| #endif | |
| ws->peer_id = NULL; | |
| ws->hash = NULL; | |
| OT_SETIP( &ws->peer, cookie->ip ); | |
| OT_SETPORT( &ws->peer, &port ); | |
| OT_PEERFLAG( &ws->peer ) = 0; | |
| numwant = 50; | |
| scanon = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment