-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/psiphon dev #410
Feature/psiphon dev #410
Conversation
* eliminate addFailureToReport because the errors are handled by HTTPTest errback and addToReport * add ConnectionDone exception to handleAllErrors, so that an HTTP request to a domain that is not reachable is reported
One FIXME less, line numbers in previous comment doesn't match anymore. |
@@ -6,7 +6,7 @@ | |||
from twisted.internet.error import ConnectionRefusedError, TCPTimedOutError | |||
from twisted.internet.error import DNSLookupError, ConnectError, ConnectionLost | |||
from twisted.internet.error import TimeoutError as GenericTimeoutError | |||
from twisted.internet.error import ProcessDone | |||
from twisted.internet.error import ProcessDone, ConnectionDone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ConnectionDone
indicates the case where you make an HTTP request to a domain that is not reachable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Responding to myself, this probably indicates that the proxy closed the connection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly
I am currently running into trouble because, when I run the In any case, for the records, this is the relevant part of the output: [D] STDOUT: Traceback (most recent call last):\r\n File "/var/folders/bl/r84rmchd6c5848k6gxvvky_m0000gn/T/tmpBLbQCY", line 2, in \r\n from psi_client import connect\r\n File "$HOME/psiphon-circumvention-system/pyclient/psi_client.py", line 22, in \r\n from psi_ssh_connection import SSHConnection, OSSHConnection\r\n File "$HOME/psiphon-circumvention-system/pyclient/psi_ssh_connection.py", line 21, in \r\n import pexpect\r\nImportError: No module named pexpect\r\n |
Briefly: pip install pexpect |
@juga0: actually
Must be something else. |
@juga0: sorted out the issue: I had more than one Python installed (the system one and the one installed with brew). Unfortunately |
@juga0: Further updated my diff to use sys.executable to avoid removing my Python executable :). |
cp psi_client.dat $PSIPHON_PYCLIENT_PATH | ||
|
||
# assuming to be inside a virtualenv | ||
pip install jsonpickle pexpect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to check whether you are inside a virtualenv?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasattr(sys, 'real_prefix'). Inside a virtualenv real_prefix points to the prefix of the system Python, outside a virtualenv real_prefix should not exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to know!
@juga0 is this ready to be tested? |
Can we merge this? @juga0 @bassosimone |
@hellais not yet. There is a problem that the test hangs when this test is run using |
…-probe/pull/410 * add comment about why using usePTY * add comment about why is needed to run psiphon from an script * fix identation
Improvements to psiphon install script in https://github.com/juga0/ooni-probe/commits/feature/psiphon-dev-install-script. |
Psiphon test specifications here ooni/spec#44 |
…-probe/pull/410 * add comment about why using usePTY * add comment about why is needed to run psiphon from an script * fix identation
Merged #425 that was based on this pull request. I have resolved all the issues highlighted in this pull request in a quick-and-dirty way because it was imperative to merge a psiphon MVP into master. |
* 'master' of github.com:TheTorProject/ooni-probe: (67 commits) Downgrading Twisted version is not needed Remove duplicate package Remove unneeded space Add IRC travis build notifications Add all supported twisted version, revise build dependencies Skip failing tests Proper fix for issue reported by @anadahz in #401 psiphon: fix bug that psiphon hangs ooniprobe -ng Remove script to install psiphon psiphon.py: prepare for merge with master Minor improvements commented on https://github.com/TheTorProject/ooni-probe/pull/410 psiphon: use the python provided by sys.executable change the way HTTP request errors are handled add psiphon_install.sh, code should be improved initial psiphon test. Failure cases doesn't fail propertly Properly add BTC address Update README.rst Update README.rst deal with existing, but empty, reporting.yml Fix misleading error message ...
…-probe/pull/410 * add comment about why using usePTY * add comment about why is needed to run psiphon from an script * fix identation
Not ready to merge. Look FIXMEs in psiphon.py, specially lines 68 and 122.
Thanks.