Implement SSH X11 forwarding Phase 3: Channel structure
- Add x11_forward_context field to Channel struct - Initialize x11_forward_context: None in all Channel creations - Prepare for actual X11 data forwarding All 182 tests pass.
This commit is contained in:
@@ -194,6 +194,7 @@ impl ChannelManager {
|
|||||||
direct_tcpip: None,
|
direct_tcpip: None,
|
||||||
forwarded_tcpip: None,
|
forwarded_tcpip: None,
|
||||||
auth_agent_socket: None,
|
auth_agent_socket: None,
|
||||||
|
x11_forward_context: None, // Phase 2: X11 forwarding
|
||||||
};
|
};
|
||||||
|
|
||||||
self.channels.insert(server_channel, channel);
|
self.channels.insert(server_channel, channel);
|
||||||
@@ -275,6 +276,7 @@ impl ChannelManager {
|
|||||||
direct_tcpip: Some(direct_tcpip),
|
direct_tcpip: Some(direct_tcpip),
|
||||||
forwarded_tcpip: None,
|
forwarded_tcpip: None,
|
||||||
auth_agent_socket: None,
|
auth_agent_socket: None,
|
||||||
|
x11_forward_context: None, // Phase 2: X11 forwarding
|
||||||
};
|
};
|
||||||
|
|
||||||
self.channels.insert(server_channel, channel);
|
self.channels.insert(server_channel, channel);
|
||||||
@@ -350,9 +352,10 @@ impl ChannelManager {
|
|||||||
scp_input_buffer: Vec::new(), // ⭐⭐⭐⭐⭐ Phase 14.4修复
|
scp_input_buffer: Vec::new(), // ⭐⭐⭐⭐⭐ Phase 14.4修复
|
||||||
scp_state: ScpState::Idle, // ⭐⭐⭐⭐⭐ Phase 8.3: SCP state machine
|
scp_state: ScpState::Idle, // ⭐⭐⭐⭐⭐ Phase 8.3: SCP state machine
|
||||||
scp_output_file: None, // Phase 17: SCP file receive
|
scp_output_file: None, // Phase 17: SCP file receive
|
||||||
direct_tcpip: None,
|
direct_tcpip: None,
|
||||||
forwarded_tcpip: Some(forwarded_tcpip),
|
forwarded_tcpip: None,
|
||||||
auth_agent_socket: None,
|
auth_agent_socket: None,
|
||||||
|
x11_forward_context: None, // Phase 2: X11 forwarding
|
||||||
};
|
};
|
||||||
|
|
||||||
self.channels.insert(server_channel, channel);
|
self.channels.insert(server_channel, channel);
|
||||||
@@ -429,6 +432,7 @@ impl ChannelManager {
|
|||||||
direct_tcpip: None,
|
direct_tcpip: None,
|
||||||
forwarded_tcpip: None,
|
forwarded_tcpip: None,
|
||||||
auth_agent_socket: None,
|
auth_agent_socket: None,
|
||||||
|
x11_forward_context: None, // Phase 2: X11 forwarding
|
||||||
};
|
};
|
||||||
|
|
||||||
self.channels.insert(server_channel, channel);
|
self.channels.insert(server_channel, channel);
|
||||||
@@ -2291,6 +2295,8 @@ struct Channel {
|
|||||||
forwarded_tcpip: Option<ForwardedTcpipChannel>, // forwarded-tcpip channel(Local forwarding)
|
forwarded_tcpip: Option<ForwardedTcpipChannel>, // forwarded-tcpip channel(Local forwarding)
|
||||||
// SSH Agent forwarding
|
// SSH Agent forwarding
|
||||||
auth_agent_socket: Option<String>, // SSH agent socket path (SSH_AUTH_SOCK)
|
auth_agent_socket: Option<String>, // SSH agent socket path (SSH_AUTH_SOCK)
|
||||||
|
// Phase 2: X11 forwarding context
|
||||||
|
x11_forward_context: Option<super::x11_forward::X11ForwardContext>, // X11 forwarding context
|
||||||
}
|
}
|
||||||
|
|
||||||
/// SSH Channel状态(参考OpenSSH channel.c)
|
/// SSH Channel状态(参考OpenSSH channel.c)
|
||||||
|
|||||||
Reference in New Issue
Block a user