Skip to content

feat(connector):Add ironrdp-vmconnector crate, integrated into existing ironrdp-client and ironrdp async #841

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

irvingoujAtDevolution
Copy link
Contributor

@irvingoujAtDevolution irvingoujAtDevolution commented Jun 26, 2025

Hello @CBenoit , I added dynamically dispatched trait for hyperv connector and normal connectors. The main drive is to avoid copy and paste in previous version. I did it this is way is also to reuse existing code as much as possible, instead of copy each and every method and add a _vmconnect suffix. This might not be the best solution, let me know your thoughts.

@CBenoit
Copy link
Member

CBenoit commented Jul 1, 2025

@irvingoujAtDevolution I don’t remember very well. What is different from the previous version?

@irvingoujAtDevolution
Copy link
Contributor Author

@CBenoit
The first version's main problem was that we modified on ClientConnector itself, which causes the state management less intuitive.
The second version's problem was that, the logic for vmconnect are tied to io, and we uses a lot of boolean params and hardcoded logics to manually manipulate the connector's state, which is not FFI friendly.

Comment on lines +39 to +53
pub async fn run_until_handover(
credssp_finished: &mut CredSSPFinished,
framed: &mut Framed<impl FramedRead + FramedWrite>,
mut connector: VmClientConnector,
) -> ConnectorResult<ClientConnector> {
let result = loop {
single_sequence_step(framed, &mut connector, &mut credssp_finished.write_buf).await?;

if connector.should_hand_over() {
break connector.hand_over();
}
};

info!("Handover to client connector");
credssp_finished.write_buf.clear();
Copy link
Member

Choose a reason for hiding this comment

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

question: Is handover a terminology used by VMConnect protocol?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really, it's only make sense in this context

Copy link
Member

@CBenoit CBenoit left a comment

Choose a reason for hiding this comment

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

question: What about the extra option EnhancedMode? I think Hyper-V understands the following format now: <GUID>;EnhancedMode=1

@irvingoujAtDevolution
Copy link
Contributor Author

We were having CredSSP issues on enhanced mode, I intend to have that support in separate pull request.

Copy link

github-actions bot commented Jul 4, 2025

Coverage Report 🤖 ⚙️

Past:
Total lines: 28328
Covered lines: 17460 (61.64%)

New:
Total lines: 28654
Covered lines: 17473 (60.98%)

Diff: -0.66%

[this comment will be updated automatically]

@irvingoujAtDevolution irvingoujAtDevolution marked this pull request as ready for review July 4, 2025 18:44
@irvingoujAtDevolution irvingoujAtDevolution force-pushed the vmconnect-use-vmconnector branch 2 times, most recently from e28091e to 349b21f Compare July 4, 2025 18:55
@irvingoujAtDevolution irvingoujAtDevolution force-pushed the vmconnect-use-vmconnector branch from 082acb5 to 69264ff Compare July 8, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants