diff --git a/experiment/psiphon/psiphon.go b/experiment/psiphon/psiphon.go index 3e73d788..5ca59490 100644 --- a/experiment/psiphon/psiphon.go +++ b/experiment/psiphon/psiphon.go @@ -30,7 +30,7 @@ import ( const ( testName = "psiphon" - testVersion = "0.3.1" + testVersion = "0.3.2" ) // Config contains the experiment's configuration. @@ -45,27 +45,14 @@ type Config struct { // This is what will end up into the Measurement.TestKeys field // when you run this experiment. type TestKeys struct { - // Agent is the HTTP agent we're using. - Agent string `json:"agent"` - - // BootstrapTime is the seconds it took to bootstrap Psiphon. - BootstrapTime float64 `json:"bootstrap_time"` - - // Failure contains the failure that occurred. - Failure *string `json:"failure"` - - // MaxRuntime is the number of seconds after which we - // interrupt the psiphon experiment. - MaxRuntime float64 `json:"max_runtime"` - - // Queries contains the DNS queries. - Queries oonidatamodel.DNSQueriesList `json:"queries"` - - // Requests contains HTTP measurements - Requests oonidatamodel.RequestList `json:"requests"` - - // SOCKSProxy is the address of the proxy we're using. - SOCKSProxy string `json:"socksproxy"` + Agent string `json:"agent"` + BootstrapTime float64 `json:"bootstrap_time"` + Failure *string `json:"failure"` + MaxRuntime float64 `json:"max_runtime"` + Queries oonidatamodel.DNSQueriesList `json:"queries"` + Requests oonidatamodel.RequestList `json:"requests"` + SOCKSProxy string `json:"socksproxy"` + TLSHandshakes oonidatamodel.TLSHandshakesList `json:"tls_handshakes"` } type runner struct { @@ -141,8 +128,11 @@ func (r *runner) usetunnel( r.testkeys.Requests = append( r.testkeys.Requests, oonidatamodel.NewRequestList(results.TestKeys)..., ) + r.testkeys.TLSHandshakes = append( + r.testkeys.TLSHandshakes, oonidatamodel.NewTLSHandshakesList(results.TestKeys)..., + ) // TODO(bassosimone): understand if there is a way to ask - // the tunnel the number of bytes sent and/or received + // the tunnel the number of bytes sent and received receivedBytes := results.TestKeys.ReceivedBytes sentBytes := results.TestKeys.SentBytes r.callbacks.OnDataUsage( diff --git a/experiment/telegram/telegram.go b/experiment/telegram/telegram.go index 35061a7c..e2038c49 100644 --- a/experiment/telegram/telegram.go +++ b/experiment/telegram/telegram.go @@ -26,7 +26,7 @@ import ( const ( testName = "telegram" - testVersion = "0.0.4" + testVersion = "0.0.5" ) // Config contains the experiment config. @@ -34,14 +34,15 @@ type Config struct{} // TestKeys contains telegram test keys. type TestKeys struct { - Agent string `json:"agent"` - Queries oonidatamodel.DNSQueriesList `json:"queries"` - Requests oonidatamodel.RequestList `json:"requests"` - TCPConnect oonidatamodel.TCPConnectList `json:"tcp_connect"` - TelegramHTTPBlocking bool `json:"telegram_http_blocking"` - TelegramTCPBlocking bool `json:"telegram_tcp_blocking"` - TelegramWebFailure *string `json:"telegram_web_failure"` - TelegramWebStatus string `json:"telegram_web_status"` + Agent string `json:"agent"` + Queries oonidatamodel.DNSQueriesList `json:"queries"` + Requests oonidatamodel.RequestList `json:"requests"` + TCPConnect oonidatamodel.TCPConnectList `json:"tcp_connect"` + TelegramHTTPBlocking bool `json:"telegram_http_blocking"` + TelegramTCPBlocking bool `json:"telegram_tcp_blocking"` + TelegramWebFailure *string `json:"telegram_web_failure"` + TelegramWebStatus string `json:"telegram_web_status"` + TLSHandshakes oonidatamodel.TLSHandshakesList `json:"tls_handshakes"` } type urlMeasurements struct { @@ -78,6 +79,10 @@ func (tk *TestKeys) processone(v *urlMeasurements) error { tk.TCPConnect, oonidatamodel.NewTCPConnectList(r.TestKeys)..., ) + tk.TLSHandshakes = append( + tk.TLSHandshakes, + oonidatamodel.NewTLSHandshakesList(r.TestKeys)..., + ) // process access points first if v.method != "GET" { if r.Error == nil {