ip-10-224-83-43:/usr/local/src/crtmpserver/sources # svn diff Index: thelib/src/protocols/rtmp/inboundrtmpprotocol.cpp =================================================================== --- thelib/src/protocols/rtmp/inboundrtmpprotocol.cpp (revision 794) +++ thelib/src/protocols/rtmp/inboundrtmpprotocol.cpp (working copy) @@ -120,6 +120,13 @@ bool InboundRTMPProtocol::ValidateClient(IOBuffer &inputBuffer) { if (_currentFPVersion == 0) { + std::string ip(GetCustomParameters()["ip"].ToString()); + cout << "Validating client by ip: "<< ip << " (only 127.0.0.1 is allowed.)" << endl; + if (ip.compare("127.0.0.1") == 0) + return true; + else + return false; + WARN("This version of player doesn't support validation"); return true; } Index: thelib/src/netio/epoll/tcpacceptor.cpp =================================================================== --- thelib/src/netio/epoll/tcpacceptor.cpp (revision 794) +++ thelib/src/netio/epoll/tcpacceptor.cpp (working copy) @@ -161,6 +161,10 @@ //4. Create the chain BaseProtocol *pProtocol = ProtocolFactoryManager::CreateProtocolChain(_protocolChain, _parameters); + + pProtocol->GetCustomParameters()["ip"] = string (inet_ntoa(((sockaddr_in *) & address)->sin_addr)); + cout << "set source ip parameter to: "<< pProtocol->GetCustomParameters()["ip"].ToString() << endl; + if (pProtocol == NULL) { FATAL("Unable to create protocol chain"); CLOSE_SOCKET(fd); ip-10-224-83-43:/usr/local/src/crtmpserver/sources #