[tor-commits] [flashproxy/master] Merge remote branch 'origin/rtmfp' into rtmfp

dcf at torproject.org dcf at torproject.org
Sun Jun 12 08:56:27 UTC 2011


commit 9b7947e9b893ddfb308e467dd2a2d4a6c73caa4b
Merge: 6e08bb5 a8e37c5
Author: ellitron <jdellit at stanford.edu>
Date:   Thu May 19 18:03:22 2011 -0700

    Merge remote branch 'origin/rtmfp' into rtmfp
    
    Conflicts:
    	swfcat.as

 Makefile                                      |    4 +-
 com/rtmfpcat/Makefile                         |   11 +
 com/rtmfpcat/README                           |  118 +++++++++
 com/rtmfpcat/Utils.as                         |   25 ++
 com/rtmfpcat/connector.py                     |  326 +++++++++++++++++++++++++
 com/rtmfpcat/facilitator.py                   |  146 +++++++++++
 com/rtmfpcat/rtmfp/RTMFPSocket.as             |  216 ++++++++++++++++
 com/rtmfpcat/rtmfp/RTMFPSocketClient.as       |   57 +++++
 com/rtmfpcat/rtmfp/events/RTMFPSocketEvent.as |   25 ++
 com/rtmfpcat/rtmfpcat.as                      |  208 ++++++++++++++++
 swfcat.as                                     |   82 +++++-
 11 files changed, 1202 insertions(+), 16 deletions(-)

diff --cc Makefile
index 7f81cf9,0c3beba..5390327
--- a/Makefile
+++ b/Makefile
@@@ -4,10 -4,8 +4,10 @@@ TARGETS = swfcat.swf com/rtmfpcat/rtmfp
  
  all: $(TARGETS)
  
 +swfcat.swf: badge.png
 +
  %.swf: %.as
- 	$(MXMLC) -output $@ -static-link-runtime-shared-libraries $<
 -	$(MXMLC) -output $@ -define=RTMFP::CIRRUS_KEY,\"$(CIRRUS_KEY)\" $^
++	$(MXMLC) -output $@ -static-link-runtime-shared-libraries -define=RTMFP::CIRRUS_KEY,\"$(CIRRUS_KEY)\" $<
  
  clean:
  	rm -f $(TARGETS)
diff --cc swfcat.as
index 76de948,423f30a..fd3625d
--- a/swfcat.as
+++ b/swfcat.as
@@@ -249,9 -168,10 +249,10 @@@ import flash.events.ProgressEvent
  import flash.events.SecurityErrorEvent;
  import flash.net.Socket;
  import flash.utils.ByteArray;
+ import flash.utils.setInterval;
  
  /* An instance of a client-relay connection. */
 -class ProxyPair
 +class ProxyPair extends EventDispatcher
  {
      // Address ({host, port}) of client.
      private var addr_c:Object;
@@@ -265,8 -185,21 +266,21 @@@
  
      // Parent swfcat, for UI updates.
      private var ui:swfcat;
+     
+     // Proxy transfer rate limit in KB/s
+     private var rate_limit:uint;
+     
+     // Default limit is 10KB/s
+     private const DEFAULT_RATE_LIMIT:uint = 10000;
+     
+     private var curr_rate:Number;
+     private var historical_rate:Number;
+     private var lifetime:uint;
+     
+     // in milliseconds
+     private const DEFAULT_RATE_TIMEOUT:uint = 1000;
  
 -    private function log(msg:String):void
 +    public function log(msg:String):void
      {
          ui.puts(id() + ": " + msg)
      }





More information about the tor-commits mailing list