mirror of
https://github.com/eycorsican/leaf.git
synced 2026-12-05 16:02:32 +00:00
test: fix
This commit is contained in:
1 parent
857de598be
commit
949b60c2bc
1 file changed
+5
-5
@@ -1,3 +1,4 @@
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use futures::future::abortable;
|
||||
@@ -92,11 +93,10 @@ pub fn test_configs(configs: Vec<String>, socks_addr: &str, socks_port: u16) {
|
||||
dns: None,
|
||||
};
|
||||
let config = leaf::config::json::to_internal(config).unwrap();
|
||||
let outbound_manager = leaf::app::outbound::manager::OutboundManager::new(
|
||||
&config.outbounds,
|
||||
config.dns.as_ref().unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
let dns_client = Arc::new(leaf::app::dns_client::DnsClient::new(&config.dns).unwrap());
|
||||
let outbound_manager =
|
||||
leaf::app::outbound::manager::OutboundManager::new(&config.outbounds, dns_client)
|
||||
.unwrap();
|
||||
let handler = outbound_manager.get("socks").unwrap();
|
||||
let mut sess = leaf::session::Session::default();
|
||||
sess.destination = leaf::session::SocksAddr::Ip("127.0.0.1:3000".parse().unwrap());
|
||||
|
||||
Reference in new issue
Block a user