commit 9dbecb3523efdd184f0687f144ee26a54deca154
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Fri Nov 4 21:52:35 2011 +0100
No need to edit the R file anymore (#2394).
---
task-2394/README | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/task-2394/README b/task-2394/README
index 714853e..774dff2 100644
--- a/task-2394/README
+++ b/task-2394/README
@@ -31,7 +31,3 @@ Visualize self-reported vs. measured bandwidth of relays
$ R --slave -f …
[View More]bandwidth-comparison.R
- (Edit bandwidth-comparison.R to color urras or one of the other
- directories specially by putting in the lines containing "purple" and
- re-run the last command above.)
-
[View Less]
commit 902da50891a1f9fd3b145df5fe0e83631b55ddae
Author: Runa A. Sandvik <runa.sandvik(a)gmail.com>
Date: Fri Nov 4 20:36:16 2011 +0000
Updated with FAQ and more info (do /not/ push this live just yet)
---
html/index.html | 150 ++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 131 insertions(+), 19 deletions(-)
diff --git a/html/index.html b/html/index.html
index e9a04ad..f445c15 100644
--- a/html/index.html
+++ b/html/index.html
@@ -37,8 +37,8 @@
…
[View More]<ul class="tabs nav">
<li><a id="t1" href="#what_is_it">What Is It?</a></li>
<li><a id="t2" href="#get_started">Get Started!</a></li>
- <li><a id="t3" href="#support">Support</a></li>
-<!-- <li><a id="t4" href="#faq">FAQ</a></li>-->
+ <li><a id="t3" href="#faq">FAQ</a></li>
+ <li><a id="t4" href="#support">Support</a></li>
</ul>
</nav>
<h1 id="logo"><a href="/">Tor Cloud</a></h1>
@@ -52,11 +52,11 @@
<div class="deco first"></div>
<h2>Tor Cloud on Amazon EC2</h2>
</hgroup>
- <p>The Tor Cloud is a user friendly way of deploying relays
- to help users in countries securely access the Internet,
- free of censorship. By donating your bandwidth to the Tor
+ <p>The Tor Cloud is a user friendly way of deploying bridges and
+ relays to help users in countries securely access the Internet,
+ free of censorship. By donating your bandwidth to the Tor
Network, you improve the safety and speed at which users
- can access the Internet. <a href="http://www.torproject.org"
+ can access the Internet. <a href="https://www.torproject.org"
target="_blank">Learn more about Tor »</a></p>
<p>This project runs on the Amazon EC2 cloud computing
platform, which powers Amazon.com and other major websites
@@ -65,6 +65,12 @@
cost-effective terms. The Tor network can always benefit from
more volunteer bandwidth. <a href="http://aws.amazon.com/ec2/"
target="_blank">Learn more about Amazon EC2 »</a></p>
+ <p>Setting up a Tor bridge or relay in the Amazon cloud is simple and
+ will only take you a couple of minutes. The images have all been
+ configured with automatic package updates and port forwarding, so you
+ do not have to worry about Tor not working or lacking security updates.
+ <a href="https://cloud.torproject.org/#get_started" target="_blank">Get
+ started with Tor Cloud »</a></p>
<hgroup>
<div class="deco"></div>
<h2>AWS Free Usage Tier</h2>
@@ -84,31 +90,58 @@
<div class="main" role="main">
<hgroup>
<div class="deco first"></div>
- <h2>How to Get Started</h2>
+ <h2>Sign up for an AWS account</h2>
</hgroup>
- <p>1. Sign-up for an AWS account and
- subscribe to EC2 service: <a class="signup"
+ <p>Before you can set up a bridge or a relay in the Amazon cloud,<br>
+ you need to sign up for an <i>Amazon Web Services (AWS)</i> account.
+ <a class="signup"
href="https://aws-portal.amazon.com/gp/aws/developer/registration"
- target="_blank" border="0"> Sign Up Now!</a><br><em>(Amazon
- will send you an email once your account is
- activated.)</em></p>
- <p>2. Click and start your Tor Cloud bridge on one of the
- many locations available:</p>
+ target="_blank" border="0"> Sign Up Now!</a>
+ <br><br><br>Amazon will send
+ you an email once your account has been activated.</p>
+ <hgroup>
+ <div class="deco"></div>
+ <h2>Select type of relay and its location</h2>
+ </hgroup>
+ <p>The images below have been configured as private bridges, public
+ bridges, and non-exit relays. The cost of running a bridge or a relay in the
+ Amazon Cloud depends on a number of factors, including the region you decide to
+ put it in. See <a href="http://aws.amazon.com/ec2/pricing/">Amazon EC2
+ Pricing</a> for more information.</p>
+
+ <p><b>Bridge:</b></p>
<ul class="region-nav">
<li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=us-east-1#launchAmi=ami-11af…" target="_blank">us-east-1<br>Virginia</a></li>
<li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=us-west-1#launchAmi=ami-4bf9…" target="_blank">us-west-1<br>N. California</a></li>
<li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=ap-northeast-1#launchAmi=ami…" target="_blank">ap-northeast-1<br>Tokyo</a></li>
<li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=eu-west-1#launchAmi=ami-9c99…" target="_blank">eu-west-1<br>Ireland</a></li>
<li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=ap-southeast-1#launchAmi=ami…" target="_blank">ap-southeast-1<br>Singapore</a></li>
- </ul>
+ </ul>
+
+ <p><b>Private bridge:</b></p>
+ <ul class="region-nav">
+ <li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=us-east-1#launchAmi=ami-11af…" target="_blank">us-east-1<br>Virginia</a></li>
+ <li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=us-west-1#launchAmi=ami-4bf9…" target="_blank">us-west-1<br>N. California</a></li>
+ <li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=ap-northeast-1#launchAmi=ami…" target="_blank">ap-northeast-1<br>Tokyo</a></li>
+ <li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=eu-west-1#launchAmi=ami-9c99…" target="_blank">eu-west-1<br>Ireland</a></li>
+ <li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=ap-southeast-1#launchAmi=ami…" target="_blank">ap-southeast-1<br>Singapore</a></li>
+ </ul>
+
+ <p><b>Non-exit relay:</b></p>
+ <ul class="region-nav">
+ <li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=us-east-1#launchAmi=ami-11af…" target="_blank">us-east-1<br>Virginia</a></li>
+ <li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=us-west-1#launchAmi=ami-4bf9…" target="_blank">us-west-1<br>N. California</a></li>
+ <li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=ap-northeast-1#launchAmi=ami…" target="_blank">ap-northeast-1<br>Tokyo</a></li>
+ <li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=eu-west-1#launchAmi=ami-9c99…" target="_blank">eu-west-1<br>Ireland</a></li>
+ <li><a class="region" href="https://console.aws.amazon.com/ec2/home?region=ap-southeast-1#launchAmi=ami…" target="_blank">ap-southeast-1<br>Singapore</a></li>
+ </ul>
+
<hgroup>
<div class="deco"></div>
<h2>Step by Step Process</h2>
</hgroup>
- <p>Once you select a location from the selecton above,
- you will be redirected to Amazon's management console.</p>
- <p>Below you can see all the steps you have to take after
- clicking on your desired location:</p>
+ <p>Once you have selected a relay and its location, you will be redirected to Amazon's management console.
+ Simply follow the steps as illustrated below, and your relay will up and running in just a couple of minutes:</p>
<div class='slider-wrapper theme-orman'>
<div id='slider' class='nivoSlider'>
<img src="img/tor-1.png" alt="" title="Click
@@ -135,6 +168,85 @@
</div>
</div>
+<!-- FAQ -->
+<div class="main" role="main">
+ <hgroup>
+ <div class="deco first"></div>
+ <h2>Frequently Asked Questions (FAQ)</h2>
+ </hgroup>
+
+ <p>
+ <a href="#WhatIsTheDifference">1. What is the difference between a bridge and a relay?</a><br>
+ <a href="#HowMuchDoesItCost">2. How much does it cost?</a><br>
+ <a href="#ICantConnect">3. I can't connect as user <i>root</i>, what's wrong?</a><br>
+ <a href="#CanISetUpAnExit">4. Can I set up an exit relay?</a><br>
+ <a href="#WhatIsInTheConfig">5. What's in the Tor configuration file?</a><br>
+ <a href="#AutomaticUpdates">6. Will the images automatically download and install package updates?</a><br>
+ <a href="#NewImages">7. Will you let me know when you publish new images?</a><br>
+ <a href="#ReportBugs">8. Where do I report a bug I am encountering?</a><br>
+ <a href="#IRC">9. Is there an IRC channel about Tor Cloud?</a><br>
+ <a href="#AnotherQuestion">10. I have a question that is not answered here, what do I do?</a>
+ </p>
+
+ <p><b><a class="anchor" href="#WhatIsTheDifference">1. What is the difference between a bridge and a relay?</a></b><br>
+ A bridge is a hidden relay used only to forward traffic on to the rest
+ of the Tor network. A bridge will usually see less traffic than a relay, and
+ thus consume less bandwidth. This is something to consider if you're worried
+ about the cost.
+ <br><br>
+ When you set up a bridge, we will automatically distribute the bridge
+ address (that is, the IP address and the port Tor is listening on) for
+ you via email and on <a
+ href="https://bridges.torproject.org">bridges.torproject.org</a>. If you only
+ want a specific group of people (such as close friends and family) to use the
+ bridge, set up a private bridge instead.
+ <br><br>
+ A non-exit relay is a public server used only to forward traffic on to
+ the rest of the Tor network. No traffic will ever exit from your relay.
+ A relay will usually see more traffic than a bridge, so please keep
+ this in mind if you're worried about the cost.
+ </p>
+
+ <p><b><a class="anchor" href="#HowMuchDoesItCost">2. How much does it cost?</a></b><br>
+ There is no fee charged by the Tor Project for you to run a Tor Cloud
+ image. Amazon does, however, charge instances according to their <a
+ href="http://aws.amazon.com/ec2/pricing/">pricing</a>.
+ We have <a
+ href="https://trac.torproject.org/projects/tor/ticket/3574#comment:4">estimated</a>
+ that running a bridge will cost around $30 a month. A private bridge
+ ay be cheaper, a non-exit relay will probably cost a bit
+ more.<br><br>If you decide to run a private bridge or a non-exit relay, please
+ let us know how much you end up paying each month so that we can update this
+ FAQ.</p>
+
+ <p><b><a class="anchor" href="#ICantConnect">3. I can't connect as user <i>root</i>, what's wrong?</a></b><br>
+ When you right-click and choose <i>connect</i>, AWS will suggest that
+ you use <i>root</i> as the username. This is wrong. You need to use
+ <i>ubuntu</i> as the username if you wish to connect to your server via
+ SSH.</p>
+
+ <p><b><a class="anchor" href="#CanISetUpAnExit">4. Can I set up an exit relay?</a></b><br>
+ Answer here.</p>
+
+ <p><b><a class="anchor" href="#WhatIsInTheConfig">5. What's in the Tor configuration file?</a></b><br>
+ Answer here.</p>
+
+ <p><b><a class="anchor" href="#AutomaticUpdates">6. Will the images automatically download and install package updates?</a></b><br>
+ Yes, the images have all been configured with the <a href="https://help.ubuntu.com/community/AutomaticSecurityUpdates"><i>unattended-upgrades</i></a> package. This means that your system will automatically download and install updates.</p>
+
+ <p><b><a class="anchor" href="#NewImages">7. Will you let me know when you publish new images?</a></b><br>
+ New cloud images will be announced on <a href="https://twitter.com/torproject">Twitter</a>, <a href="https://identi.ca/torproject">identi.ca</a>, <a href="https://blog.torproject.org">our blog</a> and on the <a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk">tor-talk</a> mailing list.</p>
+
+ <p><b><a class="anchor" href="#ReportBugs">8. Where do I report a bug I am encountering?</a></b><br>
+ If you think the bug you have found is specific to the Tor Cloud images we provide, please <a href="https://trac.torproject.org">file a bug</a> or send an email to <i>community-support AT lists.torproject.org</i>.</p>
+
+ <p><b><a class="anchor" href="#IRC">9. Is there an IRC channel about Tor Cloud?</a></b><br>
+ Yes, simply join #tor on irc.oftc.net and ask your question. It may take a while before we get back to you, so please be patient.</p>
+
+ <p><b><a class="anchor" href="#AnotherQuestion">10. I have a question that is not answered here, what do I do?</a></b><br>
+ Please send an email to <i>community-support AT lists.torproject.org</i> and we'll make sure it gets added to the list.</p>
+</div>
+
<!-- Support -->
<div class="main" role="main">
<hgroup>
[View Less]
commit a090373e5384026295b31daee8ef622a589a913d
Author: Damian Johnson <atagar(a)torproject.org>
Date: Tue Nov 1 18:49:55 2011 -0700
Utility function for parsing control messages
Trying out a utility function to pop the first item off a control response,
with the caller providing attributes it should have.
---
stem/types.py | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 80 insertions(+), 0 deletions(-)
diff --git a/stem/types.py b/…
[View More]stem/types.py
index b289921..e6188ae 100644
--- a/stem/types.py
+++ b/stem/types.py
@@ -22,6 +22,10 @@ import socket
from stem.util import log
+# Escape sequences from the 'esc_for_log' function of tor's 'common/util.c'.
+CONTROL_ESCAPES = {r"\\": "\\", r"\"": "\"", r"\'": "'",
+ r"\r": "\r", r"\n": "\n", r"\t": "\t"}
+
class ProtocolError(Exception):
"Malformed content from the control socket."
pass
@@ -282,3 +286,79 @@ class Version:
# TODO: version requirements will probably be moved to another module later
REQ_GETINFO_CONFIG_TEXT = Version("0.2.2.7-alpha")
+# TODO: trying this out temporarily to see if it's generally helpful or another
+# parser function would be a better fit
+def get_entry(line, mapping = False, quoted = False, escaped = False):
+ """
+ Parses a space separated series of entries, providing back a tuple with the
+ first entry in the string and the remainder (dropping the space between).
+
+ This is meant to be a helper function for stem to parse tor's control
+ protocol lines rather than being used directly by this library's users.
+
+ Example:
+ get_entry('hello there random person') =>
+ (None, "hello", "there random person")
+ get_entry('version="0.1.2.3"', True, True) =>
+ ("version", "0.1.2.3", "")
+ get_entry('"this has a \" and \\ in it" foo=bar more_data', False, True, True) =>
+ (None, 'this has a " and \ in it', "foo=bar more_data")
+
+ Arguments:
+ line (str) - string with a space separated series of entries
+ mapping (bool) - parses the next entry as a KEY=VALUE entry, if False then
+ the 'key' attribute of the returned tuple is None
+ quoted (bool) - parses the next entry as a quoted value, removing the
+ quotes
+ escaped (bool) - unescapes the CONTROL_ESCAPES escape sequences
+
+ Returns:
+ tuple of the form (key, value, remainder)
+
+ Raises:
+ ValueError if 'mapping' is True without a '=' or 'quoted' is True without
+ the value being quoted
+ """
+
+ # Start by splitting apart the 'key=everything else' portion. The key
+ # shouldn't have any spaces in it.
+
+ if mapping:
+ key_match = re.match("^(\S+)=", line)
+
+ if key_match:
+ key = key_match.groups()[0]
+ remainder = line[key_match.end():]
+ else:
+ raise ValueError("mapping doesn't contain a '=': " + line)
+ else: key, remainder = None, line
+
+ if quoted:
+ # Check that we have a starting quote.
+ if not remainder.startswith("\""):
+ raise ValueError("quoted value doesn't have a leading quote: " + line)
+
+ # Finds the ending quote. If we have escapes then we need to skip any '\"'
+ # entries.
+ end_quote = remainder.find("\"", 1)
+
+ if is_escaped:
+ while end_quote != -1 and remainder[end_quote - 1] == "/":
+ end_quote = remainder.find("\"", end_quote + 1)
+
+ # Check that we have an ending quote.
+ if end_quote == -1:
+ raise ValueError("quoted value doesn't have an ending quote: " + line)
+
+ value, remainder = remainder[1:end_quote], remainder[end_quote + 1:]
+ else:
+ # Non-quoted value. Just need to check if there's more data afterward.
+ if " " in remainder: value, remainder = remainder.split(" ", 1)
+ else: value, remainder = remainder, ""
+
+ if escaped:
+ for esc_sequence, replacement in CONTROL_ESCAPES.items():
+ value = value.replace(esc_sequence, replacement)
+
+ return (key, value, remainder)
+
[View Less]