Browse Source

- fingerprint cleanup

Tobias Begalke 7 years ago
parent
commit
574c449e3d
3 changed files with 37 additions and 32 deletions
  1. 33 32
      fingerprint.go
  2. 3 0
      request.proto
  3. 1 0
      request_data.go

+ 33 - 32
fingerprint.go

@@ -9,36 +9,37 @@ import (
 
 
 type Fingerprint struct {
 type Fingerprint struct {
 	// ID                  bson.ObjectId `bson:"_id,omitempty" json:"_id"`
 	// ID                  bson.ObjectId `bson:"_id,omitempty" json:"_id"`
-	Remote              string        `bson:"remote" json:"remote" form:"remote"`
-	Url                 string        `bson:"url" json:"url" form:"url"`
-	UserAgent           string        `bson:"user_agent" json:"user_agent" form:"user_agent"`
-	Adblock             bool          `bson:"adblock" json:"adblock" form:"adblock"`
-	AvailableResolution []int         `bson:"available_resolution" json:"available_resolution" form:"available_resolution"`
-	Canvas              string        `bson:"canvas" json:"canvas" form:"canvas"`
-	ColorDepth          int           `bson:"color_depth" json:"color_depth" form:"color_depth"`
-	CpuClass            string        `bson:"cpu_class" json:"cpu_class" form:"cpu_class"`
-	DoNotTrack          string        `bson:"do_not_track" json:"do_not_track" form:"don_not_track"`
-	Fingerprint         string        `bson:"fingerprint" json:"fingerprint" form:"fingerprint"`
-	HasLiedBrowser      bool          `bson:"has_lied_browser" json:"has_lied_browser" form:"has_lied_browser"`
-	HasLiedLanguages    bool          `bson:"has_lied_languages" json:"has_lied_languages" form:"has_lied_languages"`
-	HasLiedOs           bool          `bson:"has_lied_os" json:"has_lied_os" form:"has_lied_os"`
-	HasLiedResolution   bool          `bson:"has_lied_resolution" json:"has_lied_resolution" form:"has_lied_resolution"`
-	IndexedDb           int           `bson:"indexed_db" json:"indexed_db" form:"indexed_db"`
-	JsFonts             []string      `bson:"js_fonts" json:"js_fonts" form:"js_fonts"`
-	Language            string        `bson:"language" json:"language" form:"language"`
-	LocalStorage        int           `bson:"local_storage" json:"local_storage" form:"local_storage"`
-	NavigatorPlatform   string        `bson:"navigator_platform" json:"navigator_platform" form:"navigator_platform"`
-	Plugins             []string      `bson:"regular_plugins" json:"regular_plugins" form:"regular_plugins"`
-	Resolution          []int         `bson:"resolution" json:"resolution" form:"resolution"`
-	SessionStorage      int           `bson:"session_storage" json:"session_storage" form:"session_storage"`
-	TouchSupport        []interface{} `bson:"touch_support" json:"touch_support" form:"touch_support"`
-	WebGl               string        `bson:"webgl" json:"webgl" form:"webgl"`
-	TimeZoneOffset      int           `bson:"timezone_offset" json:"timezone_offset" form:"timezone_offset"`
-	CreatedAt           time.Time     `bson:"created_at" json:"created_at" form:"created_at"`
-	Source              string        `bson:"source" json:"source" form:"source"`
-	XForwardedFor       string        `bson:"x_forwarded_for" json:"x-forwarded-for" form:"x_forwarded_for"`
-	XRealIP             string        `bson:"x_real_ip" json:"x-real-ip" form:"x_real_ip"`
-	XScwIP              string        `bson:"x_scw_ip" json:"x-scw-ip" form:"x_scw_ip"`
-	Grs                 *grs.GRS      `bson:"grs" json:"grs" form:"grs"`
-	GeoIP               *geoip.GeoIP  `bson:"geoip" json:"geoip" form:"geoip"`
+	ClientID      string       `bson:"cid" json:"cid" form:"cid"`
+	Remote        string       `bson:"remote" json:"remote" form:"remote"`
+	Url           string       `bson:"url" json:"url" form:"url"`
+	Fingerprint   string       `bson:"fp" json:"fp" form:"fp"`
+	CreatedAt     time.Time    `bson:"created_at" json:"created_at" form:"created_at"`
+	Source        string       `bson:"source" json:"source" form:"source"`
+	XForwardedFor string       `bson:"x_forwarded_for" json:"x-forwarded-for" form:"x_forwarded_for"`
+	XRealIP       string       `bson:"x_real_ip" json:"x-real-ip" form:"x_real_ip"`
+	XScwIP        string       `bson:"x_scw_ip" json:"x-scw-ip" form:"x_scw_ip"`
+	Grs           *grs.GRS     `bson:"grs" json:"grs" form:"grs"`
+	GeoIP         *geoip.GeoIP `bson:"geoip" json:"geoip" form:"geoip"`
+	//UserAgent           string        `bson:"user_agent" json:"user_agent" form:"user_agent"`
+	//Adblock             bool          `bson:"adblock" json:"adblock" form:"adblock"`
+	//AvailableResolution []int         `bson:"available_resolution" json:"available_resolution" form:"available_resolution"`
+	//Canvas              string        `bson:"canvas" json:"canvas" form:"canvas"`
+	//ColorDepth          int           `bson:"color_depth" json:"color_depth" form:"color_depth"`
+	//CpuClass            string        `bson:"cpu_class" json:"cpu_class" form:"cpu_class"`
+	//DoNotTrack          string        `bson:"do_not_track" json:"do_not_track" form:"don_not_track"`
+	//HasLiedBrowser      bool          `bson:"has_lied_browser" json:"has_lied_browser" form:"has_lied_browser"`
+	//HasLiedLanguages    bool          `bson:"has_lied_languages" json:"has_lied_languages" form:"has_lied_languages"`
+	//HasLiedOs           bool          `bson:"has_lied_os" json:"has_lied_os" form:"has_lied_os"`
+	//HasLiedResolution   bool          `bson:"has_lied_resolution" json:"has_lied_resolution" form:"has_lied_resolution"`
+	//IndexedDb           int           `bson:"indexed_db" json:"indexed_db" form:"indexed_db"`
+	//JsFonts             []string      `bson:"js_fonts" json:"js_fonts" form:"js_fonts"`
+	//Language            string        `bson:"language" json:"language" form:"language"`
+	//LocalStorage        int           `bson:"local_storage" json:"local_storage" form:"local_storage"`
+	//NavigatorPlatform   string        `bson:"navigator_platform" json:"navigator_platform" form:"navigator_platform"`
+	//Plugins             []string      `bson:"regular_plugins" json:"regular_plugins" form:"regular_plugins"`
+	//Resolution          []int         `bson:"resolution" json:"resolution" form:"resolution"`
+	//SessionStorage      int           `bson:"session_storage" json:"session_storage" form:"session_storage"`
+	//TouchSupport        []interface{} `bson:"touch_support" json:"touch_support" form:"touch_support"`
+	//WebGl               string        `bson:"webgl" json:"webgl" form:"webgl"`
+	//TimeZoneOffset      int           `bson:"timezone_offset" json:"timezone_offset" form:"timezone_offset"`
 }
 }

+ 3 - 0
request.proto

@@ -2,6 +2,9 @@ syntax = "proto3";
 
 
 package data;
 package data;
 
 
+option java_package = "com.scraperwall.data";
+option java_outer_classname = "RequestProtos";
+
 
 
 message Request {
 message Request {
   string Url = 100;
   string Url = 100;

+ 1 - 0
request_data.go

@@ -33,6 +33,7 @@ type RequestData struct {
 	Accept         string                 `bson:"accept" json:"accept"`
 	Accept         string                 `bson:"accept" json:"accept"`
 	Cookie         string                 `bson:"cookie" json:"cookie"`
 	Cookie         string                 `bson:"cookie" json:"cookie"`
 	Host           string                 `bson:"host" json:"host"`
 	Host           string                 `bson:"host" json:"host"`
+	HostName       string                 `bson:"hostname" json:"hostname"`
 	Protocol       string                 `bson:"protocol" json:"protocol"`
 	Protocol       string                 `bson:"protocol" json:"protocol"`
 	Source         string                 `bson:"source" json:"source"`
 	Source         string                 `bson:"source" json:"source"`
 	Via            string                 `bson:"via" json:"via"`
 	Via            string                 `bson:"via" json:"via"`