Skip to content
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

Implement decoy-test mode #6

Open
sergeyfrolov opened this issue Sep 4, 2019 · 0 comments
Open

Implement decoy-test mode #6

sergeyfrolov opened this issue Sep 4, 2019 · 0 comments
Assignees

Comments

@sergeyfrolov
Copy link
Member

Issue moved from the old repo. Assigning the issue to the original assignee @nikitaborisov.

As @nikitaborisov reported, when testing a single decoy, the following behavior would be useful:

  1. Automatically dial that decoy, without waiting for a connection to the proxy socket
  2. Only dial that decoy once, rather than keep retrying upon failure
  3. Exit after the connection fails or succeeds
  4. Print a final error message documenting failure reason, or success, before exiting.

This would make it much easier to test an individual decoy and also aggregate failure reports.

I think best way to do this would be to get a separate program for this, and not try to integrate it with cli. You'd be able to test as many decoy as you want with lightweight goroutines, rather than spawning processes. Assuming that's the path we'd take, we can achieve this by adding a function to gotapdance that would look something like

MakeRawTestConn(decoy pb.TLSDecoySpec) *tdRawConn {
   // fill all the fields, like it's done in makeTdRaw and conn_flow.go
   tdRaw.pinDecoySpec = true
   tdRaw.decoySpec = decoy
  return tdRaw
}

The tool would call said MakeRawTestConn() function to get the testConn, and then Dial() on the testConn, which would then attempt the TapDance handshake and return the error in desired format.

or, better yet, just have TestDecoy(decoy pb.TLSDecoySpec) error, which would just do both of the above.

That doesn't address 2., which we could solve by using exported constants

ConnectionAttemptsOnDial = 6 // attempts to dial different decoys on first connection
ConnectionAttemptsOnRedial = 2 // attempts to redial same decoy on reconnect 

which you would then override.

It would also be very useful for the final output to provide even more information. This may include RTT, TLS fingerprint used, cipher, and HTTP version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants