12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #ifndef __FINGERPRINT_MANAGER_H__
- #define __FINGERPRINT_MANAGER_H__
- #include <string>
- #include <map>
- #include <vector>
- #include <boost/asio.hpp>
- #include "http/HttpBridge.hpp"
- using namespace boost::asio;
- class FingerprintManager : public HttpBridgeListener {
- private:
- static FingerprintManager *manager;
- std::map<ip::address, std::string> fingerprints;
- std::vector<std::string> validAgents;
- std::string* getUserAgentFor(ip::address &address);
- public:
-
- static FingerprintManager* getInstance();
- void setValidUserAgents(std::string &validAgents);
- virtual void setUserAgentFor(ip::address &address, std::string &userAgent);
- bool isValidTarget(ip::address &address);
- bool isValidWildcardTarget(ip::address &address);
- };
- #endif
|