tor-commits
Threads by month
- ----- 2026 -----
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
February 2018
- 19 participants
- 1580 discussions
[metrics-web/master] Stop using \n to create whitespace around text.
by karsten@torproject.org 09 Feb '18
by karsten@torproject.org 09 Feb '18
09 Feb '18
commit ba6c9e2efdb238df0cdb2363d00de78322cfa4de
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Fri Feb 9 21:09:16 2018 +0100
Stop using \n to create whitespace around text.
---
src/main/R/rserver/graphs.R | 74 +++++++++++++++++++++++++--------------------
1 file changed, 42 insertions(+), 32 deletions(-)
diff --git a/src/main/R/rserver/graphs.R b/src/main/R/rserver/graphs.R
index b238713..440a691 100644
--- a/src/main/R/rserver/graphs.R
+++ b/src/main/R/rserver/graphs.R
@@ -273,13 +273,25 @@ formatter <- function(x, ...) {
format(x, ..., scientific = FALSE, big.mark = ' ')
}
-theme_update(plot.title = element_text(hjust = 0.5),
- plot.margin = margin(5.5, 11, 5.5, 5.5))
+theme_update(
+ # Make plot title centered, and leave some room to the plot.
+ plot.title = element_text(hjust = 0.5, margin = margin(b = 11)),
+
+ # Leave a little more room to the right for long x axis labels.
+ plot.margin = margin(5.5, 11, 5.5, 5.5),
+
+ # Leave some room between plot and x axis label, which we use for the
+ # copyright notice.
+ axis.title.x = element_text(margin = margin(t = 11)),
+
+ # Leave some room between plot and y axis label.
+ axis.title.y = element_text(margin = margin(r = 11))
+)
# Set the default line size of geom_line() to 1.
update_geom_defaults("line", list(size = 1))
-copyright_notice = "\nThe Tor Project - https://metrics.torproject.org/"
+copyright_notice = "The Tor Project - https://metrics.torproject.org/"
plot_networksize <- function(start, end, path) {
end <- min(end, as.character(Sys.Date() - 2))
@@ -310,7 +322,7 @@ plot_networksize <- function(start, end, path) {
scale_y_continuous(name = "", limits = c(0, NA)) +
scale_colour_hue("", breaks = c("relays", "bridges"),
labels = c("Relays", "Bridges")) +
- ggtitle("Number of relays\n")
+ ggtitle("Number of relays")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
@@ -347,7 +359,7 @@ plot_versions <- function(start, end, path) {
scale_colour_manual(name = "Tor version",
values = colours[colours$breaks %in% visible_versions, 2],
breaks = visible_versions) +
- ggtitle("Relay versions\n")
+ ggtitle("Relay versions")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
@@ -375,7 +387,7 @@ plot_platforms <- function(start, end, path) {
breaks = c("Linux", "Darwin", "BSD", "Windows", "Other"),
labels = c("Linux", "macOS", "BSD", "Windows", "Other"),
values = c("#E69F00", "#56B4E9", "#009E73", "#0072B2", "#333333")) +
- ggtitle("Relay platforms\n")
+ ggtitle("Relay platforms")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
@@ -515,7 +527,7 @@ plot_relayflags <- function(start, end, flags, path) {
scale_colour_manual(name = "Relay flags", values = c("#E69F00",
"#56B4E9", "#009E73", "#EE6A50", "#000000", "#0072B2"),
breaks = flags, labels = flags) +
- ggtitle("Number of relays with relay flags assigned\n")
+ ggtitle("Number of relays with relay flags assigned")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
@@ -651,7 +663,7 @@ plot_connbidirect <- function(start, end, path) {
breaks = c("both", "write", "read"),
labels = c("Both reading and writing", "Mostly writing",
"Mostly reading")) +
- ggtitle("Fraction of connections used uni-/bidirectionally\n") +
+ ggtitle("Fraction of connections used uni-/bidirectionally") +
theme(legend.position = "top")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
@@ -734,11 +746,10 @@ plot_userstats <- function(start, end, node, variable, value, events,
if (node == 'relay') {
if (value != 'all') {
u <- u[u$country == value, ]
- title <- paste("Directly connecting users from ",
- countryname(value), "\n", sep = "")
+ title <- paste("Directly connecting users from", countryname(value))
} else {
u <- u[u$country == '', ]
- title <- "Directly connecting users\n"
+ title <- "Directly connecting users"
}
u <- aggregate(list(lower = u$lower, upper = u$upper,
users = u$clients),
@@ -764,7 +775,7 @@ plot_userstats <- function(start, end, node, variable, value, events,
by = list(date = as.Date(u$date, "%Y-%m-%d"),
value = u$transport),
FUN = sum)
- title <- paste("Bridge users by transport\n")
+ title <- paste("Bridge users by transport")
} else {
u <- u[u$transport == value, ]
u <- aggregate(list(lower = u$lower, upper = u$upper,
@@ -772,17 +783,17 @@ plot_userstats <- function(start, end, node, variable, value, events,
by = list(date = as.Date(u$date, "%Y-%m-%d"),
value = u$transport),
FUN = sum)
- title <- paste("Bridge users using ",
+ title <- paste("Bridge users using",
ifelse(value == '<??>', 'unknown pluggable transport(s)',
ifelse(value == '<OR>', 'default OR protocol',
ifelse(value == '!<OR>', 'any pluggable transport',
ifelse(value == 'fte', 'FTE',
ifelse(value == 'websocket', 'Flash proxy/websocket',
- paste('transport', value)))))), "\n", sep = "")
+ paste('transport', value)))))))
}
} else if (variable == 'version') {
u <- u[u$version == value, ]
- title <- paste("Bridge users using IP", value, "\n", sep = "")
+ title <- paste("Bridge users using IP", value, sep = "")
u <- aggregate(list(lower = u$lower, upper = u$upper,
users = u$clients),
by = list(date = as.Date(u$date, "%Y-%m-%d"),
@@ -791,11 +802,10 @@ plot_userstats <- function(start, end, node, variable, value, events,
} else {
if (value != 'all') {
u <- u[u$country == value, ]
- title <- paste("Bridge users from ", countryname(value),
- "\n", sep = "")
+ title <- paste("Bridge users from", countryname(value))
} else {
u <- u[u$country == '' & u$transport == '' & u$version == '', ]
- title <- "Bridge users\n"
+ title <- "Bridge users"
}
u <- aggregate(list(lower = u$lower, upper = u$upper,
users = u$clients),
@@ -928,11 +938,11 @@ plot_advbwdist_perc <- function(start, end, p, path) {
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
- scale_y_continuous(name = "Advertised bandwidth in Gbit/s\n",
+ scale_y_continuous(name = "Advertised bandwidth in Gbit/s",
limits = c(0, NA)) +
scale_colour_hue(name = "Percentile",
breaks = rev(levels(t$percentile))) +
- ggtitle("Advertised bandwidth distribution\n")
+ ggtitle("Advertised bandwidth distribution")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
@@ -955,10 +965,10 @@ plot_advbwdist_relay <- function(start, end, n, path) {
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
- scale_y_continuous(name = "Advertised bandwidth in Gbit/s\n",
+ scale_y_continuous(name = "Advertised bandwidth in Gbit/s",
limits = c(0, NA)) +
scale_colour_hue(name = "n", breaks = levels(t$relay)) +
- ggtitle("Advertised bandwidth of n-th fastest relays\n")
+ ggtitle("Advertised bandwidth of n-th fastest relays")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
@@ -979,7 +989,7 @@ plot_hidserv_dir_onions_seen <- function(start, end, path) {
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
scale_y_continuous(name = "") +
- ggtitle("Unique .onion addresses\n")
+ ggtitle("Unique .onion addresses")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
@@ -1002,7 +1012,7 @@ plot_hidserv_rend_relayed_cells <- function(start, end, path) {
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
scale_y_continuous(name = "") +
- ggtitle("Onion-service traffic in Mbit/s\n")
+ ggtitle("Onion-service traffic in Mbit/s")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
@@ -1057,11 +1067,11 @@ plot_webstats_tb <- function(start, end, path) {
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
- scale_y_continuous(name = 'Requests per day\n', labels = formatter,
+ scale_y_continuous(name = 'Requests per day', labels = formatter,
limits = c(0, NA)) +
theme(strip.text.y = element_text(angle = 0, hjust = 0, size = rel(1.5)),
strip.background = element_rect(fill = NA)) +
- ggtitle("Tor Browser downloads and updates\n")
+ ggtitle("Tor Browser downloads and updates")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
@@ -1080,14 +1090,14 @@ plot_webstats_tb_platform <- function(start, end, path) {
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
- scale_y_continuous(name = 'Requests per day\n', labels = formatter,
+ scale_y_continuous(name = 'Requests per day', labels = formatter,
limits = c(0, NA)) +
scale_colour_hue(name = "Platform",
breaks = c("w", "m", "l", "o", ""),
labels = c("Windows", "macOS", "Linux", "Other", "Unknown")) +
theme(strip.text.y = element_text(angle = 0, hjust = 0, size = rel(1.5)),
strip.background = element_rect(fill = NA)) +
- ggtitle("Tor Browser downloads by platform\n")
+ ggtitle("Tor Browser downloads by platform")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
@@ -1110,14 +1120,14 @@ plot_webstats_tb_locale <- function(start, end, path) {
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
- scale_y_continuous(name = 'Requests per day\n', labels = formatter,
+ scale_y_continuous(name = 'Requests per day', labels = formatter,
limits = c(0, NA)) +
scale_colour_hue(name = "Locale",
breaks = c(e$locale, "(other)"),
labels = c(e$locale, "Other")) +
theme(strip.text.y = element_text(angle = 0, hjust = 0, size = rel(1.5)),
strip.background = element_rect(fill = NA)) +
- ggtitle("Tor Browser downloads by locale\n")
+ ggtitle("Tor Browser downloads by locale")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
@@ -1139,11 +1149,11 @@ plot_webstats_tm <- function(start, end, path) {
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
- scale_y_continuous(name = 'Requests per day\n', labels = formatter,
+ scale_y_continuous(name = 'Requests per day', labels = formatter,
limits = c(0, NA)) +
theme(strip.text.y = element_text(angle = 0, hjust = 0, size = rel(1.5)),
strip.background = element_rect(fill = NA)) +
- ggtitle("Tor Messenger downloads and updates\n")
+ ggtitle("Tor Messenger downloads and updates")
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
1
0
[metrics-web/master] Remove unused code for plotting relays by country.
by karsten@torproject.org 09 Feb '18
by karsten@torproject.org 09 Feb '18
09 Feb '18
commit e797903fb93b70c675d2b1655c9d333a713f6bfb
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Fri Feb 9 17:57:26 2018 +0100
Remove unused code for plotting relays by country.
---
src/main/R/rserver/graphs.R | 35 -----------------------------------
1 file changed, 35 deletions(-)
diff --git a/src/main/R/rserver/graphs.R b/src/main/R/rserver/graphs.R
index e24a617..2a055c2 100644
--- a/src/main/R/rserver/graphs.R
+++ b/src/main/R/rserver/graphs.R
@@ -311,41 +311,6 @@ plot_networksize <- function(start, end, path) {
ggsave(filename = path, width = 8, height = 5, dpi = 150)
}
-plot_relaycountries <- function(start, end, country, path) {
- end <- min(end, as.character(Sys.Date() - 2))
- s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "servers.csv", sep = ""), stringsAsFactors = FALSE)
- s <- s[s$date >= start & s$date <= end & s$flag == '' &
- s$country == ifelse(country == "all", '', country) &
- s$version == '' & s$platform == '' & s$ec2bridge == '', ]
- s <- data.frame(date = as.Date(s$date, "%Y-%m-%d"), relays = s$relays)
- dates <- seq(from = as.Date(start, "%Y-%m-%d"),
- to = as.Date(end, "%Y-%m-%d"), by="1 day")
- missing <- setdiff(dates, s$date)
- if (length(missing) > 0)
- s <- rbind(s,
- data.frame(date = as.Date(missing, origin = "1970-01-01"),
- relays = NA))
- title <- ifelse(country == "all",
- "Number of relays in all countries\n",
- paste("Number of relays in ", countryname(country), "\n", sep = ""))
- formatter <- function(x, ...) { format(x, scientific = FALSE, ...) }
- date_breaks <- date_breaks(
- as.numeric(max(as.Date(s$date, "%Y-%m-%d")) -
- min(as.Date(s$date, "%Y-%m-%d"))))
- ggplot(s, aes(x = as.Date(date, "%Y-%m-%d"), y = relays)) +
- geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
- labels = date_format(date_breaks$format),
- date_breaks = date_breaks$major,
- date_minor_breaks = date_breaks$minor) +
- scale_y_continuous(name = "", limits = c(0, max(s$relays,
- na.rm = TRUE)), formatter = formatter) +
- ggtitle(title)
- ggsave(filename = path, width = 8, height = 5, dpi = 150)
-}
-
plot_versions <- function(start, end, path) {
end <- min(end, as.character(Sys.Date() - 2))
s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
1
0
[metrics-web/master] Set the default line size of geom_line() to 1.
by karsten@torproject.org 09 Feb '18
by karsten@torproject.org 09 Feb '18
09 Feb '18
commit 43822357ea1ae16016565f422b97d96b2a9f5c6c
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Fri Feb 9 20:55:51 2018 +0100
Set the default line size of geom_line() to 1.
Also change some line sizes from 0.75 to 1 for extra consistency.
---
src/main/R/rserver/graphs.R | 37 ++++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/src/main/R/rserver/graphs.R b/src/main/R/rserver/graphs.R
index 10f89ce..b238713 100644
--- a/src/main/R/rserver/graphs.R
+++ b/src/main/R/rserver/graphs.R
@@ -276,6 +276,9 @@ formatter <- function(x, ...) {
theme_update(plot.title = element_text(hjust = 0.5),
plot.margin = margin(5.5, 11, 5.5, 5.5))
+# Set the default line size of geom_line() to 1.
+update_geom_defaults("line", list(size = 1))
+
copyright_notice = "\nThe Tor Project - https://metrics.torproject.org/"
plot_networksize <- function(start, end, path) {
@@ -299,7 +302,7 @@ plot_networksize <- function(start, end, path) {
as.numeric(max(as.Date(networksize$date, "%Y-%m-%d")) -
min(as.Date(networksize$date, "%Y-%m-%d"))))
ggplot(networksize, aes(x = as.Date(date, "%Y-%m-%d"), y = value,
- colour = variable)) + geom_line(size = 1) +
+ colour = variable)) + geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -335,7 +338,7 @@ plot_versions <- function(start, end, path) {
min(as.Date(versions$date, "%Y-%m-%d"))))
ggplot(versions, aes(x = as.Date(date, "%Y-%m-%d"), y = relays,
colour = version)) +
- geom_line(size = 1) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -362,7 +365,7 @@ plot_platforms <- function(start, end, path) {
min(as.Date(platforms$date, "%Y-%m-%d"))))
ggplot(platforms, aes(x = as.Date(date, "%Y-%m-%d"), y = value,
colour = variable)) +
- geom_line(size = 1) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -391,7 +394,7 @@ plot_bandwidth <- function(start, end, path) {
min(as.Date(bandwidth$date, "%Y-%m-%d"))))
ggplot(bandwidth, aes(x = as.Date(date, "%Y-%m-%d"),
y = value * 8 / 1e9, colour = variable)) +
- geom_line(size = 1) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -436,7 +439,7 @@ plot_bwhist_flags <- function(start, end, path) {
min(as.Date(bw$date, "%Y-%m-%d"))))
ggplot(bw, aes(x = as.Date(date, "%Y-%m-%d"), y = value * 8 / 1e9,
colour = variable)) +
- geom_line(size = 1) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -463,7 +466,7 @@ plot_dirbytes <- function(start, end, path) {
min(as.Date(dir$date, "%Y-%m-%d"))))
ggplot(dir, aes(x = as.Date(date, "%Y-%m-%d"), y = value * 8 / 1e9,
colour = variable)) +
- geom_line(size = 1) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -503,7 +506,7 @@ plot_relayflags <- function(start, end, flags, path) {
as.numeric(max(as.Date(end, "%Y-%m-%d")) -
min(as.Date(networksize$date, "%Y-%m-%d"))))
ggplot(networksize, aes(x = as.Date(date, "%Y-%m-%d"), y = value,
- colour = as.factor(variable))) + geom_line(size = 1) +
+ colour = as.factor(variable))) + geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -702,7 +705,7 @@ plot_bandwidth_flags <- function(start, end, path) {
levels = levels(bandwidth$variable)[c(3, 4, 1, 2)])
ggplot(bandwidth, aes(x = as.Date(date, "%Y-%m-%d"),
y = value * 8 / 1e9, colour = variable)) +
- geom_line(size = 1) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -830,7 +833,7 @@ plot_userstats <- function(start, end, node, variable, value, events,
colour = "firebrick2")
}
plot <- plot +
- geom_line(size = 1) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -920,7 +923,7 @@ plot_advbwdist_perc <- function(start, end, p, path) {
min(as.Date(t$date, "%Y-%m-%d"))))
ggplot(t, aes(x = as.Date(date), y = advbw, colour = percentile)) +
facet_grid(variable ~ .) +
- geom_line(size = 0.75) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -947,7 +950,7 @@ plot_advbwdist_relay <- function(start, end, n, path) {
min(as.Date(t$date, "%Y-%m-%d"))))
ggplot(t, aes(x = as.Date(date), y = advbw, colour = relay)) +
facet_grid(variable ~ .) +
- geom_line(size = 0.75) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -970,7 +973,7 @@ plot_hidserv_dir_onions_seen <- function(start, end, path) {
date_breaks <- date_breaks(as.numeric(max(h$date, na.rm = TRUE)
- min(h$date, na.rm = TRUE)))
ggplot(h, aes(x = as.Date(date, origin = "1970-01-01"), y = wiqm)) +
- geom_line(size = 0.75) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -993,7 +996,7 @@ plot_hidserv_rend_relayed_cells <- function(start, end, path) {
- min(h$date, na.rm = TRUE)))
ggplot(h, aes(x = as.Date(date, origin = "1970-01-01"),
y = wiqm * 8 * 512 / (86400 * 1e6))) +
- geom_line(size = 0.75) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -1017,7 +1020,7 @@ plot_hidserv_frac_reporting <- function(start, end, path) {
- min(h$date, na.rm = TRUE)))
ggplot(h, aes(x = as.Date(date, origin = "1970-01-01"), y = frac,
colour = type)) +
- geom_line(size = 0.75) +
+ geom_line() +
geom_hline(yintercept = 0.01, linetype = 2) +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
@@ -1165,7 +1168,7 @@ plot_relays_ipv6 <- function(start, end, path) {
gather(total, announced, reachable, exiting, key = "category",
value = "count") %>%
ggplot(aes(x = valid_after_date, y = count, colour = category)) +
- geom_line(size = 1) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -1198,7 +1201,7 @@ plot_bridges_ipv6 <- function(start, end, path) {
by = "1 day")), all = TRUE) %>%
gather(total, announced, key = "category", value = "count") %>%
ggplot(aes(x = valid_after_date, y = count, colour = category)) +
- geom_line(size = 1) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
@@ -1239,7 +1242,7 @@ plot_advbw_ipv6 <- function(start, end, path) {
exiting, key = "category", value = "count") %>%
ggplot(aes(x = valid_after_date, y = (count * 8) / 1e9,
colour = category)) +
- geom_line(size = 1) +
+ geom_line() +
scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
1
0
09 Feb '18
commit cfd676fe60b4ab717bfa2303d55620b04bb0141f
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Fri Feb 9 20:51:40 2018 +0100
Use a variable for the copyright notice.
---
src/main/R/rserver/graphs.R | 77 ++++++++++++++++-----------------------------
1 file changed, 27 insertions(+), 50 deletions(-)
diff --git a/src/main/R/rserver/graphs.R b/src/main/R/rserver/graphs.R
index c7f7d90..10f89ce 100644
--- a/src/main/R/rserver/graphs.R
+++ b/src/main/R/rserver/graphs.R
@@ -276,6 +276,8 @@ formatter <- function(x, ...) {
theme_update(plot.title = element_text(hjust = 0.5),
plot.margin = margin(5.5, 11, 5.5, 5.5))
+copyright_notice = "\nThe Tor Project - https://metrics.torproject.org/"
+
plot_networksize <- function(start, end, path) {
end <- min(end, as.character(Sys.Date() - 2))
s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
@@ -298,8 +300,7 @@ plot_networksize <- function(start, end, path) {
min(as.Date(networksize$date, "%Y-%m-%d"))))
ggplot(networksize, aes(x = as.Date(date, "%Y-%m-%d"), y = value,
colour = variable)) + geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -335,8 +336,7 @@ plot_versions <- function(start, end, path) {
ggplot(versions, aes(x = as.Date(date, "%Y-%m-%d"), y = relays,
colour = version)) +
geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -363,8 +363,7 @@ plot_platforms <- function(start, end, path) {
ggplot(platforms, aes(x = as.Date(date, "%Y-%m-%d"), y = value,
colour = variable)) +
geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -393,8 +392,7 @@ plot_bandwidth <- function(start, end, path) {
ggplot(bandwidth, aes(x = as.Date(date, "%Y-%m-%d"),
y = value * 8 / 1e9, colour = variable)) +
geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -439,8 +437,7 @@ plot_bwhist_flags <- function(start, end, path) {
ggplot(bw, aes(x = as.Date(date, "%Y-%m-%d"), y = value * 8 / 1e9,
colour = variable)) +
geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -467,8 +464,7 @@ plot_dirbytes <- function(start, end, path) {
ggplot(dir, aes(x = as.Date(date, "%Y-%m-%d"), y = value * 8 / 1e9,
colour = variable)) +
geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -508,8 +504,7 @@ plot_relayflags <- function(start, end, flags, path) {
min(as.Date(networksize$date, "%Y-%m-%d"))))
ggplot(networksize, aes(x = as.Date(date, "%Y-%m-%d"), y = value,
colour = as.factor(variable))) + geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor, limits = as.Date(c(start, end))) +
@@ -555,8 +550,7 @@ plot_torperf <- function(start, end, source, server, filesize, path) {
geom_line(colour = colour, size = 0.75) +
geom_ribbon(data = torperf, aes(x = date, ymin = q1/1e3,
ymax = q3/1e3, fill = "ribbon")) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -608,8 +602,7 @@ plot_torperf_failures <- function(start, end, source, server, filesize, path) {
ggplot(torperf, aes(x = as.Date(date, "%Y-%m-%d"), y = value,
colour = variable)) +
geom_point(size = 2) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -642,8 +635,7 @@ plot_connbidirect <- function(start, end, path) {
geom_line(size = 0.75) +
geom_ribbon(aes(x = date, ymin = X0.25, ymax = X0.75,
fill = direction), alpha = 0.5, show_guide = FALSE) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -711,8 +703,7 @@ plot_bandwidth_flags <- function(start, end, path) {
ggplot(bandwidth, aes(x = as.Date(date, "%Y-%m-%d"),
y = value * 8 / 1e9, colour = variable)) +
geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -840,8 +831,7 @@ plot_userstats <- function(start, end, node, variable, value, events,
}
plot <- plot +
geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -902,8 +892,7 @@ plot_userstats_bridge_combined <- function(start, end, country, path) {
ggplot(u, aes(x = as.Date(date), ymin = low, ymax = high,
colour = transport, fill = transport)) +
geom_ribbon(alpha = 0.5, size = 0.5) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -932,8 +921,7 @@ plot_advbwdist_perc <- function(start, end, p, path) {
ggplot(t, aes(x = as.Date(date), y = advbw, colour = percentile)) +
facet_grid(variable ~ .) +
geom_line(size = 0.75) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -960,8 +948,7 @@ plot_advbwdist_relay <- function(start, end, n, path) {
ggplot(t, aes(x = as.Date(date), y = advbw, colour = relay)) +
facet_grid(variable ~ .) +
geom_line(size = 0.75) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -984,8 +971,7 @@ plot_hidserv_dir_onions_seen <- function(start, end, path) {
- min(h$date, na.rm = TRUE)))
ggplot(h, aes(x = as.Date(date, origin = "1970-01-01"), y = wiqm)) +
geom_line(size = 0.75) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -1008,8 +994,7 @@ plot_hidserv_rend_relayed_cells <- function(start, end, path) {
ggplot(h, aes(x = as.Date(date, origin = "1970-01-01"),
y = wiqm * 8 * 512 / (86400 * 1e6))) +
geom_line(size = 0.75) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -1034,8 +1019,7 @@ plot_hidserv_frac_reporting <- function(start, end, path) {
colour = type)) +
geom_line(size = 0.75) +
geom_hline(yintercept = 0.01, linetype = 2) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -1066,8 +1050,7 @@ plot_webstats_tb <- function(start, end, path) {
geom_point() +
geom_line() +
facet_grid(request_type ~ ., scales = "free_y") +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -1090,8 +1073,7 @@ plot_webstats_tb_platform <- function(start, end, path) {
ggplot(d, aes(x = log_date, y = count, colour = platform)) +
geom_point() +
geom_line() +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -1121,8 +1103,7 @@ plot_webstats_tb_locale <- function(start, end, path) {
ggplot(d, aes(x = log_date, y = count, colour = locale)) +
geom_point() +
geom_line() +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -1151,8 +1132,7 @@ plot_webstats_tm <- function(start, end, path) {
geom_point() +
geom_line() +
facet_grid(request_type ~ ., scales = "free_y") +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -1186,8 +1166,7 @@ plot_relays_ipv6 <- function(start, end, path) {
value = "count") %>%
ggplot(aes(x = valid_after_date, y = count, colour = category)) +
geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -1220,8 +1199,7 @@ plot_bridges_ipv6 <- function(start, end, path) {
gather(total, announced, key = "category", value = "count") %>%
ggplot(aes(x = valid_after_date, y = count, colour = category)) +
geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
@@ -1262,8 +1240,7 @@ plot_advbw_ipv6 <- function(start, end, path) {
ggplot(aes(x = valid_after_date, y = (count * 8) / 1e9,
colour = category)) +
geom_line(size = 1) +
- scale_x_date(name = paste("\nThe Tor Project - ",
- "https://metrics.torproject.org/", sep = ""),
+ scale_x_date(name = copyright_notice,
labels = date_format(date_breaks$format),
date_breaks = date_breaks$major,
date_minor_breaks = date_breaks$minor) +
1
0
09 Feb '18
commit 8831ecebd4ac186a798c2cb844289ed94318a6ed
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Fri Feb 9 21:24:01 2018 +0100
Don't cut off any data from CSV files.
When graphing data from CSV files it's not our job to make sure the
data is stable enough to be graphed. That would mean that whoever uses
our CSV files directly would have to make that sure by themselves. If
data is too recent to be graphed, it shouldn't be included in the CSV
files. As a side effect this makes the graphing process a little
easier.
---
src/main/R/rserver/graphs.R | 31 +++----------------------------
1 file changed, 3 insertions(+), 28 deletions(-)
diff --git a/src/main/R/rserver/graphs.R b/src/main/R/rserver/graphs.R
index 440a691..768b776 100644
--- a/src/main/R/rserver/graphs.R
+++ b/src/main/R/rserver/graphs.R
@@ -294,7 +294,6 @@ update_geom_defaults("line", list(size = 1))
copyright_notice = "The Tor Project - https://metrics.torproject.org/"
plot_networksize <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 2))
s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"servers.csv", sep = ""), stringsAsFactors = FALSE)
s <- s[s$date >= start & s$date <= end & s$flag == '' &
@@ -327,7 +326,6 @@ plot_networksize <- function(start, end, path) {
}
plot_versions <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 2))
s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"servers.csv", sep = ""), stringsAsFactors = FALSE)
s <- s[s$date >= start & s$date <= end & s$flag == '' &
@@ -364,7 +362,6 @@ plot_versions <- function(start, end, path) {
}
plot_platforms <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 2))
s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"servers.csv", sep = ""), stringsAsFactors = FALSE)
s <- s[s$date >= start & s$date <= end & s$flag == '' &
@@ -392,7 +389,6 @@ plot_platforms <- function(start, end, path) {
}
plot_bandwidth <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 4))
b <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"bandwidth.csv", sep = ""), stringsAsFactors = FALSE)
b <- b[b$date >= start & b$date <= end & b$isexit == '' &
@@ -421,7 +417,6 @@ plot_bandwidth <- function(start, end, path) {
}
plot_bwhist_flags <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 4))
b <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"bandwidth.csv", sep = ""), stringsAsFactors = FALSE)
b <- b[b$date >= start & b$date <= end & b$isexit != '' &
@@ -465,7 +460,6 @@ plot_bwhist_flags <- function(start, end, path) {
}
plot_dirbytes <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 4))
b <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"bandwidth.csv", sep = ""), stringsAsFactors = FALSE)
b <- b[b$date >= start & b$date <= end & b$isexit == '' &
@@ -493,7 +487,6 @@ plot_dirbytes <- function(start, end, path) {
}
plot_relayflags <- function(start, end, flags, path) {
- end <- min(end, as.character(Sys.Date() - 2))
s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"servers.csv", sep = ""), stringsAsFactors = FALSE)
s <- s[s$date >= start & s$date <= end & s$country == '' &
@@ -532,7 +525,6 @@ plot_relayflags <- function(start, end, flags, path) {
}
plot_torperf <- function(start, end, source, server, filesize, path) {
- end <- min(end, as.character(Sys.Date() - 2))
filesizeVal <- ifelse(filesize == '50kb', 50 * 1024,
ifelse(filesize == '1mb', 1024 * 1024, 5 * 1024 * 1024))
t <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
@@ -582,7 +574,6 @@ plot_torperf <- function(start, end, source, server, filesize, path) {
}
plot_torperf_failures <- function(start, end, source, server, filesize, path) {
- end <- min(end, as.character(Sys.Date() - 2))
filesizeVal <- ifelse(filesize == '50kb', 50 * 1024,
ifelse(filesize == '1mb', 1024 * 1024, 5 * 1024 * 1024))
t <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
@@ -633,7 +624,6 @@ plot_torperf_failures <- function(start, end, source, server, filesize, path) {
}
plot_connbidirect <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 2))
c <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"connbidirect2.csv", sep = ""), stringsAsFactors = FALSE)
c <- c[c$date >= start & c$date <= end, ]
@@ -669,7 +659,6 @@ plot_connbidirect <- function(start, end, path) {
}
plot_bandwidth_flags <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 4))
b <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"bandwidth.csv", sep = ""), stringsAsFactors = FALSE)
b <- b[b$date >= start & b$date <= end & b$isexit != '' &
@@ -733,7 +722,6 @@ plot_bandwidth_flags <- function(start, end, path) {
plot_userstats <- function(start, end, node, variable, value, events,
path) {
- end <- min(end, as.character(Sys.Date() - 2))
load(paste("/srv/metrics.torproject.org/metrics/shared/RData/clients-",
node, ".RData", sep = ""))
c <- data
@@ -887,7 +875,6 @@ plot_userstats_bridge_combined <- function(start, end, country, path) {
} else {
top <- 3
country <- ifelse(country == "all", NA, country)
- end <- min(end, as.character(Sys.Date() - 2))
load(paste("/srv/metrics.torproject.org/metrics/shared/RData/",
"userstats-bridge-combined.RData", sep = ""))
u <- data
@@ -919,7 +906,6 @@ plot_userstats_bridge_combined <- function(start, end, country, path) {
}
plot_advbwdist_perc <- function(start, end, p, path) {
- end <- min(end, as.character(Sys.Date() - 2))
t <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"advbwdist.csv", sep = ""), stringsAsFactors = FALSE)
t <- t[t$date >= start & t$date <= end &
@@ -947,7 +933,6 @@ plot_advbwdist_perc <- function(start, end, p, path) {
}
plot_advbwdist_relay <- function(start, end, n, path) {
- end <- min(end, as.character(Sys.Date() - 2))
t <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"advbwdist.csv", sep = ""), stringsAsFactors = FALSE)
t <- t[t$date >= start & t$date <= end & t$relay %in% as.numeric(n), ]
@@ -973,7 +958,6 @@ plot_advbwdist_relay <- function(start, end, n, path) {
}
plot_hidserv_dir_onions_seen <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 2))
h <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"hidserv.csv", sep = ""), stringsAsFactors = FALSE)
h <- h[h$date >= start & h$date <= end & h$type == "dir-onions-seen", ]
@@ -994,7 +978,6 @@ plot_hidserv_dir_onions_seen <- function(start, end, path) {
}
plot_hidserv_rend_relayed_cells <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 2))
h <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"hidserv.csv", sep = ""), stringsAsFactors = FALSE)
h <- h[h$date >= start & h$date <= end &
@@ -1017,7 +1000,6 @@ plot_hidserv_rend_relayed_cells <- function(start, end, path) {
}
plot_hidserv_frac_reporting <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 2))
h <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"hidserv.csv", sep = ""), stringsAsFactors = FALSE)
h <- h[h$date >= start & h$date <= end, ]
@@ -1048,7 +1030,6 @@ plot_hidserv_frac_reporting <- function(start, end, path) {
}
plot_webstats_tb <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 2))
load("/srv/metrics.torproject.org/metrics/shared/RData/webstats-tb.RData")
d <- data
d <- d[d$log_date >= start & d$log_date <= end, ]
@@ -1076,7 +1057,6 @@ plot_webstats_tb <- function(start, end, path) {
}
plot_webstats_tb_platform <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 2))
d <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"webstats.csv", sep = ""), stringsAsFactors = FALSE)
d <- d[d$log_date >= start & d$log_date <= end & d$request_type == 'tbid', ]
@@ -1102,7 +1082,6 @@ plot_webstats_tb_platform <- function(start, end, path) {
}
plot_webstats_tb_locale <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 2))
d <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
"webstats.csv", sep = ""), stringsAsFactors = FALSE)
d <- d[d$log_date >= start & d$log_date <= end & d$request_type == 'tbid', ]
@@ -1132,7 +1111,6 @@ plot_webstats_tb_locale <- function(start, end, path) {
}
plot_webstats_tm <- function(start, end, path) {
- end <- min(end, as.character(Sys.Date() - 2))
load("/srv/metrics.torproject.org/metrics/shared/RData/webstats-tm.RData")
d <- data
d <- d[d$log_date >= start & d$log_date <= end, ]
@@ -1163,8 +1141,7 @@ plot_relays_ipv6 <- function(start, end, path) {
colClasses = c("valid_after_date" = "Date")) %>%
filter(server == "relay")
start_date <- max(as.Date(start), min(all_relay_data$valid_after_date))
- end_date <- min(as.Date(end), max(all_relay_data$valid_after_date),
- Sys.Date() - 2)
+ end_date <- min(as.Date(end), max(all_relay_data$valid_after_date))
date_breaks <- date_breaks(as.numeric(end_date - start_date))
all_relay_data %>%
filter(valid_after_date >= start_date, valid_after_date <= end_date) %>%
@@ -1199,8 +1176,7 @@ plot_bridges_ipv6 <- function(start, end, path) {
colClasses = c("valid_after_date" = "Date")) %>%
filter(server == "bridge")
start_date <- max(as.Date(start), min(all_bridge_data$valid_after_date))
- end_date <- min(as.Date(end), max(all_bridge_data$valid_after_date),
- Sys.Date() - 2)
+ end_date <- min(as.Date(end), max(all_bridge_data$valid_after_date))
date_breaks <- date_breaks(as.numeric(end_date - start_date))
all_bridge_data %>%
filter(valid_after_date >= start_date, valid_after_date <= end_date) %>%
@@ -1231,8 +1207,7 @@ plot_advbw_ipv6 <- function(start, end, path) {
colClasses = c("valid_after_date" = "Date")) %>%
filter(server == "relay")
start_date <- max(as.Date(start), min(all_relay_data$valid_after_date))
- end_date <- min(as.Date(end), max(all_relay_data$valid_after_date),
- Sys.Date() - 2)
+ end_date <- min(as.Date(end), max(all_relay_data$valid_after_date))
date_breaks <- date_breaks(as.numeric(end_date - start_date))
all_relay_data %>%
filter(valid_after_date >= start_date, valid_after_date <= end_date) %>%
1
0
commit ee0218d8e3dfc5163ef74e443ecfbcfac293977f
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Fri Feb 9 22:00:59 2018 +0100
Use variables for paths.
---
src/main/R/rserver/graphs.R | 93 ++++++++++++++++++++++-----------------------
1 file changed, 46 insertions(+), 47 deletions(-)
diff --git a/src/main/R/rserver/graphs.R b/src/main/R/rserver/graphs.R
index 768b776..9a37d88 100644
--- a/src/main/R/rserver/graphs.R
+++ b/src/main/R/rserver/graphs.R
@@ -293,9 +293,13 @@ update_geom_defaults("line", list(size = 1))
copyright_notice = "The Tor Project - https://metrics.torproject.org/"
+stats_dir = "/srv/metrics.torproject.org/metrics/shared/stats/"
+
+rdata_dir = "/srv/metrics.torproject.org/metrics/shared/RData/"
+
plot_networksize <- function(start, end, path) {
- s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "servers.csv", sep = ""), stringsAsFactors = FALSE)
+ s <- read.csv(paste(stats_dir, "servers.csv", sep = ""),
+ stringsAsFactors = FALSE)
s <- s[s$date >= start & s$date <= end & s$flag == '' &
s$country == '' & s$version == '' & s$platform == '' &
s$ec2bridge == '', ]
@@ -326,8 +330,8 @@ plot_networksize <- function(start, end, path) {
}
plot_versions <- function(start, end, path) {
- s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "servers.csv", sep = ""), stringsAsFactors = FALSE)
+ s <- read.csv(paste(stats_dir, "servers.csv", sep = ""),
+ stringsAsFactors = FALSE)
s <- s[s$date >= start & s$date <= end & s$flag == '' &
s$country == '' & s$version != '' & s$platform == '' &
s$ec2bridge == '', ]
@@ -362,8 +366,8 @@ plot_versions <- function(start, end, path) {
}
plot_platforms <- function(start, end, path) {
- s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "servers.csv", sep = ""), stringsAsFactors = FALSE)
+ s <- read.csv(paste(stats_dir, "servers.csv", sep = ""),
+ stringsAsFactors = FALSE)
s <- s[s$date >= start & s$date <= end & s$flag == '' &
s$country == '' & s$version == '' & s$platform != '' &
s$ec2bridge == '', ]
@@ -389,8 +393,8 @@ plot_platforms <- function(start, end, path) {
}
plot_bandwidth <- function(start, end, path) {
- b <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "bandwidth.csv", sep = ""), stringsAsFactors = FALSE)
+ b <- read.csv(paste(stats_dir, "bandwidth.csv", sep = ""),
+ stringsAsFactors = FALSE)
b <- b[b$date >= start & b$date <= end & b$isexit == '' &
b$isguard == '', ]
b <- data.frame(date = as.Date(b$date, "%Y-%m-%d"),
@@ -417,8 +421,8 @@ plot_bandwidth <- function(start, end, path) {
}
plot_bwhist_flags <- function(start, end, path) {
- b <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "bandwidth.csv", sep = ""), stringsAsFactors = FALSE)
+ b <- read.csv(paste(stats_dir, "bandwidth.csv", sep = ""),
+ stringsAsFactors = FALSE)
b <- b[b$date >= start & b$date <= end & b$isexit != '' &
b$isguard != '', ]
bw <- data.frame(date = as.Date(b$date, "%Y-%m-%d"),
@@ -460,8 +464,8 @@ plot_bwhist_flags <- function(start, end, path) {
}
plot_dirbytes <- function(start, end, path) {
- b <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "bandwidth.csv", sep = ""), stringsAsFactors = FALSE)
+ b <- read.csv(paste(stats_dir, "bandwidth.csv", sep = ""),
+ stringsAsFactors = FALSE)
b <- b[b$date >= start & b$date <= end & b$isexit == '' &
b$isguard == '', ]
b <- data.frame(date = as.Date(b$date, "%Y-%m-%d"),
@@ -487,8 +491,8 @@ plot_dirbytes <- function(start, end, path) {
}
plot_relayflags <- function(start, end, flags, path) {
- s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "servers.csv", sep = ""), stringsAsFactors = FALSE)
+ s <- read.csv(paste(stats_dir, "servers.csv", sep = ""),
+ stringsAsFactors = FALSE)
s <- s[s$date >= start & s$date <= end & s$country == '' &
s$version == '' & s$platform == '' & s$ec2bridge == '', ]
s <- data.frame(date = as.Date(s$date, "%Y-%m-%d"),
@@ -527,8 +531,8 @@ plot_relayflags <- function(start, end, flags, path) {
plot_torperf <- function(start, end, source, server, filesize, path) {
filesizeVal <- ifelse(filesize == '50kb', 50 * 1024,
ifelse(filesize == '1mb', 1024 * 1024, 5 * 1024 * 1024))
- t <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "torperf-1.1.csv", sep = ""), stringsAsFactors = FALSE)
+ t <- read.csv(paste(stats_dir, "torperf-1.1.csv", sep = ""),
+ stringsAsFactors = FALSE)
known_sources <- c("all", unique(t[t$source != "", "source"]))
colours <- data.frame(source = known_sources,
colour = brewer.pal(length(known_sources), "Paired"),
@@ -576,8 +580,8 @@ plot_torperf <- function(start, end, source, server, filesize, path) {
plot_torperf_failures <- function(start, end, source, server, filesize, path) {
filesizeVal <- ifelse(filesize == '50kb', 50 * 1024,
ifelse(filesize == '1mb', 1024 * 1024, 5 * 1024 * 1024))
- t <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "torperf-1.1.csv", sep = ""), stringsAsFactors = FALSE)
+ t <- read.csv(paste(stats_dir, "torperf-1.1.csv", sep = ""),
+ stringsAsFactors = FALSE)
t <- t[t$date >= start & t$date <= end & t$filesize == filesizeVal &
t$source == ifelse(source == 'all', '', source) &
t$server == server, ]
@@ -624,8 +628,8 @@ plot_torperf_failures <- function(start, end, source, server, filesize, path) {
}
plot_connbidirect <- function(start, end, path) {
- c <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "connbidirect2.csv", sep = ""), stringsAsFactors = FALSE)
+ c <- read.csv(paste(stats_dir, "connbidirect2.csv", sep = ""),
+ stringsAsFactors = FALSE)
c <- c[c$date >= start & c$date <= end, ]
c <- data.frame(date = as.Date(c$date),
direction = factor(c$direction,
@@ -659,8 +663,8 @@ plot_connbidirect <- function(start, end, path) {
}
plot_bandwidth_flags <- function(start, end, path) {
- b <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "bandwidth.csv", sep = ""), stringsAsFactors = FALSE)
+ b <- read.csv(paste(stats_dir, "bandwidth.csv", sep = ""),
+ stringsAsFactors = FALSE)
b <- b[b$date >= start & b$date <= end & b$isexit != '' &
b$isguard != '', ]
b <- data.frame(date = as.Date(b$date, "%Y-%m-%d"),
@@ -722,8 +726,7 @@ plot_bandwidth_flags <- function(start, end, path) {
plot_userstats <- function(start, end, node, variable, value, events,
path) {
- load(paste("/srv/metrics.torproject.org/metrics/shared/RData/clients-",
- node, ".RData", sep = ""))
+ load(paste(rdata_dir, "clients-", node, ".RData", sep = ""))
c <- data
u <- c[c$date >= start & c$date <= end, ]
u <- rbind(u, data.frame(date = start,
@@ -875,8 +878,7 @@ plot_userstats_bridge_combined <- function(start, end, country, path) {
} else {
top <- 3
country <- ifelse(country == "all", NA, country)
- load(paste("/srv/metrics.torproject.org/metrics/shared/RData/",
- "userstats-bridge-combined.RData", sep = ""))
+ load(paste(rdata_dir, "userstats-bridge-combined.RData", sep = ""))
u <- data
u <- u[u$date >= start & u$date <= end
& (is.na(country) | u$country == country), ]
@@ -906,7 +908,7 @@ plot_userstats_bridge_combined <- function(start, end, country, path) {
}
plot_advbwdist_perc <- function(start, end, p, path) {
- t <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
+ t <- read.csv(paste(stats_dir,
"advbwdist.csv", sep = ""), stringsAsFactors = FALSE)
t <- t[t$date >= start & t$date <= end &
t$percentile %in% as.numeric(p), ]
@@ -933,8 +935,8 @@ plot_advbwdist_perc <- function(start, end, p, path) {
}
plot_advbwdist_relay <- function(start, end, n, path) {
- t <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "advbwdist.csv", sep = ""), stringsAsFactors = FALSE)
+ t <- read.csv(paste(stats_dir, "advbwdist.csv", sep = ""),
+ stringsAsFactors = FALSE)
t <- t[t$date >= start & t$date <= end & t$relay %in% as.numeric(n), ]
t <- data.frame(date = t$date, advbw = t$advbw * 8 / 1e9,
variable = ifelse(t$isexit != "t", "All relays",
@@ -958,8 +960,8 @@ plot_advbwdist_relay <- function(start, end, n, path) {
}
plot_hidserv_dir_onions_seen <- function(start, end, path) {
- h <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "hidserv.csv", sep = ""), stringsAsFactors = FALSE)
+ h <- read.csv(paste(stats_dir, "hidserv.csv", sep = ""),
+ stringsAsFactors = FALSE)
h <- h[h$date >= start & h$date <= end & h$type == "dir-onions-seen", ]
h <- rbind(data.frame(date = NA, wiqm = 0),
data.frame(date = as.Date(h$date, "%Y-%m-%d"),
@@ -978,8 +980,8 @@ plot_hidserv_dir_onions_seen <- function(start, end, path) {
}
plot_hidserv_rend_relayed_cells <- function(start, end, path) {
- h <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "hidserv.csv", sep = ""), stringsAsFactors = FALSE)
+ h <- read.csv(paste(stats_dir, "hidserv.csv", sep = ""),
+ stringsAsFactors = FALSE)
h <- h[h$date >= start & h$date <= end &
h$type == "rend-relayed-cells", ]
h <- rbind(data.frame(date = NA, wiqm = 0),
@@ -1000,8 +1002,8 @@ plot_hidserv_rend_relayed_cells <- function(start, end, path) {
}
plot_hidserv_frac_reporting <- function(start, end, path) {
- h <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "hidserv.csv", sep = ""), stringsAsFactors = FALSE)
+ h <- read.csv(paste(stats_dir, "hidserv.csv", sep = ""),
+ stringsAsFactors = FALSE)
h <- h[h$date >= start & h$date <= end, ]
h <- rbind(data.frame(date = NA, frac = 0,
type = c("rend-relayed-cells",
@@ -1030,7 +1032,7 @@ plot_hidserv_frac_reporting <- function(start, end, path) {
}
plot_webstats_tb <- function(start, end, path) {
- load("/srv/metrics.torproject.org/metrics/shared/RData/webstats-tb.RData")
+ load(paste(rdata_dir, "webstats-tb.RData", sep = ""))
d <- data
d <- d[d$log_date >= start & d$log_date <= end, ]
date_breaks <- date_breaks(as.numeric(max(d$log_date) - min(d$log_date)))
@@ -1057,8 +1059,8 @@ plot_webstats_tb <- function(start, end, path) {
}
plot_webstats_tb_platform <- function(start, end, path) {
- d <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "webstats.csv", sep = ""), stringsAsFactors = FALSE)
+ d <- read.csv(paste(stats_dir, "webstats.csv", sep = ""),
+ stringsAsFactors = FALSE)
d <- d[d$log_date >= start & d$log_date <= end & d$request_type == 'tbid', ]
d <- aggregate(list(count = d$count), by = list(log_date = as.Date(d$log_date),
platform = d$platform), FUN = sum)
@@ -1082,8 +1084,8 @@ plot_webstats_tb_platform <- function(start, end, path) {
}
plot_webstats_tb_locale <- function(start, end, path) {
- d <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
- "webstats.csv", sep = ""), stringsAsFactors = FALSE)
+ d <- read.csv(paste(stats_dir, "webstats.csv", sep = ""),
+ stringsAsFactors = FALSE)
d <- d[d$log_date >= start & d$log_date <= end & d$request_type == 'tbid', ]
e <- d
e <- aggregate(list(count = e$count), by = list(locale = e$locale), FUN = sum)
@@ -1111,7 +1113,7 @@ plot_webstats_tb_locale <- function(start, end, path) {
}
plot_webstats_tm <- function(start, end, path) {
- load("/srv/metrics.torproject.org/metrics/shared/RData/webstats-tm.RData")
+ load(paste(rdata_dir, "webstats-tm.RData", sep = ""))
d <- data
d <- d[d$log_date >= start & d$log_date <= end, ]
date_breaks <- date_breaks(as.numeric(max(d$log_date) - min(d$log_date)))
@@ -1136,8 +1138,7 @@ plot_webstats_tm <- function(start, end, path) {
}
plot_relays_ipv6 <- function(start, end, path) {
- all_relay_data <- read.csv(
- "/srv/metrics.torproject.org/metrics/shared/stats/ipv6servers.csv",
+ all_relay_data <- read.csv(paste(stats_dir, "ipv6servers.csv", sep = ""),
colClasses = c("valid_after_date" = "Date")) %>%
filter(server == "relay")
start_date <- max(as.Date(start), min(all_relay_data$valid_after_date))
@@ -1171,8 +1172,7 @@ plot_relays_ipv6 <- function(start, end, path) {
}
plot_bridges_ipv6 <- function(start, end, path) {
- all_bridge_data <- read.csv(
- "/srv/metrics.torproject.org/metrics/shared/stats/ipv6servers.csv",
+ all_bridge_data <- read.csv(paste(stats_dir, "ipv6servers.csv", sep = ""),
colClasses = c("valid_after_date" = "Date")) %>%
filter(server == "bridge")
start_date <- max(as.Date(start), min(all_bridge_data$valid_after_date))
@@ -1202,8 +1202,7 @@ plot_bridges_ipv6 <- function(start, end, path) {
}
plot_advbw_ipv6 <- function(start, end, path) {
- all_relay_data <- read.csv(
- "/srv/metrics.torproject.org/metrics/shared/stats/ipv6servers.csv",
+ all_relay_data <- read.csv(paste(stats_dir, "ipv6servers.csv", sep = ""),
colClasses = c("valid_after_date" = "Date")) %>%
filter(server == "relay")
start_date <- max(as.Date(start), min(all_relay_data$valid_after_date))
1
0
commit 859ae85287c36eb0b16b1880683a8904bb8e3839
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Fri Feb 9 16:01:31 2018 -0500
Write a blurb
---
ChangeLog | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 3accb494f..a32897e03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
Changes in version 0.3.3.2-alpha - 2018-02-09
- Blurb here.
+ Tor 0.3.3.2-alpha is the second alpha in the 0.3.3.x series. It
+ introduces a mechanism to handle the high loads that many relays
+ operators have been reporting recently. It also fixes several bugs in
+ older releases. If this new code proves reliable, we plan to backport
+ it to older supported release series.
o Major features (denial-of-service mitigation):
- Give relays some defenses against the recent network overload. We
1
0
commit e5d78c70b00a2afe1c4f98638ce53315be141789
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Fri Feb 9 15:58:26 2018 -0500
Begin work on a changelog
---
ChangeLog | 151 +++++++++++++++++++++++++++++++++++++++++++++++
changes/bug22212-forreal | 8 ---
changes/bug23954 | 4 --
changes/bug24469 | 4 --
changes/bug24700 | 4 --
changes/bug24859 | 4 --
changes/bug24927 | 4 --
changes/bug24952 | 5 --
changes/bug24972 | 4 --
changes/bug24975 | 6 --
changes/bug24976 | 5 --
changes/bug25008 | 9 ---
changes/bug25026 | 4 --
changes/bug25070 | 3 -
changes/bug25105 | 5 --
changes/bug25113 | 5 --
changes/bug25116 | 4 --
changes/bug25127 | 7 ---
changes/geoip-2018-02-07 | 4 --
changes/ticket23650 | 4 --
changes/ticket24849 | 3 -
changes/ticket24902 | 13 ----
changes/ticket25108 | 3 -
changes/ticket25122 | 4 --
changes/ticket25163 | 4 --
changes/ticket25170 | 5 --
26 files changed, 151 insertions(+), 125 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b97d2f9eb..3accb494f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,154 @@
+Changes in version 0.3.3.2-alpha - 2018-02-09
+ Blurb here.
+
+ o Major features (denial-of-service mitigation):
+ - Give relays some defenses against the recent network overload. We
+ start with three defenses (default parameters in parentheses).
+ First: if a single client address makes too many concurrent
+ connections (>100), hang up on further connections. Second: if a
+ single client address makes circuits too quickly (more than 3 per
+ second, with an allowed burst of 90) while also having too many
+ connections open (3), refuse new create cells for the next while
+ (1-2 hours). Third: if a client asks to establish a rendezvous
+ point to you directly, ignore the request. These defenses can be
+ manually controlled by new torrc options, but relays will also
+ take guidance from consensus parameters, so there's no need to
+ configure anything manually. Implements ticket 24902.
+
+ o Major bugfixes (netflow padding):
+ - Stop adding unneeded channel padding right after we finish
+ flushing to a connection that has been trying to flush for many
+ seconds. Instead, treat all partial or complete flushes as
+ activity on the channel, which will defer the time until we need
+ to add padding. This fix should resolve confusing and scary log
+ messages like "Channel padding timeout scheduled 221453ms in the
+ past." Fixes bug 22212; bugfix on 0.3.1.1-alpha.
+
+ o Major bugfixes (protocol versions):
+ - Add Link protocol version 5 to the supported protocols list. Fixes
+ bug 25070; bugfix on 0.3.1.1-alpha.
+
+ o Major bugfixes (scheduler, consensus):
+ - A logic in the code was preventing the scheduler subystem to
+ properly make a decision based on the latest consensus when it
+ arrives. This lead to the scheduler failing to notice any
+ consensus parameters that might have changed between consensuses.
+ Fixes bug 24975; bugfix on 0.3.2.1-alpha.
+
+ o Minor features (denial-of-service avoidance):
+ - Make our OOM handler aware of the geoip client history cache so it
+ doesn't fill up the memory which is especially important for IPv6
+ and our DoS mitigation subsystem. Closes ticket 25122.
+
+ o Minor features (directory authority):
+ - When unable to add signatures to a pending consensus, log the
+ reason why. Closes ticket 24849.
+
+ o Minor features (geoip):
+ - Update geoip and geoip6 to the February 7 2018 Maxmind GeoLite2
+ Country database.
+
+ o Minor features (logging, diagnostic):
+ - When logging a failure to check a onion service's certificate,
+ also log what the problem with the certificate was. Diagnostic for
+ ticket 24972.
+
+ o Minor bugfix (channel connection):
+ - The accurate address of a connection is real_addr, not the addr
+ member. TLS Channel remote address is now real_addr content
+ instead of addr member. Fixes bug 24952; bugfix on 707c1e2e26 in
+ 0.2.4.11-alpha. Patch by "ffmancera".
+
+ o Minor bugfix (directory authority, documentation):
+ - When a fingerprint or network address is marked as rejected, the
+ returned message by the authority now explicitly mention to set a
+ valid ContactInfo address and contact the bad-relays@ mailing
+ list. Fixes bug 25170; bugfix on 0.2.9.1.
+
+ o Minor bugfixes (all versions of Tor):
+ - Use the "misspell" tool to detect and fix typos throughout the
+ source code. Fixes bug 23650; bugfix on various versions of Tor.
+ Patch from Deepesh Pathak.
+
+ o Minor bugfixes (circuit, cannibalization):
+ - Don't cannibalize circuits for which we don't know the first hop
+ which can happen if our Guard relay went off the consensus after
+ the circuit was created preemptively. Fixes bug 24469; bugfix
+ on 0.0.6.
+
+ o Minor bugfixes (correctness):
+ - Remove a nonworking, unnecessary check to see whether a circuit
+ hop's identity was set when the circuit failed. Fixes bug 24927;
+ bugfix on 0.2.4.4-alpha.
+
+ o Minor bugfixes (onion services):
+ - Remove a BUG() statement which can be triggered in normal
+ circumstances where a client fetches a descriptor that has a lower
+ revision counter than the one in its cache. This can happen due to
+ HSDir desync. Fixes bug 24976; bugfix on 0.3.2.1-alpha.
+ - Don't log in the heartbeat any long term established one hop
+ rendezvous points if tor is a single onion service. Fixes bug
+ 25116; bugfix on 0.2.9.6-rc;
+
+ o Minor bugfixes (logging):
+ - Don't treat inability to store a cached consensus object as a bug:
+ it can happen normally when we are out of disk space. Fixes bug
+ 24859; bugfix on 0.3.1.1-alpha.
+ - Fix a (mostly harmless) race condition when invoking
+ LOG_PROTOCOL_WARN message from a subthread while the options are
+ changing. Fixes bug 23954; bugfix on 0.1.1.9-alpha.
+
+ o Minor bugfixes (performance):
+ - Avoid calling protocol_list_supports_protocol() from inside tight
+ loops when running with cached routerinfo_t objects. Instead,
+ summarize the relevant protocols as flags in the routerinfo_t, as
+ we do for routerstatus_t objects. This change simplifies our code
+ a little, and saves a large amount of short-term memory allocation
+ operations. Fixes bug 25008; bugfix on 0.2.9.4-alpha.
+
+ o Minor bugfixes (Rust FFI):
+ - Fix a minor memory leak which would happen whenever the C code
+ would call the Rust implementation of
+ protover_get_supported_protocols(). This was due to the C version
+ returning a static string, whereas the Rust version newly allocated
+ a CString to pass accross the FFI boundary. Consequently, the C
+ code was not expecting to need to free() what it was given. Fixes
+ bug 25127; bugfix on 0.3.2.1-alpha.
+
+ o Minor bugfixes (scheduler, KIST):
+ - Avoid adding the same channel twice in the KIST scheduler pending
+ list wasting CPU cycles at handling the same channel twice. Fixes
+ bug 24700; bugfix on 0.3.2.1-alpha.
+
+ o Minor bugfixes (unit test, monotonic time):
+ - Bump a gap of 1msec to 10msec used in the monotonic time test that
+ makes sure the nsec/usec/msec time read are synchronized. This
+ change was needed to accommodate slow system like armel or when
+ the clock_gettime() is not a VDSO on the running kernel. Fixes bug
+ 25113; bugfix on 0.2.9.1.
+
+ o Minor bugfixes (v3 onion services):
+ - Look at the "HSRend" protocol version, not the "HSDir" protocol
+ version, when deciding whether a consensus entry can support the
+ v3 onion service protocol as a rendezvous point. Fixes bug 25105;
+ bugfix on 0.3.2.1-alpha.
+
+ o Code simplification and refactoring:
+ - Remove the unused nodelist_recompute_all_hsdir_indices(). Closes
+ ticket 25108.
+
+ o Documentation:
+ - HiddenServiceVersion only accepts one version to be specified.
+ This version can either be version 2 or 3. Closes ticket 25026;
+ bugfix on 0.3.2.2-alpha.
+
+ o Code simplification and refactoring (rephist):
+ - Remove a series of counters used to track circuit extend attemps
+ and connection status but that in reality we aren't using for
+ anything other than stats logged by a SIGUSR1 signal. Closes
+ ticket 25163.
+
+
Changes in version 0.3.3.1-alpha - 2018-01-25
Tor 0.3.3.1-alpha is the first release in the 0.3.3.x series. It adds
several new features to Tor, including several improvements to
diff --git a/changes/bug22212-forreal b/changes/bug22212-forreal
deleted file mode 100644
index 159d0990e..000000000
--- a/changes/bug22212-forreal
+++ /dev/null
@@ -1,8 +0,0 @@
- o Major bugfixes (netflow padding):
- - Stop adding unneeded channel padding right after we finish flushing
- to a connection that has been trying to flush for many seconds.
- Instead, treat all partial or complete flushes as activity on the
- channel, which will defer the time until we need to add padding.
- This fix should resolve confusing and scary log messages like
- "Channel padding timeout scheduled 221453ms in the past." Fixes
- bug 22212; bugfix on 0.3.1.1-alpha.
diff --git a/changes/bug23954 b/changes/bug23954
deleted file mode 100644
index 185814f12..000000000
--- a/changes/bug23954
+++ /dev/null
@@ -1,4 +0,0 @@
- o Minor bugfixes (logging, race conditions):
- - Fix a (mostly harmless) race condition when invoking
- LOG_PROTOCOL_WARN message from a subthread while the options are
- changing. Fixes bug 23954; bugfix on 0.1.1.9-alpha.
diff --git a/changes/bug24469 b/changes/bug24469
deleted file mode 100644
index 2e137b49b..000000000
--- a/changes/bug24469
+++ /dev/null
@@ -1,4 +0,0 @@
- o Minor bugfixes (circuit, cannibalization):
- - Don't cannibalize circuits for which we don't know the first hop which
- can happen if our Guard relay went off the consensus after the circuit
- was created preemptively. Fixes bug 24469; bugfix on 0.0.6.
diff --git a/changes/bug24700 b/changes/bug24700
deleted file mode 100644
index 74dc581a0..000000000
--- a/changes/bug24700
+++ /dev/null
@@ -1,4 +0,0 @@
- o Minor bugfixes (scheduler, KIST):
- - Avoid adding the same channel twice in the KIST scheduler pending list
- wasting CPU cycles at handling the same channel twice. Fixes bug 24700;
- bugfix on 0.3.2.1-alpha.
diff --git a/changes/bug24859 b/changes/bug24859
deleted file mode 100644
index 122109d65..000000000
--- a/changes/bug24859
+++ /dev/null
@@ -1,4 +0,0 @@
- o Minor bugfixes (logging):
- - Don't treat inability to store a cached consensus object as a
- bug: it can happen normally when we are out of disk space.
- Fixes bug 24859; bugfix on 0.3.1.1-alpha.
diff --git a/changes/bug24927 b/changes/bug24927
deleted file mode 100644
index 699730695..000000000
--- a/changes/bug24927
+++ /dev/null
@@ -1,4 +0,0 @@
- o Minor bugfixes (correctness):
- - Remove nonworking, unnecessary check to see whether a circuit hop's
- identity was set when the circuit failed. Fixes bug 24927; bugfix on
- 0.2.4.4-alpha.
diff --git a/changes/bug24952 b/changes/bug24952
deleted file mode 100644
index 93174c04f..000000000
--- a/changes/bug24952
+++ /dev/null
@@ -1,5 +0,0 @@
- o Minor bugfix (channel connection):
- - The accurate address of a connection is real_addr, not the addr member.
- TLS Channel remote address is now real_addr content instead of addr
- member. Fixes bug 24952; bugfix on 707c1e2e26 in 0.2.4.11-alpha.
- Patch by "ffmancera".
diff --git a/changes/bug24972 b/changes/bug24972
deleted file mode 100644
index 5adf970ab..000000000
--- a/changes/bug24972
+++ /dev/null
@@ -1,4 +0,0 @@
- o Minor features (logging, diagnostic):
- - When logging a failure to check a hidden service's certificate,
- also log what the problem with the certificate was. Diagnostic
- for ticket 24972.
diff --git a/changes/bug24975 b/changes/bug24975
deleted file mode 100644
index 32a5dfc92..000000000
--- a/changes/bug24975
+++ /dev/null
@@ -1,6 +0,0 @@
- o Major bugfixes (scheduler, consensus):
- - A logic in the code was preventing the scheduler subystem to properly
- make a decision based on the latest consensus when it arrives. This lead
- to the scheduler failing to notice any consensus parameters that might
- have changed between consensuses. Fixes bug 24975; bugfix on
- 0.3.2.1-alpha.
diff --git a/changes/bug24976 b/changes/bug24976
deleted file mode 100644
index 9c3be86ea..000000000
--- a/changes/bug24976
+++ /dev/null
@@ -1,5 +0,0 @@
- o Minor bugfixes (hidden service v3 client):
- - Remove a BUG() statement which can be triggered in normal circumstances
- where a client fetches a descriptor that has a lower revision counter
- than the one in its cache. This can happen due to HSDir desync. Fixes
- bug 24976; bugfix on 0.3.2.1-alpha.
diff --git a/changes/bug25008 b/changes/bug25008
deleted file mode 100644
index 5ddc06298..000000000
--- a/changes/bug25008
+++ /dev/null
@@ -1,9 +0,0 @@
- o Minor bugfixes (performance):
- - Avoid calling protocol_list_supports_protocol() from inside tight loops
- when running with cached routerinfo_t objects. Instead,
- summarize the relevant protocols as flags in the routerinfo_t, as we do
- for routerstatus_t objects. This change simplifies our code a little,
- and saves a large amount of short-term memory allocation operations.
- Fixes bug 25008; bugfix on 0.2.9.4-alpha.
-
-
diff --git a/changes/bug25026 b/changes/bug25026
deleted file mode 100644
index 24a64a562..000000000
--- a/changes/bug25026
+++ /dev/null
@@ -1,4 +0,0 @@
- o Documentation:
- - HiddenServiceVersion only accepts one version to be specified. This
- version can either be version 2 or 3. Closes ticket 25026; bugfix on
- 0.3.2.2-alpha.
diff --git a/changes/bug25070 b/changes/bug25070
deleted file mode 100644
index c2f4e58c4..000000000
--- a/changes/bug25070
+++ /dev/null
@@ -1,3 +0,0 @@
- o Major bugfixes (protocol versions):
- - Add Link protocol version 5 to the supported protocols list.
- Fixes bug 25070; bugfix on 0.3.1.1-alpha.
diff --git a/changes/bug25105 b/changes/bug25105
deleted file mode 100644
index 36d1a5f16..000000000
--- a/changes/bug25105
+++ /dev/null
@@ -1,5 +0,0 @@
- o Minor bugfixes (v3 onion services):
- - Look at the "HSRend" protocol version, not the "HSDir" protocol
- version, when deciding whether a consensus entry can support
- the v3 onion service protocol as a rendezvous point.
- Fixes bug 25105; bugfix on 0.3.2.1-alpha.
diff --git a/changes/bug25113 b/changes/bug25113
deleted file mode 100644
index 4a020b784..000000000
--- a/changes/bug25113
+++ /dev/null
@@ -1,5 +0,0 @@
- o Minor bugfixes (unit test, monotonic time):
- - Bump a gap of 1msec to 10msec used in the monotonic time test that makes
- sure the nsec/usec/msec time read are synchronized. This change was
- needed to accommodate slow system like armel or when the clock_gettime()
- is not a VDSO on the running kernel. Fixes bug 25113; bugfix on 0.2.9.1.
diff --git a/changes/bug25116 b/changes/bug25116
deleted file mode 100644
index b3e73feea..000000000
--- a/changes/bug25116
+++ /dev/null
@@ -1,4 +0,0 @@
- o Minor bugfixes (hidden service, heartbeat):
- - Don't log in the heartbeat any long term established one hop rendezvous
- points if tor is a single onion service. Fixes bug 25116; bugfix on
- 0.2.9.6-rc;
diff --git a/changes/bug25127 b/changes/bug25127
deleted file mode 100644
index 3438ed125..000000000
--- a/changes/bug25127
+++ /dev/null
@@ -1,7 +0,0 @@
- o Minor bugfixes (Rust FFI):
- - Fix a minor memory leak which would happen whenever the C code would call
- the Rust implementation of protover_get_supported_protocols(). This was
- due to the C version returning a static string, whereas the Rust version
- newly allocated a CString to pass accross the FFI boundary. Consequently,
- the C code was not expecting to need to free() what it was given. Fixes
- bug 25127; bugfix on 0.3.2.1-alpha.
diff --git a/changes/geoip-2018-02-07 b/changes/geoip-2018-02-07
deleted file mode 100644
index f45228fd7..000000000
--- a/changes/geoip-2018-02-07
+++ /dev/null
@@ -1,4 +0,0 @@
- o Minor features (geoip):
- - Update geoip and geoip6 to the February 7 2018 Maxmind GeoLite2
- Country database.
-
diff --git a/changes/ticket23650 b/changes/ticket23650
deleted file mode 100644
index cf5eb39d5..000000000
--- a/changes/ticket23650
+++ /dev/null
@@ -1,4 +0,0 @@
- o Minor bugfixes (all versions of Tor):
- - Use the "misspell" tool to detect and fix typos throughout the source
- code. Fixes bug 23650; bugfix on various versions of Tor. Patch
- from Deepesh Pathak.
diff --git a/changes/ticket24849 b/changes/ticket24849
deleted file mode 100644
index fd9492acb..000000000
--- a/changes/ticket24849
+++ /dev/null
@@ -1,3 +0,0 @@
- o Minor features (directory authority):
- - When unable to add signatures to a pending consensus, log the reason
- why. Closes ticket 24849.
diff --git a/changes/ticket24902 b/changes/ticket24902
deleted file mode 100644
index 1a2ef95cc..000000000
--- a/changes/ticket24902
+++ /dev/null
@@ -1,13 +0,0 @@
- o Major features (denial of service mitigation):
- - Give relays some defenses against the recent network overload. We start
- with three defenses (default parameters in parentheses). First: if a
- single client address makes too many concurrent connections (>100), hang
- up on further connections. Second: if a single client address makes
- circuits too quickly (more than 3 per second, with an allowed burst of
- 90) while also having too many connections open (3), refuse new create
- cells for the next while (1-2 hours). Third: if a client asks to
- establish a rendezvous point to you directly, ignore the request. These
- defenses can be manually controlled by new torrc options, but relays
- will also take guidance from consensus parameters, so there's no need to
- configure anything manually. Implements ticket 24902.
-
diff --git a/changes/ticket25108 b/changes/ticket25108
deleted file mode 100644
index 6aefac16d..000000000
--- a/changes/ticket25108
+++ /dev/null
@@ -1,3 +0,0 @@
- o Code simplification and refactoring:
- - Remove the unused nodelist_recompute_all_hsdir_indices(). Closes ticket
- 25108.
diff --git a/changes/ticket25122 b/changes/ticket25122
deleted file mode 100644
index 2921811b2..000000000
--- a/changes/ticket25122
+++ /dev/null
@@ -1,4 +0,0 @@
- o Minor feature (geoip cache):
- - Make our OOM handler aware of the geoip client history cache so it
- doesn't fill up the memory which is especially important for IPv6 and
- our DoS mitigation subsystem. Closes ticket 25122.
diff --git a/changes/ticket25163 b/changes/ticket25163
deleted file mode 100644
index 6d237db75..000000000
--- a/changes/ticket25163
+++ /dev/null
@@ -1,4 +0,0 @@
- o Code simplification and refactoring (rephist):
- - Remove a series of counters used to track circuit extend attemps and
- connection status but that in reality we aren't using for anything other
- than stats logged by a SIGUSR1 signal. Closes ticket 25163.
diff --git a/changes/ticket25170 b/changes/ticket25170
deleted file mode 100644
index 065213940..000000000
--- a/changes/ticket25170
+++ /dev/null
@@ -1,5 +0,0 @@
- o Minor bugfix (directory authority, documentation):
- - When a fingerprint or network address is marked as rejected, the
- returned message by the authority now explicitly mention to set a valid
- ContactInfo address and contact the bad-relays@ mailing list. Fixes bug
- 25170; bugfix on 0.2.9.1.
1
0
commit 6b85ff95a283755ccf0caadb046ecaa5c988255c
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Fri Feb 9 16:01:45 2018 -0500
Tweak blurb, re-sort changelog
---
ChangeLog | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a32897e03..bf9f2d5a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,8 @@
Changes in version 0.3.3.2-alpha - 2018-02-09
- Tor 0.3.3.2-alpha is the second alpha in the 0.3.3.x series. It
+ Tor 0.3.3.2-alpha is the second alpha in the 0.3.3.x series. It
introduces a mechanism to handle the high loads that many relays
operators have been reporting recently. It also fixes several bugs in
- older releases. If this new code proves reliable, we plan to backport
+ older releases. If this new code proves reliable, we plan to backport
it to older supported release series.
o Major features (denial-of-service mitigation):
@@ -85,6 +85,14 @@ Changes in version 0.3.3.2-alpha - 2018-02-09
hop's identity was set when the circuit failed. Fixes bug 24927;
bugfix on 0.2.4.4-alpha.
+ o Minor bugfixes (logging):
+ - Don't treat inability to store a cached consensus object as a bug:
+ it can happen normally when we are out of disk space. Fixes bug
+ 24859; bugfix on 0.3.1.1-alpha.
+ - Fix a (mostly harmless) race condition when invoking
+ LOG_PROTOCOL_WARN message from a subthread while the options are
+ changing. Fixes bug 23954; bugfix on 0.1.1.9-alpha.
+
o Minor bugfixes (onion services):
- Remove a BUG() statement which can be triggered in normal
circumstances where a client fetches a descriptor that has a lower
@@ -94,14 +102,6 @@ Changes in version 0.3.3.2-alpha - 2018-02-09
rendezvous points if tor is a single onion service. Fixes bug
25116; bugfix on 0.2.9.6-rc;
- o Minor bugfixes (logging):
- - Don't treat inability to store a cached consensus object as a bug:
- it can happen normally when we are out of disk space. Fixes bug
- 24859; bugfix on 0.3.1.1-alpha.
- - Fix a (mostly harmless) race condition when invoking
- LOG_PROTOCOL_WARN message from a subthread while the options are
- changing. Fixes bug 23954; bugfix on 0.1.1.9-alpha.
-
o Minor bugfixes (performance):
- Avoid calling protocol_list_supports_protocol() from inside tight
loops when running with cached routerinfo_t objects. Instead,
1
0
commit f76d64d4bc7c9522a63faeee6c9c667458e1600d
Author: Damian Johnson <atagar(a)torproject.org>
Date: Fri Feb 9 12:08:12 2018 -0800
Loosen check for ssl connection errors
Jenkins is getting a different SSL error response than what I see locally when
attempted to treat the ControlPort like an ORPort. Loosening the conditional.
I'm tempted to include the exception string in the message but it's kinda
verbose. Maybe I'll do a regex to pluck out the useful bit in the future if
folks would find it useful.
======================================================================
FAIL: test_not_orport
----------------------------------------------------------------------
Traceback (most recent call last):
File "/srv/jenkins-workspace/workspace/stem-tor-ci/test/integ/client/connection.py", line 34, in test_not_orport
self.assertRaisesRegexp(stem.SocketError, "Failed to SSL authenticate to 127.0.0.1:1111. Maybe it isn't an ORPort?", Relay.connect, '127.0.0.1', test.runner.CONTROL_PORT)
File "/srv/jenkins-workspace/workspace/stem-tor-ci/stem/util/test_tools.py", line 278, in assertRaisesRegexp
return super(original_type, self).assertRaisesRegexp(exc_type, exc_msg, func, *args, **kwargs)
AssertionError: "Failed to SSL authenticate to 127.0.0.1:1111. Maybe it isn't an ORPort?" does not match "[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:661)"
----------------------------------------------------------------------
---
stem/client/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stem/client/__init__.py b/stem/client/__init__.py
index 340082c7..2c6b7ea6 100644
--- a/stem/client/__init__.py
+++ b/stem/client/__init__.py
@@ -83,7 +83,7 @@ class Relay(object):
except stem.SocketError as exc:
if 'Connection refused' in str(exc):
raise stem.SocketError("Failed to connect to %s:%i. Maybe it isn't an ORPort?" % (address, port))
- elif 'SSL: UNKNOWN_PROTOCOL' in str(exc):
+ elif 'SSL: ' in str(exc):
raise stem.SocketError("Failed to SSL authenticate to %s:%i. Maybe it isn't an ORPort?" % (address, port))
else:
raise
1
0