Files
shadowsocks-rust/src/lib.rs
T
Shun Sakai f57d50659f Change the return type of the main function
Since Rust 1.61.0, the `main` function can return a type that
implements the `Termination` trait.
By this, the `main` function can return custom exit codes, so use this.
2022-06-13 11:26:50 +08:00

29 lines
953 B
Rust

//! Shadowsocks service command line utilities
pub mod allocator;
pub mod config;
#[cfg(unix)]
pub mod daemonize;
#[cfg(feature = "logging")]
pub mod logging;
pub mod monitor;
pub mod password;
pub mod service;
pub mod sys;
pub mod validator;
/// Exit code when server exits unexpectly
pub const EXIT_CODE_SERVER_EXIT_UNEXPECTEDLY: sysexits::ExitCode = sysexits::ExitCode::Software;
/// Exit code when server aborted
pub const EXIT_CODE_SERVER_ABORTED: sysexits::ExitCode = sysexits::ExitCode::Software;
/// Exit code when loading configuration from file fails
pub const EXIT_CODE_LOAD_CONFIG_FAILURE: sysexits::ExitCode = sysexits::ExitCode::Config;
/// Exit code when loading ACL from file fails
pub const EXIT_CODE_LOAD_ACL_FAILURE: sysexits::ExitCode = sysexits::ExitCode::Config;
/// Build timestamp in UTC
pub const BUILD_TIME: &str = build_time::build_time_utc!();
/// shadowsocks version
pub const VERSION: &str = env!("CARGO_PKG_VERSION");