mirror of
https://github.com/eycorsican/leaf.git
synced 2026-12-06 16:01:29 +00:00
Fix build
This commit is contained in:
1 parent
15b793ec37
commit
f7349cdbc0
2 files changed
+8
-8
No files matched your search
+6
-6
@@ -23,6 +23,8 @@ all-configs = [
|
||||
"config-json",
|
||||
]
|
||||
all-endpoints = [
|
||||
"inbound-http",
|
||||
"inbound-socks",
|
||||
"outbound-direct",
|
||||
"outbound-drop",
|
||||
"outbound-redirect",
|
||||
@@ -34,8 +36,6 @@ all-endpoints = [
|
||||
"outbound-ws",
|
||||
"outbound-vless",
|
||||
"outbound-h2",
|
||||
"inbound-http",
|
||||
"inbound-socks",
|
||||
"outbound-failover",
|
||||
"outbound-random",
|
||||
"outbound-tryall",
|
||||
@@ -147,10 +147,6 @@ http = { version = "0.2", optional = true }
|
||||
# SOCKS outbound
|
||||
async-socks5 = { version = "0.3", optional = true }
|
||||
|
||||
# TUN
|
||||
[target.'cfg(any(target_os = "ios", target_os = "macos", target_os = "linux"))'.dependencies]
|
||||
tun = { git = "https://github.com/eycorsican/rust-tun.git", branch = "fix", features = ["async"] }
|
||||
|
||||
# VMess
|
||||
lz_fnv = { version = "0.1", optional = true }
|
||||
cfb-mode = { version = "0.5", optional = true }
|
||||
@@ -173,6 +169,10 @@ sha-1 = { version = "0.9", optional = true }
|
||||
sha2 = { version = "0.9", optional = true }
|
||||
hex = { version = "0.4", optional = true }
|
||||
|
||||
# TUN
|
||||
[target.'cfg(any(target_os = "ios", target_os = "macos", target_os = "linux"))'.dependencies]
|
||||
tun = { git = "https://github.com/eycorsican/rust-tun.git", branch = "fix", features = ["async"] }
|
||||
|
||||
[build-dependencies]
|
||||
cc = "1.0"
|
||||
bindgen = "0.55"
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ use tokio::runtime;
|
||||
#[cfg(feature = "inbound-socks")]
|
||||
use crate::proxy::socks;
|
||||
|
||||
#[cfg(feature = "feature-http")]
|
||||
#[cfg(feature = "inbound-http")]
|
||||
use crate::proxy::http;
|
||||
|
||||
use crate::{
|
||||
@@ -32,7 +32,7 @@ pub fn create_runners(config: Config) -> Result<Vec<Runner>> {
|
||||
let mut runners: Vec<Runner> = Vec::new();
|
||||
for inbound in config.inbounds.into_iter() {
|
||||
match inbound.protocol.as_str() {
|
||||
#[cfg(feature = "feature-http")]
|
||||
#[cfg(feature = "inbound-http")]
|
||||
"http" => {
|
||||
if let Ok(r) = http::inbound::new(inbound, dispatcher.clone()) {
|
||||
runners.push(r);
|
||||
|
||||
Reference in new issue
Block a user