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

Version 0.8: maintanance #42

Merged
merged 14 commits into from
May 6, 2024
Merged

Version 0.8: maintanance #42

merged 14 commits into from
May 6, 2024

Conversation

dr-orlovsky
Copy link
Member

No description provided.

@dr-orlovsky dr-orlovsky changed the title Version 0.8 Version 0.8: maintanance May 4, 2024
@dr-orlovsky dr-orlovsky requested a review from cloudhead May 4, 2024 18:00
@dr-orlovsky dr-orlovsky added the bug Something isn't working label May 4, 2024
@dr-orlovsky dr-orlovsky marked this pull request as ready for review May 4, 2024 18:00
Copy link
Member Author

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cloudhead also market the specific place with the fix (the rest is chore)

src/session.rs Outdated Show resolved Hide resolved
Ok(0)
} else {
Err(io::ErrorKind::Interrupted.into())
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cloudhead important!

Before, I was unconditionally passing to the inner session write operation. Now, I do that only if the handshake in the current session is complete

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that means you can't write before the handshake anymore? That sounds good.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, you also was not being able to write before the handshake before...

fn artifact(&self) -> Option<Self::Artifact> { Some(()) }
fn artifact(&self) -> Option<Self::Artifact> {
match self {
Socks5::Initial(addr, false) if !addr.requires_proxy() => Some(addr.clone()),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is the actual bugfix: we return artifact signifying successful handshake if the proxy is not used and not needed. Thus, we do not run a empty handshake and successfully activate handshake in up-level session.

Copy link
Contributor

@cloudhead cloudhead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dr-orlovsky dr-orlovsky merged commit 70df5a5 into master May 6, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants