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

bug fixes for obfs4 only. test will fail due to #133 #135

Merged
merged 2 commits into from
Jun 29, 2022
Merged

Conversation

jmwample
Copy link
Member

Fix for unconditional return in obfs4 WrapConnection - move checks on proper data length earlier in the function and continue through loop when the MAC mark that we are looking for is not found.

The fix(es) applied in this PR relates to #132 as we add a temporary fix that creates an ioutil.tempdir for each obfs4 session ensuring separation of state. However this is probably not a good long-term fix as file descriptor limitations might cause issues, also we probably don't need any of the files to begin with.

closes #128
relates to #132

Changes

obfs4

  • move mark len check proper locations
    • too short check up front
    • not found, but not past max at end for retry
  • mark not found w/ one reg, continue to next instead of return
  • use tempdir instead of current dir for obfs4 state

Proof that the fixes works:

TestSuccessfulWrapMulti - checks that a connection can be established for an obfs4 session even when multiple obfs4 sessions map to the same phantom address.

@jmwample
Copy link
Member Author

solving failing tests will be solved in a separate PR.

@jmwample jmwample merged commit 350c6c5 into master Jun 29, 2022
@jmwample jmwample deleted the obfs4-fix-only branch June 29, 2022 19:03
@jmwample jmwample mentioned this pull request Jan 13, 2023
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

Successfully merging this pull request may close these issues.

Unconditional return in obfs4 Transport
1 participant