mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-11-06 08:14:07 +00:00
chore: reformatted with nightlly rustc
This commit is contained in:
@@ -70,7 +70,14 @@ use serde::{Deserialize, Serialize};
|
||||
use shadowsocks::relay::socks5::Address;
|
||||
use shadowsocks::{
|
||||
config::{
|
||||
ManagerAddr, Mode, ReplayAttackPolicy, ServerAddr, ServerConfig, ServerUser, ServerUserManager, ServerWeight,
|
||||
ManagerAddr,
|
||||
Mode,
|
||||
ReplayAttackPolicy,
|
||||
ServerAddr,
|
||||
ServerConfig,
|
||||
ServerUser,
|
||||
ServerUserManager,
|
||||
ServerWeight,
|
||||
},
|
||||
crypto::CipherKind,
|
||||
plugin::PluginConfig,
|
||||
|
||||
@@ -6,7 +6,10 @@ use hickory_resolver::proto::{
|
||||
op::{header::MessageType, response_code::ResponseCode, Message, OpCode},
|
||||
rr::{
|
||||
rdata::{A, AAAA},
|
||||
DNSClass, RData, Record, RecordType,
|
||||
DNSClass,
|
||||
RData,
|
||||
Record,
|
||||
RecordType,
|
||||
},
|
||||
};
|
||||
use log::{debug, trace};
|
||||
|
||||
@@ -35,8 +35,7 @@ use tokio::{
|
||||
time,
|
||||
};
|
||||
|
||||
use crate::config::ServerInstanceConfig;
|
||||
use crate::local::context::ServiceContext;
|
||||
use crate::{config::ServerInstanceConfig, local::context::ServiceContext};
|
||||
|
||||
use super::{
|
||||
server_data::ServerIdent,
|
||||
|
||||
@@ -29,7 +29,9 @@ use shadowsocks::{
|
||||
use crate::{
|
||||
local::{context::ServiceContext, loadbalancing::PingBalancer},
|
||||
net::{
|
||||
packet_window::PacketWindowFilter, MonProxySocket, UDP_ASSOCIATION_KEEP_ALIVE_CHANNEL_SIZE,
|
||||
packet_window::PacketWindowFilter,
|
||||
MonProxySocket,
|
||||
UDP_ASSOCIATION_KEEP_ALIVE_CHANNEL_SIZE,
|
||||
UDP_ASSOCIATION_SEND_CHANNEL_SIZE,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ use tokio::{
|
||||
};
|
||||
|
||||
use crate::net::{
|
||||
sys::{ErrorKind, set_common_sockopt_after_connect, set_common_sockopt_for_connect},
|
||||
sys::{set_common_sockopt_after_connect, set_common_sockopt_for_connect, ErrorKind},
|
||||
AcceptOpts,
|
||||
AddrFamily,
|
||||
ConnectOpts,
|
||||
|
||||
@@ -991,7 +991,11 @@ fn launch_reload_server_task(config_path: PathBuf, balancer: PingBalancer) {
|
||||
}
|
||||
};
|
||||
|
||||
info!("auto-reload {} with {} servers", config_path.display(), config.server.len());
|
||||
info!(
|
||||
"auto-reload {} with {} servers",
|
||||
config_path.display(),
|
||||
config.server.len()
|
||||
);
|
||||
|
||||
if let Err(err) = balancer.reset_servers(config.server).await {
|
||||
error!("auto-reload {} but found error: {}", config_path.display(), err);
|
||||
|
||||
Reference in New Issue
Block a user