|
libsshpp v0.1.7
Modern C++17 wrapper for libssh
|
#include <forwarding.hpp>
Classes | |
| struct | Options |
Public Member Functions | |
| X11Forwarder (Channel &session_channel, Options options) | |
| Result< void > | try_request () |
| Result< std::optional< Channel > > | try_accept (std::chrono::milliseconds timeout) |
Blocks up to timeout for the server to open an x11 channel. | |
| Result< void > | try_run_until_stopped () |
| Accepts then pumps x11 channels to the local display until stop() is called. | |
| void | stop () noexcept |
Static Public Member Functions | |
| static Result< ForwardTarget > | target_from_display (std::string_view display) |
| Parses $DISPLAY (":0", "localhost:10.0", "host:0") into a ForwardTarget. | |
Client-side X11 forwarding: request it on an open session channel, then accept and pump the (usually single) resulting x11 channel to a local X display. See docs/design/07 ยง7.4. X11 forwarding is a well-known security hazard: a compromised remote host gets access to the local display, so trusted defaults to false and single_connection is recommended.
|
explicit |
| SSHPP_INLINE Result< void > sshpp::X11Forwarder::try_request | ( | ) |
| SSHPP_INLINE Result< std::optional< Channel > > sshpp::X11Forwarder::try_accept | ( | std::chrono::milliseconds | timeout | ) |
Blocks up to timeout for the server to open an x11 channel.
| SSHPP_INLINE Result< void > sshpp::X11Forwarder::try_run_until_stopped | ( | ) |
Accepts then pumps x11 channels to the local display until stop() is called.
|
noexcept |
|
static |
Parses $DISPLAY (":0", "localhost:10.0", "host:0") into a ForwardTarget.