[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [pluggable-transports/snowflake-webext] 01/02: Have unrestricted proxies always poll frequently
This is an automated email from the git hooks/post-receive script.
cohosh pushed a commit to branch main
in repository pluggable-transports/snowflake-webext.
commit 6b3f4fc527c51f7bf24c5f4b74f4a29a67cf8109
Author: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
AuthorDate: Thu Sep 29 11:23:57 2022 -0400
Have unrestricted proxies always poll frequently
---
config.js | 3 ++-
snowflake.js | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/config.js b/config.js
index 3142f5f..8f42176 100644
--- a/config.js
+++ b/config.js
@@ -27,6 +27,7 @@ Config.prototype.rateLimitHistory = 5.0;
Config.prototype.defaultBrokerPollInterval = 60.0 * 1000; //1 poll every minutes
Config.prototype.slowestBrokerPollInterval = 6 * 60 * 60.0 * 1000; //1 poll every 6 hours
Config.prototype.pollAdjustment = 100.0 * 1000;
+Config.prototype.fastBrokerPollInterval = 30 * 1000; //1 poll every 30 seconds
// Recheck our NAT type once every 2 days
Config.prototype.natCheckInterval = 2 * 24 * 60 * 60 * 1000;
@@ -52,4 +53,4 @@ Config.prototype.pcConfig = {
Config.PROBEURL = "https://snowflake-broker.freehaven.net:8443/probe";
-Config.prototype.allowedRelayPattern="snowflake.torproject.net";
\ No newline at end of file
+Config.prototype.allowedRelayPattern="snowflake.torproject.net";
diff --git a/snowflake.js b/snowflake.js
index 8685753..fbff283 100644
--- a/snowflake.js
+++ b/snowflake.js
@@ -113,6 +113,9 @@ class Snowflake {
Math.max(this.pollInterval - this.config.pollAdjustment,
this.config.defaultBrokerPollInterval);
this.natFailures = 0;
+ if (this.ui.natType == "unrestricted") {
+ this.pollInterval = this.config.fastBrokerPollInterval;
+ }
}
}), this.config.datachannelTimeout);
}, function () {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits