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

Obfs4 stateDir handling #157

Merged
merged 2 commits into from
Jan 13, 2023
Merged

Obfs4 stateDir handling #157

merged 2 commits into from
Jan 13, 2023

Conversation

jmwample
Copy link
Member

@jmwample jmwample commented Jan 13, 2023

Creates a somewhat more permanent fix for #132. This makes use of a fix that I implemented in a fork of the obfs4 repo which treats an empty statedir string as "Do NOT use local state" rather than treating it as "./". To me this seems like a better and more explicit way to handle state (or lack there-of). For now I have added a PR against the upstream obfs4 repository Yawning/obfs4#35 and added a replace in the go.mod to use my fork in the hopes that it will be accepted soon at which time we can just remove the replace. Alternatively if that PR leads to some other fix we can support it here in a future PR.

To re-iterate the problem: We use independent keys for each session making a connection using the obfs4 transport with the keys derived from the shared secret of the session. We want the server to be usable ONLY by the individual client that negotiated the session. However, since there is no option to not use stateDir in the ServerFactory, each session must create a unique directory that it can use as the stateDir otherwise one session might parse another sessions secrets from the state files. The fix allows us to bypass the steps of parsing arguments from and writing arguments to the state directory.

related: #135

@jmwample jmwample self-assigned this Jan 13, 2023
@jmwample jmwample merged commit 2d04ea1 into master Jan 13, 2023
@jmwample jmwample deleted the obfs4-state branch January 13, 2023 21:24
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.

1 participant