commit 90d82c205c0269b87de5a6956e485225f8a9a2cb
Author: David Fifield <david(a)bamsoftware.com>
Date: Thu Jan 10 22:11:10 2019 -0700
Use the utls HelloRandomizedNoALPN handshake.
Since we cannot use any handshake that has a "h2" ALPN (like
HelloFirefox_63 or HelloChrome_70), let's use a randomized handshake.
HelloRandomizedNoALPN differs from HelloRandomized and
HelloRandomizedALPN in that it always omits ALPN.
The http.Transport still appears to make …
[View More]10 independent connections,
each with its own randomized fingerprint...
---
meek-client/meek-client.go | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/meek-client/meek-client.go b/meek-client/meek-client.go
index 5853428..4f5aadd 100644
--- a/meek-client/meek-client.go
+++ b/meek-client/meek-client.go
@@ -451,18 +451,8 @@ func main() {
if err != nil {
return nil, err
}
- uconn := tls.UClient(conn, config, tls.HelloChrome_Auto)
- // We cannot call uconn.Handshake() here: it causes the server
- // to use HTTP/2, when the client is still using HTTP/1.1,
- // because net/http disables automatic HTTP/2 support when using
- // DialTLS.
- // https://github.com/golang/go/issues/21753
- // "Auto-HTTP/2 is disabled by DialTLS being set"
- // https://github.com/golang/go/issues/21336
- // But: returning without calling uconn.Handshake causes the
- // ClientHello to lack the ALPN extension entirely...
- //
- // err = uconn.Handshake()
+ uconn := tls.UClient(conn, config, tls.HelloRandomizedNoALPN)
+ err = uconn.Handshake()
return uconn, err
}
[View Less]
commit 55854cdbf674151d368f134bdb8d381e69209ce8
Author: Damian Johnson <atagar(a)torproject.org>
Date: Thu Jan 10 14:58:46 2019 -0800
Skip installation test when offline
On my morning bus commute I was pretty puzzled why our tests broke. Turns out
we fail in a rather confusing way that says our PYTHONPATH is misconfigured
when unable to install stem from pypi.
---
test/installation.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/test/…
[View More]installation.py b/test/installation.py
index 4b89177..4bde759 100644
--- a/test/installation.py
+++ b/test/installation.py
@@ -3,18 +3,34 @@ import shutil
import subprocess
import sys
import unittest
+import urllib2
import nyx
import stem.util.system
import test
+def is_online():
+ """
+ Confirm we can reach PyPI. If we can't then our installation test will fail
+ due to being unable to install Stem.
+ """
+
+ try:
+ urllib2.urlopen('https://pypi.org/', timeout = 1)
+ return True
+ except urllib2.URLError:
+ return False
+
+
class TestInstallation(unittest.TestCase):
def test_installing_stem(self):
base_directory = os.path.sep.join(__file__.split(os.path.sep)[:-2])
if not os.path.exists(os.path.sep.join([base_directory, 'setup.py'])):
self.skipTest('(only for git checkout)')
+ elif not is_online():
+ self.skipTest('(only when online)')
original_cwd = os.getcwd()
site_packages = '/tmp/nyx_test/lib/python%i.%i/site-packages/' % sys.version_info[:2]
[View Less]
commit 321eb30eb1f38eb16b94ead67ad21cf5e3930a48
Author: Damian Johnson <atagar(a)torproject.org>
Date: Wed Jan 9 11:35:00 2019 -0800
Implement delete key
Special keys (arrows, home/end, etc) require for us to implement their
handling. Doing so for the delete key.
https://trac.torproject.org/projects/tor/ticket/5835
---
nyx/curses.py | 12 ++++++++++++
web/changelog/index.html | 1 +
2 files changed, 13 insertions(+)
diff --git a/nyx/curses.py b/…
[View More]nyx/curses.py
index 3f4b797..9f998b0 100644
--- a/nyx/curses.py
+++ b/nyx/curses.py
@@ -318,6 +318,18 @@ def _handle_key(textbox, key):
textbox.win.move(y, msg_length - 1) # if we're in the content then move to the end
elif key == curses.KEY_RIGHT and x < msg_length - 1:
textbox.win.move(y, x + 1) # only move cursor if there's content after it
+ elif key == curses.KEY_DC:
+ # Delete key. Remove the character after the cursor if there is one.
+
+ y, x = textbox.win.getyx()
+ content = textbox.gather()
+
+ if x < len(content):
+ content = content[:x] + content[x + 1:]
+ textbox.win.clear()
+ textbox.win.addstr(y, 0, content)
+
+ textbox.win.move(y, x) # revert cursor to its prior position
elif key == 410:
# if we're resizing the display during text entry then cancel it
# (otherwise the input field is filled with nonprintable characters)
diff --git a/web/changelog/index.html b/web/changelog/index.html
index d49533e..dfb6465 100644
--- a/web/changelog/index.html
+++ b/web/changelog/index.html
@@ -126,6 +126,7 @@
<li><span class="component">Curses</span>
<ul>
<li>Resizing could crash the interface (<b><a href="https://trac.torproject.org/projects/tor/ticket/24382">ticket</a></b>)</li>
+ <li>Implemented <b>del key</b> in editable text fields (<b><a href="https://trac.torproject.org/projects/tor/ticket/5835">ticket</a></b>)</li>
</ul>
</li>
[View Less]