twisteroidambassador / ptadapter

Pluggable Transports Python interface & standalone tunnels
GNU General Public License v3.0
61 stars 9 forks source link

IndexError when SMETHOD does not have 'options' field #3

Closed JoeTester1965 closed 7 years ago

JoeTester1965 commented 7 years ago

Hi.

Strange error. Works fine when using meek testing on localhost, but bombs out repeatedly (after a few seconds at most) when deploying meek on cloud platform. Have attached stderr output example.

Is this meek_client or wrapper issue?

Thanks example - worked for a while with meek.zip

twisteroidambassador commented 7 years ago

Can't tell anything from the logs. It all comes from the meek executable; nothing by pluggabletransportadapter is in that log file.

Just guessing, did you copy a compiled meek executable to your cloud server? Try compiling it on the server itself.

JoeTester1965 commented 7 years ago

Hi.

Still get this error when compiling both ends.

Sorry to forget this (is a part time pet project). but o get the server to run, I had to comment out this line in baseserverclient.py:

self.transports[e[0]]["options"] = e[2]

If I do not, get the following error:Traceback (most recent call last): File "./standalone_server.py", line 91, in main_cli() File "./standalone_server.py", line 73, in main_cli server.start() File "/home/ubuntu/Play/pluggabletransportadapter/pluggabletransportadapter/baseserverclient.py", line 203, in start if self.parse_stdout(line.strip()): break File "/home/ubuntu/Play/pluggabletransportadapter/pluggabletransportadapter/baseserverclient.py", line 243, in parse_stdout self.transports[e[0]]["options"] = e[2] IndexError: list index out of range

Could this be something to do with it?

JoeTester1965 commented 7 years ago

Finally stable.

Used meek-client and meek-server from https://people.debian.org/~infinity0/apt/

Rather than using https://github.com/arlolra/meek

Wish I knwe what the diffence was!

twisteroidambassador commented 7 years ago

Ah, yes, I believe you found a bug. The PT spec says:

For each transport initialized, the PT proxy reports the listener
status back to the parent via messages to stdout.

 SMETHOD <transport> <address:port> [options]
 [...]

   The OPTIONAL 'options' field is used to pass additional
   per-transport information back to the parent process.

Looks like the code does not handle the situation where the OPTIONAL 'options' field is not there. Will fix later.