[tor-commits] [tor/master] Merge branch 'tor-github/pr/1940'
commit 96876d3ad79c14722cf14d9705df291b38ec4a82 Merge: 86aa84e63 caebfa5f6 Author: Alexander Færøy Date: Tue Jun 30 01:22:44 2020 + Merge branch 'tor-github/pr/1940' src/test/test_hs_service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Fix typo in test_build_update_descriptors() comment
commit caebfa5f6feb7451959b613d656c177ed1288a7d Author: Neel Chauhan Date: Wed Jun 17 20:12:13 2020 -0700 Fix typo in test_build_update_descriptors() comment --- src/test/test_hs_service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c index 80383baff..68ec5af39 100644 --- a/src/test/test_hs_service.c +++ b/src/test/test_hs_service.c @@ -1619,7 +1619,7 @@ test_build_update_descriptors(void *arg) /* We won't test the service IP object because there is a specific test * already for this but we'll make sure that the state is coherent.*/ - /* Three link specifiers are mandatoy so make sure we do have them. */ + /* Three link specifiers are mandatory so make sure we do have them. */ tt_int_op(smartlist_len(ip_cur->base.link_specifiers), OP_EQ, 3); /* Make sure we have a valid encryption keypair generated when we pick an * intro point in the update process. */ ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] fix: doc: Update/clarify Torflow aggregation
commit 5a44410af282b3193298518783e492e1a3cdae4b Author: juga0 Date: Wed May 20 13:21:23 2020 + fix: doc: Update/clarify Torflow aggregation --- docs/source/torflow_aggr.rst | 351 --- 1 file changed, 297 insertions(+), 54 deletions(-) diff --git a/docs/source/torflow_aggr.rst b/docs/source/torflow_aggr.rst index 49441b4..10b12a8 100644 --- a/docs/source/torflow_aggr.rst +++ b/docs/source/torflow_aggr.rst @@ -3,27 +3,34 @@ Torflow measurements aggregation == -From Torflow's README.spec.txt (section 2.2):: +Torflow aggregation or scaling goal is: + +From Torflow's `README.spec.txt`_ (section 2.2):: In this way, the resulting network status consensus bandwidth values are effectively re-weighted proportional to how much faster the node was as compared to the rest of the network. -The variables and steps used in Torflow: +With and without PID control + + +Per relay measurements' bandwidth +~ -**strm_bw**:: +They are calculated in the same way whether or not `PID controller`_ feedback +is used. + +From Torflow's `README.spec.txt`_ (section 1.6):: The strm_bw field is the average (mean) of all the streams for the relay identified by the fingerprint field. -strm_bw = sum(bw stream x)/|n stream| - -**filt_bw**:: The filt_bw field is computed similarly, but only the streams equal to or greater than the strm_bw are counted in order to filter very slow streams due to slow node pairings. -**filt_sbw and strm_sbw**:: +In the code, `SQLSupport.py`_, ``strm_bw`` is ``sbw`` and +``filt_bw`` is ``filt_sbws``:: for rs in RouterStats.query.filter(stats_clause).\ options(eagerload_all('router.streams.circuit.routers')).all(): @@ -46,36 +53,73 @@ The variables and steps used in Torflow: if sbw_cnt: rs.filt_sbw = tot_sbw/sbw_cnt else: rs.filt_sbw = None -**filt_avg, and strm_avg**:: +This is also expressed in pseudocode in the `bandwidth file spec`_, section B.4 +step 1. + +Calling ``bw_i`` to ``strm_bw`` and ``bwfilt_i`` to ``filt_bw``, +if ``bw_j`` is a measurement for a relay ``i`` and ``m`` is the number of +measurements for that relay, then: + +.. math:: + +bw_i = \mu(bw_j) = \frac{\sum_{j=1}^{m}bw_j}{m} + +.. math:: + +bwfilt_i &= \mu(max(\mu(bw_j), bw_j)) + = \frac{\sum_{j=1}^{m} max\left(\frac{\sum_{j=1}^{m}bw_j}{m}, bw_j\right)}{m} + +Network measurements' bandwidth average +~~~ + +From `README.spec.txt`_ (section 2.1):: Once we have determined the most recent measurements for each node, we compute an average of the filt_bw fields over all nodes we have measured. -:: +In Torflow's `aggregate.py`_ code:: filt_avg = sum(map(lambda n: n.filt_bw, nodes.itervalues()))/float(len(nodes)) strm_avg = sum(map(lambda n: n.strm_bw, nodes.itervalues()))/float(len(nodes)) -**true_filt_avg and true_strm_avg**:: +Both in the code with PID and without, all types of nodes get the same +average. -for cl in ["Guard+Exit", "Guard", "Exit", "Middle"]: -true_filt_avg[cl] = filt_avg -true_strm_avg[cl] = strm_avg +This is also expressed in pseudocode in the `bandwidth file spec`_, section B.4 +step 2. -In the non-pid case, all types of nodes get the same avg +Calling ``bwstrm`` to ``strm_avg`` and ``bwfilt`` to ``fitl_avg``, if ``n`` is +the number of relays in the network, then: -**n.fbw_ratio and n.fsw_ratio**:: +.. math:: + + bwstrm &= \mu(bw_i) + = \frac{\sum_{i=1}^{n}bw_i}{n} + = \frac{\sum_{i=1}^{n} \frac{\sum_{j=1}^{m}bw_j}{m} }{n} + +.. math:: + + bwfilt &= \mu(bwfilt_i) + = \frac{\sum_{i=1}^{n}bwfilt_i}{n} + = \frac{\sum_{i=1}^{n}\frac{\sum_{j=1}^{m}max(\mu(bw_j), bw_j)}{m}}{n} + = \frac{\sum_{i=1}^{n}\frac{\sum_{j=1}^{m}max\left(\frac{\sum_{j=1}^{m}bw_j}{m}, bw_j\right)}{m}}{n} -for n in nodes.itervalues(): -n.fbw_ratio = n.filt_bw/true_filt_avg[n.node_class()] -n.sbw_ratio = n.strm_bw/true_strm_avg[n.node_class()] -**n.ratio**:: +Per relay bandwidth ratio +~ + +From `README.spec.txt`_ (section 2.2):: These averages are used to produce ratios for each node by dividing the measured value for that node by the network average. -:: +In Torflow's `aggregate.py`_ code:: + +for n in nodes.itervalues(): +n.fbw_ratio = n.filt_bw/true_filt_avg[n.node_class()] +n.sbw_ratio = n.strm_bw/true_strm_avg[n.node_class()] + +[snip] # Choose the larger between sbw and fbw if n.sbw_ratio > n.fbw_ratio: @@ -83,68 +127,267 @@ In the non-pid case, all types of nodes get the same avg else: n.ratio = n.fbw_ratio -**desc_bw**: +This is also expressed in pseudocode in the `bandwidth file spec`_, section B.4 +step 2 and 3. -It is the minimum of
[tor-commits] [sbws/master] fix: test: Unrelated linter error
commit b9e8fcd7fdcd931fe87a715d089c073d8fd3fe34 Author: juga0 Date: Tue May 19 14:28:20 2020 + fix: test: Unrelated linter error --- tests/conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/conftest.py b/tests/conftest.py index 5d156f1..5f71b4a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -116,6 +116,7 @@ def router_status(server_descriptor, router_statuses): ][0] return rs + # Because of the function scoped `args` in `tests.unit.conftest`, this has to # be function scoped too. @pytest.fixture(scope='function') ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] chg: v3bwfile: Calculate hlimit from scaled sum bw
commit 5d0e63cb62ddae416671abd2e4b604e83c34cd1a Author: juga0 Date: Sun May 17 14:29:54 2020 + chg: v3bwfile: Calculate hlimit from scaled sum bw instead of bw before scaling. Tests have finally correct value. For 1 result, only when the cap is 1, the value will be equal to the rounded bw because the cap does not limit it. --- sbws/lib/v3bwfile.py| 44 + tests/unit/lib/test_v3bwfile.py | 16 +++ 2 files changed, 39 insertions(+), 21 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index e3a4cf2..4ebfa68 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1060,8 +1060,10 @@ class V3BWFile(object): cls.warn_if_not_accurate_enough(bw_lines, scale_constant) # log.debug(bw_lines[-1]) elif scaling_method == TORFLOW_SCALING: -bw_lines = cls.bw_torflow_scale(bw_lines_raw, torflow_obs, -torflow_cap, round_digs) +bw_lines = cls.bw_torflow_scale( +bw_lines_raw, torflow_obs, torflow_cap, round_digs, +router_statuses_d=router_statuses_d +) # log.debug(bw_lines[-1]) # Update the header and log the progress. min_perc = cls.update_progress( @@ -1186,7 +1188,8 @@ class V3BWFile(object): @staticmethod def bw_torflow_scale(bw_lines, desc_bw_obs_type=TORFLOW_OBS_MEAN, cap=TORFLOW_BW_MARGIN, - num_round_dig=PROP276_ROUND_DIG, reverse=False): + num_round_dig=PROP276_ROUND_DIG, reverse=False, + router_statuses_d=None): """ Obtain final bandwidth measurements applying Torflow's scaling method. @@ -1344,15 +1347,12 @@ class V3BWFile(object): mu = mean([l.bw_mean for l in bw_lines]) # filtered mean (Torflow's filt_avg) muf = mean([l.bw_filt for l in bw_lines]) - -# bw sum (Torflow's tot_net_bw or tot_sbw) -sum_bw = sum([l.bw_mean for l in bw_lines]) -# Torflow's clipping -hlimit = sum_bw * cap -log.debug('sum %s', sum_bw) log.debug('mu %s', mu) log.debug('muf %s', muf) -log.debug('hlimit %s', hlimit) + +# Torflow's ``tot_net_bw``, sum of the scaled bandwidth for the relays +# that are in the last consensus +sum_bw = 0 for l in bw_lines_tf: # First, obtain the observed bandwidth, later check what to do # if it is 0 or None. @@ -1412,9 +1412,27 @@ class V3BWFile(object): ratio_stream = l.bw_mean / mu ratio_stream_filtered = l.bw_filt / muf ratio = max(ratio_stream, ratio_stream_filtered) -bw_scaled = ratio * min_bandwidth -# Cap maximum bw -bw_scaled = min(hlimit, bw_scaled) + +# Assign it to an attribute, so it's not lost before capping and +# rounding +l.bw = ratio * min_bandwidth + +# If the consensus is available, sum only the bw for the relays +# that are in the consensus +if router_statuses_d: +if l.node_id.replace("$", "") in router_statuses_d: +sum_bw += l.bw +# Otherwise sum all bw, for compatibility with tests that were not +# using the consensus file. +else: +sum_bw += l.bw + +# Cap maximum bw, only possible when the ``sum_bw`` is calculated. +# Torflow's clipping +hlimit = sum_bw * cap +log.debug("sum_bw: %s, hlimit: %s", sum_bw, hlimit) +for l in bw_lines_tf: +bw_scaled = min(hlimit, l.bw) # round and convert to KB bw_new = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig) # avoid 0 diff --git a/tests/unit/lib/test_v3bwfile.py b/tests/unit/lib/test_v3bwfile.py index 5567a37..07f59d7 100644 --- a/tests/unit/lib/test_v3bwfile.py +++ b/tests/unit/lib/test_v3bwfile.py @@ -330,7 +330,7 @@ def test_torflow_scale(mock_consensus, datadir, tmpdir, conf): state_fpath, scaling_method=TORFLOW_SCALING, round_digs=TORFLOW_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 3 +assert v3bwfile.bw_lines[0].bw == 6 v3bwfile = V3BWFile.from_results(results, '', '', state_fpath, scaling_method=TORFLOW_SCALING, @@ -343,13 +343,13 @@ def test_torflow_scale(mock_consensus, datadir, tmpdir, conf): scaling_method=TORFLOW_SCALING, torflow_cap=1, round_digs=TORFLOW_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 61 +
[tor-commits] [sbws/master] chg: v3bwfile: Obtain consensus values from last consensus
commit 6e1f57c6770d7a09facf0414029a6f8cb32e35c7 Author: juga0 Date: Sun May 17 13:12:37 2020 + chg: v3bwfile: Obtain consensus values from last consensus --- sbws/lib/v3bwfile.py | 52 ++-- 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 30e8a8b..e3a4cf2 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -642,7 +642,7 @@ class V3BWLine(object): @classmethod def from_results(cls, results, secs_recent=None, secs_away=None, - min_num=0): + min_num=0, router_statuses_d=None): """Convert sbws results to relays' Bandwidth Lines ``bs`` stands for Bytes/seconds @@ -756,6 +756,23 @@ class V3BWLine(object): 'recent_measurements_excluded_few_count' return (cls(node_id, 1, **kwargs), exclusion_reason) +# Use the last consensus if available, since the results' consensus +# values come from the moment the measurement was made. +if router_statuses_d and node_id in router_statuses_d: +consensus_bandwidth = \ +router_statuses_d[node_id].bandwidth * 1000 +consensus_bandwidth_is_unmeasured = \ +router_statuses_d[node_id].is_unmeasured +else: +consensus_bandwidth = \ +cls.consensus_bandwidth_from_results(results_recent) +consensus_bandwidth_is_unmeasured = \ +cls.consensus_bandwidth_is_unmeasured_from_results( +results_recent) +# If there is no last observed bandwidth, there won't be mean either. +desc_bw_obs_last = \ +cls.desc_bw_obs_last_from_results(results_recent) + # For any line not excluded, do not include vote and unmeasured # KeyValues del kwargs['vote'] @@ -776,15 +793,13 @@ class V3BWLine(object): cls.desc_bw_avg_from_results(results_recent) kwargs['desc_bw_bur'] = \ cls.desc_bw_bur_from_results(results_recent) -kwargs['consensus_bandwidth'] = \ -cls.consensus_bandwidth_from_results(results_recent) +kwargs['consensus_bandwidth'] = consensus_bandwidth kwargs['consensus_bandwidth_is_unmeasured'] = \ -cls.consensus_bandwidth_is_unmeasured_from_results( -results_recent) -kwargs['desc_bw_obs_last'] = \ -cls.desc_bw_obs_last_from_results(results_recent) +consensus_bandwidth_is_unmeasured +kwargs['desc_bw_obs_last'] = desc_bw_obs_last kwargs['desc_bw_obs_mean'] = \ cls.desc_bw_obs_mean_from_results(results_recent) + bwl = cls(node_id, bw, **kwargs) return bwl, None @@ -997,8 +1012,10 @@ class V3BWFile(object): destinations_countries, state_fpath) bw_lines_raw = [] bw_lines_excluded = [] -number_consensus_relays = cls.read_number_consensus_relays( -consensus_path) +router_statuses_d = cls.read_router_statuses(consensus_path) +# XXX: Use router_statuses_d to not parse again the file. +number_consensus_relays = \ +cls.read_number_consensus_relays(consensus_path) state = State(state_fpath) # Create a dictionary with the number of relays excluded by any of the @@ -1012,7 +1029,8 @@ class V3BWFile(object): for fp, values in results.items(): # log.debug("Relay fp %s", fp) line, reason = V3BWLine.from_results(values, secs_recent, - secs_away, min_num) + secs_away, min_num, + router_statuses_d) # If there is no reason it means the line will not be excluded. if not reason: bw_lines_raw.append(line) @@ -1417,6 +1435,20 @@ class V3BWFile(object): log.debug("Number of relays in the network %s", num) return num +@staticmethod +def read_router_statuses(consensus_path): +"""Read the router statuses from the cached consensus file.""" +router_statuses_d = None +try: +router_statuses_d = dict([ +(r.fingerprint, r) +for r in parse_file(consensus_path) +]) +except (FileNotFoundError, AttributeError): +log.warning("It is not possible to obtain the last consensus" +"cached file %s.", consensus_path) +return router_statuses_d + @staticmethod def measured_progress_stats(num_bw_lines, number_consensus_relays, min_perc_reached_before): ___ tor-commits mailing list tor-commits@lists.torproject.org
[tor-commits] [sbws/master] chg: scaling: Add filtered bandwidth function
commit 5159662a50b6ae97588e87423d6c56a9014ff91f Author: juga0 Date: Sat May 16 17:07:19 2020 + chg: scaling: Add filtered bandwidth function to calculate the filtered bandwidth for each relay. --- sbws/lib/scaling.py | 19 +++ 1 file changed, 19 insertions(+) diff --git a/sbws/lib/scaling.py b/sbws/lib/scaling.py new file mode 100644 index 000..0fc3f84 --- /dev/null +++ b/sbws/lib/scaling.py @@ -0,0 +1,19 @@ +from statistics import mean + + +def bw_measurements_from_results(results): +return [ +dl['amount'] / dl['duration'] +for r in results for dl in r.downloads +] + + +def bw_filt(bw_measurements): +"""Filtered bandwidth for a relay. + +It is the equivalent to Torflow's ``filt_sbw``. +``mu`` in this function is the equivalent to Torflow's ``sbw``. +""" +mu = mean(bw_measurements) +bws_gte_mean = filter(lambda bw: bw >= mu, bw_measurements) +return mean(bws_gte_mean) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] chg: v3bwfile: Change logic obtaining min bandwidth
commit f365d679d72f1f35e59442bade90cfda3537a508 Author: juga0 Date: Sun May 17 11:16:54 2020 + chg: v3bwfile: Change logic obtaining min bandwidth Take either the consenus bandwidth or the descriptor bandwidth if one of them is missing, do not scale when both are missing and ignore descriptor average and burst when they are missing. --- sbws/lib/v3bwfile.py | 51 ++ tests/unit/lib/data/results_0_consensus_bw.txt | 1 + tests/unit/lib/data/results_no_consensus_bw.txt| 1 + tests/unit/lib/data/results_no_desc_bw_avg.txt | 1 + tests/unit/lib/data/results_no_desc_bw_avg_obs.txt | 1 + tests/unit/lib/data/results_no_desc_bw_obs.txt | 1 + tests/unit/lib/test_v3bwfile.py| 43 ++ 7 files changed, 82 insertions(+), 17 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 244eb5b..8c58d64 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1154,7 +1154,8 @@ class V3BWFile(object): # Percentage difference diff_perc = ( abs(sum_consensus_bw - sum_bw) -/ ((sum_consensus_bw + sum_bw) / 2) +# Avoid ZeroDivisionError +/ (max(1, (sum_consensus_bw + sum_bw)) / 2) ) * 100 log.info("The difference between the total consensus bandwidth (%s)" "and the total measured bandwidth (%s) is %s%%.", @@ -1356,23 +1357,39 @@ class V3BWFile(object): # descriptors' bandwidth-observed, because that penalises new # relays. # See https://trac.torproject.org/projects/tor/ticket/8494 -if l.desc_bw_bur is not None: -# Because in previous versions results were not storing -# desc_bw_bur -desc_bw = min(desc_bw_obs, l.desc_bw_bur, l.desc_bw_avg) +# If the observed bandwidth is None, it is not possible to +# calculate the minimum with the other descriptors. +# Only in this case, take the consensus bandwidth. +# In the case that descriptor average or burst are None, +# ignore them since it must be a bug in ``Resultdump``, already +# logged in x_bw/bandwidth_x_from_results, but scale. +if desc_bw_obs is not None: +if l.desc_bw_bur is not None: +if l.desc_bw_avg is not None: +desc_bw = min( +desc_bw_obs, l.desc_bw_bur, l.desc_bw_avg +) +else: +desc_bw = min(desc_bw_obs, l.desc_bw_bur) +else: +if l.desc_bw_avg is not None: +desc_bw = min(desc_bw_obs, l.desc_bw_avg) +else: +desc_bw = desc_bw_obs +# If the relay is unmeasured and consensus bandwidth is None or +# 0, use the descriptor bandwidth +if l.consensus_bandwidth_is_unmeasured \ +or not l.consensus_bandwidth: +min_bandwidth = desc_bw_obs +else: +min_bandwidth = min(desc_bw, l.consensus_bandwidth) +elif l.consensus_bandwidth is not None: +min_bandwidth = l.consensus_bandwidth else: -desc_bw = min(desc_bw_obs, l.desc_bw_avg) -# In previous versions results were not storing consensus_bandwidth -if l.consensus_bandwidth_is_unmeasured \ -or l.consensus_bandwidth is None: -min_bandwidth = desc_bw -# If the relay is measured, use the minimum between the descriptors -# bandwidth and the consensus bandwidth, so that -# MaxAdvertisedBandwidth limits the consensus weight -# The consensus bandwidth in a measured relay has been obtained -# doing the same calculation as here -else: -min_bandwidth = min(desc_bw, l.consensus_bandwidth) +log.warning("Can not scale relay missing descriptor and" +" consensus bandwidth.") +continue + # Torflow's scaling ratio_stream = l.bw_mean / mu ratio_stream_filtered = l.bw_filt / muf diff --git a/tests/unit/lib/data/results_0_consensus_bw.txt b/tests/unit/lib/data/results_0_consensus_bw.txt new file mode 100644 index 000..a4164a7 --- /dev/null +++ b/tests/unit/lib/data/results_0_consensus_bw.txt @@ -0,0 +1 @@ +{"version": 4, "time": 1523887747, "circ": ["", ""], "type": "success", "rtts": [0.4596822261810303, 0.44872617721557617, 0.4563450813293457, 0.44872212409973145, 0.4561030864715576, 0.4765200614929199, 0.4495084285736084, 0.45711588859558105,
[tor-commits] [sbws/master] chg: v3bwfile: Stop making mean minimum 1
commit 88eb7ef53c77d1d377125effd088f4cd41f59235 Author: juga0 Date: Tue May 19 07:59:28 2020 + chg: v3bwfile: Stop making mean minimum 1 --- sbws/lib/v3bwfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 9a303be..8c5b9a9 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -902,7 +902,8 @@ class V3BWLine(object): if r.relay_observed_bandwidth is not None: desc_bw_obs_ls.append(r.relay_observed_bandwidth) if desc_bw_obs_ls: -return max(round(mean(desc_bw_obs_ls)), 1) +return round(mean(desc_bw_obs_ls)) +log.warning("Descriptor observed bandwidth is None.") return None @staticmethod ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] chg: v3bwfile: Scale relays missing descriptor bws
commit d2947035c685ec6cc6a5cbdf4b33a05f398febba Author: juga0 Date: Sun May 17 10:55:44 2020 + chg: v3bwfile: Scale relays missing descriptor bws Scale relays without average or observed bandwidth. Later it will be check what to do if their values are None or 0 --- sbws/lib/v3bwfile.py | 30 +++--- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 46e6357..244eb5b 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1335,26 +1335,18 @@ class V3BWFile(object): log.debug('muf %s', muf) log.debug('hlimit %s', hlimit) for l in bw_lines_tf: -# Because earlier versions did not store this values, check first -# they exists. Do not report any error, since they will be stored -if not(l.desc_bw_avg): -log.debug("Skipping %s from scaling, because there was no " - "descriptor average bandwidth.", l.nick) -continue +# First, obtain the observed bandwidth, later check what to do +# if it is 0 or None. if desc_bw_obs_type == TORFLOW_OBS_LAST: -if l.desc_bw_obs_last: -desc_bw_obs = l.desc_bw_obs_last -else: -log.debug("Skipping %s from scaling, because there was no " - "last descriptor observed bandwidth.", l.nick) -continue -elif desc_bw_obs_type == TORFLOW_OBS_MEAN: -if l.desc_bw_obs_mean: -desc_bw_obs = l.desc_bw_obs_mean -else: -log.debug("Skipping %s from scaling, because there was no " - "mean descriptor observed bandwidth.", l.nick) -continue +# In case there's no last, use the mean, because it is possible +# that it went down for a few days, but no more than 5, +# otherwise the mean will be 1 +desc_bw_obs = l.desc_bw_obs_last or l.desc_bw_obs_mean +# Assume that if it is not TORFLOW_OBS_LAST, then it is +# TORFLOW_OBS_MEAN +else: +desc_bw_obs = l.desc_bw_obs_mean + # Excerpt from bandwidth-file-spec.txt section 2.3 # A relay's MaxAdvertisedBandwidth limits the bandwidth-avg in its # descriptor. ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] chg: v3bwfile: Round scaled bandwidth after capping
commit e4d80225e2ef81ce9e2665c69f487f05ad58836b Author: juga0 Date: Sun May 17 11:30:49 2020 + chg: v3bwfile: Round scaled bandwidth after capping Make tests pass because the high limit change the expected values, but the final value still needs to be fixed. --- sbws/lib/v3bwfile.py| 4 ++-- tests/unit/lib/test_v3bwfile.py | 20 +++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 33fafbb..30e8a8b 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1395,10 +1395,10 @@ class V3BWFile(object): ratio_stream_filtered = l.bw_filt / muf ratio = max(ratio_stream, ratio_stream_filtered) bw_scaled = ratio * min_bandwidth +# Cap maximum bw +bw_scaled = min(hlimit, bw_scaled) # round and convert to KB bw_new = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig) -# Cap maximum bw -bw_new = min(hlimit, bw_new) # avoid 0 l.bw = max(bw_new, 1) return sorted(bw_lines_tf, key=lambda x: x.bw, reverse=reverse) diff --git a/tests/unit/lib/test_v3bwfile.py b/tests/unit/lib/test_v3bwfile.py index 885797b..5567a37 100644 --- a/tests/unit/lib/test_v3bwfile.py +++ b/tests/unit/lib/test_v3bwfile.py @@ -330,25 +330,26 @@ def test_torflow_scale(mock_consensus, datadir, tmpdir, conf): state_fpath, scaling_method=TORFLOW_SCALING, round_digs=TORFLOW_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 123 +assert v3bwfile.bw_lines[0].bw == 3 v3bwfile = V3BWFile.from_results(results, '', '', state_fpath, scaling_method=TORFLOW_SCALING, torflow_cap=0.0001, round_digs=TORFLOW_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 6.14230005 +# Wrong because it should be rounded after clipping +assert v3bwfile.bw_lines[0].bw == 1 v3bwfile = V3BWFile.from_results(results, '', '', state_fpath, scaling_method=TORFLOW_SCALING, torflow_cap=1, round_digs=TORFLOW_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 123 +assert v3bwfile.bw_lines[0].bw == 61 v3bwfile = V3BWFile.from_results(results, '', '', state_fpath, scaling_method=TORFLOW_SCALING, torflow_cap=1, round_digs=PROP276_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 120 +assert v3bwfile.bw_lines[0].bw == 61 def test_torflow_scale_no_desc_bw_avg(datadir, conf, caplog): @@ -356,7 +357,7 @@ def test_torflow_scale_no_desc_bw_avg(datadir, conf, caplog): results = load_result_file(str(datadir.join("results_no_desc_bw_avg.txt"))) caplog.set_level(logging.DEBUG) v3bwfile = V3BWFile.from_results(results, '', '', state_fpath) -assert v3bwfile.bw_lines[0].bw == 520 +assert v3bwfile.bw_lines[0].bw == 3 def test_torflow_scale_no_desc_bw_obs(datadir, conf, caplog): @@ -364,7 +365,7 @@ def test_torflow_scale_no_desc_bw_obs(datadir, conf, caplog): results = load_result_file(str(datadir.join("results_no_desc_bw_obs.txt"))) caplog.set_level(logging.DEBUG) v3bwfile = V3BWFile.from_results(results, '', '', state_fpath) -assert v3bwfile.bw_lines[0].bw == 600 +assert v3bwfile.bw_lines[0].bw == 3 def test_torflow_scale_no_desc_bw_avg_obs(datadir, conf, caplog): @@ -374,7 +375,7 @@ def test_torflow_scale_no_desc_bw_avg_obs(datadir, conf, caplog): ) caplog.set_level(logging.DEBUG) v3bwfile = V3BWFile.from_results(results, '', '', state_fpath) -assert v3bwfile.bw_lines[0].bw == 600 +assert v3bwfile.bw_lines[0].bw == 3 def test_torflow_scale_no_consensus_bw(datadir, conf, caplog): @@ -384,7 +385,7 @@ def test_torflow_scale_no_consensus_bw(datadir, conf, caplog): ) caplog.set_level(logging.DEBUG) v3bwfile = V3BWFile.from_results(results, '', '', state_fpath) -assert v3bwfile.bw_lines[0].bw == 520 +assert v3bwfile.bw_lines[0].bw == 3 def test_torflow_scale_0_consensus_bw(datadir, conf, caplog): @@ -392,7 +393,8 @@ def test_torflow_scale_0_consensus_bw(datadir, conf, caplog): results = load_result_file(str(datadir.join("results_0_consensus_bw.txt"))) caplog.set_level(logging.DEBUG) v3bwfile = V3BWFile.from_results(results, '', '', state_fpath) -assert v3bwfile.bw_lines[0].bw == 520 +assert v3bwfile.bw_lines[0].bw == 3 + def test_results_away_each_other(datadir): min_num = 2
[tor-commits] [sbws/master] chg: v3bwfile: Calculate filtered bandwidth
commit c030731ec25adeff750c8c00415b87521a10d581 Author: juga0 Date: Sat May 16 17:55:50 2020 + chg: v3bwfile: Calculate filtered bandwidth for each relay, calculate the filtered mean for all relays and calculate the filtered ratio for each relay. --- sbws/lib/v3bwfile.py | 14 +++--- tests/unit/lib/test_scaling.py | 13 + 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 245ffa6..9a303be 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -15,6 +15,7 @@ from sbws.globals import (SPEC_VERSION, BW_LINE_SIZE, SBWS_SCALE_CONSTANT, TORFLOW_SCALING, SBWS_SCALING, TORFLOW_BW_MARGIN, TORFLOW_OBS_LAST, TORFLOW_OBS_MEAN, PROP276_ROUND_DIG, MIN_REPORT, MAX_BW_DIFF_PERC) +from sbws.lib import scaling from sbws.lib.resultdump import ResultSuccess, _ResultType from sbws.util.filelock import DirectoryLock from sbws.util.timestamp import (now_isodt_str, unixts_to_isodt_str, @@ -631,8 +632,10 @@ class V3BWLine(object): assert node_id.startswith('$') self.node_id = node_id self.bw = bw +# For now, we do not want to add ``bw_filt`` to the bandwidth file, +# therefore it is set here but not added to ``BWLINE_KEYS_V1``. [setattr(self, k, v) for k, v in kwargs.items() - if k in BWLINE_KEYS_V1] + if k in BWLINE_KEYS_V1 + ["bw_filt"]] def __str__(self): return self.bw_strv1 @@ -762,7 +765,11 @@ class V3BWLine(object): if rtt: kwargs['rtt'] = rtt bw = cls.bw_median_from_results(results_recent) +# XXX: all the class functions could use the bw_measurements instead of +# obtaining them each time or use a class Measurements. +bw_measurements = scaling.bw_measurements_from_results(results_recent) kwargs['bw_mean'] = cls.bw_mean_from_results(results_recent) +kwargs['bw_filt'] = scaling.bw_filt(bw_measurements) kwargs['bw_median'] = cls.bw_median_from_results( results_recent) kwargs['desc_bw_avg'] = \ @@ -1311,7 +1318,8 @@ class V3BWFile(object): # mean (Torflow's strm_avg) mu = mean([l.bw_mean for l in bw_lines]) # filtered mean (Torflow's filt_avg) -muf = mean([max(l.bw_mean, mu) for l in bw_lines]) +muf = mean([l.bw_filt for l in bw_lines]) + # bw sum (Torflow's tot_net_bw or tot_sbw) sum_bw = sum([l.bw_mean for l in bw_lines]) # Torflow's clipping @@ -1369,7 +1377,7 @@ class V3BWFile(object): min_bandwidth = min(desc_bw, l.consensus_bandwidth) # Torflow's scaling ratio_stream = l.bw_mean / mu -ratio_stream_filtered = max(l.bw_mean, mu) / muf +ratio_stream_filtered = l.bw_filt / muf ratio = max(ratio_stream, ratio_stream_filtered) bw_scaled = ratio * min_bandwidth # round and convert to KB diff --git a/tests/unit/lib/test_scaling.py b/tests/unit/lib/test_scaling.py new file mode 100644 index 000..06fb71b --- /dev/null +++ b/tests/unit/lib/test_scaling.py @@ -0,0 +1,13 @@ +"""Unit tests for scaling.py.""" + +from sbws.lib import scaling + + +def test_bw_filt(): +bw_measurements = [ +96700.00922329757, 70311.63051659254, 45531.743347556374, +38913.97025485627, 55656.332364676025 +] +fb = scaling.bw_filt(bw_measurements) +# This is greater than the mean, that is 61422.73714139576 +assert fb == 83505.81986994506 ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] fix: v3bwfile: cap is never None
commit ce4ad67508003e5437a10aef8f642e0f559dc54f Author: juga0 Date: Sun May 17 11:35:37 2020 + fix: v3bwfile: cap is never None --- sbws/lib/v3bwfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 8c58d64..e7a8aef 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1398,8 +1398,7 @@ class V3BWFile(object): # round and convert to KB bw_new = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig) # Cap maximum bw -if cap is not None: -bw_new = min(hlimit, bw_new) +bw_new = min(hlimit, bw_new) # avoid 0 l.bw = max(bw_new, 1) return sorted(bw_lines_tf, key=lambda x: x.bw, reverse=reverse) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] Merge branch 'maint-1.1_bug33871_scaling_03' into 'maint-1.1'
commit 02861e103119b17821e78fcacbcfdf24f568ec69 Merge: 3033421 ce0449a Author: Georg Koppen Date: Mon Jun 15 07:14:43 2020 + Merge branch 'maint-1.1_bug33871_scaling_03' into 'maint-1.1' Maint 1.1 bug33871 scaling 03 See merge request tpo/network-health/sbws!9 docs/source/index.rst | 1 + docs/source/torflow_aggr.rst | 429 + sbws/lib/bwfile_health.py | 2 + sbws/lib/scaling.py| 19 + sbws/lib/v3bwfile.py | 386 -- tests/conftest.py | 1 + tests/unit/lib/data/results_0_consensus_bw.txt | 1 + tests/unit/lib/data/results_no_consensus_bw.txt| 1 + tests/unit/lib/data/results_no_desc_bw_avg.txt | 1 + tests/unit/lib/data/results_no_desc_bw_avg_obs.txt | 1 + tests/unit/lib/data/results_no_desc_bw_obs.txt | 1 + tests/unit/lib/test_scaling.py | 13 + tests/unit/lib/test_v3bwfile.py| 49 ++- 13 files changed, 680 insertions(+), 225 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] fix: doc: Update/clarify Torflow aggregation
commit 5a44410af282b3193298518783e492e1a3cdae4b Author: juga0 Date: Wed May 20 13:21:23 2020 + fix: doc: Update/clarify Torflow aggregation --- docs/source/torflow_aggr.rst | 351 --- 1 file changed, 297 insertions(+), 54 deletions(-) diff --git a/docs/source/torflow_aggr.rst b/docs/source/torflow_aggr.rst index 49441b4..10b12a8 100644 --- a/docs/source/torflow_aggr.rst +++ b/docs/source/torflow_aggr.rst @@ -3,27 +3,34 @@ Torflow measurements aggregation == -From Torflow's README.spec.txt (section 2.2):: +Torflow aggregation or scaling goal is: + +From Torflow's `README.spec.txt`_ (section 2.2):: In this way, the resulting network status consensus bandwidth values are effectively re-weighted proportional to how much faster the node was as compared to the rest of the network. -The variables and steps used in Torflow: +With and without PID control + + +Per relay measurements' bandwidth +~ -**strm_bw**:: +They are calculated in the same way whether or not `PID controller`_ feedback +is used. + +From Torflow's `README.spec.txt`_ (section 1.6):: The strm_bw field is the average (mean) of all the streams for the relay identified by the fingerprint field. -strm_bw = sum(bw stream x)/|n stream| - -**filt_bw**:: The filt_bw field is computed similarly, but only the streams equal to or greater than the strm_bw are counted in order to filter very slow streams due to slow node pairings. -**filt_sbw and strm_sbw**:: +In the code, `SQLSupport.py`_, ``strm_bw`` is ``sbw`` and +``filt_bw`` is ``filt_sbws``:: for rs in RouterStats.query.filter(stats_clause).\ options(eagerload_all('router.streams.circuit.routers')).all(): @@ -46,36 +53,73 @@ The variables and steps used in Torflow: if sbw_cnt: rs.filt_sbw = tot_sbw/sbw_cnt else: rs.filt_sbw = None -**filt_avg, and strm_avg**:: +This is also expressed in pseudocode in the `bandwidth file spec`_, section B.4 +step 1. + +Calling ``bw_i`` to ``strm_bw`` and ``bwfilt_i`` to ``filt_bw``, +if ``bw_j`` is a measurement for a relay ``i`` and ``m`` is the number of +measurements for that relay, then: + +.. math:: + +bw_i = \mu(bw_j) = \frac{\sum_{j=1}^{m}bw_j}{m} + +.. math:: + +bwfilt_i &= \mu(max(\mu(bw_j), bw_j)) + = \frac{\sum_{j=1}^{m} max\left(\frac{\sum_{j=1}^{m}bw_j}{m}, bw_j\right)}{m} + +Network measurements' bandwidth average +~~~ + +From `README.spec.txt`_ (section 2.1):: Once we have determined the most recent measurements for each node, we compute an average of the filt_bw fields over all nodes we have measured. -:: +In Torflow's `aggregate.py`_ code:: filt_avg = sum(map(lambda n: n.filt_bw, nodes.itervalues()))/float(len(nodes)) strm_avg = sum(map(lambda n: n.strm_bw, nodes.itervalues()))/float(len(nodes)) -**true_filt_avg and true_strm_avg**:: +Both in the code with PID and without, all types of nodes get the same +average. -for cl in ["Guard+Exit", "Guard", "Exit", "Middle"]: -true_filt_avg[cl] = filt_avg -true_strm_avg[cl] = strm_avg +This is also expressed in pseudocode in the `bandwidth file spec`_, section B.4 +step 2. -In the non-pid case, all types of nodes get the same avg +Calling ``bwstrm`` to ``strm_avg`` and ``bwfilt`` to ``fitl_avg``, if ``n`` is +the number of relays in the network, then: -**n.fbw_ratio and n.fsw_ratio**:: +.. math:: + + bwstrm &= \mu(bw_i) + = \frac{\sum_{i=1}^{n}bw_i}{n} + = \frac{\sum_{i=1}^{n} \frac{\sum_{j=1}^{m}bw_j}{m} }{n} + +.. math:: + + bwfilt &= \mu(bwfilt_i) + = \frac{\sum_{i=1}^{n}bwfilt_i}{n} + = \frac{\sum_{i=1}^{n}\frac{\sum_{j=1}^{m}max(\mu(bw_j), bw_j)}{m}}{n} + = \frac{\sum_{i=1}^{n}\frac{\sum_{j=1}^{m}max\left(\frac{\sum_{j=1}^{m}bw_j}{m}, bw_j\right)}{m}}{n} -for n in nodes.itervalues(): -n.fbw_ratio = n.filt_bw/true_filt_avg[n.node_class()] -n.sbw_ratio = n.strm_bw/true_strm_avg[n.node_class()] -**n.ratio**:: +Per relay bandwidth ratio +~ + +From `README.spec.txt`_ (section 2.2):: These averages are used to produce ratios for each node by dividing the measured value for that node by the network average. -:: +In Torflow's `aggregate.py`_ code:: + +for n in nodes.itervalues(): +n.fbw_ratio = n.filt_bw/true_filt_avg[n.node_class()] +n.sbw_ratio = n.strm_bw/true_strm_avg[n.node_class()] + +[snip] # Choose the larger between sbw and fbw if n.sbw_ratio > n.fbw_ratio: @@ -83,68 +127,267 @@ In the non-pid case, all types of nodes get the same avg else: n.ratio = n.fbw_ratio -**desc_bw**: +This is also expressed in pseudocode in the `bandwidth file spec`_, section B.4 +step 2 and 3. -It is the minimum of
[tor-commits] [sbws/master] fix: v3bwfile: Warn about None bandwidth values
commit d4929161a1284b8d1a28abc4ba6d09af61d68853 Author: juga0 Date: Sun May 17 09:46:45 2020 + fix: v3bwfile: Warn about None bandwidth values since they are probably due a bug. --- sbws/lib/v3bwfile.py | 5 + 1 file changed, 5 insertions(+) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 8c5b9a9..46e6357 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -869,6 +869,7 @@ class V3BWLine(object): for r in reversed(results): if r.relay_average_bandwidth is not None: return r.relay_average_bandwidth +log.warning("Descriptor average bandwidth is None.") return None @staticmethod @@ -877,6 +878,7 @@ class V3BWLine(object): for r in reversed(results): if r.relay_burst_bandwidth is not None: return r.relay_burst_bandwidth +log.warning("Descriptor burst bandwidth is None.") return None @staticmethod @@ -885,6 +887,7 @@ class V3BWLine(object): for r in reversed(results): if r.consensus_bandwidth is not None: return r.consensus_bandwidth +log.warning("Consensus bandwidth is None.") return None @staticmethod @@ -893,6 +896,7 @@ class V3BWLine(object): for r in reversed(results): if r.consensus_bandwidth_is_unmeasured is not None: return r.consensus_bandwidth_is_unmeasured +log.warning("Consensus bandwidth is unmeasured is None.") return None @staticmethod @@ -912,6 +916,7 @@ class V3BWLine(object): for r in reversed(results): if r.relay_observed_bandwidth is not None: return r.relay_observed_bandwidth +log.warning("Descriptor observed bandwidth is None.") return None @property ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] fix: docs: Remove unneeded linter exception
commit 3edf2fe2a739af4a2ccc8f128e45245347bce265 Author: juga0 Date: Tue May 19 15:22:13 2020 + fix: docs: Remove unneeded linter exception --- docs/source/index.rst| 1 + docs/source/torflow_aggr.rst | 30 - sbws/lib/v3bwfile.py | 147 +-- 3 files changed, 17 insertions(+), 161 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 342e857..58c3911 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -45,6 +45,7 @@ Included in the config config_tor sbws + torflow_aggr implementation bandwidth_distribution tor_bandwidth_files diff --git a/docs/source/torflow_aggr.rst b/docs/source/torflow_aggr.rst index 6fc8fd1..49441b4 100644 --- a/docs/source/torflow_aggr.rst +++ b/docs/source/torflow_aggr.rst @@ -5,28 +5,28 @@ Torflow measurements aggregation From Torflow's README.spec.txt (section 2.2):: -In this way, the resulting network status consensus bandwidth values # NOQA -are effectively re-weighted proportional to how much faster the node # NOQA +In this way, the resulting network status consensus bandwidth values +are effectively re-weighted proportional to how much faster the node was as compared to the rest of the network. The variables and steps used in Torflow: **strm_bw**:: -The strm_bw field is the average (mean) of all the streams for the relay # NOQA +The strm_bw field is the average (mean) of all the streams for the relay identified by the fingerprint field. strm_bw = sum(bw stream x)/|n stream| **filt_bw**:: -The filt_bw field is computed similarly, but only the streams equal to # NOQA -or greater than the strm_bw are counted in order to filter very slow # NOQA +The filt_bw field is computed similarly, but only the streams equal to +or greater than the strm_bw are counted in order to filter very slow streams due to slow node pairings. **filt_sbw and strm_sbw**:: for rs in RouterStats.query.filter(stats_clause).\ - options(eagerload_all('router.streams.circuit.routers')).all(): # NOQA + options(eagerload_all('router.streams.circuit.routers')).all(): tot_sbw = 0 sbw_cnt = 0 for s in rs.router.streams: @@ -48,13 +48,13 @@ The variables and steps used in Torflow: **filt_avg, and strm_avg**:: -Once we have determined the most recent measurements for each node, we # NOQA -compute an average of the filt_bw fields over all nodes we have measured. # NOQA +Once we have determined the most recent measurements for each node, we +compute an average of the filt_bw fields over all nodes we have measured. :: -filt_avg = sum(map(lambda n: n.filt_bw, nodes.itervalues()))/float(len(nodes)) # NOQA -strm_avg = sum(map(lambda n: n.strm_bw, nodes.itervalues()))/float(len(nodes)) # NOQA +filt_avg = sum(map(lambda n: n.filt_bw, nodes.itervalues()))/float(len(nodes)) +strm_avg = sum(map(lambda n: n.strm_bw, nodes.itervalues()))/float(len(nodes)) **true_filt_avg and true_strm_avg**:: @@ -72,7 +72,7 @@ In the non-pid case, all types of nodes get the same avg **n.ratio**:: -These averages are used to produce ratios for each node by dividing the # NOQA +These averages are used to produce ratios for each node by dividing the measured value for that node by the network average. :: @@ -91,15 +91,15 @@ It is the minimum of all the descriptor bandwidth values:: bw_observed = min(bws) return Router(ns.idhex, ns.nickname, bw_observed, dead, exitpolicy, -ns.flags, ip, version, os, uptime, published, contact, rate_limited, # NOQA +ns.flags, ip, version, os, uptime, published, contact, rate_limited, ns.orhash, ns.bandwidth, extra_info_digest, ns.unmeasured) self.desc_bw = max(bw,1) # Avoid div by 0 **new_bw**:: -These ratios are then multiplied by the most recent observed descriptor # NOQA -bandwidth we have available for each node, to produce a new value for # NOQA +These ratios are then multiplied by the most recent observed descriptor +bandwidth we have available for each node, to produce a new value for the network status consensus process. :: @@ -115,7 +115,7 @@ The descriptor observed bandwidth is multiplied by the ratio. :: if n.new_bw > tot_net_bw*NODE_CAP: - plog("INFO", "Clipping extremely fast "+n.node_class()+" node "+n.idhex+"="+n.nick+ # NOQA + plog("INFO", "Clipping extremely fast "+n.node_class()+" node "+n.idhex+"="+n.nick+ " at "+str(100*NODE_CAP)+"% of network capacity ("+ str(n.new_bw)+"->"+str(int(tot_net_bw*NODE_CAP))+") "+ " pid_error="+str(n.pid_error)+ diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 56925cb..a585bb7 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1207,152 +1207,7 @@ class
[tor-commits] [sbws/master] Merge branch 'maint-1.1'
commit c89a8a35989773ac4da249b5f8f6138ed528dd4e Merge: 44489f3 02861e1 Author: juga0 Date: Mon Jun 29 07:49:48 2020 + Merge branch 'maint-1.1' docs/source/index.rst | 1 + docs/source/torflow_aggr.rst | 429 + sbws/lib/bwfile_health.py | 2 + sbws/lib/scaling.py| 19 + sbws/lib/v3bwfile.py | 386 -- tests/conftest.py | 1 + tests/unit/lib/data/results_0_consensus_bw.txt | 1 + tests/unit/lib/data/results_no_consensus_bw.txt| 1 + tests/unit/lib/data/results_no_desc_bw_avg.txt | 1 + tests/unit/lib/data/results_no_desc_bw_avg_obs.txt | 1 + tests/unit/lib/data/results_no_desc_bw_obs.txt | 1 + tests/unit/lib/test_scaling.py | 13 + tests/unit/lib/test_v3bwfile.py| 49 ++- 13 files changed, 680 insertions(+), 225 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] Merge branch 'maint-1.1_bug33871_scaling_03' into 'maint-1.1'
commit 02861e103119b17821e78fcacbcfdf24f568ec69 Merge: 3033421 ce0449a Author: Georg Koppen Date: Mon Jun 15 07:14:43 2020 + Merge branch 'maint-1.1_bug33871_scaling_03' into 'maint-1.1' Maint 1.1 bug33871 scaling 03 See merge request tpo/network-health/sbws!9 docs/source/index.rst | 1 + docs/source/torflow_aggr.rst | 429 + sbws/lib/bwfile_health.py | 2 + sbws/lib/scaling.py| 19 + sbws/lib/v3bwfile.py | 386 -- tests/conftest.py | 1 + tests/unit/lib/data/results_0_consensus_bw.txt | 1 + tests/unit/lib/data/results_no_consensus_bw.txt| 1 + tests/unit/lib/data/results_no_desc_bw_avg.txt | 1 + tests/unit/lib/data/results_no_desc_bw_avg_obs.txt | 1 + tests/unit/lib/data/results_no_desc_bw_obs.txt | 1 + tests/unit/lib/test_scaling.py | 13 + tests/unit/lib/test_v3bwfile.py| 49 ++- 13 files changed, 680 insertions(+), 225 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] fix: v3bwfile: Remove unneeded minimum 1
commit d72fe2ee33237c507f461488c7bb879301895e62 Author: juga0 Date: Wed May 20 13:23:26 2020 + fix: v3bwfile: Remove unneeded minimum 1 since rounding already returns 1 as minimum. --- sbws/lib/v3bwfile.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 4ebfa68..d64712c 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1434,9 +1434,7 @@ class V3BWFile(object): for l in bw_lines_tf: bw_scaled = min(hlimit, l.bw) # round and convert to KB -bw_new = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig) -# avoid 0 -l.bw = max(bw_new, 1) +l.bw = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig) return sorted(bw_lines_tf, key=lambda x: x.bw, reverse=reverse) @staticmethod ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] fix: v3bwfile: linter error with new flake version
commit ce0449a2efa4e341abb2bb985972423f878f0ef6 Author: juga0 Date: Wed May 20 15:39:46 2020 + fix: v3bwfile: linter error with new flake version --- sbws/lib/bwfile_health.py | 2 ++ sbws/lib/v3bwfile.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sbws/lib/bwfile_health.py b/sbws/lib/bwfile_health.py index 793e08e..95d37ee 100644 --- a/sbws/lib/bwfile_health.py +++ b/sbws/lib/bwfile_health.py @@ -1,4 +1,6 @@ """Expected bandwidth file values for KeyValues.""" +# flake8: noqa: E741 +# (E741 ambiguous variable name), when using l. import logging from stem import descriptor diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index a585bb7..071dc94 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- """Classes and functions that create the bandwidth measurements document (v3bw) used by bandwidth authorities.""" +# flake8: noqa: E741 +# (E741 ambiguous variable name), when using l. import copy import logging ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-misc_release] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release
commit 9cb6d116aff06487a6a998a977173168a1caa14f Author: Translation commit bot Date: Mon Jun 29 08:16:26 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release --- nl.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nl.po b/nl.po index 59d10f1194..b911d1696a 100644 --- a/nl.po +++ b/nl.po @@ -37,8 +37,8 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-06-19 19:37+0200\n" -"PO-Revision-Date: 2020-06-29 00:35+\n" -"Last-Translator: Thomas De Rocker\n" +"PO-Revision-Date: 2020-06-29 08:01+\n" +"Last-Translator: Tonnes \n" "Language-Team: Dutch (http://www.transifex.com/otf/torproject/language/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-misc_release] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release
commit 83e3029b4676ad8f42f7d3d7087792db7ee0fbbf Author: Translation commit bot Date: Mon Jun 29 09:46:31 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release --- lt.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lt.po b/lt.po index 046c10b5a1..56a30aedb5 100644 --- a/lt.po +++ b/lt.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-06-19 19:37+0200\n" -"PO-Revision-Date: 2020-06-29 00:35+\n" +"PO-Revision-Date: 2020-06-29 09:21+\n" "Last-Translator: Moo\n" "Language-Team: Lithuanian (http://www.transifex.com/otf/torproject/language/lt/)\n" "MIME-Version: 1.0\n" @@ -404,7 +404,7 @@ msgstr "" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:329 msgid "_Unsafe Browser" -msgstr "" +msgstr "_Nesaugi narÅ¡yklÄ" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:338 msgid "Enabled" @@ -853,7 +853,7 @@ msgstr "" msgid "" "Failed to import keys from {path}:\n" "{error}" -msgstr "" +msgstr "Nepavyko importuoti raktų iÅ¡ {path}:\n{error}" #: config/chroot_local-includes/usr/local/lib/seahorse-tool-wrapper:53 msgid "Key Imported" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-misc] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc
commit 83b744aeccddb4d1ce73b84f579d243ba1b1d20b Author: Translation commit bot Date: Mon Jun 29 09:45:50 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-misc --- lt.po | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lt.po b/lt.po index 6045846f7a..759145a1d6 100644 --- a/lt.po +++ b/lt.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-06-19 19:37+0200\n" -"PO-Revision-Date: 2020-06-29 00:35+\n" +"PO-Revision-Date: 2020-06-29 09:21+\n" "Last-Translator: Moo\n" "Language-Team: Lithuanian (http://www.transifex.com/otf/torproject/language/lt/)\n" "MIME-Version: 1.0\n" @@ -404,7 +404,7 @@ msgstr "Nepasiekiama(-s)" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:329 msgid "_Unsafe Browser" -msgstr "" +msgstr "_Nesaugi narÅ¡yklÄ" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:338 msgid "Enabled" @@ -661,7 +661,7 @@ msgstr "" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:72 msgid "Language, administration password, and additional settings" -msgstr "" +msgstr "Kalba, administravimo slaptažodis bei papildomi nustatymai" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:85 msgid "Browser Bookmarks" @@ -844,7 +844,7 @@ msgstr "Nepavyksta rasti disko, iÅ¡ kurio yra paleista Tails. GalbÅ«t, jÅ«s naud #: config/chroot_local-includes/usr/local/lib/seahorse-tool-wrapper:42 msgid "Import Failed" -msgstr "" +msgstr "Importavimas nepavyko" #. Translators: Don't translate {path} or {error}, #. they are placeholders and will be replaced. @@ -853,7 +853,7 @@ msgstr "" msgid "" "Failed to import keys from {path}:\n" "{error}" -msgstr "" +msgstr "Nepavyko importuoti raktų iÅ¡ {path}:\n{error}" #: config/chroot_local-includes/usr/local/lib/seahorse-tool-wrapper:53 msgid "Key Imported" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] fix: v3bwfile: Use cap argument to clip scaled bw
commit 788a777fbe946b8e2cd50308487802cb93d743f1 Author: juga0 Date: Tue May 19 10:32:09 2020 + fix: v3bwfile: Use cap argument to clip scaled bw Make test pass, though the value is not correct since it needs to be rounded after clipping --- sbws/lib/v3bwfile.py| 2 +- tests/unit/lib/test_v3bwfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index e7a8aef..33fafbb 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1330,7 +1330,7 @@ class V3BWFile(object): # bw sum (Torflow's tot_net_bw or tot_sbw) sum_bw = sum([l.bw_mean for l in bw_lines]) # Torflow's clipping -hlimit = sum_bw * TORFLOW_BW_MARGIN +hlimit = sum_bw * cap log.debug('sum %s', sum_bw) log.debug('mu %s', mu) log.debug('muf %s', muf) diff --git a/tests/unit/lib/test_v3bwfile.py b/tests/unit/lib/test_v3bwfile.py index 1b46d69..885797b 100644 --- a/tests/unit/lib/test_v3bwfile.py +++ b/tests/unit/lib/test_v3bwfile.py @@ -336,7 +336,7 @@ def test_torflow_scale(mock_consensus, datadir, tmpdir, conf): scaling_method=TORFLOW_SCALING, torflow_cap=0.0001, round_digs=TORFLOW_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 123 +assert v3bwfile.bw_lines[0].bw == 6.14230005 v3bwfile = V3BWFile.from_results(results, '', '', state_fpath, scaling_method=TORFLOW_SCALING, ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] chg: v3bwfile: Round scaled bandwidth after capping
commit e4d80225e2ef81ce9e2665c69f487f05ad58836b Author: juga0 Date: Sun May 17 11:30:49 2020 + chg: v3bwfile: Round scaled bandwidth after capping Make tests pass because the high limit change the expected values, but the final value still needs to be fixed. --- sbws/lib/v3bwfile.py| 4 ++-- tests/unit/lib/test_v3bwfile.py | 20 +++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 33fafbb..30e8a8b 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1395,10 +1395,10 @@ class V3BWFile(object): ratio_stream_filtered = l.bw_filt / muf ratio = max(ratio_stream, ratio_stream_filtered) bw_scaled = ratio * min_bandwidth +# Cap maximum bw +bw_scaled = min(hlimit, bw_scaled) # round and convert to KB bw_new = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig) -# Cap maximum bw -bw_new = min(hlimit, bw_new) # avoid 0 l.bw = max(bw_new, 1) return sorted(bw_lines_tf, key=lambda x: x.bw, reverse=reverse) diff --git a/tests/unit/lib/test_v3bwfile.py b/tests/unit/lib/test_v3bwfile.py index 885797b..5567a37 100644 --- a/tests/unit/lib/test_v3bwfile.py +++ b/tests/unit/lib/test_v3bwfile.py @@ -330,25 +330,26 @@ def test_torflow_scale(mock_consensus, datadir, tmpdir, conf): state_fpath, scaling_method=TORFLOW_SCALING, round_digs=TORFLOW_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 123 +assert v3bwfile.bw_lines[0].bw == 3 v3bwfile = V3BWFile.from_results(results, '', '', state_fpath, scaling_method=TORFLOW_SCALING, torflow_cap=0.0001, round_digs=TORFLOW_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 6.14230005 +# Wrong because it should be rounded after clipping +assert v3bwfile.bw_lines[0].bw == 1 v3bwfile = V3BWFile.from_results(results, '', '', state_fpath, scaling_method=TORFLOW_SCALING, torflow_cap=1, round_digs=TORFLOW_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 123 +assert v3bwfile.bw_lines[0].bw == 61 v3bwfile = V3BWFile.from_results(results, '', '', state_fpath, scaling_method=TORFLOW_SCALING, torflow_cap=1, round_digs=PROP276_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 120 +assert v3bwfile.bw_lines[0].bw == 61 def test_torflow_scale_no_desc_bw_avg(datadir, conf, caplog): @@ -356,7 +357,7 @@ def test_torflow_scale_no_desc_bw_avg(datadir, conf, caplog): results = load_result_file(str(datadir.join("results_no_desc_bw_avg.txt"))) caplog.set_level(logging.DEBUG) v3bwfile = V3BWFile.from_results(results, '', '', state_fpath) -assert v3bwfile.bw_lines[0].bw == 520 +assert v3bwfile.bw_lines[0].bw == 3 def test_torflow_scale_no_desc_bw_obs(datadir, conf, caplog): @@ -364,7 +365,7 @@ def test_torflow_scale_no_desc_bw_obs(datadir, conf, caplog): results = load_result_file(str(datadir.join("results_no_desc_bw_obs.txt"))) caplog.set_level(logging.DEBUG) v3bwfile = V3BWFile.from_results(results, '', '', state_fpath) -assert v3bwfile.bw_lines[0].bw == 600 +assert v3bwfile.bw_lines[0].bw == 3 def test_torflow_scale_no_desc_bw_avg_obs(datadir, conf, caplog): @@ -374,7 +375,7 @@ def test_torflow_scale_no_desc_bw_avg_obs(datadir, conf, caplog): ) caplog.set_level(logging.DEBUG) v3bwfile = V3BWFile.from_results(results, '', '', state_fpath) -assert v3bwfile.bw_lines[0].bw == 600 +assert v3bwfile.bw_lines[0].bw == 3 def test_torflow_scale_no_consensus_bw(datadir, conf, caplog): @@ -384,7 +385,7 @@ def test_torflow_scale_no_consensus_bw(datadir, conf, caplog): ) caplog.set_level(logging.DEBUG) v3bwfile = V3BWFile.from_results(results, '', '', state_fpath) -assert v3bwfile.bw_lines[0].bw == 520 +assert v3bwfile.bw_lines[0].bw == 3 def test_torflow_scale_0_consensus_bw(datadir, conf, caplog): @@ -392,7 +393,8 @@ def test_torflow_scale_0_consensus_bw(datadir, conf, caplog): results = load_result_file(str(datadir.join("results_0_consensus_bw.txt"))) caplog.set_level(logging.DEBUG) v3bwfile = V3BWFile.from_results(results, '', '', state_fpath) -assert v3bwfile.bw_lines[0].bw == 520 +assert v3bwfile.bw_lines[0].bw == 3 + def test_results_away_each_other(datadir): min_num = 2
[tor-commits] [sbws/maint-1.1] fix: v3bwfile: Warn about None bandwidth values
commit d4929161a1284b8d1a28abc4ba6d09af61d68853 Author: juga0 Date: Sun May 17 09:46:45 2020 + fix: v3bwfile: Warn about None bandwidth values since they are probably due a bug. --- sbws/lib/v3bwfile.py | 5 + 1 file changed, 5 insertions(+) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 8c5b9a9..46e6357 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -869,6 +869,7 @@ class V3BWLine(object): for r in reversed(results): if r.relay_average_bandwidth is not None: return r.relay_average_bandwidth +log.warning("Descriptor average bandwidth is None.") return None @staticmethod @@ -877,6 +878,7 @@ class V3BWLine(object): for r in reversed(results): if r.relay_burst_bandwidth is not None: return r.relay_burst_bandwidth +log.warning("Descriptor burst bandwidth is None.") return None @staticmethod @@ -885,6 +887,7 @@ class V3BWLine(object): for r in reversed(results): if r.consensus_bandwidth is not None: return r.consensus_bandwidth +log.warning("Consensus bandwidth is None.") return None @staticmethod @@ -893,6 +896,7 @@ class V3BWLine(object): for r in reversed(results): if r.consensus_bandwidth_is_unmeasured is not None: return r.consensus_bandwidth_is_unmeasured +log.warning("Consensus bandwidth is unmeasured is None.") return None @staticmethod @@ -912,6 +916,7 @@ class V3BWLine(object): for r in reversed(results): if r.relay_observed_bandwidth is not None: return r.relay_observed_bandwidth +log.warning("Descriptor observed bandwidth is None.") return None @property ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] chg: v3bwfile: Exclude relays without observed bw
commit a44ffcb20d0efcd68b3a80b080494f3c7a5da1e2 Author: juga0 Date: Sun May 17 13:30:03 2020 + chg: v3bwfile: Exclude relays without observed bw and without consensus bw from scaling. Part of #33871, closes #33831. --- sbws/lib/v3bwfile.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 263a285..56925cb 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -773,6 +773,13 @@ class V3BWLine(object): desc_bw_obs_last = \ cls.desc_bw_obs_last_from_results(results_recent) +# Exclude also relays without consensus bandwidth nor observed +# bandwidth, since they can't be scaled +if (desc_bw_obs_last is None and consensus_bandwidth is None): +# This reason is not counted, not added in the file, but it will +# have vote = 0 +return(cls(node_id, 1), "no_consensus_no_observed_bw") + # For any line not excluded, do not include vote and unmeasured # KeyValues del kwargs['vote'] ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] chg: v3bwfile: Calculate hlimit from scaled sum bw
commit 5d0e63cb62ddae416671abd2e4b604e83c34cd1a Author: juga0 Date: Sun May 17 14:29:54 2020 + chg: v3bwfile: Calculate hlimit from scaled sum bw instead of bw before scaling. Tests have finally correct value. For 1 result, only when the cap is 1, the value will be equal to the rounded bw because the cap does not limit it. --- sbws/lib/v3bwfile.py| 44 + tests/unit/lib/test_v3bwfile.py | 16 +++ 2 files changed, 39 insertions(+), 21 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index e3a4cf2..4ebfa68 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1060,8 +1060,10 @@ class V3BWFile(object): cls.warn_if_not_accurate_enough(bw_lines, scale_constant) # log.debug(bw_lines[-1]) elif scaling_method == TORFLOW_SCALING: -bw_lines = cls.bw_torflow_scale(bw_lines_raw, torflow_obs, -torflow_cap, round_digs) +bw_lines = cls.bw_torflow_scale( +bw_lines_raw, torflow_obs, torflow_cap, round_digs, +router_statuses_d=router_statuses_d +) # log.debug(bw_lines[-1]) # Update the header and log the progress. min_perc = cls.update_progress( @@ -1186,7 +1188,8 @@ class V3BWFile(object): @staticmethod def bw_torflow_scale(bw_lines, desc_bw_obs_type=TORFLOW_OBS_MEAN, cap=TORFLOW_BW_MARGIN, - num_round_dig=PROP276_ROUND_DIG, reverse=False): + num_round_dig=PROP276_ROUND_DIG, reverse=False, + router_statuses_d=None): """ Obtain final bandwidth measurements applying Torflow's scaling method. @@ -1344,15 +1347,12 @@ class V3BWFile(object): mu = mean([l.bw_mean for l in bw_lines]) # filtered mean (Torflow's filt_avg) muf = mean([l.bw_filt for l in bw_lines]) - -# bw sum (Torflow's tot_net_bw or tot_sbw) -sum_bw = sum([l.bw_mean for l in bw_lines]) -# Torflow's clipping -hlimit = sum_bw * cap -log.debug('sum %s', sum_bw) log.debug('mu %s', mu) log.debug('muf %s', muf) -log.debug('hlimit %s', hlimit) + +# Torflow's ``tot_net_bw``, sum of the scaled bandwidth for the relays +# that are in the last consensus +sum_bw = 0 for l in bw_lines_tf: # First, obtain the observed bandwidth, later check what to do # if it is 0 or None. @@ -1412,9 +1412,27 @@ class V3BWFile(object): ratio_stream = l.bw_mean / mu ratio_stream_filtered = l.bw_filt / muf ratio = max(ratio_stream, ratio_stream_filtered) -bw_scaled = ratio * min_bandwidth -# Cap maximum bw -bw_scaled = min(hlimit, bw_scaled) + +# Assign it to an attribute, so it's not lost before capping and +# rounding +l.bw = ratio * min_bandwidth + +# If the consensus is available, sum only the bw for the relays +# that are in the consensus +if router_statuses_d: +if l.node_id.replace("$", "") in router_statuses_d: +sum_bw += l.bw +# Otherwise sum all bw, for compatibility with tests that were not +# using the consensus file. +else: +sum_bw += l.bw + +# Cap maximum bw, only possible when the ``sum_bw`` is calculated. +# Torflow's clipping +hlimit = sum_bw * cap +log.debug("sum_bw: %s, hlimit: %s", sum_bw, hlimit) +for l in bw_lines_tf: +bw_scaled = min(hlimit, l.bw) # round and convert to KB bw_new = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig) # avoid 0 diff --git a/tests/unit/lib/test_v3bwfile.py b/tests/unit/lib/test_v3bwfile.py index 5567a37..07f59d7 100644 --- a/tests/unit/lib/test_v3bwfile.py +++ b/tests/unit/lib/test_v3bwfile.py @@ -330,7 +330,7 @@ def test_torflow_scale(mock_consensus, datadir, tmpdir, conf): state_fpath, scaling_method=TORFLOW_SCALING, round_digs=TORFLOW_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 3 +assert v3bwfile.bw_lines[0].bw == 6 v3bwfile = V3BWFile.from_results(results, '', '', state_fpath, scaling_method=TORFLOW_SCALING, @@ -343,13 +343,13 @@ def test_torflow_scale(mock_consensus, datadir, tmpdir, conf): scaling_method=TORFLOW_SCALING, torflow_cap=1, round_digs=TORFLOW_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 61 +
[tor-commits] [sbws/maint-1.1] fix: v3bwfile: Remove unneeded minimum 1
commit d72fe2ee33237c507f461488c7bb879301895e62 Author: juga0 Date: Wed May 20 13:23:26 2020 + fix: v3bwfile: Remove unneeded minimum 1 since rounding already returns 1 as minimum. --- sbws/lib/v3bwfile.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 4ebfa68..d64712c 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1434,9 +1434,7 @@ class V3BWFile(object): for l in bw_lines_tf: bw_scaled = min(hlimit, l.bw) # round and convert to KB -bw_new = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig) -# avoid 0 -l.bw = max(bw_new, 1) +l.bw = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig) return sorted(bw_lines_tf, key=lambda x: x.bw, reverse=reverse) @staticmethod ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] fix: test: Unrelated linter error
commit b9e8fcd7fdcd931fe87a715d089c073d8fd3fe34 Author: juga0 Date: Tue May 19 14:28:20 2020 + fix: test: Unrelated linter error --- tests/conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/conftest.py b/tests/conftest.py index 5d156f1..5f71b4a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -116,6 +116,7 @@ def router_status(server_descriptor, router_statuses): ][0] return rs + # Because of the function scoped `args` in `tests.unit.conftest`, this has to # be function scoped too. @pytest.fixture(scope='function') ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] chg: v3bwfile: Calculate filtered bandwidth
commit c030731ec25adeff750c8c00415b87521a10d581 Author: juga0 Date: Sat May 16 17:55:50 2020 + chg: v3bwfile: Calculate filtered bandwidth for each relay, calculate the filtered mean for all relays and calculate the filtered ratio for each relay. --- sbws/lib/v3bwfile.py | 14 +++--- tests/unit/lib/test_scaling.py | 13 + 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 245ffa6..9a303be 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -15,6 +15,7 @@ from sbws.globals import (SPEC_VERSION, BW_LINE_SIZE, SBWS_SCALE_CONSTANT, TORFLOW_SCALING, SBWS_SCALING, TORFLOW_BW_MARGIN, TORFLOW_OBS_LAST, TORFLOW_OBS_MEAN, PROP276_ROUND_DIG, MIN_REPORT, MAX_BW_DIFF_PERC) +from sbws.lib import scaling from sbws.lib.resultdump import ResultSuccess, _ResultType from sbws.util.filelock import DirectoryLock from sbws.util.timestamp import (now_isodt_str, unixts_to_isodt_str, @@ -631,8 +632,10 @@ class V3BWLine(object): assert node_id.startswith('$') self.node_id = node_id self.bw = bw +# For now, we do not want to add ``bw_filt`` to the bandwidth file, +# therefore it is set here but not added to ``BWLINE_KEYS_V1``. [setattr(self, k, v) for k, v in kwargs.items() - if k in BWLINE_KEYS_V1] + if k in BWLINE_KEYS_V1 + ["bw_filt"]] def __str__(self): return self.bw_strv1 @@ -762,7 +765,11 @@ class V3BWLine(object): if rtt: kwargs['rtt'] = rtt bw = cls.bw_median_from_results(results_recent) +# XXX: all the class functions could use the bw_measurements instead of +# obtaining them each time or use a class Measurements. +bw_measurements = scaling.bw_measurements_from_results(results_recent) kwargs['bw_mean'] = cls.bw_mean_from_results(results_recent) +kwargs['bw_filt'] = scaling.bw_filt(bw_measurements) kwargs['bw_median'] = cls.bw_median_from_results( results_recent) kwargs['desc_bw_avg'] = \ @@ -1311,7 +1318,8 @@ class V3BWFile(object): # mean (Torflow's strm_avg) mu = mean([l.bw_mean for l in bw_lines]) # filtered mean (Torflow's filt_avg) -muf = mean([max(l.bw_mean, mu) for l in bw_lines]) +muf = mean([l.bw_filt for l in bw_lines]) + # bw sum (Torflow's tot_net_bw or tot_sbw) sum_bw = sum([l.bw_mean for l in bw_lines]) # Torflow's clipping @@ -1369,7 +1377,7 @@ class V3BWFile(object): min_bandwidth = min(desc_bw, l.consensus_bandwidth) # Torflow's scaling ratio_stream = l.bw_mean / mu -ratio_stream_filtered = max(l.bw_mean, mu) / muf +ratio_stream_filtered = l.bw_filt / muf ratio = max(ratio_stream, ratio_stream_filtered) bw_scaled = ratio * min_bandwidth # round and convert to KB diff --git a/tests/unit/lib/test_scaling.py b/tests/unit/lib/test_scaling.py new file mode 100644 index 000..06fb71b --- /dev/null +++ b/tests/unit/lib/test_scaling.py @@ -0,0 +1,13 @@ +"""Unit tests for scaling.py.""" + +from sbws.lib import scaling + + +def test_bw_filt(): +bw_measurements = [ +96700.00922329757, 70311.63051659254, 45531.743347556374, +38913.97025485627, 55656.332364676025 +] +fb = scaling.bw_filt(bw_measurements) +# This is greater than the mean, that is 61422.73714139576 +assert fb == 83505.81986994506 ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] chg: scaling: Add filtered bandwidth function
commit 5159662a50b6ae97588e87423d6c56a9014ff91f Author: juga0 Date: Sat May 16 17:07:19 2020 + chg: scaling: Add filtered bandwidth function to calculate the filtered bandwidth for each relay. --- sbws/lib/scaling.py | 19 +++ 1 file changed, 19 insertions(+) diff --git a/sbws/lib/scaling.py b/sbws/lib/scaling.py new file mode 100644 index 000..0fc3f84 --- /dev/null +++ b/sbws/lib/scaling.py @@ -0,0 +1,19 @@ +from statistics import mean + + +def bw_measurements_from_results(results): +return [ +dl['amount'] / dl['duration'] +for r in results for dl in r.downloads +] + + +def bw_filt(bw_measurements): +"""Filtered bandwidth for a relay. + +It is the equivalent to Torflow's ``filt_sbw``. +``mu`` in this function is the equivalent to Torflow's ``sbw``. +""" +mu = mean(bw_measurements) +bws_gte_mean = filter(lambda bw: bw >= mu, bw_measurements) +return mean(bws_gte_mean) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] fix: v3bwfile: linter error with new flake version
commit ce0449a2efa4e341abb2bb985972423f878f0ef6 Author: juga0 Date: Wed May 20 15:39:46 2020 + fix: v3bwfile: linter error with new flake version --- sbws/lib/bwfile_health.py | 2 ++ sbws/lib/v3bwfile.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sbws/lib/bwfile_health.py b/sbws/lib/bwfile_health.py index 793e08e..95d37ee 100644 --- a/sbws/lib/bwfile_health.py +++ b/sbws/lib/bwfile_health.py @@ -1,4 +1,6 @@ """Expected bandwidth file values for KeyValues.""" +# flake8: noqa: E741 +# (E741 ambiguous variable name), when using l. import logging from stem import descriptor diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index a585bb7..071dc94 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- """Classes and functions that create the bandwidth measurements document (v3bw) used by bandwidth authorities.""" +# flake8: noqa: E741 +# (E741 ambiguous variable name), when using l. import copy import logging ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] chg: v3bwfile: Scale relays missing descriptor bws
commit d2947035c685ec6cc6a5cbdf4b33a05f398febba Author: juga0 Date: Sun May 17 10:55:44 2020 + chg: v3bwfile: Scale relays missing descriptor bws Scale relays without average or observed bandwidth. Later it will be check what to do if their values are None or 0 --- sbws/lib/v3bwfile.py | 30 +++--- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 46e6357..244eb5b 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1335,26 +1335,18 @@ class V3BWFile(object): log.debug('muf %s', muf) log.debug('hlimit %s', hlimit) for l in bw_lines_tf: -# Because earlier versions did not store this values, check first -# they exists. Do not report any error, since they will be stored -if not(l.desc_bw_avg): -log.debug("Skipping %s from scaling, because there was no " - "descriptor average bandwidth.", l.nick) -continue +# First, obtain the observed bandwidth, later check what to do +# if it is 0 or None. if desc_bw_obs_type == TORFLOW_OBS_LAST: -if l.desc_bw_obs_last: -desc_bw_obs = l.desc_bw_obs_last -else: -log.debug("Skipping %s from scaling, because there was no " - "last descriptor observed bandwidth.", l.nick) -continue -elif desc_bw_obs_type == TORFLOW_OBS_MEAN: -if l.desc_bw_obs_mean: -desc_bw_obs = l.desc_bw_obs_mean -else: -log.debug("Skipping %s from scaling, because there was no " - "mean descriptor observed bandwidth.", l.nick) -continue +# In case there's no last, use the mean, because it is possible +# that it went down for a few days, but no more than 5, +# otherwise the mean will be 1 +desc_bw_obs = l.desc_bw_obs_last or l.desc_bw_obs_mean +# Assume that if it is not TORFLOW_OBS_LAST, then it is +# TORFLOW_OBS_MEAN +else: +desc_bw_obs = l.desc_bw_obs_mean + # Excerpt from bandwidth-file-spec.txt section 2.3 # A relay's MaxAdvertisedBandwidth limits the bandwidth-avg in its # descriptor. ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] fix: v3bwfile: cap is never None
commit ce4ad67508003e5437a10aef8f642e0f559dc54f Author: juga0 Date: Sun May 17 11:35:37 2020 + fix: v3bwfile: cap is never None --- sbws/lib/v3bwfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 8c58d64..e7a8aef 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1398,8 +1398,7 @@ class V3BWFile(object): # round and convert to KB bw_new = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig) # Cap maximum bw -if cap is not None: -bw_new = min(hlimit, bw_new) +bw_new = min(hlimit, bw_new) # avoid 0 l.bw = max(bw_new, 1) return sorted(bw_lines_tf, key=lambda x: x.bw, reverse=reverse) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] fix: doc: Add differences between Torflow and sbws
commit f531c57c7f67d72a597e3299a9cb2ec053d58d8d Author: juga0 Date: Wed May 20 13:44:59 2020 + fix: doc: Add differences between Torflow and sbws Closes #33871. --- docs/source/torflow_aggr.rst | 36 1 file changed, 36 insertions(+) diff --git a/docs/source/torflow_aggr.rst b/docs/source/torflow_aggr.rst index 10b12a8..5b4b3fd 100644 --- a/docs/source/torflow_aggr.rst +++ b/docs/source/torflow_aggr.rst @@ -385,6 +385,42 @@ Per relay scaled bandwidth rounding Finally, the new scaled bandwidth is expressed in kilobytes and rounded a number of digits. +Differences between Torflow aggregation and sbws scaling (May 2020) +--- + +Torflow does not exclude relays because of having "few" measurements or "close" +to each other for that relay. + +If there are not new measurements for a relay, Torflow uses the previous +calculated bandwidth, instead of the new value:: + + # If there is a new sample, let's use it for all but guards + if n.measured_at > prev_votes.vote_map[n.idhex].measured_at: + + [snip] + + else: + # Reset values. Don't vote/sample this measurement round. + n.revert_to_vote(prev_votes.vote_map[n.idhex]) + +The oldest measurements Toflow seems to take are from 4 weeks ago, while sbws +oldest measurements are 5 days old:: + +GUARD_SAMPLE_RATE = 2*7*24*60*60 # 2wks + +[snip] + +MAX_AGE = 2*GUARD_SAMPLE_RATE + +[snip] + +# old measurements are probably +# better than no measurements. We may not +# measure hibernating routers for days. +# This filter is just to remove REALLY old files +if time.time() - timestamp > MAX_AGE: + + .. _README.spec.txt: https://gitweb.torproject.org/torflow.git/tree/NetworkScanners/BwAuthority/README.spec.txt .. _PID Controller: https://en.wikipedia.org/wiki/PID_controller .. _SQLSupport.py: https://gitweb.torproject.org/pytorctl.git/tree/SQLSupport.py#n493 ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] fix: docs: Move torflow scaling docstring to docs
commit 54a1128af9670380d0c47d1f4d92994a662c1f3f Author: juga0 Date: Tue May 19 15:19:11 2020 + fix: docs: Move torflow scaling docstring to docs so that it has its own page as it is too long as docstring and is harder to write latex with the docstring syntax. --- docs/source/torflow_aggr.rst | 150 +++ 1 file changed, 150 insertions(+) diff --git a/docs/source/torflow_aggr.rst b/docs/source/torflow_aggr.rst new file mode 100644 index 000..6fc8fd1 --- /dev/null +++ b/docs/source/torflow_aggr.rst @@ -0,0 +1,150 @@ +.. _torflow_aggr: + +Torflow measurements aggregation +== + +From Torflow's README.spec.txt (section 2.2):: + +In this way, the resulting network status consensus bandwidth values # NOQA +are effectively re-weighted proportional to how much faster the node # NOQA +was as compared to the rest of the network. + +The variables and steps used in Torflow: + +**strm_bw**:: + +The strm_bw field is the average (mean) of all the streams for the relay # NOQA +identified by the fingerprint field. +strm_bw = sum(bw stream x)/|n stream| + +**filt_bw**:: + +The filt_bw field is computed similarly, but only the streams equal to # NOQA +or greater than the strm_bw are counted in order to filter very slow # NOQA +streams due to slow node pairings. + +**filt_sbw and strm_sbw**:: + +for rs in RouterStats.query.filter(stats_clause).\ + options(eagerload_all('router.streams.circuit.routers')).all(): # NOQA + tot_sbw = 0 + sbw_cnt = 0 + for s in rs.router.streams: +if isinstance(s, ClosedStream): + skip = False + #for br in badrouters: + # if br != rs: + #if br.router in s.circuit.routers: + # skip = True + if not skip: +# Throw out outliers < mean +# (too much variance for stddev to filter much) +if rs.strm_closed == 1 or s.bandwidth() >= rs.sbw: + tot_sbw += s.bandwidth() + sbw_cnt += 1 + +if sbw_cnt: rs.filt_sbw = tot_sbw/sbw_cnt +else: rs.filt_sbw = None + +**filt_avg, and strm_avg**:: + +Once we have determined the most recent measurements for each node, we # NOQA +compute an average of the filt_bw fields over all nodes we have measured. # NOQA + +:: + +filt_avg = sum(map(lambda n: n.filt_bw, nodes.itervalues()))/float(len(nodes)) # NOQA +strm_avg = sum(map(lambda n: n.strm_bw, nodes.itervalues()))/float(len(nodes)) # NOQA + +**true_filt_avg and true_strm_avg**:: + +for cl in ["Guard+Exit", "Guard", "Exit", "Middle"]: +true_filt_avg[cl] = filt_avg +true_strm_avg[cl] = strm_avg + +In the non-pid case, all types of nodes get the same avg + +**n.fbw_ratio and n.fsw_ratio**:: + +for n in nodes.itervalues(): +n.fbw_ratio = n.filt_bw/true_filt_avg[n.node_class()] +n.sbw_ratio = n.strm_bw/true_strm_avg[n.node_class()] + +**n.ratio**:: + +These averages are used to produce ratios for each node by dividing the # NOQA +measured value for that node by the network average. + +:: + +# Choose the larger between sbw and fbw + if n.sbw_ratio > n.fbw_ratio: +n.ratio = n.sbw_ratio + else: +n.ratio = n.fbw_ratio + +**desc_bw**: + +It is the minimum of all the descriptor bandwidth values:: + +bws = map(int, g) +bw_observed = min(bws) + +return Router(ns.idhex, ns.nickname, bw_observed, dead, exitpolicy, +ns.flags, ip, version, os, uptime, published, contact, rate_limited, # NOQA +ns.orhash, ns.bandwidth, extra_info_digest, ns.unmeasured) + +self.desc_bw = max(bw,1) # Avoid div by 0 + +**new_bw**:: + +These ratios are then multiplied by the most recent observed descriptor # NOQA +bandwidth we have available for each node, to produce a new value for # NOQA +the network status consensus process. + +:: + +n.new_bw = n.desc_bw*n.ratio + +The descriptor observed bandwidth is multiplied by the ratio. + +**Limit the bandwidth to a maximum**:: + +NODE_CAP = 0.05 + +:: + +if n.new_bw > tot_net_bw*NODE_CAP: + plog("INFO", "Clipping extremely fast "+n.node_class()+" node "+n.idhex+"="+n.nick+ # NOQA +" at "+str(100*NODE_CAP)+"% of network capacity ("+ +str(n.new_bw)+"->"+str(int(tot_net_bw*NODE_CAP))+") "+ +" pid_error="+str(n.pid_error)+ +" pid_error_sum="+str(n.pid_error_sum)) + n.new_bw = int(tot_net_bw*NODE_CAP) + +However, tot_net_bw does not seems to be updated when not using pid. +This clipping would make faster relays to all have the same value. + +All of that can be expressed as: + +.. math:: + +bwn_i =& min\\left(bwnew_i, + \\sum_{i=1}^{n}bwnew_i \\times 0.05\\right) \\ + + &= min\\left( + \\left(min\\left(bwobs_i, bwavg_i, bwbur_i \\right) \\times r_i\\right), +
[tor-commits] [sbws/maint-1.1] chg: v3bwfile: Change logic obtaining min bandwidth
commit f365d679d72f1f35e59442bade90cfda3537a508 Author: juga0 Date: Sun May 17 11:16:54 2020 + chg: v3bwfile: Change logic obtaining min bandwidth Take either the consenus bandwidth or the descriptor bandwidth if one of them is missing, do not scale when both are missing and ignore descriptor average and burst when they are missing. --- sbws/lib/v3bwfile.py | 51 ++ tests/unit/lib/data/results_0_consensus_bw.txt | 1 + tests/unit/lib/data/results_no_consensus_bw.txt| 1 + tests/unit/lib/data/results_no_desc_bw_avg.txt | 1 + tests/unit/lib/data/results_no_desc_bw_avg_obs.txt | 1 + tests/unit/lib/data/results_no_desc_bw_obs.txt | 1 + tests/unit/lib/test_v3bwfile.py| 43 ++ 7 files changed, 82 insertions(+), 17 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 244eb5b..8c58d64 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1154,7 +1154,8 @@ class V3BWFile(object): # Percentage difference diff_perc = ( abs(sum_consensus_bw - sum_bw) -/ ((sum_consensus_bw + sum_bw) / 2) +# Avoid ZeroDivisionError +/ (max(1, (sum_consensus_bw + sum_bw)) / 2) ) * 100 log.info("The difference between the total consensus bandwidth (%s)" "and the total measured bandwidth (%s) is %s%%.", @@ -1356,23 +1357,39 @@ class V3BWFile(object): # descriptors' bandwidth-observed, because that penalises new # relays. # See https://trac.torproject.org/projects/tor/ticket/8494 -if l.desc_bw_bur is not None: -# Because in previous versions results were not storing -# desc_bw_bur -desc_bw = min(desc_bw_obs, l.desc_bw_bur, l.desc_bw_avg) +# If the observed bandwidth is None, it is not possible to +# calculate the minimum with the other descriptors. +# Only in this case, take the consensus bandwidth. +# In the case that descriptor average or burst are None, +# ignore them since it must be a bug in ``Resultdump``, already +# logged in x_bw/bandwidth_x_from_results, but scale. +if desc_bw_obs is not None: +if l.desc_bw_bur is not None: +if l.desc_bw_avg is not None: +desc_bw = min( +desc_bw_obs, l.desc_bw_bur, l.desc_bw_avg +) +else: +desc_bw = min(desc_bw_obs, l.desc_bw_bur) +else: +if l.desc_bw_avg is not None: +desc_bw = min(desc_bw_obs, l.desc_bw_avg) +else: +desc_bw = desc_bw_obs +# If the relay is unmeasured and consensus bandwidth is None or +# 0, use the descriptor bandwidth +if l.consensus_bandwidth_is_unmeasured \ +or not l.consensus_bandwidth: +min_bandwidth = desc_bw_obs +else: +min_bandwidth = min(desc_bw, l.consensus_bandwidth) +elif l.consensus_bandwidth is not None: +min_bandwidth = l.consensus_bandwidth else: -desc_bw = min(desc_bw_obs, l.desc_bw_avg) -# In previous versions results were not storing consensus_bandwidth -if l.consensus_bandwidth_is_unmeasured \ -or l.consensus_bandwidth is None: -min_bandwidth = desc_bw -# If the relay is measured, use the minimum between the descriptors -# bandwidth and the consensus bandwidth, so that -# MaxAdvertisedBandwidth limits the consensus weight -# The consensus bandwidth in a measured relay has been obtained -# doing the same calculation as here -else: -min_bandwidth = min(desc_bw, l.consensus_bandwidth) +log.warning("Can not scale relay missing descriptor and" +" consensus bandwidth.") +continue + # Torflow's scaling ratio_stream = l.bw_mean / mu ratio_stream_filtered = l.bw_filt / muf diff --git a/tests/unit/lib/data/results_0_consensus_bw.txt b/tests/unit/lib/data/results_0_consensus_bw.txt new file mode 100644 index 000..a4164a7 --- /dev/null +++ b/tests/unit/lib/data/results_0_consensus_bw.txt @@ -0,0 +1 @@ +{"version": 4, "time": 1523887747, "circ": ["", ""], "type": "success", "rtts": [0.4596822261810303, 0.44872617721557617, 0.4563450813293457, 0.44872212409973145, 0.4561030864715576, 0.4765200614929199, 0.4495084285736084, 0.45711588859558105,
[tor-commits] [sbws/maint-1.1] chg: v3bwfile: Obtain consensus values from last consensus
commit 6e1f57c6770d7a09facf0414029a6f8cb32e35c7 Author: juga0 Date: Sun May 17 13:12:37 2020 + chg: v3bwfile: Obtain consensus values from last consensus --- sbws/lib/v3bwfile.py | 52 ++-- 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 30e8a8b..e3a4cf2 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -642,7 +642,7 @@ class V3BWLine(object): @classmethod def from_results(cls, results, secs_recent=None, secs_away=None, - min_num=0): + min_num=0, router_statuses_d=None): """Convert sbws results to relays' Bandwidth Lines ``bs`` stands for Bytes/seconds @@ -756,6 +756,23 @@ class V3BWLine(object): 'recent_measurements_excluded_few_count' return (cls(node_id, 1, **kwargs), exclusion_reason) +# Use the last consensus if available, since the results' consensus +# values come from the moment the measurement was made. +if router_statuses_d and node_id in router_statuses_d: +consensus_bandwidth = \ +router_statuses_d[node_id].bandwidth * 1000 +consensus_bandwidth_is_unmeasured = \ +router_statuses_d[node_id].is_unmeasured +else: +consensus_bandwidth = \ +cls.consensus_bandwidth_from_results(results_recent) +consensus_bandwidth_is_unmeasured = \ +cls.consensus_bandwidth_is_unmeasured_from_results( +results_recent) +# If there is no last observed bandwidth, there won't be mean either. +desc_bw_obs_last = \ +cls.desc_bw_obs_last_from_results(results_recent) + # For any line not excluded, do not include vote and unmeasured # KeyValues del kwargs['vote'] @@ -776,15 +793,13 @@ class V3BWLine(object): cls.desc_bw_avg_from_results(results_recent) kwargs['desc_bw_bur'] = \ cls.desc_bw_bur_from_results(results_recent) -kwargs['consensus_bandwidth'] = \ -cls.consensus_bandwidth_from_results(results_recent) +kwargs['consensus_bandwidth'] = consensus_bandwidth kwargs['consensus_bandwidth_is_unmeasured'] = \ -cls.consensus_bandwidth_is_unmeasured_from_results( -results_recent) -kwargs['desc_bw_obs_last'] = \ -cls.desc_bw_obs_last_from_results(results_recent) +consensus_bandwidth_is_unmeasured +kwargs['desc_bw_obs_last'] = desc_bw_obs_last kwargs['desc_bw_obs_mean'] = \ cls.desc_bw_obs_mean_from_results(results_recent) + bwl = cls(node_id, bw, **kwargs) return bwl, None @@ -997,8 +1012,10 @@ class V3BWFile(object): destinations_countries, state_fpath) bw_lines_raw = [] bw_lines_excluded = [] -number_consensus_relays = cls.read_number_consensus_relays( -consensus_path) +router_statuses_d = cls.read_router_statuses(consensus_path) +# XXX: Use router_statuses_d to not parse again the file. +number_consensus_relays = \ +cls.read_number_consensus_relays(consensus_path) state = State(state_fpath) # Create a dictionary with the number of relays excluded by any of the @@ -1012,7 +1029,8 @@ class V3BWFile(object): for fp, values in results.items(): # log.debug("Relay fp %s", fp) line, reason = V3BWLine.from_results(values, secs_recent, - secs_away, min_num) + secs_away, min_num, + router_statuses_d) # If there is no reason it means the line will not be excluded. if not reason: bw_lines_raw.append(line) @@ -1417,6 +1435,20 @@ class V3BWFile(object): log.debug("Number of relays in the network %s", num) return num +@staticmethod +def read_router_statuses(consensus_path): +"""Read the router statuses from the cached consensus file.""" +router_statuses_d = None +try: +router_statuses_d = dict([ +(r.fingerprint, r) +for r in parse_file(consensus_path) +]) +except (FileNotFoundError, AttributeError): +log.warning("It is not possible to obtain the last consensus" +"cached file %s.", consensus_path) +return router_statuses_d + @staticmethod def measured_progress_stats(num_bw_lines, number_consensus_relays, min_perc_reached_before): ___ tor-commits mailing list tor-commits@lists.torproject.org
[tor-commits] [sbws/maint-1.1] chg: v3bwfile: Stop making mean minimum 1
commit 88eb7ef53c77d1d377125effd088f4cd41f59235 Author: juga0 Date: Tue May 19 07:59:28 2020 + chg: v3bwfile: Stop making mean minimum 1 --- sbws/lib/v3bwfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 9a303be..8c5b9a9 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -902,7 +902,8 @@ class V3BWLine(object): if r.relay_observed_bandwidth is not None: desc_bw_obs_ls.append(r.relay_observed_bandwidth) if desc_bw_obs_ls: -return max(round(mean(desc_bw_obs_ls)), 1) +return round(mean(desc_bw_obs_ls)) +log.warning("Descriptor observed bandwidth is None.") return None @staticmethod ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/maint-1.1] chg: v3bwfile: Percentage difference with consensus
commit d4fe347c8154335049898a4e687d5cf33e974f24 Author: juga0 Date: Tue May 19 08:11:11 2020 + chg: v3bwfile: Percentage difference with consensus --- sbws/lib/v3bwfile.py | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index d64712c..263a285 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1077,7 +1077,9 @@ class V3BWFile(object): bw_lines = cls.bw_kb(bw_lines_raw) # log.debug(bw_lines[-1]) # Not using the result for now, just warning -cls.is_max_bw_diff_perc_reached(bw_lines, max_bw_diff_perc) +cls.is_max_bw_diff_perc_reached( +bw_lines, max_bw_diff_perc, router_statuses_d +) header.add_time_report_half_network() f = cls(header, bw_lines + bw_lines_excluded) return f @@ -1159,18 +1161,22 @@ class V3BWFile(object): @staticmethod def is_max_bw_diff_perc_reached(bw_lines, -max_bw_diff_perc=MAX_BW_DIFF_PERC): -# Since old versions were not storing consensus bandwidth, use getattr. -sum_consensus_bw = sum([l.consensus_bandwidth for l in bw_lines -if getattr(l, 'consensus_bandwidth', None)]) +max_bw_diff_perc=MAX_BW_DIFF_PERC, +router_statuses_d=None): +if router_statuses_d: +sum_consensus_bw = sum(list(map( +lambda x: x.bandwidth * 1000, +router_statuses_d.values() +))) +else: +sum_consensus_bw = sum([ +l.consensus_bandwidth for l in bw_lines +if getattr(l, 'consensus_bandwidth', None) +]) # Because the scaled bandwidth is in KB, but not the stored consensus # bandwidth, multiply by 1000. -# Do not count 1 bandwidths for the relays that were excluded -# and exclude also the bw of the relays that did not stored consensus, -# since they are not included either in the sum of the consensus. -sum_bw = sum([l.bw for l in bw_lines - if getattr(l, 'consensus_bandwidth', None) - and getattr(l, 'unmeasured', 0) == 0]) * 1000 +# Do not count the bandwidths for the relays that were excluded +sum_bw = sum([l.bw for l in bw_lines if getattr(l, "vote", 1)]) * 1000 # Percentage difference diff_perc = ( abs(sum_consensus_bw - sum_bw) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] chg: v3bwfile: Exclude relays without observed bw
commit a44ffcb20d0efcd68b3a80b080494f3c7a5da1e2 Author: juga0 Date: Sun May 17 13:30:03 2020 + chg: v3bwfile: Exclude relays without observed bw and without consensus bw from scaling. Part of #33871, closes #33831. --- sbws/lib/v3bwfile.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 263a285..56925cb 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -773,6 +773,13 @@ class V3BWLine(object): desc_bw_obs_last = \ cls.desc_bw_obs_last_from_results(results_recent) +# Exclude also relays without consensus bandwidth nor observed +# bandwidth, since they can't be scaled +if (desc_bw_obs_last is None and consensus_bandwidth is None): +# This reason is not counted, not added in the file, but it will +# have vote = 0 +return(cls(node_id, 1), "no_consensus_no_observed_bw") + # For any line not excluded, do not include vote and unmeasured # KeyValues del kwargs['vote'] ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] fix: docs: Remove unneeded linter exception
commit 3edf2fe2a739af4a2ccc8f128e45245347bce265 Author: juga0 Date: Tue May 19 15:22:13 2020 + fix: docs: Remove unneeded linter exception --- docs/source/index.rst| 1 + docs/source/torflow_aggr.rst | 30 - sbws/lib/v3bwfile.py | 147 +-- 3 files changed, 17 insertions(+), 161 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 342e857..58c3911 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -45,6 +45,7 @@ Included in the config config_tor sbws + torflow_aggr implementation bandwidth_distribution tor_bandwidth_files diff --git a/docs/source/torflow_aggr.rst b/docs/source/torflow_aggr.rst index 6fc8fd1..49441b4 100644 --- a/docs/source/torflow_aggr.rst +++ b/docs/source/torflow_aggr.rst @@ -5,28 +5,28 @@ Torflow measurements aggregation From Torflow's README.spec.txt (section 2.2):: -In this way, the resulting network status consensus bandwidth values # NOQA -are effectively re-weighted proportional to how much faster the node # NOQA +In this way, the resulting network status consensus bandwidth values +are effectively re-weighted proportional to how much faster the node was as compared to the rest of the network. The variables and steps used in Torflow: **strm_bw**:: -The strm_bw field is the average (mean) of all the streams for the relay # NOQA +The strm_bw field is the average (mean) of all the streams for the relay identified by the fingerprint field. strm_bw = sum(bw stream x)/|n stream| **filt_bw**:: -The filt_bw field is computed similarly, but only the streams equal to # NOQA -or greater than the strm_bw are counted in order to filter very slow # NOQA +The filt_bw field is computed similarly, but only the streams equal to +or greater than the strm_bw are counted in order to filter very slow streams due to slow node pairings. **filt_sbw and strm_sbw**:: for rs in RouterStats.query.filter(stats_clause).\ - options(eagerload_all('router.streams.circuit.routers')).all(): # NOQA + options(eagerload_all('router.streams.circuit.routers')).all(): tot_sbw = 0 sbw_cnt = 0 for s in rs.router.streams: @@ -48,13 +48,13 @@ The variables and steps used in Torflow: **filt_avg, and strm_avg**:: -Once we have determined the most recent measurements for each node, we # NOQA -compute an average of the filt_bw fields over all nodes we have measured. # NOQA +Once we have determined the most recent measurements for each node, we +compute an average of the filt_bw fields over all nodes we have measured. :: -filt_avg = sum(map(lambda n: n.filt_bw, nodes.itervalues()))/float(len(nodes)) # NOQA -strm_avg = sum(map(lambda n: n.strm_bw, nodes.itervalues()))/float(len(nodes)) # NOQA +filt_avg = sum(map(lambda n: n.filt_bw, nodes.itervalues()))/float(len(nodes)) +strm_avg = sum(map(lambda n: n.strm_bw, nodes.itervalues()))/float(len(nodes)) **true_filt_avg and true_strm_avg**:: @@ -72,7 +72,7 @@ In the non-pid case, all types of nodes get the same avg **n.ratio**:: -These averages are used to produce ratios for each node by dividing the # NOQA +These averages are used to produce ratios for each node by dividing the measured value for that node by the network average. :: @@ -91,15 +91,15 @@ It is the minimum of all the descriptor bandwidth values:: bw_observed = min(bws) return Router(ns.idhex, ns.nickname, bw_observed, dead, exitpolicy, -ns.flags, ip, version, os, uptime, published, contact, rate_limited, # NOQA +ns.flags, ip, version, os, uptime, published, contact, rate_limited, ns.orhash, ns.bandwidth, extra_info_digest, ns.unmeasured) self.desc_bw = max(bw,1) # Avoid div by 0 **new_bw**:: -These ratios are then multiplied by the most recent observed descriptor # NOQA -bandwidth we have available for each node, to produce a new value for # NOQA +These ratios are then multiplied by the most recent observed descriptor +bandwidth we have available for each node, to produce a new value for the network status consensus process. :: @@ -115,7 +115,7 @@ The descriptor observed bandwidth is multiplied by the ratio. :: if n.new_bw > tot_net_bw*NODE_CAP: - plog("INFO", "Clipping extremely fast "+n.node_class()+" node "+n.idhex+"="+n.nick+ # NOQA + plog("INFO", "Clipping extremely fast "+n.node_class()+" node "+n.idhex+"="+n.nick+ " at "+str(100*NODE_CAP)+"% of network capacity ("+ str(n.new_bw)+"->"+str(int(tot_net_bw*NODE_CAP))+") "+ " pid_error="+str(n.pid_error)+ diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 56925cb..a585bb7 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1207,152 +1207,7 @@ class
[tor-commits] [sbws/master] fix: v3bwfile: Use cap argument to clip scaled bw
commit 788a777fbe946b8e2cd50308487802cb93d743f1 Author: juga0 Date: Tue May 19 10:32:09 2020 + fix: v3bwfile: Use cap argument to clip scaled bw Make test pass, though the value is not correct since it needs to be rounded after clipping --- sbws/lib/v3bwfile.py| 2 +- tests/unit/lib/test_v3bwfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index e7a8aef..33fafbb 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1330,7 +1330,7 @@ class V3BWFile(object): # bw sum (Torflow's tot_net_bw or tot_sbw) sum_bw = sum([l.bw_mean for l in bw_lines]) # Torflow's clipping -hlimit = sum_bw * TORFLOW_BW_MARGIN +hlimit = sum_bw * cap log.debug('sum %s', sum_bw) log.debug('mu %s', mu) log.debug('muf %s', muf) diff --git a/tests/unit/lib/test_v3bwfile.py b/tests/unit/lib/test_v3bwfile.py index 1b46d69..885797b 100644 --- a/tests/unit/lib/test_v3bwfile.py +++ b/tests/unit/lib/test_v3bwfile.py @@ -336,7 +336,7 @@ def test_torflow_scale(mock_consensus, datadir, tmpdir, conf): scaling_method=TORFLOW_SCALING, torflow_cap=0.0001, round_digs=TORFLOW_ROUND_DIG) -assert v3bwfile.bw_lines[0].bw == 123 +assert v3bwfile.bw_lines[0].bw == 6.14230005 v3bwfile = V3BWFile.from_results(results, '', '', state_fpath, scaling_method=TORFLOW_SCALING, ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] fix: doc: Add differences between Torflow and sbws
commit f531c57c7f67d72a597e3299a9cb2ec053d58d8d Author: juga0 Date: Wed May 20 13:44:59 2020 + fix: doc: Add differences between Torflow and sbws Closes #33871. --- docs/source/torflow_aggr.rst | 36 1 file changed, 36 insertions(+) diff --git a/docs/source/torflow_aggr.rst b/docs/source/torflow_aggr.rst index 10b12a8..5b4b3fd 100644 --- a/docs/source/torflow_aggr.rst +++ b/docs/source/torflow_aggr.rst @@ -385,6 +385,42 @@ Per relay scaled bandwidth rounding Finally, the new scaled bandwidth is expressed in kilobytes and rounded a number of digits. +Differences between Torflow aggregation and sbws scaling (May 2020) +--- + +Torflow does not exclude relays because of having "few" measurements or "close" +to each other for that relay. + +If there are not new measurements for a relay, Torflow uses the previous +calculated bandwidth, instead of the new value:: + + # If there is a new sample, let's use it for all but guards + if n.measured_at > prev_votes.vote_map[n.idhex].measured_at: + + [snip] + + else: + # Reset values. Don't vote/sample this measurement round. + n.revert_to_vote(prev_votes.vote_map[n.idhex]) + +The oldest measurements Toflow seems to take are from 4 weeks ago, while sbws +oldest measurements are 5 days old:: + +GUARD_SAMPLE_RATE = 2*7*24*60*60 # 2wks + +[snip] + +MAX_AGE = 2*GUARD_SAMPLE_RATE + +[snip] + +# old measurements are probably +# better than no measurements. We may not +# measure hibernating routers for days. +# This filter is just to remove REALLY old files +if time.time() - timestamp > MAX_AGE: + + .. _README.spec.txt: https://gitweb.torproject.org/torflow.git/tree/NetworkScanners/BwAuthority/README.spec.txt .. _PID Controller: https://en.wikipedia.org/wiki/PID_controller .. _SQLSupport.py: https://gitweb.torproject.org/pytorctl.git/tree/SQLSupport.py#n493 ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [sbws/master] fix: docs: Move torflow scaling docstring to docs
commit 54a1128af9670380d0c47d1f4d92994a662c1f3f Author: juga0 Date: Tue May 19 15:19:11 2020 + fix: docs: Move torflow scaling docstring to docs so that it has its own page as it is too long as docstring and is harder to write latex with the docstring syntax. --- docs/source/torflow_aggr.rst | 150 +++ 1 file changed, 150 insertions(+) diff --git a/docs/source/torflow_aggr.rst b/docs/source/torflow_aggr.rst new file mode 100644 index 000..6fc8fd1 --- /dev/null +++ b/docs/source/torflow_aggr.rst @@ -0,0 +1,150 @@ +.. _torflow_aggr: + +Torflow measurements aggregation +== + +From Torflow's README.spec.txt (section 2.2):: + +In this way, the resulting network status consensus bandwidth values # NOQA +are effectively re-weighted proportional to how much faster the node # NOQA +was as compared to the rest of the network. + +The variables and steps used in Torflow: + +**strm_bw**:: + +The strm_bw field is the average (mean) of all the streams for the relay # NOQA +identified by the fingerprint field. +strm_bw = sum(bw stream x)/|n stream| + +**filt_bw**:: + +The filt_bw field is computed similarly, but only the streams equal to # NOQA +or greater than the strm_bw are counted in order to filter very slow # NOQA +streams due to slow node pairings. + +**filt_sbw and strm_sbw**:: + +for rs in RouterStats.query.filter(stats_clause).\ + options(eagerload_all('router.streams.circuit.routers')).all(): # NOQA + tot_sbw = 0 + sbw_cnt = 0 + for s in rs.router.streams: +if isinstance(s, ClosedStream): + skip = False + #for br in badrouters: + # if br != rs: + #if br.router in s.circuit.routers: + # skip = True + if not skip: +# Throw out outliers < mean +# (too much variance for stddev to filter much) +if rs.strm_closed == 1 or s.bandwidth() >= rs.sbw: + tot_sbw += s.bandwidth() + sbw_cnt += 1 + +if sbw_cnt: rs.filt_sbw = tot_sbw/sbw_cnt +else: rs.filt_sbw = None + +**filt_avg, and strm_avg**:: + +Once we have determined the most recent measurements for each node, we # NOQA +compute an average of the filt_bw fields over all nodes we have measured. # NOQA + +:: + +filt_avg = sum(map(lambda n: n.filt_bw, nodes.itervalues()))/float(len(nodes)) # NOQA +strm_avg = sum(map(lambda n: n.strm_bw, nodes.itervalues()))/float(len(nodes)) # NOQA + +**true_filt_avg and true_strm_avg**:: + +for cl in ["Guard+Exit", "Guard", "Exit", "Middle"]: +true_filt_avg[cl] = filt_avg +true_strm_avg[cl] = strm_avg + +In the non-pid case, all types of nodes get the same avg + +**n.fbw_ratio and n.fsw_ratio**:: + +for n in nodes.itervalues(): +n.fbw_ratio = n.filt_bw/true_filt_avg[n.node_class()] +n.sbw_ratio = n.strm_bw/true_strm_avg[n.node_class()] + +**n.ratio**:: + +These averages are used to produce ratios for each node by dividing the # NOQA +measured value for that node by the network average. + +:: + +# Choose the larger between sbw and fbw + if n.sbw_ratio > n.fbw_ratio: +n.ratio = n.sbw_ratio + else: +n.ratio = n.fbw_ratio + +**desc_bw**: + +It is the minimum of all the descriptor bandwidth values:: + +bws = map(int, g) +bw_observed = min(bws) + +return Router(ns.idhex, ns.nickname, bw_observed, dead, exitpolicy, +ns.flags, ip, version, os, uptime, published, contact, rate_limited, # NOQA +ns.orhash, ns.bandwidth, extra_info_digest, ns.unmeasured) + +self.desc_bw = max(bw,1) # Avoid div by 0 + +**new_bw**:: + +These ratios are then multiplied by the most recent observed descriptor # NOQA +bandwidth we have available for each node, to produce a new value for # NOQA +the network status consensus process. + +:: + +n.new_bw = n.desc_bw*n.ratio + +The descriptor observed bandwidth is multiplied by the ratio. + +**Limit the bandwidth to a maximum**:: + +NODE_CAP = 0.05 + +:: + +if n.new_bw > tot_net_bw*NODE_CAP: + plog("INFO", "Clipping extremely fast "+n.node_class()+" node "+n.idhex+"="+n.nick+ # NOQA +" at "+str(100*NODE_CAP)+"% of network capacity ("+ +str(n.new_bw)+"->"+str(int(tot_net_bw*NODE_CAP))+") "+ +" pid_error="+str(n.pid_error)+ +" pid_error_sum="+str(n.pid_error_sum)) + n.new_bw = int(tot_net_bw*NODE_CAP) + +However, tot_net_bw does not seems to be updated when not using pid. +This clipping would make faster relays to all have the same value. + +All of that can be expressed as: + +.. math:: + +bwn_i =& min\\left(bwnew_i, + \\sum_{i=1}^{n}bwnew_i \\times 0.05\\right) \\ + + &= min\\left( + \\left(min\\left(bwobs_i, bwavg_i, bwbur_i \\right) \\times r_i\\right), +
[tor-commits] [sbws/master] chg: v3bwfile: Percentage difference with consensus
commit d4fe347c8154335049898a4e687d5cf33e974f24 Author: juga0 Date: Tue May 19 08:11:11 2020 + chg: v3bwfile: Percentage difference with consensus --- sbws/lib/v3bwfile.py | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index d64712c..263a285 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1077,7 +1077,9 @@ class V3BWFile(object): bw_lines = cls.bw_kb(bw_lines_raw) # log.debug(bw_lines[-1]) # Not using the result for now, just warning -cls.is_max_bw_diff_perc_reached(bw_lines, max_bw_diff_perc) +cls.is_max_bw_diff_perc_reached( +bw_lines, max_bw_diff_perc, router_statuses_d +) header.add_time_report_half_network() f = cls(header, bw_lines + bw_lines_excluded) return f @@ -1159,18 +1161,22 @@ class V3BWFile(object): @staticmethod def is_max_bw_diff_perc_reached(bw_lines, -max_bw_diff_perc=MAX_BW_DIFF_PERC): -# Since old versions were not storing consensus bandwidth, use getattr. -sum_consensus_bw = sum([l.consensus_bandwidth for l in bw_lines -if getattr(l, 'consensus_bandwidth', None)]) +max_bw_diff_perc=MAX_BW_DIFF_PERC, +router_statuses_d=None): +if router_statuses_d: +sum_consensus_bw = sum(list(map( +lambda x: x.bandwidth * 1000, +router_statuses_d.values() +))) +else: +sum_consensus_bw = sum([ +l.consensus_bandwidth for l in bw_lines +if getattr(l, 'consensus_bandwidth', None) +]) # Because the scaled bandwidth is in KB, but not the stored consensus # bandwidth, multiply by 1000. -# Do not count 1 bandwidths for the relays that were excluded -# and exclude also the bw of the relays that did not stored consensus, -# since they are not included either in the sum of the consensus. -sum_bw = sum([l.bw for l in bw_lines - if getattr(l, 'consensus_bandwidth', None) - and getattr(l, 'unmeasured', 0) == 0]) * 1000 +# Do not count the bandwidths for the relays that were excluded +sum_bw = sum([l.bw for l in bw_lines if getattr(l, "vote", 1)]) * 1000 # Percentage difference diff_perc = ( abs(sum_consensus_bw - sum_bw) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-misc] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc
commit 14376e60c000da9879ccf2c6e756ad9330b871c0 Author: Translation commit bot Date: Mon Jun 29 08:15:48 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-misc --- nl.po | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/nl.po b/nl.po index ea45f13694..46fc769c7f 100644 --- a/nl.po +++ b/nl.po @@ -37,8 +37,8 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-06-19 19:37+0200\n" -"PO-Revision-Date: 2020-06-29 00:35+\n" -"Last-Translator: Thomas De Rocker\n" +"PO-Revision-Date: 2020-06-29 08:01+\n" +"Last-Translator: Tonnes \n" "Language-Team: Dutch (http://www.transifex.com/otf/torproject/language/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -430,7 +430,7 @@ msgstr "Offline" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:329 msgid "_Unsafe Browser" -msgstr "" +msgstr "_Onveilige Browser" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:338 msgid "Enabled" @@ -438,7 +438,7 @@ msgstr "Ingeschakeld" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:340 msgid "Disabled (default)" -msgstr "" +msgstr "Uitgeschakeld (standaard)" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:391 msgid "On (default)" @@ -683,11 +683,11 @@ msgstr "Bestanden bewaren in de map 'Persistent'" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:70 msgid "Settings on the Welcome Screen" -msgstr "" +msgstr "Instellingen op het Welkomstscherm" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:72 msgid "Language, administration password, and additional settings" -msgstr "" +msgstr "Taal, beheerderswachtwoord en extra instellingen" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:85 msgid "Browser Bookmarks" @@ -1462,7 +1462,7 @@ msgid "" "The Unsafe Browser was not enabled on the Welcome Screen.\\n\\nIf you want " "to use the Unsafe Browser, you have to restart Tails and enable it in the " "settings on the Welcome Screen." -msgstr "" +msgstr "De Onveilige Browser is niet ingeschakeld op het Welkomstscherm.\\n\\nAls u de Onveilige Browser wilt gebruiken, moet u Tails herstarten en dit inschakelen in de instellingen op het Welkomstscherm." #: config/chroot_local-includes/usr/local/sbin/unsafe-browser:98 msgid "" @@ -1652,19 +1652,19 @@ msgid "" "A captive portal is a web page that is displayed before you can access the Internet. Captive portals usually require to log in to the network or enter information such as an email address.\n" "\n" "The Unsafe Browser is not anonymous and can deanonymize you. Use it only to log in to captive portals." -msgstr "" +msgstr "Met de Onveilige Browser kunt u zich aanmelden bij een aanmeldingspagina ('captive portal').\n\nEen aanmeldingspagina is een webpagina die wordt weergegeven voordat u toegang hebt tot het internet. Aanmeldingspagina's vereisen doorgaans dat u zich bij het netwerk aanmeldt of informatie invoert, zoals een e-mailadres.\n\nDe Onveilige Browser is niet anoniem en kan uw anonimiteit opheffen. Gebruik hem alleen voor aanmelding bij aanmeldingspagina's." #: ../config/chroot_local-includes/usr/share/tails/greeter/additional_settings.ui.in:572 msgid "Disable the Unsafe Browser (default)" -msgstr "" +msgstr "De Onveilige Browser uitschakelen (standaard)" #: ../config/chroot_local-includes/usr/share/tails/greeter/additional_settings.ui.in:617 msgid "Enable the Unsafe Browser" -msgstr "" +msgstr "De Onveilige Browser inschakelen" #: ../config/chroot_local-includes/usr/share/tails/greeter/main.ui.in:100 msgid "Settings were loaded from the persistent storage." -msgstr "" +msgstr "Instellingen zijn geladen vanuit de permanente opslag." #: ../config/chroot_local-includes/usr/share/tails/greeter/main.ui.in:168 msgid "" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tbmanual-contentspot] https://gitweb.torproject.org/translation.git/commit/?h=tbmanual-contentspot
commit af9af4b867accff956acaf2d63fc045c151def0b Author: Translation commit bot Date: Mon Jun 29 12:47:06 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tbmanual-contentspot --- contents+pt-PT.po | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contents+pt-PT.po b/contents+pt-PT.po index 330d1b64cd..34f5d2c0eb 100644 --- a/contents+pt-PT.po +++ b/contents+pt-PT.po @@ -5,6 +5,7 @@ # Rui , 2020 # Manuela Silva , 2020 # Hugo Costa , 2020 +# A Russo , 2020 # msgid "" msgstr "" @@ -12,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-04-12 08:00+CET\n" "PO-Revision-Date: 2018-11-14 12:31+\n" -"Last-Translator: Hugo Costa , 2020\n" +"Last-Translator: A Russo , 2020\n" "Language-Team: Portuguese (Portugal) (https://www.transifex.com/otf/teams/1519/pt_PT/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1099,6 +1100,8 @@ msgid "" "Complete the CAPTCHA and click \"Submit.\" Your setting will automatically " "be saved once you close the tab." msgstr "" +"Complete o CAPTCHA e carreguem em \"Submeter.\" A sua configuração será " +"automaticamente salva quando fechar a tab." #: https//tb-manual.torproject.org/bridges/ #: (content/bridges/contents+en.lrtopic.body) @@ -1134,7 +1137,7 @@ msgstr "" #: https//tb-manual.torproject.org/bridges/ #: (content/bridges/contents+en.lrtopic.body) msgid "Click \"Connect\" to save your settings." -msgstr "" +msgstr "Carregue em \"Ligar\" para salvar a suas Definicões." #: https//tb-manual.torproject.org/bridges/ #: (content/bridges/contents+en.lrtopic.body) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/support-portal] https://gitweb.torproject.org/translation.git/commit/?h=support-portal
commit ef7769c9f2aba11b2a703111dbd47a2baaa7092a Author: Translation commit bot Date: Mon Jun 29 12:48:10 2020 + https://gitweb.torproject.org/translation.git/commit/?h=support-portal --- contents+zh-CN.po | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/contents+zh-CN.po b/contents+zh-CN.po index 9198eb34f1..5f003853a0 100644 --- a/contents+zh-CN.po +++ b/contents+zh-CN.po @@ -3,7 +3,7 @@ # Herman Koe , 2018 # ã¨ã¤ãã®è³¢ç¼ãã, 2019 # Dianyu Liu , 2019 -# Anais Huang <1299820...@qq.com>, 2019 +# Anaïs Huang <1299820...@qq.com>, 2019 # shenzhui007 <12231...@bjtu.edu.cn>, 2019 # AngelFalse, 2020 # Cloud P , 2020 @@ -17,6 +17,7 @@ # ciaran , 2020 # Scott Rhodes , 2020 # Runzhe Liang <18051080...@163.com>, 2020 +# MTR Zhao , 2020 # msgid "" msgstr "" @@ -24,7 +25,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-04-15 19:40+CET\n" "PO-Revision-Date: 2018-10-02 22:41+\n" -"Last-Translator: Runzhe Liang <18051080...@163.com>, 2020\n" +"Last-Translator: MTR Zhao , 2020\n" "Language-Team: Chinese (China) (https://www.transifex.com/otf/teams/1519/zh_CN/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -387,6 +388,10 @@ msgid "" "services](../single-onion-service)), and never an exit node. You can view " "your current Tor circuit by clicking on the [i] on the URL bar." msgstr "" +"ç±[客æ·ç«¯](#client)æ建ç [Tor ç½ç»](#tor-/-tor-network/-core-" +"tor)é¾è·¯ï¼ç±éæºéæ©çèç¹ç»æãé¾è·¯ä»¥[ç½æ¡¥](#bridge)æ[å®å«èç¹](#guard)å¼å§ã大å¤æ°é¾è·¯ç±ä¸ä¸ªèç¹ç»æââä¸ä¸ªå®å«èç¹æç½æ¡¥ï¼ä¸ä¸ª[ä¸ç»§](#middle" +" relay)åä¸ä¸ª[åºå£](#exit)ã大å¤æ°[æ´è±æå¡](#onion-services)å¨ä¸ä¸ªé¾è·¯ä¸ä½¿ç¨6è·³ï¼é¤äº [single onion " +"services](#single-onion-service)ï¼ï¼å¹¶ä¸æ²¡æåºå£èç¹ãæ¨å¯ä»¥å¨ Tor æµè§å¨ä¸ç¹å»æ´è±æé®æ¥çæ¨å½å Tor é¾è·¯ã" #: https//support.torproject.org/glossary/client/ #: (content/glossary/client/contents+en.lrword.term) @@ -529,6 +534,8 @@ msgid "" "each [relay](../relay) decrypts one layer before passing the request on to " "the next relay." msgstr "" +"å°ä¸æ®µæ°æ®æä¹±æåªè½è¢«ç®æ æ¥æ¶è 读åçå¯ç çè¿ç¨ã[Tor](#tor-/-tor-network/-core-tor) å¨ Tor " +"[é¾è·¯](#circuit)ä¸ä½¿ç¨ä¸å±å å¯ï¼æ¯ä¸ª[ä¸ç»§](#relay)å¨å°è¯·æ±ä¼ éå°ä¸ä¸ä¸ªä¸ç»§ä¹å解å¯ä¸ä¸ªå±ã" #: https//support.torproject.org/glossary/end-to-end-encrypted/ #: (content/glossary/end-to-end-encrypted/contents+en.lrword.term) @@ -572,6 +579,9 @@ msgid "" "relay running on a given IP address on a given date. This service is often " "useful when dealing with law enforcement." msgstr "" +"ExoneraTor æå¡ç»´æ¤äºä¸ä¸ªå·²æ为 Tor ç½ç»ä¸é¨åç[ä¸ç»§](#relay)ç [IP å°å](#ip-address) çæ°æ®åºãå®å°åç" +" [Tor](#tor-/-tor-network/-core-tor) ä¸ç»§å¨ç»å®çæ¥ææ¯å¦è¿è¡å¨ç»å®ç IP " +"å°åä¸ãè¿ä¸ªæå¡å¨åºå¯¹æ§æ³é¨é¨æ¶å¸¸å¸¸æ¯å¾ç®¡ç¨çã" #: https//support.torproject.org/glossary/firefox/ #: (content/glossary/firefox/contents+en.lrword.term) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] kist: Document a magic value in channel_should_write_to_kernel()
commit c55e633f7446fea7b73be75f6713fad6493edf05 Author: David Goulet Date: Mon Jun 22 15:28:47 2020 -0400 kist: Document a magic value in channel_should_write_to_kernel() Closes #40008 Signed-off-by: David Goulet --- src/core/or/scheduler_kist.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/core/or/scheduler_kist.c b/src/core/or/scheduler_kist.c index c73d768f8..5c1922847 100644 --- a/src/core/or/scheduler_kist.c +++ b/src/core/or/scheduler_kist.c @@ -445,6 +445,11 @@ update_socket_written(socket_table_t *table, channel_t *chan, size_t bytes) * one cell for each and bouncing back and forth. This KIST impl avoids that * by only writing a channel's outbuf to the kernel if it has 8 cells or more * in it. + * + * Note: The number 8 has been picked for no particular reasons except that it + * is 4096 bytes which is a common number for buffering. A TLS record can hold + * up to 16KiB thus using 8 cells means that a relay will at most send a TLS + * record of 4KiB or 1/4 of the maximum capacity of a TLS record. */ MOCK_IMPL(int, channel_should_write_to_kernel, (outbuf_table_t *table, channel_t *chan)) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tbmanual-contentspot] https://gitweb.torproject.org/translation.git/commit/?h=tbmanual-contentspot
commit e25f7b8eda8e3df84cfea5d13b0086346b6db6a8 Author: Translation commit bot Date: Mon Jun 29 13:16:57 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tbmanual-contentspot --- contents+pt-PT.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contents+pt-PT.po b/contents+pt-PT.po index 34f5d2c0eb..c757f4a176 100644 --- a/contents+pt-PT.po +++ b/contents+pt-PT.po @@ -1137,7 +1137,7 @@ msgstr "" #: https//tb-manual.torproject.org/bridges/ #: (content/bridges/contents+en.lrtopic.body) msgid "Click \"Connect\" to save your settings." -msgstr "Carregue em \"Ligar\" para salvar a suas Definicões." +msgstr "Carregue em \"Ligar\" para salvar a suas Configurações; Definições." #: https//tb-manual.torproject.org/bridges/ #: (content/bridges/contents+en.lrtopic.body) @@ -2374,7 +2374,7 @@ msgstr "" #: (content/mobile-tor/contents+en.lrtopic.body) msgid "" "It is like the desktop Tor Browser, but for your Android mobile device." -msgstr "" +msgstr "à como o Tor Browser para desktop, mas no seu aparelho Android." #: https//tb-manual.torproject.org/mobile-tor/ #: (content/mobile-tor/contents+en.lrtopic.body) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge branch 'dgoulet/tor-ticket40008_045_01'
commit f1932265fc2da57c6bda1813b57b74d24eff21fe Merge: 5336ac266 c55e633f7 Author: Alexander Færøy Date: Mon Jun 29 14:09:53 2020 + Merge branch 'dgoulet/tor-ticket40008_045_01' src/core/or/scheduler_kist.c | 5 + 1 file changed, 5 insertions(+) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-misc] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc
commit 2cd962c06b6b7c43529d7b49f6057a956626de72 Author: Translation commit bot Date: Mon Jun 29 14:15:48 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-misc --- fr.po | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fr.po b/fr.po index 4b1bd308c8..87ddcb4e43 100644 --- a/fr.po +++ b/fr.po @@ -41,7 +41,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-06-19 19:37+0200\n" -"PO-Revision-Date: 2020-06-29 00:35+\n" +"PO-Revision-Date: 2020-06-29 14:07+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -434,7 +434,7 @@ msgstr "Hors ligne" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:329 msgid "_Unsafe Browser" -msgstr "" +msgstr "Navigateur _non sécurisé" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:338 msgid "Enabled" @@ -442,7 +442,7 @@ msgstr "Activé" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:340 msgid "Disabled (default)" -msgstr "" +msgstr "Désactivé (par défaut)" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:391 msgid "On (default)" @@ -687,11 +687,11 @@ msgstr "Conserver les fichiers stockés dans le répertoire `Persistentâ" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:70 msgid "Settings on the Welcome Screen" -msgstr "" +msgstr "Paramètres sur lâécran Bienvenue" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:72 msgid "Language, administration password, and additional settings" -msgstr "" +msgstr "Langue, mot de passe dâadministration et paramètres supplémentaires" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:85 msgid "Browser Bookmarks" @@ -1466,7 +1466,7 @@ msgid "" "The Unsafe Browser was not enabled on the Welcome Screen.\\n\\nIf you want " "to use the Unsafe Browser, you have to restart Tails and enable it in the " "settings on the Welcome Screen." -msgstr "" +msgstr "Le Navigateur non sécurisé nâa pas été activé sur lâécran Bienvenue.\\n\\nSi vous souhaitez utiliser le Navigateur non sécurisé, vous devez redémarrer Tails et lâactiver dans les paramètres de lâécran Bienvenue." #: config/chroot_local-includes/usr/local/sbin/unsafe-browser:98 msgid "" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-misc] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc
commit 3428a02f92b90ef91020b659b3aacab3a7916fb8 Author: Translation commit bot Date: Mon Jun 29 14:45:54 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-misc --- fr.po | 112 +- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/fr.po b/fr.po index 87ddcb4e43..da47040de2 100644 --- a/fr.po +++ b/fr.po @@ -41,7 +41,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-06-19 19:37+0200\n" -"PO-Revision-Date: 2020-06-29 14:07+\n" +"PO-Revision-Date: 2020-06-29 14:45+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -79,19 +79,19 @@ msgstr "Aidez-nous à corriger votre bogueâ!\nLisez \\n\\nCheck your network connection, and restart Tails to try " "upgrading again.\\n\\nIf the problem persists, go to " "file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html" -msgstr "Une erreur est survenue pendant la mise à jour de la clé de signature.\\n\\nCela empêche de déterminer si une mise à jour est disponible sur notre site web.\\n\\nVérifiez votre connexion réseau et redémarrez Tails pour essayer de retenter la mise à jour.\\n\\nSi le problème persiste, consultez file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" +msgstr "Une erreur est survenue pendant la mise à niveau de la clé de signature.\\n\\nCela empêche de déterminer si une mise à niveau est proposée sur notre site Web.\\n\\nVérifiez votre connexion réseau et redémarrez Tails pour essayer de retenter la mise à niveau.\\n\\nSi le problème persiste, consultez file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:250 msgid "Error while updating the signing key" -msgstr "Erreur lors de la mise à jour de la clé de signature" +msgstr "Erreur de mise à jour de la clé de signature" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:279 msgid "Error while checking for upgrades" -msgstr "Erreur lors de la vérification des mises à jour" +msgstr "Erreur de vérification de la présence de mises à niveau" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:282 msgid "" @@ -161,11 +161,11 @@ msgid "" "Check your network connection, and restart Tails to try upgrading again.\n" "\n" "If the problem persists, go to file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html" -msgstr "Impossible de déterminer si une mise à jour est disponible sur notre site web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à jour.\n\nSi le problème persiste, consultez file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" +msgstr "Impossible de déterminer si une mise à niveau est disponible sur notre site web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à niveau.\n\nSi le problème persiste, consultez file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:297 msgid "no automatic upgrade is available from our website for this version" -msgstr "aucune mise à jour automatique nâest disponible sur notre site web pour cette version" +msgstr "aucune mise à niveau automatique nâest proposée sur notre site Web pour cette version" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:303 msgid "your device was not created using a USB image or Tails Installer" @@ -201,24 +201,24 @@ msgstr "Cette version de Tails est obsolète et peut poser des problèmes de sé msgid "" "The available incremental upgrade requires %{space_needed}s of free space on" " Tails system partition, but only %{free_space}s is available." -msgstr "La mise à jour incrémentale proposée exige %{space_needed}s dâespace libre sur la partition système de Tails, mais seulement %{free_space}s est disponible." +msgstr "La mise à niveau incrémentale proposée exige %{space_needed}s dâespace libre sur la partition système de Tails, mais seulement %{free_space}s est disponible." #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:399 #, perl-brace-format msgid "" "The available incremental upgrade requires %{memory_needed}s of free memory," " but only %{free_memory}s is available." -msgstr "La mise à jour incrémentale proposée exige %{memory_needed}s de mémoire libre, mais seulement %{free_memory}s est disponible." +msgstr "La mise à niveau incrémentale proposée exige %{memory_needed}s de mémoire libre, mais seulement %{free_memory}s est disponible." #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:421 msgid "" "An incremental upgrade is available, but no
[tor-commits] [translation/tails-misc_release] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release
commit f849df165f1e546bd03c318624f1d358763e4c10 Author: Translation commit bot Date: Mon Jun 29 14:46:35 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release --- fr.po | 108 +- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/fr.po b/fr.po index 6559a370c7..8e24b4efaa 100644 --- a/fr.po +++ b/fr.po @@ -41,7 +41,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-06-19 19:37+0200\n" -"PO-Revision-Date: 2020-06-29 14:07+\n" +"PO-Revision-Date: 2020-06-29 14:46+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -79,19 +79,19 @@ msgstr "Aidez-nous à corriger votre bogueâ!\nLisez \\n\\nCheck your network connection, and restart Tails to try " "upgrading again.\\n\\nIf the problem persists, go to " "file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html" -msgstr "Une erreur est survenue pendant la mise à jour de la clé de signature.\\n\\nCela empêche de déterminer si une mise à jour est disponible sur notre site web.\\n\\nVérifiez votre connexion réseau et redémarrez Tails pour essayer de retenter la mise à jour.\\n\\nSi le problème persiste, consultez file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" +msgstr "Une erreur est survenue pendant la mise à niveau de la clé de signature.\\n\\nCela empêche de déterminer si une mise à niveau est proposée sur notre site Web.\\n\\nVérifiez votre connexion réseau et redémarrez Tails pour essayer de retenter la mise à niveau.\\n\\nSi le problème persiste, consultez file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:250 msgid "Error while updating the signing key" -msgstr "Erreur lors de la mise à jour de la clé de signature" +msgstr "Erreur de mise à jour de la clé de signature" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:279 msgid "Error while checking for upgrades" -msgstr "Erreur lors de la vérification des mises à jour" +msgstr "Erreur de vérification de la présence de mises à niveau" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:282 msgid "" @@ -161,11 +161,11 @@ msgid "" "Check your network connection, and restart Tails to try upgrading again.\n" "\n" "If the problem persists, go to file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html" -msgstr "Impossible de déterminer si une mise à jour est disponible sur notre site web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à jour.\n\nSi le problème persiste, consultez file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" +msgstr "Impossible de déterminer si une mise à niveau est disponible sur notre site web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à niveau.\n\nSi le problème persiste, consultez file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:297 msgid "no automatic upgrade is available from our website for this version" -msgstr "aucune mise à jour automatique nâest disponible sur notre site web pour cette version" +msgstr "aucune mise à niveau automatique nâest proposée sur notre site Web pour cette version" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:303 msgid "your device was not created using a USB image or Tails Installer" @@ -201,24 +201,24 @@ msgstr "Cette version de Tails est obsolète et peut poser des problèmes de sé msgid "" "The available incremental upgrade requires %{space_needed}s of free space on" " Tails system partition, but only %{free_space}s is available." -msgstr "La mise à jour incrémentale proposée exige %{space_needed}s dâespace libre sur la partition système de Tails, mais seulement %{free_space}s est disponible." +msgstr "La mise à niveau incrémentale proposée exige %{space_needed}s dâespace libre sur la partition système de Tails, mais seulement %{free_space}s est disponible." #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:399 #, perl-brace-format msgid "" "The available incremental upgrade requires %{memory_needed}s of free memory," " but only %{free_memory}s is available." -msgstr "La mise à jour incrémentale proposée exige %{memory_needed}s de mémoire libre, mais seulement %{free_memory}s est disponible." +msgstr "La mise à niveau incrémentale proposée exige %{memory_needed}s de mémoire libre, mais seulement %{free_memory}s est disponible." #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:421 msgid "" "An incremental upgrade is available,
[tor-commits] [translation/tails-iuk] https://gitweb.torproject.org/translation.git/commit/?h=tails-iuk
commit 3318db50577d9d64b559704b0b0f4407ecd87ef6 Author: Translation commit bot Date: Mon Jun 29 14:46:37 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-iuk --- fr.po | 54 +++--- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/fr.po b/fr.po index e5180a0242..614a345522 100644 --- a/fr.po +++ b/fr.po @@ -36,7 +36,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: Tails developers \n" "POT-Creation-Date: 2019-11-28 16:51+0100\n" -"PO-Revision-Date: 2020-03-25 15:43+\n" +"PO-Revision-Date: 2020-06-29 14:41+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -54,7 +54,7 @@ msgstr "Pour obtenir les informations de débogage, exécutez la commande suivan #: ../lib/Tails/IUK/Frontend.pm:218 msgid "Error while checking for upgrades" -msgstr "Erreur lors de la vérification des mises à jour" +msgstr "Erreur de vérification de la présence de mises à niveau" #: ../lib/Tails/IUK/Frontend.pm:221 msgid "" @@ -63,11 +63,11 @@ msgid "" "Check your network connection, and restart Tails to try upgrading again.\n" "\n" "If the problem persists, go to file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html" -msgstr "Impossible de déterminer si une mise à jour est disponible sur notre site web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à jour.\n\nSi le problème persiste, allez à file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" +msgstr "Impossible de déterminer si une mise à niveau est disponible sur notre site web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à niveau.\n\nSi le problème persiste, allez à file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" #: ../lib/Tails/IUK/Frontend.pm:236 msgid "no automatic upgrade is available from our website for this version" -msgstr "aucune mise à jour automatique nâest disponible sur notre site web pour cette version" +msgstr "aucune mise à niveau automatique nâest disponible sur notre site web pour cette version" #: ../lib/Tails/IUK/Frontend.pm:242 msgid "your device was not created using a USB image or Tails Installer" @@ -103,24 +103,24 @@ msgstr "Cette version de Tails est obsolète et peut poser des problèmes de sé msgid "" "The available incremental upgrade requires %{space_needed}s of free space on" " Tails system partition, but only %{free_space}s is available." -msgstr "La mise à jour incrémentale proposée exige %{space_needed}s dâespace libre sur la partition système de Tails, mais seulement %{free_space}s est libre." +msgstr "La mise à niveau incrémentale proposée exige %{space_needed}s dâespace libre sur la partition système de Tails, mais seulement %{free_space}s est libre." #: ../lib/Tails/IUK/Frontend.pm:336 #, perl-brace-format msgid "" "The available incremental upgrade requires %{memory_needed}s of free memory," " but only %{free_memory}s is available." -msgstr "La mise à jour incrémentale proposée exige %{memory_needed}s de mémoire libre, mais seulement %{free_memory}s est libre." +msgstr "La mise à niveau incrémentale proposée exige %{memory_needed}s de mémoire libre, mais seulement %{free_memory}s est libre." #: ../lib/Tails/IUK/Frontend.pm:358 msgid "" "An incremental upgrade is available, but no full upgrade is.\n" "This should not happen. Please report a bug." -msgstr "Une mise à jour incrémentale est disponible, mais aucune mise à jour complète ne lâest.\nCela ne devrait pas arriver. Veuillez signaler un bogue." +msgstr "Une mise à niveau incrémentale est disponible, mais aucune mise à niveau complète ne lâest.\nCela ne devrait pas arriver. Veuillez signaler un bogue." #: ../lib/Tails/IUK/Frontend.pm:362 msgid "Error while detecting available upgrades" -msgstr "Erreur lors de la détection des mises à jour disponibles" +msgstr "Erreur de détection des mises à niveau proposées" #: ../lib/Tails/IUK/Frontend.pm:372 #, perl-brace-format @@ -135,19 +135,19 @@ msgid "" "Download size: %{size}s\n" "\n" "Do you want to upgrade now?" -msgstr "Vous devriez mettre à jour vers %{name}s %{version}s.\n\nPour plus de précisions sur cette nouvelle version, visitez %{details_url}s\n\nNous vous recommandons de fermer toutes les applications pendant la mise à jour.\nLe téléchargement de la mise à jour pourrait être long, de plusieurs minutes à quelques heures.\n\nTaille du téléchargement : %{size}s\n\nVoulez-vous mettre à jour maintenantâ?" +msgstr "Vous devriez mettre à niveau vers %{name}s %{version}s.\n\nPour plus de précisions sur cette nouvelle version, visitez %{details_url}s\n\nNous vous recommandons de fermer toutes les applications pendant la mise à niveau.\nLe
[tor-commits] [translation/tails-iuk_completed] https://gitweb.torproject.org/translation.git/commit/?h=tails-iuk_completed
commit 76b85dfadacf441341ea4d36d81b12743458edab Author: Translation commit bot Date: Mon Jun 29 14:46:41 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-iuk_completed --- fr.po | 54 +++--- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/fr.po b/fr.po index e5180a0242..614a345522 100644 --- a/fr.po +++ b/fr.po @@ -36,7 +36,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: Tails developers \n" "POT-Creation-Date: 2019-11-28 16:51+0100\n" -"PO-Revision-Date: 2020-03-25 15:43+\n" +"PO-Revision-Date: 2020-06-29 14:41+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -54,7 +54,7 @@ msgstr "Pour obtenir les informations de débogage, exécutez la commande suivan #: ../lib/Tails/IUK/Frontend.pm:218 msgid "Error while checking for upgrades" -msgstr "Erreur lors de la vérification des mises à jour" +msgstr "Erreur de vérification de la présence de mises à niveau" #: ../lib/Tails/IUK/Frontend.pm:221 msgid "" @@ -63,11 +63,11 @@ msgid "" "Check your network connection, and restart Tails to try upgrading again.\n" "\n" "If the problem persists, go to file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html" -msgstr "Impossible de déterminer si une mise à jour est disponible sur notre site web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à jour.\n\nSi le problème persiste, allez à file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" +msgstr "Impossible de déterminer si une mise à niveau est disponible sur notre site web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à niveau.\n\nSi le problème persiste, allez à file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" #: ../lib/Tails/IUK/Frontend.pm:236 msgid "no automatic upgrade is available from our website for this version" -msgstr "aucune mise à jour automatique nâest disponible sur notre site web pour cette version" +msgstr "aucune mise à niveau automatique nâest disponible sur notre site web pour cette version" #: ../lib/Tails/IUK/Frontend.pm:242 msgid "your device was not created using a USB image or Tails Installer" @@ -103,24 +103,24 @@ msgstr "Cette version de Tails est obsolète et peut poser des problèmes de sé msgid "" "The available incremental upgrade requires %{space_needed}s of free space on" " Tails system partition, but only %{free_space}s is available." -msgstr "La mise à jour incrémentale proposée exige %{space_needed}s dâespace libre sur la partition système de Tails, mais seulement %{free_space}s est libre." +msgstr "La mise à niveau incrémentale proposée exige %{space_needed}s dâespace libre sur la partition système de Tails, mais seulement %{free_space}s est libre." #: ../lib/Tails/IUK/Frontend.pm:336 #, perl-brace-format msgid "" "The available incremental upgrade requires %{memory_needed}s of free memory," " but only %{free_memory}s is available." -msgstr "La mise à jour incrémentale proposée exige %{memory_needed}s de mémoire libre, mais seulement %{free_memory}s est libre." +msgstr "La mise à niveau incrémentale proposée exige %{memory_needed}s de mémoire libre, mais seulement %{free_memory}s est libre." #: ../lib/Tails/IUK/Frontend.pm:358 msgid "" "An incremental upgrade is available, but no full upgrade is.\n" "This should not happen. Please report a bug." -msgstr "Une mise à jour incrémentale est disponible, mais aucune mise à jour complète ne lâest.\nCela ne devrait pas arriver. Veuillez signaler un bogue." +msgstr "Une mise à niveau incrémentale est disponible, mais aucune mise à niveau complète ne lâest.\nCela ne devrait pas arriver. Veuillez signaler un bogue." #: ../lib/Tails/IUK/Frontend.pm:362 msgid "Error while detecting available upgrades" -msgstr "Erreur lors de la détection des mises à jour disponibles" +msgstr "Erreur de détection des mises à niveau proposées" #: ../lib/Tails/IUK/Frontend.pm:372 #, perl-brace-format @@ -135,19 +135,19 @@ msgid "" "Download size: %{size}s\n" "\n" "Do you want to upgrade now?" -msgstr "Vous devriez mettre à jour vers %{name}s %{version}s.\n\nPour plus de précisions sur cette nouvelle version, visitez %{details_url}s\n\nNous vous recommandons de fermer toutes les applications pendant la mise à jour.\nLe téléchargement de la mise à jour pourrait être long, de plusieurs minutes à quelques heures.\n\nTaille du téléchargement : %{size}s\n\nVoulez-vous mettre à jour maintenantâ?" +msgstr "Vous devriez mettre à niveau vers %{name}s %{version}s.\n\nPour plus de précisions sur cette nouvelle version, visitez %{details_url}s\n\nNous vous recommandons de fermer toutes les applications pendant la mise Ã
[tor-commits] [translation/tails-greeter-2_completed] https://gitweb.torproject.org/translation.git/commit/?h=tails-greeter-2_completed
commit d2a167e14188368cab94d37507ea177f401573ed Author: Translation commit bot Date: Mon Jun 29 14:46:54 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-greeter-2_completed --- fr/fr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fr/fr.po b/fr/fr.po index 06109a3933..ff91688f7f 100644 --- a/fr/fr.po +++ b/fr/fr.po @@ -233,7 +233,7 @@ msgid "" "press the \"+\" button below." msgstr "" "Les paramètres par défaut sont sûrs dans la plupart des cas. Pour ajouter un" -" paramètre personnalisé, appuyer sur le bouton \"+\" ci-dessous." +" paramètre personnalisé, appuyer sur le bouton « + » ci-dessous." #: ../data/greeter.ui.h:46 msgid "_Administration Password" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-persistence-setup_completed] https://gitweb.torproject.org/translation.git/commit/?h=tails-persistence-setup_completed
commit 26ebca2fa6d194073853bcd900b241bd3da9d9d1 Author: Translation commit bot Date: Mon Jun 29 14:47:05 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-persistence-setup_completed --- fr/fr.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fr/fr.po b/fr/fr.po index d589d1e53e..cfd8a3173b 100644 --- a/fr/fr.po +++ b/fr/fr.po @@ -36,7 +36,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: Tails developers \n" "POT-Creation-Date: 2019-10-21 09:06+0200\n" -"PO-Revision-Date: 2020-03-25 15:36+\n" +"PO-Revision-Date: 2020-06-29 14:25+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -152,7 +152,7 @@ msgstr "Configuration des périphériques et connexions réseau" #: ../lib/Tails/Persistence/Configuration/Presets.pm:100 msgid "Additional Software" -msgstr "Logiciels additionnels" +msgstr "Logiciels supplémentaires" #: ../lib/Tails/Persistence/Configuration/Presets.pm:102 msgid "Software installed when starting Tails" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-greeter-2] https://gitweb.torproject.org/translation.git/commit/?h=tails-greeter-2
commit f34ee4db405d660f365a611532e07dd98a04ed50 Author: Translation commit bot Date: Mon Jun 29 14:46:49 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-greeter-2 --- fr/fr.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fr/fr.po b/fr/fr.po index 3801d26ccd..ff91688f7f 100644 --- a/fr/fr.po +++ b/fr/fr.po @@ -5,9 +5,9 @@ # # Translators: # Thomas Chauchefoin , 2016 -# arpalord , 2016 +# 4c6ce9952c5260c09c52a2847598402a_b451c51 <586e15927c43f46ef10f0dcb0660dbc3_11384>, 2016 # Towinet, 2016 -# runasand , 2016 +# 9dbfdf86bd952758642d51c44dd7a9ba_5a11089 <36683c9dbea49936293c1f7a98a2e946_2821>, 2016 # erinm, 2019 # xin, 2019 # AO , 2020 @@ -233,7 +233,7 @@ msgid "" "press the \"+\" button below." msgstr "" "Les paramètres par défaut sont sûrs dans la plupart des cas. Pour ajouter un" -" paramètre personnalisé, appuyer sur le bouton \"+\" ci-dessous." +" paramètre personnalisé, appuyer sur le bouton « + » ci-dessous." #: ../data/greeter.ui.h:46 msgid "_Administration Password" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-persistence-setup] https://gitweb.torproject.org/translation.git/commit/?h=tails-persistence-setup
commit 82632de4b5f88736767c76409dbbd756f083cb83 Author: Translation commit bot Date: Mon Jun 29 14:47:00 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-persistence-setup --- fr/fr.po | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fr/fr.po b/fr/fr.po index 83406db809..cfd8a3173b 100644 --- a/fr/fr.po +++ b/fr/fr.po @@ -6,9 +6,9 @@ # bassmax, 2014 # Alex , 2014 # AO , 2015,2018-2020 -# arpalord , 2013 +# 4c6ce9952c5260c09c52a2847598402a_b451c51 <586e15927c43f46ef10f0dcb0660dbc3_11384>, 2013 # arpalord , 2013 -# arpalord , 2013 +# 4c6ce9952c5260c09c52a2847598402a_b451c51 <586e15927c43f46ef10f0dcb0660dbc3_11384>, 2013 # bassmax, 2014 # David Goulet , 2012 # AO , 2017-2018 @@ -36,7 +36,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: Tails developers \n" "POT-Creation-Date: 2019-10-21 09:06+0200\n" -"PO-Revision-Date: 2020-03-25 15:36+\n" +"PO-Revision-Date: 2020-06-29 14:25+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -152,7 +152,7 @@ msgstr "Configuration des périphériques et connexions réseau" #: ../lib/Tails/Persistence/Configuration/Presets.pm:100 msgid "Additional Software" -msgstr "Logiciels additionnels" +msgstr "Logiciels supplémentaires" #: ../lib/Tails/Persistence/Configuration/Presets.pm:102 msgid "Software installed when starting Tails" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-misc_completed] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_completed
commit 8df45267af56c551c38209bcf05cfeffe86c6081 Author: Translation commit bot Date: Mon Jun 29 15:15:53 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_completed --- fr.po | 1767 + 1 file changed, 1767 insertions(+) diff --git a/fr.po b/fr.po new file mode 100644 index 00..db81a52981 --- /dev/null +++ b/fr.po @@ -0,0 +1,1767 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# bassmax, 2014-2015 +# Alex , 2014 +# tneskovic , 2014 +# AO , 2015,2018-2020 +# apaddlingduck, 2014 +# apaddlingduck, 2014 +# Athorcis, 2015 +# Athorcis, 2015 +# Curtis Baltimore , 2019 +# Domiho Zannou , 2018 +# Emmanuel Simond , 2014 +# Emmanuel Simond , 2014 +# Emma Peel, 2018 +# Emma Peel, 2018 +# AO , 2017-2018 +# French language coordinator , 2015-2017 +# Gwennole Hangard , 2015 +# Jean-Yves Toumit , 2013 +# Lidija , 2015 +# mosira , 2014 +# Onizuka, 2013 +# Onizuka, 2013 +# PoorPockets McNewHold , 2020 +# mosira , 2014 +# Sabrina Cater , 2015 +# Simon-Olivier Morneau , 2018-2019 +# Thomas Chauchefoin , 2016 +# Thomas Prévost , 2018 +# tneskovic , 2014 +# Towinet, 2013-2016 +# AO , 2015 +# xin, 2019 +# xin, 2019-2020 +msgid "" +msgstr "" +"Project-Id-Version: Tor Project\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-06-19 19:37+0200\n" +"PO-Revision-Date: 2020-06-29 15:03+\n" +"Last-Translator: AO \n" +"Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready.sh:42 +msgid "Tor is ready" +msgstr "Tor est prêt" + +#: config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready.sh:43 +msgid "You can now access the Internet." +msgstr "Vous pouvez maintenant accéder à Internet." + +#: config/chroot_local-includes/etc/whisperback/config.py:69 +#, python-format +msgid "" +"Help us fix your bug!\n" +"Read our bug reporting instructions.\n" +"Do not include more personal information than\n" +"needed!\n" +"About giving us an email address\n" +"\n" +"Giving us an email address allows us to contact you to clarify the problem. This\n" +"is needed for the vast majority of the reports we receive as most reports\n" +"without any contact information are useless. On the other hand it also provides\n" +"an opportunity for eavesdroppers, like your email or Internet provider, to\n" +"confirm that you are using Tails.\n" +"\n" +msgstr "Aidez-nous à corriger votre bogueâ!\nLisez nos instructions de rapport de bogue.\nNâincluez pas plus dâinformations personnelles que nécessaireâ!\nNous donner une adresse courriel\n\nEn nous donnant une adresse courriel, vous nous permettez de vous contacter pour clarifier le problème. Cela est nécessaire pour la vaste majorité des rapports que nous recevons, car la plupart des rapports sans information de contact sont inutiles. Dâun autre côté, cela donne une occasion aux oreilles électroniques indiscrètes, comme votre fournisseur de service Internet ou de courriel, de confirmer que vous utilisez Tails.\n\n" + +#: config/chroot_local-includes/usr/share/tails/additional-software/configuration-window.ui:8 +#: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:115 +#: ../config/chroot_local-includes/usr/share/applications/org.boum.tails.additional-software-config.desktop.in.h:1 +msgid "Additional Software" +msgstr "Logiciels supplémentaires" + +#: config/chroot_local-includes/usr/share/tails/additional-software/configuration-window.ui:51 +msgid "" +"You can install additional software automatically from your persistent " +"storage when starting Tails." +msgstr "Vous pouvez installer des logiciels supplémentaires automatiquement à partir de votre stockage persistant lors du démarrage de Tails." + +#: config/chroot_local-includes/usr/share/tails/additional-software/configuration-window.ui:77 +msgid "" +"The following software is installed automatically from your persistent " +"storage when starting Tails." +msgstr "Les logiciels suivants sont installés automatiquement à partir de votre stockage persistant lors du démarrage de Tails." + +#: config/chroot_local-includes/usr/share/tails/additional-software/configuration-window.ui:135 +#: config/chroot_local-includes/usr/local/bin/tails-additional-software-config:171 +msgid "" +"To add more, install some software using Synaptic Package Manager or APT on the command line." +msgstr "Pour en ajouter dâautres, installez des logiciels en utilisant le gestionnaire de paquets Synaptic ou APT en ligne de commande." + +#:
[tor-commits] [translation/mat-gui_completed] https://gitweb.torproject.org/translation.git/commit/?h=mat-gui_completed
commit ea2aa113e357816642311d6d62be28c7aa508371 Author: Translation commit bot Date: Mon Jun 29 15:15:39 2020 + https://gitweb.torproject.org/translation.git/commit/?h=mat-gui_completed --- fr.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fr.po b/fr.po index 28a9c19f54..d002ad1309 100644 --- a/fr.po +++ b/fr.po @@ -4,7 +4,7 @@ # # Translators: # bassmax, 2014 -# AO , 2019 +# AO , 2019-2020 # BitingBird , 2015 # AO , 2018 # AO , 2016 @@ -16,7 +16,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-02-10 23:06+0100\n" -"PO-Revision-Date: 2019-10-28 16:28+\n" +"PO-Revision-Date: 2020-06-29 14:55+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -48,7 +48,7 @@ msgstr "Propres" #: mat-gui:168 msgid "No metadata found" -msgstr "Aucune métadonnée trouvée" +msgstr "Aucune métadonnée nâa été trouvée" #: mat-gui:170 mat-gui:419 msgid "Dirty" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-misc] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc
commit 38d302a6320f2d31bc2fad8adb9499580a72030c Author: Translation commit bot Date: Mon Jun 29 15:15:51 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-misc --- fr.po | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fr.po b/fr.po index da47040de2..db81a52981 100644 --- a/fr.po +++ b/fr.po @@ -41,7 +41,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-06-19 19:37+0200\n" -"PO-Revision-Date: 2020-06-29 14:45+\n" +"PO-Revision-Date: 2020-06-29 15:03+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -161,7 +161,7 @@ msgid "" "Check your network connection, and restart Tails to try upgrading again.\n" "\n" "If the problem persists, go to file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html" -msgstr "Impossible de déterminer si une mise à niveau est disponible sur notre site web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à niveau.\n\nSi le problème persiste, consultez file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" +msgstr "Impossible de déterminer si une mise à niveau est disponible sur notre site Web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à niveau.\n\nSi le problème persiste, consultez file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:297 msgid "no automatic upgrade is available from our website for this version" @@ -348,7 +348,7 @@ msgstr "Redémarrer maintenant" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:715 msgid "Restart later" -msgstr "Redémarrer plus tard" +msgstr "Redémarrer ultérieurement" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:726 msgid "Error while restarting the system" @@ -687,7 +687,7 @@ msgstr "Conserver les fichiers stockés dans le répertoire `Persistentâ" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:70 msgid "Settings on the Welcome Screen" -msgstr "Paramètres sur lâécran Bienvenue" +msgstr "Paramètres sur lâécran de bienvenue" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:72 msgid "Language, administration password, and additional settings" @@ -1135,7 +1135,7 @@ msgstr "Pour ce faire, créez un stockage persistant et installez des logiciels #: config/chroot_local-includes/usr/local/bin/tails-additional-software-config:205 msgid "" "To do so, install Tails on a USB stick and create a persistent storage." -msgstr "Pour cela, installez Tails sur une clé USB et créez un espace de stockage persistant." +msgstr "Pour ce faire, installez Tails sur une clé USB et créez un espace de stockage persistant." #: config/chroot_local-includes/usr/local/bin/tails-additional-software-config:251 msgid "[package not available]" @@ -1466,7 +1466,7 @@ msgid "" "The Unsafe Browser was not enabled on the Welcome Screen.\\n\\nIf you want " "to use the Unsafe Browser, you have to restart Tails and enable it in the " "settings on the Welcome Screen." -msgstr "Le Navigateur non sécurisé nâa pas été activé sur lâécran Bienvenue.\\n\\nSi vous souhaitez utiliser le Navigateur non sécurisé, vous devez redémarrer Tails et lâactiver dans les paramètres de lâécran Bienvenue." +msgstr "Le Navigateur non sécurisé nâa pas été activé sur lâécran de bienvenue.\\n\\nSi vous souhaitez utiliser le Navigateur non sécurisé, vous devez redémarrer Tails et lâactiver dans les paramètres de lâécran de bienvenue." #: config/chroot_local-includes/usr/local/sbin/unsafe-browser:98 msgid "" @@ -1656,7 +1656,7 @@ msgid "" "A captive portal is a web page that is displayed before you can access the Internet. Captive portals usually require to log in to the network or enter information such as an email address.\n" "\n" "The Unsafe Browser is not anonymous and can deanonymize you. Use it only to log in to captive portals." -msgstr "Le Navigateur non sécurisé vous permet de vous connecter à un portail captif. Un portail captif est une page web qui est affiché avant que vous puissiez accéder à Internet. Les portails captifs exigent habituellement que vous vous connectiez au réseau ou que vous saisissiez des renseignements tels quâune adresse courriel. Le Navigateur non sécurisé n'est pas anonyme et peut divulguer votre identité. Ne l'utilisez que pour vous connecter à des portails captifs." +msgstr "Le Navigateur non sécurisé vous permet de vous connecter à un portail captif. Un portail captif est une page Web qui est affichée avant que vous puissiez accéder Ã
[tor-commits] [translation/mat-gui] https://gitweb.torproject.org/translation.git/commit/?h=mat-gui
commit 0fb05a8c56e53fb0fa6fa097840c4f07f33515e7 Author: Translation commit bot Date: Mon Jun 29 15:15:31 2020 + https://gitweb.torproject.org/translation.git/commit/?h=mat-gui --- fr.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fr.po b/fr.po index 28a9c19f54..d002ad1309 100644 --- a/fr.po +++ b/fr.po @@ -4,7 +4,7 @@ # # Translators: # bassmax, 2014 -# AO , 2019 +# AO , 2019-2020 # BitingBird , 2015 # AO , 2018 # AO , 2016 @@ -16,7 +16,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-02-10 23:06+0100\n" -"PO-Revision-Date: 2019-10-28 16:28+\n" +"PO-Revision-Date: 2020-06-29 14:55+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -48,7 +48,7 @@ msgstr "Propres" #: mat-gui:168 msgid "No metadata found" -msgstr "Aucune métadonnée trouvée" +msgstr "Aucune métadonnée nâa été trouvée" #: mat-gui:170 mat-gui:419 msgid "Dirty" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-misc_release] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release
commit b83aac7989c6800e1c4512a781b7373550f530b8 Author: Translation commit bot Date: Mon Jun 29 15:16:31 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release --- fr.po | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/fr.po b/fr.po index 8e24b4efaa..db81a52981 100644 --- a/fr.po +++ b/fr.po @@ -41,7 +41,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-06-19 19:37+0200\n" -"PO-Revision-Date: 2020-06-29 14:46+\n" +"PO-Revision-Date: 2020-06-29 15:03+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -161,7 +161,7 @@ msgid "" "Check your network connection, and restart Tails to try upgrading again.\n" "\n" "If the problem persists, go to file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html" -msgstr "Impossible de déterminer si une mise à niveau est disponible sur notre site web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à niveau.\n\nSi le problème persiste, consultez file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" +msgstr "Impossible de déterminer si une mise à niveau est disponible sur notre site Web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à niveau.\n\nSi le problème persiste, consultez file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:297 msgid "no automatic upgrade is available from our website for this version" @@ -348,7 +348,7 @@ msgstr "Redémarrer maintenant" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:715 msgid "Restart later" -msgstr "Redémarrer plus tard" +msgstr "Redémarrer ultérieurement" #: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm:726 msgid "Error while restarting the system" @@ -434,7 +434,7 @@ msgstr "Hors ligne" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:329 msgid "_Unsafe Browser" -msgstr "" +msgstr "Navigateur _non sécurisé" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:338 msgid "Enabled" @@ -442,7 +442,7 @@ msgstr "Activé" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:340 msgid "Disabled (default)" -msgstr "" +msgstr "Désactivé (par défaut)" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:391 msgid "On (default)" @@ -687,11 +687,11 @@ msgstr "Conserver les fichiers stockés dans le répertoire `Persistentâ" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:70 msgid "Settings on the Welcome Screen" -msgstr "" +msgstr "Paramètres sur lâécran de bienvenue" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:72 msgid "Language, administration password, and additional settings" -msgstr "" +msgstr "Langue, mot de passe dâadministration et paramètres supplémentaires" #: config/chroot_local-includes/usr/src/persistence-setup/lib/Tails/Persistence/Configuration/Presets.pm:85 msgid "Browser Bookmarks" @@ -1466,7 +1466,7 @@ msgid "" "The Unsafe Browser was not enabled on the Welcome Screen.\\n\\nIf you want " "to use the Unsafe Browser, you have to restart Tails and enable it in the " "settings on the Welcome Screen." -msgstr "" +msgstr "Le Navigateur non sécurisé nâa pas été activé sur lâécran de bienvenue.\\n\\nSi vous souhaitez utiliser le Navigateur non sécurisé, vous devez redémarrer Tails et lâactiver dans les paramètres de lâécran de bienvenue." #: config/chroot_local-includes/usr/local/sbin/unsafe-browser:98 msgid "" @@ -1656,25 +1656,25 @@ msgid "" "A captive portal is a web page that is displayed before you can access the Internet. Captive portals usually require to log in to the network or enter information such as an email address.\n" "\n" "The Unsafe Browser is not anonymous and can deanonymize you. Use it only to log in to captive portals." -msgstr "" +msgstr "Le Navigateur non sécurisé vous permet de vous connecter à un portail captif. Un portail captif est une page Web qui est affichée avant que vous puissiez accéder à Internet. Les portails captifs exigent habituellement que vous vous connectiez au réseau ou que vous saisissiez des renseignements tels quâune adresse courriel. Le Navigateur non sécurisé nâest pas anonyme et peut divulguer votre identité. Ne lâutilisez que pour vous connecter à des portails captifs." #:
[tor-commits] [translation/liveusb-creator] https://gitweb.torproject.org/translation.git/commit/?h=liveusb-creator
commit 2d72d8f00d04913a11b5517fbb1dc50bea12c6c7 Author: Translation commit bot Date: Mon Jun 29 15:15:23 2020 + https://gitweb.torproject.org/translation.git/commit/?h=liveusb-creator --- fr/fr.po | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fr/fr.po b/fr/fr.po index 2c21798c1d..57e75373de 100644 --- a/fr/fr.po +++ b/fr/fr.po @@ -45,7 +45,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-10-21 09:03+0200\n" -"PO-Revision-Date: 2020-06-29 14:45+\n" +"PO-Revision-Date: 2020-06-29 14:55+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -90,7 +90,7 @@ msgstr "Erreur : le SHA1 de votre CD live est invalide. Vous pouvez exécuter c #: ../tails_installer/creator.py:341 msgid "Unknown ISO, skipping checksum verification" -msgstr "ISO inconnue, omission de la vérification de la somme de contrôle" +msgstr "ISO inconnue, la somme de contrôle ne sera pas vérifiée" #: ../tails_installer/creator.py:353 #, python-format @@ -260,7 +260,7 @@ msgstr "Réinitialisation du MBR de %s" #: ../tails_installer/creator.py:1325 msgid "Drive is a loopback, skipping MBR reset" -msgstr "Le périphérique est une boucle avec retour, omission de la réinitialisation du MBR" +msgstr "Le périphérique est une boucle, la réinitialisation du MBR sera ignorée" #: ../tails_installer/creator.py:1329 ../tails_installer/creator.py:1589 #, python-format @@ -512,7 +512,7 @@ msgstr "Impossible dâutiliser le fichier choisi. Vous devriez avoir plus de ch #: ../tails_installer/gui.py:878 #, python-format msgid "%(filename)s selected" -msgstr "%(filename)s sélectionné" +msgstr "%(filename)s est sélectionné" #: ../tails_installer/source.py:29 msgid "Unable to find LiveOS on ISO" @@ -544,7 +544,7 @@ msgstr "'%s' nâest pas un dossier" #: ../tails_installer/source.py:76 #, python-format msgid "Skipping '%(filename)s'" -msgstr "Omission de '%(filename)s'" +msgstr "'%(filename)s' sera ignoré" #: ../tails_installer/utils.py:55 #, python-format ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-greeter-2_completed] https://gitweb.torproject.org/translation.git/commit/?h=tails-greeter-2_completed
commit de85eafb2e29fc54e2697837a78f1c4e628c7cf4 Author: Translation commit bot Date: Mon Jun 29 15:16:50 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-greeter-2_completed --- fr/fr.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fr/fr.po b/fr/fr.po index ff91688f7f..ce486b8a41 100644 --- a/fr/fr.po +++ b/fr/fr.po @@ -111,8 +111,8 @@ msgid "" "You will configure the Tor bridge and local proxy later on after connecting " "to a network." msgstr "" -"Vous configurerez le pont Tor et le mandataire local plus tard, après vous " -"être connecté à un réseau." +"Vous configurerez le pont Tor et le mandataire local ultérieurement, après " +"vous être connecté à un réseau." #: ../data/greeter.ui.h:19 msgid "Welcome to Tails!" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-iuk] https://gitweb.torproject.org/translation.git/commit/?h=tails-iuk
commit f9171a31e04af389ec588d47ee2f407bf7ca4af4 Author: Translation commit bot Date: Mon Jun 29 15:16:32 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-iuk --- fr.po | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fr.po b/fr.po index 614a345522..1941fde4c3 100644 --- a/fr.po +++ b/fr.po @@ -36,7 +36,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: Tails developers \n" "POT-Creation-Date: 2019-11-28 16:51+0100\n" -"PO-Revision-Date: 2020-06-29 14:41+\n" +"PO-Revision-Date: 2020-06-29 14:57+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -63,11 +63,11 @@ msgid "" "Check your network connection, and restart Tails to try upgrading again.\n" "\n" "If the problem persists, go to file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html" -msgstr "Impossible de déterminer si une mise à niveau est disponible sur notre site web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à niveau.\n\nSi le problème persiste, allez à file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" +msgstr "Impossible de déterminer si une mise à niveau est disponible sur notre site Web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à niveau.\n\nSi le problème persiste, allez à file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" #: ../lib/Tails/IUK/Frontend.pm:236 msgid "no automatic upgrade is available from our website for this version" -msgstr "aucune mise à niveau automatique nâest disponible sur notre site web pour cette version" +msgstr "aucune mise à niveau automatique nâest disponible sur notre site Web pour cette version" #: ../lib/Tails/IUK/Frontend.pm:242 msgid "your device was not created using a USB image or Tails Installer" @@ -147,7 +147,7 @@ msgstr "Mettre à niveau maintenant" #: ../lib/Tails/IUK/Frontend.pm:388 msgid "Upgrade later" -msgstr "Mettre à niveau plus tard" +msgstr "Mettre à niveau ultérieurement" #: ../lib/Tails/IUK/Frontend.pm:396 #, perl-brace-format @@ -249,7 +249,7 @@ msgstr "Redémarrer maintenant" #: ../lib/Tails/IUK/Frontend.pm:628 msgid "Restart later" -msgstr "Redémarrer plus tard" +msgstr "Redémarrer ultérieurement" #: ../lib/Tails/IUK/Frontend.pm:639 msgid "Error while restarting the system" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/liveusb-creator] https://gitweb.torproject.org/translation.git/commit/?h=liveusb-creator
commit 99847236458648e4dd769cf356fe0da8f1624101 Author: Translation commit bot Date: Mon Jun 29 14:45:26 2020 + https://gitweb.torproject.org/translation.git/commit/?h=liveusb-creator --- fr/fr.po | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fr/fr.po b/fr/fr.po index db30e20e67..2c21798c1d 100644 --- a/fr/fr.po +++ b/fr/fr.po @@ -7,9 +7,9 @@ # bassmax, 2014 # Alex , 2014-2015 # AO , 2015,2018-2020 -# arpalord , 2012 +# 4c6ce9952c5260c09c52a2847598402a_b451c51 <586e15927c43f46ef10f0dcb0660dbc3_11384>, 2012 # arpalord , 2012 -# arpalord , 2012 +# 4c6ce9952c5260c09c52a2847598402a_b451c51 <586e15927c43f46ef10f0dcb0660dbc3_11384>, 2012 # bassmax, 2014 # 5boro , 2015 # BitingBird , 2015 @@ -45,7 +45,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-10-21 09:03+0200\n" -"PO-Revision-Date: 2020-03-02 19:39+\n" +"PO-Revision-Date: 2020-06-29 14:45+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -246,12 +246,12 @@ msgstr "Impossible de trouver gptmbr.bin de syslinux" #: ../tails_installer/creator.py:1302 #, python-format msgid "Reading extracted MBR from %s" -msgstr "Lecture du MBR extrait depuis %s" +msgstr "Lecture du MBR extrait de %s" #: ../tails_installer/creator.py:1306 #, python-format msgid "Could not read the extracted MBR from %(path)s" -msgstr "Impossible de lire le MBR extrait depuis %(path)s" +msgstr "Impossible de lire le MBR extrait de %(path)s" #: ../tails_installer/creator.py:1319 ../tails_installer/creator.py:1320 #, python-format @@ -336,7 +336,7 @@ msgid "" "Warning: This tool needs to be run as an Administrator. To do this, right " "click on the icon and open the Properties. Under the Compatibility tab, " "check the \"Run this program as an administrator\" box." -msgstr "Attention : cet outil doit être exécuté en tant quâAdministrateur. Pour cela, faites un clic droit sur lâicône et ouvrez les Propriétés. Dans lâonglet Compatibilité, cochez la case \"Exécuter ce programme en tant quâAdministrateur\"." +msgstr "Attention : Cet outil doit être exécuté en tant quâAdministrateur. Pour cela, faites un clic droit sur lâicône et ouvrez les Propriétés. Dans lâonglet Compatibilité, cochez la case « Exécuter ce programme en tant quâAdministrateur »." #: ../tails_installer/gui.py:381 msgid "Tails Installer" @@ -353,7 +353,7 @@ msgid "" "\n" "To upgrade Tails, do an automatic upgrade from Tails or a manual upgrade from Debian using a second USB stick.\n" "See the manual upgrade instructions" -msgstr "Pour installer Tails à partir de zéro, utilisez plutôt Disques de GNOME.\nVoir les instructions dâinstallation\n\nPour mettre Tails à jour, effectuez une mise à jour automatique dans Tails ou une mise à jour manuelle dans Debian en utilisant une seconde clé USB.\nVoir les instructions de mise à jour manuelle" +msgstr "Pour installer Tails à partir de zéro, utilisez plutôt Disques de GNOME.\nVoir les instructions dâinstallation\n\nPour mettre Tails à niveau, effectuez une mise à niveau automatique dans Tails ou une mise à niveau manuelle dans Debian en utilisant une seconde clé USB.\nVoir les instructions de mise à niveau manuelle" #: ../tails_installer/gui.py:450 ../data/tails-installer.ui.h:2 msgid "Clone the current Tails" @@ -365,11 +365,11 @@ msgstr "Utiliser une image ISO Tails téléchargée" #: ../tails_installer/gui.py:494 ../tails_installer/gui.py:815 msgid "Upgrade" -msgstr "Mise à jour" +msgstr "Mettre à niveau" #: ../tails_installer/gui.py:496 msgid "Manual Upgrade Instructions" -msgstr "Instructions de mise à jour manuelle" +msgstr "Instructions de mise à niveau manuelle" #: ../tails_installer/gui.py:498 msgid "https://tails.boum.org/upgrade/; @@ -416,21 +416,21 @@ msgid "" "The USB stick \"%(pretty_name)s\" is configured as non-removable by its " "manufacturer and Tails will fail to start from it. Please try installing on " "a different model." -msgstr "La clé USB \"%(pretty_name)s\" est configurée comme non amovible par son fabricant et le démarrage de Tails échouera sur cette clé. Veuillez tenter dâinstaller Tails sur un modèle différent." +msgstr "La clé USB « %(pretty_name)s » est configurée comme non amovible par son fabricant et le démarrage de Tails échouera sur cette clé. Veuillez tenter dâinstaller Tails sur un modèle différent." #: ../tails_installer/gui.py:618 #, python-format msgid "" "The device \"%(pretty_name)s\" is too small to install Tails (at least " "%(size)s GB is required)." -msgstr "Le périphérique \"%(pretty_name)s\" est trop petit pour installer Tails (au moins %(size)s Go sont exigés)." +msgstr "Le périphérique « %(pretty_name)s » est trop petit pour installer Tails (au moins %(size)s
[tor-commits] [translation/liveusb-creator_completed] https://gitweb.torproject.org/translation.git/commit/?h=liveusb-creator_completed
commit 94bfd60527c2c72d2e47f2ab425659c62fb7a9f1 Author: Translation commit bot Date: Mon Jun 29 14:45:33 2020 + https://gitweb.torproject.org/translation.git/commit/?h=liveusb-creator_completed --- fr/fr.po | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fr/fr.po b/fr/fr.po index 52f99c19ad..2c21798c1d 100644 --- a/fr/fr.po +++ b/fr/fr.po @@ -45,7 +45,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-10-21 09:03+0200\n" -"PO-Revision-Date: 2020-03-02 19:39+\n" +"PO-Revision-Date: 2020-06-29 14:45+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -246,12 +246,12 @@ msgstr "Impossible de trouver gptmbr.bin de syslinux" #: ../tails_installer/creator.py:1302 #, python-format msgid "Reading extracted MBR from %s" -msgstr "Lecture du MBR extrait depuis %s" +msgstr "Lecture du MBR extrait de %s" #: ../tails_installer/creator.py:1306 #, python-format msgid "Could not read the extracted MBR from %(path)s" -msgstr "Impossible de lire le MBR extrait depuis %(path)s" +msgstr "Impossible de lire le MBR extrait de %(path)s" #: ../tails_installer/creator.py:1319 ../tails_installer/creator.py:1320 #, python-format @@ -336,7 +336,7 @@ msgid "" "Warning: This tool needs to be run as an Administrator. To do this, right " "click on the icon and open the Properties. Under the Compatibility tab, " "check the \"Run this program as an administrator\" box." -msgstr "Attention : cet outil doit être exécuté en tant quâAdministrateur. Pour cela, faites un clic droit sur lâicône et ouvrez les Propriétés. Dans lâonglet Compatibilité, cochez la case \"Exécuter ce programme en tant quâAdministrateur\"." +msgstr "Attention : Cet outil doit être exécuté en tant quâAdministrateur. Pour cela, faites un clic droit sur lâicône et ouvrez les Propriétés. Dans lâonglet Compatibilité, cochez la case « Exécuter ce programme en tant quâAdministrateur »." #: ../tails_installer/gui.py:381 msgid "Tails Installer" @@ -353,7 +353,7 @@ msgid "" "\n" "To upgrade Tails, do an automatic upgrade from Tails or a manual upgrade from Debian using a second USB stick.\n" "See the manual upgrade instructions" -msgstr "Pour installer Tails à partir de zéro, utilisez plutôt Disques de GNOME.\nVoir les instructions dâinstallation\n\nPour mettre Tails à jour, effectuez une mise à jour automatique dans Tails ou une mise à jour manuelle dans Debian en utilisant une seconde clé USB.\nVoir les instructions de mise à jour manuelle" +msgstr "Pour installer Tails à partir de zéro, utilisez plutôt Disques de GNOME.\nVoir les instructions dâinstallation\n\nPour mettre Tails à niveau, effectuez une mise à niveau automatique dans Tails ou une mise à niveau manuelle dans Debian en utilisant une seconde clé USB.\nVoir les instructions de mise à niveau manuelle" #: ../tails_installer/gui.py:450 ../data/tails-installer.ui.h:2 msgid "Clone the current Tails" @@ -365,11 +365,11 @@ msgstr "Utiliser une image ISO Tails téléchargée" #: ../tails_installer/gui.py:494 ../tails_installer/gui.py:815 msgid "Upgrade" -msgstr "Mise à jour" +msgstr "Mettre à niveau" #: ../tails_installer/gui.py:496 msgid "Manual Upgrade Instructions" -msgstr "Instructions de mise à jour manuelle" +msgstr "Instructions de mise à niveau manuelle" #: ../tails_installer/gui.py:498 msgid "https://tails.boum.org/upgrade/; @@ -416,21 +416,21 @@ msgid "" "The USB stick \"%(pretty_name)s\" is configured as non-removable by its " "manufacturer and Tails will fail to start from it. Please try installing on " "a different model." -msgstr "La clé USB \"%(pretty_name)s\" est configurée comme non amovible par son fabricant et le démarrage de Tails échouera sur cette clé. Veuillez tenter dâinstaller Tails sur un modèle différent." +msgstr "La clé USB « %(pretty_name)s » est configurée comme non amovible par son fabricant et le démarrage de Tails échouera sur cette clé. Veuillez tenter dâinstaller Tails sur un modèle différent." #: ../tails_installer/gui.py:618 #, python-format msgid "" "The device \"%(pretty_name)s\" is too small to install Tails (at least " "%(size)s GB is required)." -msgstr "Le périphérique \"%(pretty_name)s\" est trop petit pour installer Tails (au moins %(size)s Go sont exigés)." +msgstr "Le périphérique « %(pretty_name)s » est trop petit pour installer Tails (au moins %(size)s Go sont exigés)." #: ../tails_installer/gui.py:631 #, python-format msgid "" "To upgrade device \"%(pretty_name)s\" from this Tails, you need to use a downloaded Tails ISO image:\n" "https://tails.boum.org/install/download; -msgstr "Pour mettre à jour le périphérique \"%(pretty_name)s\" depuis ce Tails, vous devez utiliser une image ISO Tails
[tor-commits] [translation/liveusb-creator_completed] https://gitweb.torproject.org/translation.git/commit/?h=liveusb-creator_completed
commit 31cc31938a823300e34cd9dca1632b7def67fcb3 Author: Translation commit bot Date: Mon Jun 29 15:15:29 2020 + https://gitweb.torproject.org/translation.git/commit/?h=liveusb-creator_completed --- fr/fr.po | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fr/fr.po b/fr/fr.po index 2c21798c1d..57e75373de 100644 --- a/fr/fr.po +++ b/fr/fr.po @@ -45,7 +45,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-10-21 09:03+0200\n" -"PO-Revision-Date: 2020-06-29 14:45+\n" +"PO-Revision-Date: 2020-06-29 14:55+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -90,7 +90,7 @@ msgstr "Erreur : le SHA1 de votre CD live est invalide. Vous pouvez exécuter c #: ../tails_installer/creator.py:341 msgid "Unknown ISO, skipping checksum verification" -msgstr "ISO inconnue, omission de la vérification de la somme de contrôle" +msgstr "ISO inconnue, la somme de contrôle ne sera pas vérifiée" #: ../tails_installer/creator.py:353 #, python-format @@ -260,7 +260,7 @@ msgstr "Réinitialisation du MBR de %s" #: ../tails_installer/creator.py:1325 msgid "Drive is a loopback, skipping MBR reset" -msgstr "Le périphérique est une boucle avec retour, omission de la réinitialisation du MBR" +msgstr "Le périphérique est une boucle, la réinitialisation du MBR sera ignorée" #: ../tails_installer/creator.py:1329 ../tails_installer/creator.py:1589 #, python-format @@ -512,7 +512,7 @@ msgstr "Impossible dâutiliser le fichier choisi. Vous devriez avoir plus de ch #: ../tails_installer/gui.py:878 #, python-format msgid "%(filename)s selected" -msgstr "%(filename)s sélectionné" +msgstr "%(filename)s est sélectionné" #: ../tails_installer/source.py:29 msgid "Unable to find LiveOS on ISO" @@ -544,7 +544,7 @@ msgstr "'%s' nâest pas un dossier" #: ../tails_installer/source.py:76 #, python-format msgid "Skipping '%(filename)s'" -msgstr "Omission de '%(filename)s'" +msgstr "'%(filename)s' sera ignoré" #: ../tails_installer/utils.py:55 #, python-format ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tor-and-https] https://gitweb.torproject.org/translation.git/commit/?h=tor-and-https
commit 9f492c7c5d67f1a6887088d1fa447be2ecd544d1 Author: Translation commit bot Date: Mon Jun 29 15:17:08 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tor-and-https --- fr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fr.po b/fr.po index 21a7851fef..dc99424414 100644 --- a/fr.po +++ b/fr.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Tor Project\n" "POT-Creation-Date: 2014-07-17 14:23+\n" -"PO-Revision-Date: 2019-06-28 21:48+\n" +"PO-Revision-Date: 2020-06-29 14:55+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/torcheck] https://gitweb.torproject.org/translation.git/commit/?h=torcheck
commit d4594e1cee5db7277e837fbc1f7bc29e2ac17bf5 Author: Translation commit bot Date: Mon Jun 29 15:17:39 2020 + https://gitweb.torproject.org/translation.git/commit/?h=torcheck --- fr/torcheck.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fr/torcheck.po b/fr/torcheck.po index 2311fec364..47d4a83e45 100644 --- a/fr/torcheck.po +++ b/fr/torcheck.po @@ -4,7 +4,7 @@ # Translators: # bassmax, 2013-2015 # AO , 2018-2019 -# arpalord , 2012 +# 4c6ce9952c5260c09c52a2847598402a_b451c51 <586e15927c43f46ef10f0dcb0660dbc3_11384>, 2012 # BitingBird , 2014 # Emma Peel, 2019 # fanjoe , 2014 @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: Tor Project\n" "POT-Creation-Date: 2012-02-16 20:28+PDT\n" -"PO-Revision-Date: 2019-12-07 20:08+\n" +"PO-Revision-Date: 2020-06-29 14:55+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-iuk_completed] https://gitweb.torproject.org/translation.git/commit/?h=tails-iuk_completed
commit 88110635ff11ff1ca8dde3a517043700f1254687 Author: Translation commit bot Date: Mon Jun 29 15:16:39 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-iuk_completed --- fr.po | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fr.po b/fr.po index 614a345522..1941fde4c3 100644 --- a/fr.po +++ b/fr.po @@ -36,7 +36,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: Tails developers \n" "POT-Creation-Date: 2019-11-28 16:51+0100\n" -"PO-Revision-Date: 2020-06-29 14:41+\n" +"PO-Revision-Date: 2020-06-29 14:57+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -63,11 +63,11 @@ msgid "" "Check your network connection, and restart Tails to try upgrading again.\n" "\n" "If the problem persists, go to file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html" -msgstr "Impossible de déterminer si une mise à niveau est disponible sur notre site web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à niveau.\n\nSi le problème persiste, allez à file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" +msgstr "Impossible de déterminer si une mise à niveau est disponible sur notre site Web.\n\nVérifiez votre connexion réseau et redémarrez Tails pour essayer à nouveau de mettre à niveau.\n\nSi le problème persiste, allez à file:///usr/share/doc/tails/website/doc/upgrade/error/check.fr.html" #: ../lib/Tails/IUK/Frontend.pm:236 msgid "no automatic upgrade is available from our website for this version" -msgstr "aucune mise à niveau automatique nâest disponible sur notre site web pour cette version" +msgstr "aucune mise à niveau automatique nâest disponible sur notre site Web pour cette version" #: ../lib/Tails/IUK/Frontend.pm:242 msgid "your device was not created using a USB image or Tails Installer" @@ -147,7 +147,7 @@ msgstr "Mettre à niveau maintenant" #: ../lib/Tails/IUK/Frontend.pm:388 msgid "Upgrade later" -msgstr "Mettre à niveau plus tard" +msgstr "Mettre à niveau ultérieurement" #: ../lib/Tails/IUK/Frontend.pm:396 #, perl-brace-format @@ -249,7 +249,7 @@ msgstr "Redémarrer maintenant" #: ../lib/Tails/IUK/Frontend.pm:628 msgid "Restart later" -msgstr "Redémarrer plus tard" +msgstr "Redémarrer ultérieurement" #: ../lib/Tails/IUK/Frontend.pm:639 msgid "Error while restarting the system" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-greeter-2] https://gitweb.torproject.org/translation.git/commit/?h=tails-greeter-2
commit 79f76cdc892bf5455ee4d658b6e08676ca71d151 Author: Translation commit bot Date: Mon Jun 29 15:16:46 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-greeter-2 --- fr/fr.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fr/fr.po b/fr/fr.po index ff91688f7f..ce486b8a41 100644 --- a/fr/fr.po +++ b/fr/fr.po @@ -111,8 +111,8 @@ msgid "" "You will configure the Tor bridge and local proxy later on after connecting " "to a network." msgstr "" -"Vous configurerez le pont Tor et le mandataire local plus tard, après vous " -"être connecté à un réseau." +"Vous configurerez le pont Tor et le mandataire local ultérieurement, après " +"vous être connecté à un réseau." #: ../data/greeter.ui.h:19 msgid "Welcome to Tails!" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tor-and-https_completed] https://gitweb.torproject.org/translation.git/commit/?h=tor-and-https_completed
commit 1b4b2e792c5f7464a58aef36e2aed73ba8431231 Author: Translation commit bot Date: Mon Jun 29 15:17:14 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tor-and-https_completed --- fr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fr.po b/fr.po index 21a7851fef..dc99424414 100644 --- a/fr.po +++ b/fr.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Tor Project\n" "POT-Creation-Date: 2014-07-17 14:23+\n" -"PO-Revision-Date: 2019-06-28 21:48+\n" +"PO-Revision-Date: 2020-06-29 14:55+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-persistence-setup] https://gitweb.torproject.org/translation.git/commit/?h=tails-persistence-setup
commit 5ce8dde612de7299788c4bb181a72a760b70da6d Author: Translation commit bot Date: Mon Jun 29 15:16:55 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-persistence-setup --- fr/fr.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fr/fr.po b/fr/fr.po index cfd8a3173b..4e0513250c 100644 --- a/fr/fr.po +++ b/fr/fr.po @@ -36,7 +36,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: Tails developers \n" "POT-Creation-Date: 2019-10-21 09:06+0200\n" -"PO-Revision-Date: 2020-06-29 14:25+\n" +"PO-Revision-Date: 2020-06-29 14:55+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -200,11 +200,11 @@ msgstr "Profils Pidgin et trousseau OTR" #: ../lib/Tails/Persistence/Configuration/Presets.pm:195 msgid "SSH Client" -msgstr "Client SSH" +msgstr "Client SSH" #: ../lib/Tails/Persistence/Configuration/Presets.pm:197 msgid "SSH keys, configuration and known hosts" -msgstr "Clés, configuration et hôtes connus SSH" +msgstr "Clés, configuration et hôtes connus SSH" #: ../lib/Tails/Persistence/Configuration/Presets.pm:210 msgid "Dotfiles" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-persistence-setup_completed] https://gitweb.torproject.org/translation.git/commit/?h=tails-persistence-setup_completed
commit 82d42765460c4c55536055155573dc1febc1eab9 Author: Translation commit bot Date: Mon Jun 29 15:16:58 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-persistence-setup_completed --- fr/fr.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fr/fr.po b/fr/fr.po index cfd8a3173b..4e0513250c 100644 --- a/fr/fr.po +++ b/fr/fr.po @@ -36,7 +36,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: Tails developers \n" "POT-Creation-Date: 2019-10-21 09:06+0200\n" -"PO-Revision-Date: 2020-06-29 14:25+\n" +"PO-Revision-Date: 2020-06-29 14:55+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -200,11 +200,11 @@ msgstr "Profils Pidgin et trousseau OTR" #: ../lib/Tails/Persistence/Configuration/Presets.pm:195 msgid "SSH Client" -msgstr "Client SSH" +msgstr "Client SSH" #: ../lib/Tails/Persistence/Configuration/Presets.pm:197 msgid "SSH keys, configuration and known hosts" -msgstr "Clés, configuration et hôtes connus SSH" +msgstr "Clés, configuration et hôtes connus SSH" #: ../lib/Tails/Persistence/Configuration/Presets.pm:210 msgid "Dotfiles" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tbmanual-contentspot] https://gitweb.torproject.org/translation.git/commit/?h=tbmanual-contentspot
commit 0dd9daec05a843f24b768e2929e586a03122e856 Author: Translation commit bot Date: Mon Jun 29 15:46:59 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tbmanual-contentspot --- contents+pt-PT.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contents+pt-PT.po b/contents+pt-PT.po index c757f4a176..7b018c78da 100644 --- a/contents+pt-PT.po +++ b/contents+pt-PT.po @@ -3,9 +3,9 @@ # Emma Peel, 2019 # erinm, 2020 # Rui , 2020 -# Manuela Silva , 2020 # Hugo Costa , 2020 # A Russo , 2020 +# Manuela Silva , 2020 # msgid "" msgstr "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-04-12 08:00+CET\n" "PO-Revision-Date: 2018-11-14 12:31+\n" -"Last-Translator: A Russo , 2020\n" +"Last-Translator: Manuela Silva , 2020\n" "Language-Team: Portuguese (Portugal) (https://www.transifex.com/otf/teams/1519/pt_PT/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1137,7 +1137,7 @@ msgstr "" #: https//tb-manual.torproject.org/bridges/ #: (content/bridges/contents+en.lrtopic.body) msgid "Click \"Connect\" to save your settings." -msgstr "Carregue em \"Ligar\" para salvar a suas Configurações; Definições." +msgstr "Clique em \"Ligar\" para guardar a suas definições." #: https//tb-manual.torproject.org/bridges/ #: (content/bridges/contents+en.lrtopic.body) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/tails-misc_release] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release
commit 87561c33cac5202723d20453db46f3e7f81bbb58 Author: Translation commit bot Date: Mon Jun 29 14:16:33 2020 + https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release --- fr.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fr.po b/fr.po index 235c33bc54..6559a370c7 100644 --- a/fr.po +++ b/fr.po @@ -41,7 +41,7 @@ msgstr "" "Project-Id-Version: Tor Project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-06-19 19:37+0200\n" -"PO-Revision-Date: 2020-06-29 00:35+\n" +"PO-Revision-Date: 2020-06-29 14:07+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" @@ -438,7 +438,7 @@ msgstr "" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:338 msgid "Enabled" -msgstr "" +msgstr "Activé" #: config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py:340 msgid "Disabled (default)" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [translation/torcheck_completed] https://gitweb.torproject.org/translation.git/commit/?h=torcheck_completed
commit 85d8f807e2da2b37cfaf2f31f8a6b773f91b7970 Author: Translation commit bot Date: Mon Jun 29 15:17:43 2020 + https://gitweb.torproject.org/translation.git/commit/?h=torcheck_completed --- fr/torcheck.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fr/torcheck.po b/fr/torcheck.po index 72a14c773a..47d4a83e45 100644 --- a/fr/torcheck.po +++ b/fr/torcheck.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: Tor Project\n" "POT-Creation-Date: 2012-02-16 20:28+PDT\n" -"PO-Revision-Date: 2019-12-07 20:08+\n" +"PO-Revision-Date: 2020-06-29 14:55+\n" "Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n" "MIME-Version: 1.0\n" ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/maint-0.4.3] Add tests for get_first_advertised_{addr, port}_by_type_af()
commit 6ffe073db741afcee90d078a30c680b87b7ad327 Author: Nick Mathewson Date: Thu Mar 19 09:17:09 2020 -0400 Add tests for get_first_advertised_{addr,port}_by_type_af() --- src/app/config/config.c | 5 +--- src/app/config/config.h | 4 +++ src/test/test_config.c | 66 + 3 files changed, 71 insertions(+), 4 deletions(-) diff --git a/src/app/config/config.c b/src/app/config/config.c index cbca7d389..aa5c92e4e 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -809,9 +809,6 @@ static int normalize_nickname_list(config_line_t **normalized_out, char **msg); static char *get_bindaddr_from_transport_listen_line(const char *line, const char *transport); -static int parse_ports(or_options_t *options, int validate_only, - char **msg_out, int *n_ports_out, - int *world_writable_control_socket); static int check_server_ports(const smartlist_t *ports, const or_options_t *options, int *num_low_ports_out); @@ -7370,7 +7367,7 @@ count_real_listeners(const smartlist_t *ports, int listenertype, * If validate_only is false, set configured_client_ports to the * new list of ports parsed from options. **/ -static int +STATIC int parse_ports(or_options_t *options, int validate_only, char **msg, int *n_ports_out, int *world_writable_control_socket) diff --git a/src/app/config/config.h b/src/app/config/config.h index 301faf706..6852d352d 100644 --- a/src/app/config/config.h +++ b/src/app/config/config.h @@ -295,6 +295,10 @@ STATIC int open_and_add_file_log(const log_severity_list_t *severity, const char *fname, int truncate_log); +STATIC int parse_ports(or_options_t *options, int validate_only, + char **msg, int *n_ports_out, + int *world_writable_control_socket); + #endif /* defined(CONFIG_PRIVATE) */ #endif /* !defined(TOR_CONFIG_H) */ diff --git a/src/test/test_config.c b/src/test/test_config.c index 855725411..d648666f6 100644 --- a/src/test/test_config.c +++ b/src/test/test_config.c @@ -4860,6 +4860,71 @@ test_config_parse_port_config__ports__server_options(void *data) config_free_lines(config_port_valid); config_port_valid = NULL; } +static void +test_config_get_first_advertised(void *data) +{ + (void)data; + int r, w=0, n=0; + char *msg=NULL; + or_options_t *opts = options_new(); + int port; + const tor_addr_t *addr; + + // no ports are configured? We get NULL. + port = get_first_advertised_port_by_type_af(CONN_TYPE_OR_LISTENER, + AF_INET); + tt_int_op(port, OP_EQ, 0); + addr = get_first_advertised_addr_by_type_af(CONN_TYPE_OR_LISTENER, + AF_INET); + tt_ptr_op(addr, OP_EQ, NULL); + + port = get_first_advertised_port_by_type_af(CONN_TYPE_OR_LISTENER, + AF_INET6); + tt_int_op(port, OP_EQ, 0); + addr = get_first_advertised_addr_by_type_af(CONN_TYPE_OR_LISTENER, + AF_INET6); + tt_ptr_op(addr, OP_EQ, NULL); + + config_line_append(>ORPort_lines, "ORPort", "[1234::5678]:8080"); + config_line_append(>ORPort_lines, "ORPort", + "1.2.3.4: noadvertise"); + config_line_append(>ORPort_lines, "ORPort", + "5.6.7.8:9911 nolisten"); + + r = parse_ports(opts, 0, , , ); + tt_assert(r == 0); + + // UNSPEC gets us nothing. + port = get_first_advertised_port_by_type_af(CONN_TYPE_OR_LISTENER, + AF_UNSPEC); + tt_int_op(port, OP_EQ, 0); + addr = get_first_advertised_addr_by_type_af(CONN_TYPE_OR_LISTENER, + AF_UNSPEC); + tt_ptr_op(addr, OP_EQ, NULL); + + // Try AF_INET. + port = get_first_advertised_port_by_type_af(CONN_TYPE_OR_LISTENER, + AF_INET); + tt_int_op(port, OP_EQ, 9911); + addr = get_first_advertised_addr_by_type_af(CONN_TYPE_OR_LISTENER, + AF_INET); + tt_ptr_op(addr, OP_NE, NULL); + tt_str_op(fmt_addrport(addr,port), OP_EQ, "5.6.7.8:9911"); + + // Try AF_INET6 + port = get_first_advertised_port_by_type_af(CONN_TYPE_OR_LISTENER, + AF_INET6); + tt_int_op(port, OP_EQ, 8080); + addr = get_first_advertised_addr_by_type_af(CONN_TYPE_OR_LISTENER, + AF_INET6); + tt_ptr_op(addr, OP_NE, NULL); + tt_str_op(fmt_addrport(addr,port), OP_EQ, "[1234::5678]:8080"); + + done: + or_options_free(opts); + config_free_all(); +} + static void test_config_parse_log_severity(void *data) { @@
[tor-commits] [tor/maint-0.4.3] Merge branch 'bug32588_035' into bug32588_041
commit 2962c32b7a60b78f4d470bf063f8b1454b56506b Merge: 42ea03eb7 96ca14d98 Author: teor Date: Sat Mar 21 03:50:36 2020 +1000 Merge branch 'bug32588_035' into bug32588_041 Merge tests from maint-0.4.1 with new tests from bug32588_035 in test_router.c. changes/bug32588 | 4 ++ src/app/config/config.c| 5 +- src/app/config/config.h| 4 ++ src/feature/relay/router.c | 77 ++--- src/feature/relay/router.h | 2 + src/test/test_config.c | 66 + src/test/test_router.c | 117 + 7 files changed, 243 insertions(+), 32 deletions(-) diff --cc src/test/test_router.c index 5477ab51e,e0d3adfdb..e0dd607b8 --- a/src/test/test_router.c +++ b/src/test/test_router.c @@@ -8,19 -8,14 +8,21 @@@ **/ #define CONFIG_PRIVATE + #define CONNECTION_PRIVATE +#define ROUTER_PRIVATE + #include "core/or/or.h" #include "app/config/config.h" #include "core/mainloop/mainloop.h" + #include "core/mainloop/connection.h" #include "feature/hibernate/hibernate.h" +#include "feature/nodelist/networkstatus.h" +#include "feature/nodelist/networkstatus_st.h" +#include "feature/nodelist/node_st.h" +#include "feature/nodelist/nodelist.h" #include "feature/nodelist/routerinfo_st.h" #include "feature/nodelist/routerlist.h" +#include "feature/nodelist/routerstatus_st.h" #include "feature/relay/router.h" #include "feature/stats/rephist.h" #include "lib/crypt_ops/crypto_curve25519.h" @@@ -243,254 -237,124 +247,367 @@@ test_router_check_descriptor_bandwidth_ UNMOCK(we_are_hibernating); } +static networkstatus_t *mock_ns = NULL; +static networkstatus_t * +mock_networkstatus_get_live_consensus(time_t now) +{ + (void)now; + return mock_ns; +} + +static routerstatus_t *mock_rs = NULL; +static const routerstatus_t * +mock_networkstatus_vote_find_entry(networkstatus_t *ns, const char *digest) +{ + (void)ns; + (void)digest; + return mock_rs; +} + +static void +test_router_mark_if_too_old(void *arg) +{ + (void)arg; + time_t now = approx_time(); + MOCK(networkstatus_get_live_consensus, + mock_networkstatus_get_live_consensus); + MOCK(networkstatus_vote_find_entry, mock_networkstatus_vote_find_entry); + + routerstatus_t rs; + networkstatus_t ns; + memset(, 0, sizeof(rs)); + memset(, 0, sizeof(ns)); + mock_ns = + mock_ns->valid_after = now-3600; + mock_rs = + mock_rs->published_on = now - 10; + + // no reason to mark this time. + desc_clean_since = now-10; + desc_dirty_reason = NULL; + mark_my_descriptor_dirty_if_too_old(now); + tt_i64_op(desc_clean_since, OP_EQ, now-10); + + // Doesn't appear in consensus? Still don't mark it. + mock_ns = NULL; + mark_my_descriptor_dirty_if_too_old(now); + tt_i64_op(desc_clean_since, OP_EQ, now-10); + mock_ns = + + // No new descriptor in a long time? Mark it. + desc_clean_since = now - 3600 * 96; + mark_my_descriptor_dirty_if_too_old(now); + tt_i64_op(desc_clean_since, OP_EQ, 0); + tt_str_op(desc_dirty_reason, OP_EQ, "time for new descriptor"); + + // Version in consensus published a long time ago? We won't mark it + // if it's been clean for only a short time. + desc_clean_since = now - 10; + desc_dirty_reason = NULL; + mock_rs->published_on = now - 3600 * 96; + mark_my_descriptor_dirty_if_too_old(now); + tt_i64_op(desc_clean_since, OP_EQ, now - 10); + + // ... but if it's been clean a while, we mark. + desc_clean_since = now - 2 * 3600; + mark_my_descriptor_dirty_if_too_old(now); + tt_i64_op(desc_clean_since, OP_EQ, 0); + tt_str_op(desc_dirty_reason, OP_EQ, +"version listed in consensus is quite old"); + + // same deal if we're marked stale. + desc_clean_since = now - 2 * 3600; + desc_dirty_reason = NULL; + mock_rs->published_on = now - 10; + mock_rs->is_staledesc = 1; + mark_my_descriptor_dirty_if_too_old(now); + tt_i64_op(desc_clean_since, OP_EQ, 0); + tt_str_op(desc_dirty_reason, OP_EQ, +"listed as stale in consensus"); + + // same deal if we're absent from the consensus. + desc_clean_since = now - 2 * 3600; + desc_dirty_reason = NULL; + mock_rs = NULL; + mark_my_descriptor_dirty_if_too_old(now); + tt_i64_op(desc_clean_since, OP_EQ, 0); + tt_str_op(desc_dirty_reason, OP_EQ, +"not listed in consensus"); + + done: + UNMOCK(networkstatus_get_live_consensus); + UNMOCK(networkstatus_vote_find_entry); +} + +static node_t fake_node; +static const node_t * +mock_node_get_by_nickname(const char *name, unsigned flags) +{ + (void)flags; + if (!strcasecmp(name, "crumpet")) +return _node; + else +return NULL; +} + +static void +test_router_get_my_family(void *arg) +{ + (void)arg; + or_options_t *options = options_new(); + smartlist_t *sl = NULL; + char *join = NULL; + // Overwrite the result of
[tor-commits] [tor/maint-0.4.3] Merge remote-tracking branch 'tor-github/pr/1829/head' into maint-0.4.3
commit 3008255aea7c0c0ca4aa368e2fc975b932241ee3 Merge: 183d0d30d 52f61ec83 Author: Nick Mathewson Date: Mon Jun 29 12:56:39 2020 -0400 Merge remote-tracking branch 'tor-github/pr/1829/head' into maint-0.4.3 changes/bug32588 | 4 ++ src/app/config/config.c| 5 +- src/app/config/config.h| 4 ++ src/feature/relay/router.c | 77 ++--- src/feature/relay/router.h | 2 + src/test/test_config.c | 66 + src/test/test_router.c | 117 + 7 files changed, 243 insertions(+), 32 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/maint-0.4.3] Merge branch 'bug32588_041' into bug32588_042
commit 5e2f31f177d106388021f18c9077b656bf494fec Merge: 3aa855dc6 2962c32b7 Author: teor Date: Sat Mar 21 03:52:32 2020 +1000 Merge branch 'bug32588_041' into bug32588_042 changes/bug32588 | 4 ++ src/app/config/config.c| 5 +- src/app/config/config.h| 4 ++ src/feature/relay/router.c | 77 ++--- src/feature/relay/router.h | 2 + src/test/test_config.c | 66 + src/test/test_router.c | 117 + 7 files changed, 243 insertions(+), 32 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge branch 'maint-0.4.3' into maint-0.4.4
commit 41a424390107f62a754f7344f23ffe9958e00c6d Merge: 2c61f22e4 3008255ae Author: Nick Mathewson Date: Mon Jun 29 12:56:50 2020 -0400 Merge branch 'maint-0.4.3' into maint-0.4.4 ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/maint-0.4.3] Merge branch 'bug32588_042' into bug32588_043
commit 52f61ec83ea8fd2641ca8cae111b2437d8114aa1 Merge: e380396d4 5e2f31f17 Author: teor Date: Sat Mar 21 04:01:00 2020 +1000 Merge branch 'bug32588_042' into bug32588_043 Merge static function declaration deletions from bug32588_042 and maint-0.4.3 in app/config/config.c. changes/bug32588 | 4 ++ src/app/config/config.c| 5 +- src/app/config/config.h| 4 ++ src/feature/relay/router.c | 77 ++--- src/feature/relay/router.h | 2 + src/test/test_config.c | 66 + src/test/test_router.c | 117 + 7 files changed, 243 insertions(+), 32 deletions(-) diff --cc src/app/config/config.c index bbf984ad0,126256843..d79cd8cb7 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@@ -819,13 -813,24 +819,10 @@@ static const config_deprecation_t optio #ifdef _WIN32 static char *get_windows_conf_root(void); #endif -static int options_act_reversible(const or_options_t *old_options, char **msg); -static int options_transition_allowed(const or_options_t *old, - const or_options_t *new, - char **msg); -static int options_transition_affects_workers( - const or_options_t *old_options, const or_options_t *new_options); -static int options_transition_affects_descriptor( - const or_options_t *old_options, const or_options_t *new_options); -static int options_transition_affects_dirauth_timing( - const or_options_t *old_options, const or_options_t *new_options); -static int normalize_nickname_list(config_line_t **normalized_out, - const config_line_t *lst, const char *name, - char **msg); -static char *get_bindaddr_from_transport_listen_line(const char *line, - const char *transport); -static int check_server_ports(const smartlist_t *ports, - const or_options_t *options, - int *num_low_ports_out); + +static int options_check_transition_cb(const void *old, + const void *new, + char **msg); - static int parse_ports(or_options_t *options, int validate_only, - char **msg_out, int *n_ports_out, - int *world_writable_control_socket); static int validate_data_directories(or_options_t *options); static int write_configuration_file(const char *fname, const or_options_t *options); diff --cc src/app/config/config.h index 04d877e9d,2ed64fab3..311e27917 --- a/src/app/config/config.h +++ b/src/app/config/config.h @@@ -302,23 -291,11 +302,27 @@@ STATIC uint64_t compute_real_max_mem_in STATIC int open_and_add_file_log(const log_severity_list_t *severity, const char *fname, int truncate_log); +STATIC int options_init_logs(const or_options_t *old_options, + const or_options_t *options, int validate_only); + +STATIC int options_create_directories(char **msg_out); +struct log_transaction_t; +STATIC struct log_transaction_t *options_start_log_transaction( + const or_options_t *old_options, + char **msg_out); +STATIC void options_commit_log_transaction(struct log_transaction_t *xn); +STATIC void options_rollback_log_transaction(struct log_transaction_t *xn); + +#ifdef TOR_UNIT_TESTS +int options_validate(const or_options_t *old_options, + or_options_t *options, + char **msg); +#endif + STATIC int parse_ports(or_options_t *options, int validate_only, +char **msg, int *n_ports_out, +int *world_writable_control_socket); + #endif /* defined(CONFIG_PRIVATE) */ #endif /* !defined(TOR_CONFIG_H) */ ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/maint-0.4.3] Add a test for the localhost case.
commit 96ca14d98924fec8a18a592c491900a9142f6e71 Author: Nick Mathewson Date: Thu Mar 19 09:50:36 2020 -0400 Add a test for the localhost case. --- src/test/test_router.c | 46 +- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/test/test_router.c b/src/test/test_router.c index 8c772c681..e0d3adfdb 100644 --- a/src/test/test_router.c +++ b/src/test/test_router.c @@ -248,7 +248,6 @@ static void test_router_get_advertised_or_port(void *arg) { (void)arg; - // uint16_t port; int r, w=0, n=0; char *msg=NULL; or_options_t *opts = options_new(); @@ -305,6 +304,50 @@ test_router_get_advertised_or_port(void *arg) UNMOCK(get_connection_array); } +static void +test_router_get_advertised_or_port_localhost(void *arg) +{ + (void)arg; + int r, w=0, n=0; + char *msg=NULL; + or_options_t *opts = options_new(); + tor_addr_port_t ipv6; + + // Set up a couple of configured ports on localhost. + config_line_append(>ORPort_lines, "ORPort", "[::1]:"); + config_line_append(>ORPort_lines, "ORPort", "127.0.0.1:"); + r = parse_ports(opts, 0, , , ); + tt_assert(r == 0); + + // We should refuse to advertise them, since we have default dirauths. + router_get_advertised_ipv6_or_ap(opts, ); + tt_str_op(fmt_addrport(, ipv6.port), OP_EQ, "[::]:0"); + // But the lower-level function should still report the correct value + tt_int_op(, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET6)); + + // The IPv4 checks are done in resolve_my_address(), which doesn't use + // ORPorts so we can't test them here. (See #33681.) Both these lower-level + // functions should still report the correct value. + tt_int_op(, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET)); + tt_int_op(, OP_EQ, router_get_advertised_or_port(opts)); + + // Now try with a fake authority set up. + config_line_append(>DirAuthorities, "DirAuthority", + "127.0.0.1:1066 " + ""); + + tt_int_op(, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET6)); + router_get_advertised_ipv6_or_ap(opts, ); + tt_str_op(fmt_addrport(, ipv6.port), OP_EQ, "[::1]:"); + + tt_int_op(, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET)); + tt_int_op(, OP_EQ, router_get_advertised_or_port(opts)); + + done: + or_options_free(opts); + config_free_all(); +} + #define ROUTER_TEST(name, flags) \ { #name, test_router_ ## name, flags, NULL, NULL } @@ -312,5 +355,6 @@ struct testcase_t router_tests[] = { ROUTER_TEST(check_descriptor_bandwidth_changed, TT_FORK), ROUTER_TEST(dump_router_to_string_no_bridge_distribution_method, TT_FORK), ROUTER_TEST(get_advertised_or_port, TT_FORK), + ROUTER_TEST(get_advertised_or_port_localhost, TT_FORK), END_OF_TESTCASES }; ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/maint-0.4.3] Extend test to handle router_get_advertised_ipv6_or_ap
commit 1251265a0f49c7446f3e00854eda8091e84d9e96 Author: Nick Mathewson Date: Thu Mar 19 09:44:27 2020 -0400 Extend test to handle router_get_advertised_ipv6_or_ap --- src/test/test_router.c | 33 +++-- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/src/test/test_router.c b/src/test/test_router.c index 5699d5472..8c772c681 100644 --- a/src/test/test_router.c +++ b/src/test/test_router.c @@ -253,28 +253,49 @@ test_router_get_advertised_or_port(void *arg) char *msg=NULL; or_options_t *opts = options_new(); listener_connection_t *listener = NULL; + tor_addr_port_t ipv6; + + // Test one failing case of router_get_advertised_ipv6_or_ap(). + router_get_advertised_ipv6_or_ap(opts, ); + tt_str_op(fmt_addrport(, ipv6.port), OP_EQ, "[::]:0"); + + // And one failing case of router_get_advertised_or_port(). + tt_int_op(0, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET)); + tt_int_op(0, OP_EQ, router_get_advertised_or_port(opts)); // Set up a couple of configured ports. - config_line_append(>ORPort_lines, "ORPort", "[1234::5678]:"); - config_line_append(>ORPort_lines, "ORPort", "5.6.7.8:auto"); + config_line_append(>ORPort_lines, "ORPort", "[1234::5678]:auto"); + config_line_append(>ORPort_lines, "ORPort", "5.6.7.8:"); r = parse_ports(opts, 0, , , ); tt_assert(r == 0); // There are no listeners, so the "auto" case will turn up no results. - tt_int_op(0, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET)); + tt_int_op(0, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET6)); + router_get_advertised_ipv6_or_ap(opts, ); + tt_str_op(fmt_addrport(, ipv6.port), OP_EQ, "[::]:0"); // This will return the matching value from the configured port. - tt_int_op(, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET6)); + tt_int_op(, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET)); + tt_int_op(, OP_EQ, router_get_advertised_or_port(opts)); // Now set up a dummy listener. MOCK(get_connection_array, mock_get_connection_array); fake_connection_array = smartlist_new(); - listener = listener_connection_new(CONN_TYPE_OR_LISTENER, AF_INET); + listener = listener_connection_new(CONN_TYPE_OR_LISTENER, AF_INET6); TO_CONN(listener)->port = 54321; smartlist_add(fake_connection_array, TO_CONN(listener)); // We should get a port this time. - tt_int_op(54321, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET)); + tt_int_op(54321, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET6)); + + // Test one succeeding case of router_get_advertised_ipv6_or_ap(). + router_get_advertised_ipv6_or_ap(opts, ); + tt_str_op(fmt_addrport(, ipv6.port), OP_EQ, +"[1234::5678]:54321"); + + // This will return the matching value from the configured port. + tt_int_op(, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET)); + tt_int_op(, OP_EQ, router_get_advertised_or_port(opts)); done: or_options_free(opts); ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/maint-0.4.3] router: Stop advertising incorrect auto IPv6 ORPorts
commit 861337fd6d286329537e07f667602992b82e921f Author: teor Date: Fri Dec 20 14:30:51 2019 +1000 router: Stop advertising incorrect auto IPv6 ORPorts When IPv6 ORPorts are set to "auto", tor relays and bridges would advertise an incorrect port in their descriptor. This may be a low-severity memory safety issue, because the published port number may be derived from uninitialised or out-of-bounds memory reads. Fixes bug 32588; bugfix on 0.2.3.9-alpha. --- changes/bug32588 | 4 +++ src/feature/relay/router.c | 76 +- src/feature/relay/router.h | 2 ++ 3 files changed, 54 insertions(+), 28 deletions(-) diff --git a/changes/bug32588 b/changes/bug32588 new file mode 100644 index 0..f31f2ce1a --- /dev/null +++ b/changes/bug32588 @@ -0,0 +1,4 @@ + o Minor bugfixes (relays): +- Stop advertising incorrect IPv6 ORPorts in relay and bridge descriptors, + when the IPv6 port was configured as "auto". + Fixes bug 32588; bugfix on 0.2.3.9-alpha diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index e91550a78..760daa249 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -1433,6 +1433,49 @@ router_get_advertised_or_port_by_af(const or_options_t *options, return port; } +/** As router_get_advertised_or_port(), but returns the IPv6 address and + * port in ipv6_ap_out, which must not be NULL. Returns a null address and + * zero port, if no ORPort is found. */ +void +router_get_advertised_ipv6_or_ap(const or_options_t *options, + tor_addr_port_t *ipv6_ap_out) +{ + /* Bug in calling function, we can't return a sensible result, and it + * shouldn't use the NULL pointer once we return. */ + tor_assert(ipv6_ap_out); + + /* If there is no valid IPv6 ORPort, return a null address and port. */ + tor_addr_make_null(_ap_out->addr, AF_INET6); + ipv6_ap_out->port = 0; + + const tor_addr_t *addr = get_first_advertised_addr_by_type_af( + CONN_TYPE_OR_LISTENER, + AF_INET6); + const uint16_t port = router_get_advertised_or_port_by_af( + options, + AF_INET6); + + if (!addr || port == 0) { +log_info(LD_CONFIG, "There is no advertised IPv6 ORPort."); +return; + } + + /* Like IPv4, if the relay is configured using the default + * authorities, disallow internal IPs. Otherwise, allow them. */ + const int default_auth = using_default_dir_authorities(options); + if (! tor_addr_is_internal(addr, 0) || ! default_auth) { +tor_addr_copy(_ap_out->addr, addr); +ipv6_ap_out->port = port; + } else { +char addrbuf[TOR_ADDR_BUF_LEN]; +log_warn(LD_CONFIG, + "Unable to use configured IPv6 address \"%s\" in a " + "descriptor. Skipping it. " + "Try specifying a globally reachable address explicitly.", + tor_addr_to_str(addrbuf, addr, sizeof(addrbuf), 1)); + } +} + /** Return the port that we should advertise as our DirPort; * this is one of three possibilities: * The one that is passed as dirport if the DirPort option is 0, or @@ -1848,34 +1891,11 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e) sizeof(curve25519_public_key_t)); /* For now, at most one IPv6 or-address is being advertised. */ - { -const port_cfg_t *ipv6_orport = NULL; -SMARTLIST_FOREACH_BEGIN(get_configured_ports(), const port_cfg_t *, p) { - if (p->type == CONN_TYPE_OR_LISTENER && - ! p->server_cfg.no_advertise && - ! p->server_cfg.bind_ipv4_only && - tor_addr_family(>addr) == AF_INET6) { -/* Like IPv4, if the relay is configured using the default - * authorities, disallow internal IPs. Otherwise, allow them. */ -const int default_auth = using_default_dir_authorities(options); -if (! tor_addr_is_internal(>addr, 0) || ! default_auth) { - ipv6_orport = p; - break; -} else { - char addrbuf[TOR_ADDR_BUF_LEN]; - log_warn(LD_CONFIG, - "Unable to use configured IPv6 address \"%s\" in a " - "descriptor. Skipping it. " - "Try specifying a globally reachable address explicitly.", - tor_addr_to_str(addrbuf, >addr, sizeof(addrbuf), 1)); -} - } -} SMARTLIST_FOREACH_END(p); -if (ipv6_orport) { - tor_addr_copy(>ipv6_addr, _orport->addr); - ri->ipv6_orport = ipv6_orport->port; -} - } + tor_addr_port_t ipv6_orport; + router_get_advertised_ipv6_or_ap(options, _orport); + /* If there is no valud IPv6 ORPort, the address and port are null. */ + tor_addr_copy(>ipv6_addr, _orport.addr); + ri->ipv6_orport = ipv6_orport.port;
[tor-commits] [tor/maint-0.4.3] Add a test for router_get_advertised_or_port_by_af().
commit 1ba79d4567c95f75daf171878faaa07b78d89130 Author: Nick Mathewson Date: Thu Mar 19 09:36:47 2020 -0400 Add a test for router_get_advertised_or_port_by_af(). --- src/test/test_router.c | 54 ++ 1 file changed, 54 insertions(+) diff --git a/src/test/test_router.c b/src/test/test_router.c index 601881a12..5699d5472 100644 --- a/src/test/test_router.c +++ b/src/test/test_router.c @@ -7,9 +7,12 @@ * \brief Unittests for code in router.c **/ +#define CONFIG_PRIVATE +#define CONNECTION_PRIVATE #include "core/or/or.h" #include "app/config/config.h" #include "core/mainloop/mainloop.h" +#include "core/mainloop/connection.h" #include "feature/hibernate/hibernate.h" #include "feature/nodelist/routerinfo_st.h" #include "feature/nodelist/routerlist.h" @@ -17,6 +20,9 @@ #include "feature/stats/rephist.h" #include "lib/crypt_ops/crypto_curve25519.h" #include "lib/crypt_ops/crypto_ed25519.h" +#include "lib/encoding/confline.h" + +#include "core/or/listener_connection_st.h" /* Test suite stuff */ #include "test/test.h" @@ -231,11 +237,59 @@ test_router_check_descriptor_bandwidth_changed(void *arg) UNMOCK(we_are_hibernating); } +static smartlist_t *fake_connection_array = NULL; +static smartlist_t * +mock_get_connection_array(void) +{ + return fake_connection_array; +} + +static void +test_router_get_advertised_or_port(void *arg) +{ + (void)arg; + // uint16_t port; + int r, w=0, n=0; + char *msg=NULL; + or_options_t *opts = options_new(); + listener_connection_t *listener = NULL; + + // Set up a couple of configured ports. + config_line_append(>ORPort_lines, "ORPort", "[1234::5678]:"); + config_line_append(>ORPort_lines, "ORPort", "5.6.7.8:auto"); + r = parse_ports(opts, 0, , , ); + tt_assert(r == 0); + + // There are no listeners, so the "auto" case will turn up no results. + tt_int_op(0, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET)); + + // This will return the matching value from the configured port. + tt_int_op(, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET6)); + + // Now set up a dummy listener. + MOCK(get_connection_array, mock_get_connection_array); + fake_connection_array = smartlist_new(); + listener = listener_connection_new(CONN_TYPE_OR_LISTENER, AF_INET); + TO_CONN(listener)->port = 54321; + smartlist_add(fake_connection_array, TO_CONN(listener)); + + // We should get a port this time. + tt_int_op(54321, OP_EQ, router_get_advertised_or_port_by_af(opts, AF_INET)); + + done: + or_options_free(opts); + config_free_all(); + smartlist_free(fake_connection_array); + connection_free_minimal(TO_CONN(listener)); + UNMOCK(get_connection_array); +} + #define ROUTER_TEST(name, flags) \ { #name, test_router_ ## name, flags, NULL, NULL } struct testcase_t router_tests[] = { ROUTER_TEST(check_descriptor_bandwidth_changed, TT_FORK), ROUTER_TEST(dump_router_to_string_no_bridge_distribution_method, TT_FORK), + ROUTER_TEST(get_advertised_or_port, TT_FORK), END_OF_TESTCASES }; ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/maint-0.4.3] router: Refactor IPv6 ORPort function logic
commit bac8bc0ff11d5b4502f2e71138d23f71fc25e72a Author: teor Date: Wed Jan 8 17:34:37 2020 +1000 router: Refactor IPv6 ORPort function logic Return early when there is no suitable IPv6 ORPort. Show the address and port on error, using a convenience function. Code simplification and refactoring. Cleanup after 32588. --- src/feature/relay/router.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 760daa249..283f7c326 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -1460,20 +1460,21 @@ router_get_advertised_ipv6_or_ap(const or_options_t *options, return; } - /* Like IPv4, if the relay is configured using the default - * authorities, disallow internal IPs. Otherwise, allow them. */ + /* If the relay is configured using the default authorities, disallow + * internal IPs. Otherwise, allow them. For IPv4 ORPorts and DirPorts, + * this check is done in resolve_my_address(). See #33681. */ const int default_auth = using_default_dir_authorities(options); - if (! tor_addr_is_internal(addr, 0) || ! default_auth) { -tor_addr_copy(_ap_out->addr, addr); -ipv6_ap_out->port = port; - } else { -char addrbuf[TOR_ADDR_BUF_LEN]; + if (tor_addr_is_internal(addr, 0) && default_auth) { log_warn(LD_CONFIG, - "Unable to use configured IPv6 address \"%s\" in a " + "Unable to use configured IPv6 ORPort \"%s\" in a " "descriptor. Skipping it. " "Try specifying a globally reachable address explicitly.", - tor_addr_to_str(addrbuf, addr, sizeof(addrbuf), 1)); + fmt_addrport(addr, port)); +return; } + + tor_addr_copy(_ap_out->addr, addr); + ipv6_ap_out->port = port; } /** Return the port that we should advertise as our DirPort; ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'tor-github/pr/1829/head' into maint-0.4.3
commit 3008255aea7c0c0ca4aa368e2fc975b932241ee3 Merge: 183d0d30d 52f61ec83 Author: Nick Mathewson Date: Mon Jun 29 12:56:39 2020 -0400 Merge remote-tracking branch 'tor-github/pr/1829/head' into maint-0.4.3 changes/bug32588 | 4 ++ src/app/config/config.c| 5 +- src/app/config/config.h| 4 ++ src/feature/relay/router.c | 77 ++--- src/feature/relay/router.h | 2 + src/test/test_config.c | 66 + src/test/test_router.c | 117 + 7 files changed, 243 insertions(+), 32 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/release-0.4.4] Merge remote-tracking branch 'tor-github/pr/1725/head' into maint-0.3.5
commit 0c0214bcc08e85040e8eb12f8388a45d271a6918 Merge: 6a43aadec 88489cd29 Author: Nick Mathewson Date: Mon Jun 29 12:55:27 2020 -0400 Merge remote-tracking branch 'tor-github/pr/1725/head' into maint-0.3.5 changes/ticket28992| 3 +++ src/feature/hs/hs_client.c | 11 --- 2 files changed, 11 insertions(+), 3 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge branch 'maint-0.3.5' into maint-0.4.2
commit fd8ce812b0a7263b75096207a735c02945320c86 Merge: 0f218a05a 0c0214bcc Author: Nick Mathewson Date: Mon Jun 29 12:55:35 2020 -0400 Merge branch 'maint-0.3.5' into maint-0.4.2 changes/ticket28992| 3 +++ src/feature/hs/hs_client.c | 11 --- 2 files changed, 11 insertions(+), 3 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge branch 'maint-0.4.3' into maint-0.4.4
commit 2c61f22e438d5ba13ace278af5c9c1005dde58f1 Merge: 68d848e24 183d0d30d Author: Nick Mathewson Date: Mon Jun 29 12:55:35 2020 -0400 Merge branch 'maint-0.4.3' into maint-0.4.4 ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/release-0.4.2] Merge remote-tracking branch 'tor-github/pr/1725/head' into maint-0.3.5
commit 0c0214bcc08e85040e8eb12f8388a45d271a6918 Merge: 6a43aadec 88489cd29 Author: Nick Mathewson Date: Mon Jun 29 12:55:27 2020 -0400 Merge remote-tracking branch 'tor-github/pr/1725/head' into maint-0.3.5 changes/ticket28992| 3 +++ src/feature/hs/hs_client.c | 11 --- 2 files changed, 11 insertions(+), 3 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits