pub struct GitwayConfig {
pub host: String,
pub port: u16,
pub username: String,
pub identity_file: Option<PathBuf>,
pub cert_file: Option<PathBuf>,
pub skip_host_check: bool,
pub inactivity_timeout: Duration,
pub custom_known_hosts: Option<PathBuf>,
pub verbose: bool,
pub fallback: Option<(String, u16)>,
}Expand description
Immutable configuration for a GitwaySession.
Construct via GitwayConfig::builder, or use one of the convenience
constructors (github, gitlab,
codeberg) for the most common targets.
Fields§
§host: StringPrimary SSH host (e.g. github.com, gitlab.com, codeberg.org).
port: u16Primary SSH port (default: 22).
username: StringRemote username (always git for hosted services; FR-13).
identity_file: Option<PathBuf>Explicit identity file path supplied via --identity.
cert_file: Option<PathBuf>OpenSSH certificate path supplied via --cert.
skip_host_check: boolWhen true, skip host-key verification (FR-8).
inactivity_timeout: DurationInactivity timeout for the SSH session (FR-5).
GitHub’s idle threshold is around 60 s; this is the configured client-side inactivity timeout, not a per-packet deadline.
custom_known_hosts: Option<PathBuf>Path to a known_hosts-style file for custom or self-hosted instances
(FR-7). Format: one hostname SHA256:<fp> entry per line.
verbose: boolEnable verbose debug logging when true.
fallback: Option<(String, u16)>Optional fallback host when port 22 is unavailable (FR-1).
GitHub: ssh.github.com:443. GitLab: altssh.gitlab.com:443.
Codeberg has no published port-443 fallback.
Implementations§
Source§impl GitwayConfig
impl GitwayConfig
Sourcepub fn builder(host: impl Into<String>) -> GitwayConfigBuilder
pub fn builder(host: impl Into<String>) -> GitwayConfigBuilder
Sourcepub fn github() -> Self
pub fn github() -> Self
Convenience constructor for the default GitHub target (github.com:22).
Includes the ssh.github.com:443 fallback pre-configured.
Trait Implementations§
Source§impl Clone for GitwayConfig
impl Clone for GitwayConfig
Source§fn clone(&self) -> GitwayConfig
fn clone(&self) -> GitwayConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more