Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/devolutions-agent-shared/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ use std::env;

use camino::Utf8PathBuf;
use cfg_if::cfg_if;

#[rustfmt::skip]
pub use date_version::{DateVersion, DateVersionError};
#[rustfmt::skip]
pub use update_json::{ProductUpdateInfo, UpdateJson, VersionSpecification};

cfg_if! {
Expand Down
4 changes: 3 additions & 1 deletion crates/devolutions-agent-shared/src/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ mod reversed_hex_uuid;

pub mod registry;

pub use reversed_hex_uuid::InvalidReversedHexUuid;
use uuid::{Uuid, uuid};

#[rustfmt::skip]
pub use reversed_hex_uuid::InvalidReversedHexUuid;

/// MSI upgrade code for the Devolutions Gateway.
///
/// MSI update code is same for all versions of the product, while product code is different for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ impl From<serde_json::Error> for Error {
mod request;

mod default_api;
pub use self::default_api::{DefaultApi, DefaultApiClient};

pub mod client;
pub mod configuration;

#[rustfmt::skip]
pub use self::default_api::{DefaultApi, DefaultApiClient};
4 changes: 3 additions & 1 deletion crates/devolutions-pedm-shared/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::time::Duration;

use anyhow::{Result, bail};
use devolutions_pedm_client_http::apis::client::APIClient;
pub use devolutions_pedm_client_http::models;
use hyper::Uri;
use hyper::body::HttpBody;
use hyper::client::connect::{Connected, Connection};
Expand All @@ -17,6 +16,9 @@ use tower::Service;
use win_api_wrappers::raw::Win32::Foundation::ERROR_PIPE_BUSY;
use win_api_wrappers::raw::Win32::Storage::FileSystem::SECURITY_IMPERSONATION;

#[rustfmt::skip]
pub use devolutions_pedm_client_http::models;

#[pin_project]
struct NamedPipeStream(#[pin] NamedPipeClient);

Expand Down
1 change: 1 addition & 0 deletions crates/devolutions-pedm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ mod db;
mod log;
pub mod model;

#[rustfmt::skip]
pub use config::Config;

cfg_if::cfg_if! {
Expand Down
5 changes: 3 additions & 2 deletions crates/jet-proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ pub mod accept;
pub mod connect;
pub mod test;

pub use http::StatusCode;

mod utils;

#[rustfmt::skip]
pub use http::StatusCode;

use std::env;
use std::io::{self, Read};
use std::sync::OnceLock;
Expand Down
4 changes: 3 additions & 1 deletion crates/jmux-proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
use core::fmt;

use bytes::{Buf as _, BufMut as _};
use smol_str::SmolStr;

// We re-export these types, because they are used in the public API.
#[rustfmt::skip]
pub use bytes::{Bytes, BytesMut};
use smol_str::SmolStr;

/// Distant identifier for a channel
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
Expand Down
10 changes: 7 additions & 3 deletions crates/jmux-proxy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use std::time::SystemTime;

use anyhow::Context as _;
use bytes::Bytes;
pub use jmux_proto::DestinationUrl;
use jmux_proto::{ChannelData, DistantChannelId, Header, LocalChannelId, Message, ReasonCode};
use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt};
use tokio::net::TcpStream;
Expand All @@ -30,11 +29,16 @@ use tokio_util::codec::FramedRead;
use tracing::{Instrument as _, Span};

use self::codec::JmuxCodec;
pub use self::config::{FilteringRule, JmuxConfig};
use self::event::TrafficCallback;
pub use self::event::{EventOutcome, TrafficEvent, TransportProtocol};
use self::id_allocator::IdAllocator;

#[rustfmt::skip]
pub use jmux_proto::DestinationUrl;
#[rustfmt::skip]
pub use self::config::{FilteringRule, JmuxConfig};
#[rustfmt::skip]
pub use self::event::{EventOutcome, TrafficEvent, TransportProtocol};

const MAXIMUM_PACKET_SIZE_IN_BYTES: u16 = 4 * 1024; // 4 kiB
const WINDOW_ADJUSTMENT_THRESHOLD: u32 = 4 * 1024; // 4 kiB

Expand Down
4 changes: 3 additions & 1 deletion crates/job-queue-libsql/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ extern crate tracing;
use anyhow::Context as _;
use async_trait::async_trait;
use job_queue::{DynJob, JobCtx, JobQueue, JobReader, RunnerWaker};
pub use libsql;
use libsql::Connection;
use time::OffsetDateTime;
use ulid::Ulid;
use uuid::Uuid;

#[rustfmt::skip]
pub use libsql;

/// Implementation of [`JobQueue`] using libSQL as the backend
///
/// This is inspired by 37signals' Solid Queue:
Expand Down
1 change: 1 addition & 0 deletions crates/network-monitor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use tracing::warn;
mod log_queue;
mod state;

#[rustfmt::skip]
pub use crate::state::{ConfigCache, State};

#[derive(Error, Debug)]
Expand Down
1 change: 1 addition & 0 deletions crates/network-scanner/src/broadcast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use anyhow::Context;
pub mod asynchronous;
pub mod blocking;

#[rustfmt::skip]
pub use asynchronous::broadcast;

#[derive(Debug, Clone)]
Expand Down
2 changes: 2 additions & 0 deletions crates/network-scanner/src/interfaces/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use network_interface::NetworkInterfaceConfig;

#[rustfmt::skip]
pub use network_interface::{Addr, NetworkInterface, V4IfAddr, V6IfAddr};

pub fn get_network_interfaces() -> anyhow::Result<Vec<NetworkInterface>> {
Expand Down
5 changes: 4 additions & 1 deletion crates/proxy-socks/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
mod socks4;
mod socks5;

use tokio::io::{AsyncRead, AsyncWrite};

#[rustfmt::skip]
pub use socks4::Socks4Stream;
#[rustfmt::skip]
pub use socks5::{Socks5Acceptor, Socks5AcceptorConfig, Socks5FailureCode, Socks5Listener, Socks5Stream};
use tokio::io::{AsyncRead, AsyncWrite};

/// We need a super-trait in order to have additional non-auto-trait traits in trait objects.
///
Expand Down
4 changes: 3 additions & 1 deletion crates/traffic-audit-libsql/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ extern crate tracing;

use anyhow::Context as _;
use async_trait::async_trait;
pub use libsql;
use libsql::Connection;
use traffic_audit::{ClaimedEvent, TrafficAuditRepo, TrafficEvent};
use ulid::Ulid;
use uuid::Uuid;

#[rustfmt::skip]
pub use libsql;

// Migration constants - these will be used by the migration system
const MIGRATIONS: &[&str] = &[
// Migration 0 - Initial schema
Expand Down
4 changes: 4 additions & 0 deletions crates/transport/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ mod ws;

use tokio::io::{AsyncRead, AsyncWrite};

#[rustfmt::skip]
pub use self::copy_bidirectional::*;
#[rustfmt::skip]
pub use self::pinnable::*;
#[rustfmt::skip]
pub use self::shared::*;
#[rustfmt::skip]
pub use self::ws::*;

pub type ErasedRead = Box<dyn AsyncRead + Send + Unpin>;
Expand Down
4 changes: 4 additions & 0 deletions crates/video-streamer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ pub(crate) mod streamer;
#[macro_use]
extern crate tracing;

#[rustfmt::skip]
pub use config::StreamingConfig;
#[rustfmt::skip]
pub use streamer::reopenable_file::ReOpenableFile;
#[rustfmt::skip]
pub use streamer::signal_writer::SignalWriter;
#[rustfmt::skip]
pub use streamer::webm_stream;
4 changes: 3 additions & 1 deletion crates/win-api-wrappers/src/identity/sid.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::{fmt, mem};

pub use Security::WELL_KNOWN_SID_TYPE;
use thiserror::Error;
use windows::Win32::Foundation::{HLOCAL, LocalFree};
use windows::Win32::Security;
Expand All @@ -12,6 +11,9 @@ use crate::identity::account::{Account, AccountWithType};
use crate::raw_buffer::RawBuffer;
use crate::str::{U16CStr, U16CStrExt, U16CString, U16CStringExt};

#[rustfmt::skip]
pub use Security::WELL_KNOWN_SID_TYPE;

/// A string-format security identifier (SID), suitable for display, storage, or transmission
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct StringSid {
Expand Down
9 changes: 6 additions & 3 deletions crates/win-api-wrappers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ pub mod str;
#[cfg(target_os = "windows")]
#[path = ""]
mod lib_win {
pub use windows as raw;

mod error;
pub use error::Error;

pub mod event;
pub mod fs;
Expand All @@ -32,7 +29,13 @@ mod lib_win {
pub mod user;
pub mod utils;
pub mod wts;

#[rustfmt::skip]
pub use windows as raw;
#[rustfmt::skip]
pub use error::Error;
}

#[cfg(target_os = "windows")]
#[rustfmt::skip]
pub use lib_win::*;
2 changes: 2 additions & 0 deletions crates/win-api-wrappers/src/str.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
//! Utility module providing types for manipulating wide strings.

// Re-export relevant items from the widestring crate.
#[rustfmt::skip]
pub use widestring::{
U16CStr, U16CString, U16Str, U16String, Utf16Str, Utf16String, decode_utf16, decode_utf16_lossy, encode_utf16,
include_utf16str, u16cstr, u16str, utf16str,
};

#[cfg(target_os = "windows")]
#[rustfmt::skip]
pub use self::win_ext::*;

#[cfg(target_os = "windows")]
Expand Down
1 change: 1 addition & 0 deletions devolutions-gateway/src/ai/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@

mod provider;

#[rustfmt::skip]
pub use provider::{AuthMethod, ProviderConfig, ProviderConfigBuilder};
7 changes: 5 additions & 2 deletions devolutions-gateway/src/plugin_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ use std::sync::{Arc, LazyLock};
use anyhow::Context as _;
use camino::Utf8Path;
use dlopen::symbor::Library;
pub use packets_parsing::PacketsParser;
use parking_lot::Mutex;
use plugin_info::{PluginCapabilities, PluginInformation};
pub use recording::Recorder;

use crate::config::Conf;

#[rustfmt::skip]
pub use packets_parsing::PacketsParser;
#[rustfmt::skip]
pub use recording::Recorder;

#[derive(Clone)]
struct Plugin {
lib: Arc<Library>,
Expand Down