[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [atlas/master] Hides the Guard and HSDir flags for bridges (Fixes: #24885)
commit 547380626fbb3831570b35e9ada7facbdcea7877
Author: Iain R. Learmonth <irl@xxxxxxxx>
Date: Thu Feb 8 12:51:16 2018 +0000
Hides the Guard and HSDir flags for bridges (Fixes: #24885)
---
js/models/relay.js | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/js/models/relay.js b/js/models/relay.js
index 70cef1c..63ac0bf 100644
--- a/js/models/relay.js
+++ b/js/models/relay.js
@@ -10,7 +10,7 @@ define([
var relayModel = Backbone.Model.extend({
baseurl: 'https://onionoo.torproject.org',
fingerprint: '',
- parseflags: function(flags) {
+ parseflags: function(flags, is_bridge) {
var output = [];
var model = this;
_.each(flags, function(flag) {
@@ -25,10 +25,14 @@ define([
output.push([flag, "fast", "This relay is suitable for high-bandwidth circuits."]);
}
if (flag == "Guard") {
- output.push([flag, "guard", "This relay is suitable for use as an entry guard."]);
+ if (!is_bridge) {
+ output.push([flag, "guard", "This relay is suitable for use as an entry guard."]);
+ }
}
if (flag == "HSDir") {
- output.push([flag, "hsdir", "This relay is considered a v2 hidden service directory."]);
+ if (!is_bridge) {
+ output.push([flag, "hsdir", "This relay is considered a v2 hidden service directory."]);
+ }
}
if (flag == "NoEdConsensus") {
output.push([flag, "noedconensus", "An Ed25519 key in the relay's descriptor or microdesriptor does not reflect authority consensus."]);
@@ -230,7 +234,7 @@ define([
relay.transports = relay.transports ? relay.transports : null;
relay.fingerprint = relay.hashed_fingerprint ? relay.hashed_fingerprint : relay.fingerprint;
model.set({badexit: false});
- relay.flags = model.parseflags(relay.flags);
+ relay.flags = model.parseflags(relay.flags, relay.is_bridge);
/* Synthetic Additional Flags */
var additional_flags = []
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits