[Pkg-privacy-commits] [flashproxy] 27/65: update patches and changeloge for 1.6
Ximin Luo
infinity0 at moszumanska.debian.org
Fri Aug 21 13:49:42 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch _volatile-rc
in repository flashproxy.
commit 31bb697f93276b08ffcf28b34c5c046f5ca2a85b
Author: Ximin Luo <infinity0 at pwned.gg>
Date: Mon May 19 10:28:41 2014 +0100
update patches and changeloge for 1.6
---
debian/changelog | 2 +-
debian/patches/add-logging-timestamp.patch | 25 +++++++++
debian/patches/bump-facilitator-version.patch | 14 ++---
debian/patches/fix-copyright-years.patch | 15 ------
debian/patches/fix-test-verbose.patch | 19 -------
debian/patches/remove-failed-connections.patch | 66 ++++++++++++++++++++++++
debian/patches/run-test-using-nodejs.patch | 71 --------------------------
debian/patches/series | 5 +-
8 files changed, 99 insertions(+), 118 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 3141bc4..8a23928 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-flashproxy (1.5-1) UNRELEASED; urgency=low
+flashproxy (1.6-1) UNRELEASED; urgency=low
* Initial release. (Closes: #721845)
diff --git a/debian/patches/add-logging-timestamp.patch b/debian/patches/add-logging-timestamp.patch
new file mode 100644
index 0000000..541021f
--- /dev/null
+++ b/debian/patches/add-logging-timestamp.patch
@@ -0,0 +1,25 @@
+Description: add a logging timestamp, and per-connection info
+Author: Ximin Luo <infinity0 at torproject.org>
+Applied-Upstream: commit:9dea0c6c90dedc868dfaa84add2bfa19a2039281
+---
+--- a/proxy/flashproxy.js
++++ b/proxy/flashproxy.js
+@@ -103,6 +103,8 @@
+
+ function puts(s) {
+ if (DEBUG) {
++ s = new Date().toISOString() + " | " + s;
++
+ /* This shows up in the Web Console in Firefox and F12 developer tools
+ in Internet Explorer. */
+ (console.debug || console.log).call(console, s);
+@@ -711,6 +713,9 @@
+ var MAX_BUFFER = 10 * 1024 * 1024;
+
+ function log(s) {
++ if (!SAFE_LOGGING) {
++ s = format_addr(client_addr) + '|' + format_addr(relay_addr) + ' : ' + s
++ }
+ puts(s)
+ }
+
diff --git a/debian/patches/bump-facilitator-version.patch b/debian/patches/bump-facilitator-version.patch
index 2ca51bc..e2b7b16 100644
--- a/debian/patches/bump-facilitator-version.patch
+++ b/debian/patches/bump-facilitator-version.patch
@@ -1,17 +1,13 @@
-Description: bump facilitator version to match rest of package
-Author: Ximin Luo <infinity0 at pwned.gg>
-Applied-Upstream: commit:0625a91d988d92694f58c98a253dce4d10b1842a
+Description: bump facilitator version
+Author: Ximin Luo <infinity0 at torproject.org>
+Applied-Upstream: commit:7735064af5a60d99f041d168d04fbda44a495760
---
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/facilitator/configure.ac
+++ b/facilitator/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ([2.68])
--AC_INIT([flashproxy-facilitator], [1.4])
-+AC_INIT([flashproxy-facilitator], [1.5])
+-AC_INIT([flashproxy-facilitator], [1.5])
++AC_INIT([flashproxy-facilitator], [1.6])
AM_INIT_AUTOMAKE([-Wall foreign])
AC_ARG_VAR(fpfacilitatoruser, [the user/group for the facilitator to run as])
---
-1.8.5.2
-
diff --git a/debian/patches/fix-copyright-years.patch b/debian/patches/fix-copyright-years.patch
deleted file mode 100644
index 84e9211..0000000
--- a/debian/patches/fix-copyright-years.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: Fix upstream copyright info
-Author: Ximin Luo <infinity0 at pwned.gg>
-Applied-Upstream: commit:1f330117b79887908785ff39f2f0a7584976be93
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/LICENSE
-+++ b/LICENSE
-@@ -1,6 +1,6 @@
- This is the license of the flash proxy software.
-
--Copyright 2012 David Fifield
-+Copyright 2011-2013 David Fifield
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
diff --git a/debian/patches/fix-test-verbose.patch b/debian/patches/fix-test-verbose.patch
deleted file mode 100644
index b7ffa2d..0000000
--- a/debian/patches/fix-test-verbose.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: fix VERBOSE flag test in flashproxy-test
-Author: Ximin Luo <infinity0 at pwned.gg>
-Applied-Upstream: commit:0ab9f052b6aaa30506c1f7db6c6718bdef8dcd62
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/proxy/flashproxy-test.js
-+++ b/proxy/flashproxy-test.js
-@@ -4,7 +4,7 @@
- (apt-get install rhino). */
-
- var VERBOSE = false;
--if ("-v" in arguments)
-+if (arguments.indexOf("-v") >= 0)
- VERBOSE = true;
-
- var num_tests = 0;
---
-1.8.5.2
-
diff --git a/debian/patches/remove-failed-connections.patch b/debian/patches/remove-failed-connections.patch
new file mode 100644
index 0000000..f890471
--- /dev/null
+++ b/debian/patches/remove-failed-connections.patch
@@ -0,0 +1,66 @@
+Description: remove failed connections from proxy_pairs as well
+ this is a pretty major fix, as the previous behaviour effectively disabled a
+ proxy after 5 failed connections (= max_num_proxy_pairs / 2)
+Author: Ximin Luo <infinity0 at torproject.org>
+Applied-Upstream: commit:05b9c101ba9afe4653d1eff6f5414f90f22ef042
+---
+--- a/proxy/flashproxy.js
++++ b/proxy/flashproxy.js
+@@ -670,8 +670,7 @@
+
+ proxy_pair = new ProxyPair(client_addr, relay_addr, this.rate_limit);
+ this.proxy_pairs.push(proxy_pair);
+- proxy_pair.complete_callback = function(event) {
+- puts("Complete.");
++ proxy_pair.cleanup_callback = function(event) {
+ /* Delete from the list of active proxy pairs. */
+ this.proxy_pairs.splice(this.proxy_pairs.indexOf(proxy_pair), 1);
+ if (this.badge)
+@@ -730,7 +729,7 @@
+ this.flush_timeout_id = null;
+
+ /* This callback function can be overridden by external callers. */
+- this.complete_callback = function() {
++ this.cleanup_callback = function() {
+ };
+
+ this.connect = function() {
+@@ -766,15 +765,23 @@
+ log(ws.label + ": connected.");
+ }.bind(this);
+
++ this.maybe_cleanup = function() {
++ if (this.running && is_closed(this.client_s) && is_closed(this.relay_s)) {
++ this.running = false;
++ this.cleanup_callback();
++ return true;
++ }
++ return false;
++ }
++
+ this.onclose_callback = function(event) {
+ var ws = event.target;
+
+ log(ws.label + ": closed.");
+ this.flush();
+
+- if (this.running && is_closed(this.client_s) && is_closed(this.relay_s)) {
+- this.running = false;
+- this.complete_callback();
++ if (this.maybe_cleanup()) {
++ puts("Complete.");
+ }
+ }.bind(this);
+
+@@ -783,6 +790,11 @@
+
+ log(ws.label + ": error.");
+ this.close();
++
++ // we can't rely on onclose_callback to cleanup, since one common error
++ // case is when the client fails to connect and the relay never starts.
++ // in that case close() is a NOP and onclose_callback is never called.
++ this.maybe_cleanup();
+ }.bind(this);
+
+ this.onmessage_client_to_relay = function(event) {
diff --git a/debian/patches/run-test-using-nodejs.patch b/debian/patches/run-test-using-nodejs.patch
deleted file mode 100644
index 9200f08..0000000
--- a/debian/patches/run-test-using-nodejs.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Description: run flashproxy-test.js using nodejs instead of rhino
-Author: Ximin Luo <infinity0 at pwned.gg>
-Applied-Upstream: commit:aa66587104addced0bd40918e8108011c8cd5c8b
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/proxy/flashproxy-test.js
-+++ b/proxy/flashproxy-test.js
-@@ -1,10 +1,9 @@
--#!/usr/bin/env rhino
-+#!/usr/bin/env node
-
--/* To run this test program, install the Rhino JavaScript interpreter
-- (apt-get install rhino). */
-+/* To run this test program, install nodejs (apt-get install nodejs). */
-
- var VERBOSE = false;
--if (arguments.indexOf("-v") >= 0)
-+if (process.argv.indexOf("-v") >= 0)
- VERBOSE = true;
-
- var num_tests = 0;
-@@ -13,7 +12,9 @@ var num_failed = 0;
- var window = {location: {search: "?"}};
- var document = {cookie: ""};
-
--load("flashproxy.js");
-+var fs = require("fs");
-+var data = fs.readFileSync("./flashproxy.js", "utf-8");
-+eval(data);
-
- function objects_equal(a, b) {
- if ((a === null) != (b === null))
-@@ -39,8 +40,8 @@ var top = true;
- function announce(test_name) {
- if (VERBOSE) {
- if (!top)
-- print();
-- print(test_name);
-+ console.log();
-+ console.log(test_name);
- }
- top = false;
- }
-@@ -48,13 +49,13 @@ function announce(test_name) {
- function pass(test) {
- num_tests++;
- if (VERBOSE)
-- print("PASS " + repr(test));
-+ console.log("PASS " + repr(test));
- }
-
- function fail(test, expected, actual) {
- num_tests++;
- num_failed++;
-- print("FAIL " + repr(test) + " expected: " + repr(expected) + " actual: " + repr(actual));
-+ console.log("FAIL " + repr(test) + " expected: " + repr(expected) + " actual: " + repr(actual));
- }
-
- function test_build_url() {
-@@ -354,6 +355,6 @@ test_lang_keys();
- test_have_websocket_binary_frames();
-
- if (num_failed == 0)
-- quit(0);
-+ process.exit(0);
- else
-- quit(1);
-+ process.exit(1);
---
-1.8.5.2
-
diff --git a/debian/patches/series b/debian/patches/series
index a45d249..030d0b3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,5 @@
rm-prebuilt-manpages.patch
-fix-copyright-years.patch
-fix-test-verbose.patch
-run-test-using-nodejs.patch
bump-facilitator-version.patch
nodejs-shebang.patch
+add-logging-timestamp.patch
+remove-failed-connections.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/flashproxy.git
More information about the Pkg-privacy-commits
mailing list