[Pkg-privacy-commits] [obfsproxy] 194/353: Add a `TransportConfig' class which should contain configuration options (such as the state location) meant for pluggable transport modules.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:01:58 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository obfsproxy.
commit f293d3d6aff79f424ab290347f99b85ca993e196
Author: Philipp Winter <phw at torproject.org>
Date: Thu Sep 26 22:46:31 2013 +0200
Add a `TransportConfig' class which should contain configuration options (such
as the state location) meant for pluggable transport modules.
---
obfsproxy/common/transport_config.py | 44 ++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/obfsproxy/common/transport_config.py b/obfsproxy/common/transport_config.py
new file mode 100644
index 0000000..3b705cd
--- /dev/null
+++ b/obfsproxy/common/transport_config.py
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+
+"""
+Provides a class which represents a pluggable transport's configuration.
+"""
+
+class TransportConfig( object ):
+
+ """
+ This class embeds configuration options for pluggable transport modules.
+
+ The options are set by obfsproxy and then passed to the transport's class
+ constructor. The pluggable transport might want to use these options but
+ does not have to. An example of such an option is the state location which
+ can be used by the pluggable transport to store persistent information.
+ """
+
+ def __init__( self ):
+ """
+ Initialise a `TransportConfig' object.
+ """
+
+ self.stateLocation = None
+
+ def setStateLocation( self, stateLocation ):
+ """
+ Set the given `stateLocation'.
+ """
+
+ self.stateLocation = stateLocation
+
+ def getStateLocation( self ):
+ """
+ Return the stored `stateLocation'.
+ """
+
+ return self.stateLocation
+
+ def __str__( self ):
+ """
+ Return a string representation of the `TransportConfig' instance.
+ """
+
+ return str(vars(self))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfsproxy.git
More information about the Pkg-privacy-commits
mailing list