-
iOS PacketTunnel 进程崩溃。 Branch:master 使用 make ios编译 libleaf.a Cargo.toml: [features] leaf-ffi/src/libs.rs:新增接口 #[no_mangle]
pub extern "C" fn leaf_run_with_config(rt_id: u16, config: *const c_char) -> i32 {
if let Ok(_config) = unsafe { CStr::from_ptr(config).to_str() } {
let opts = leaf::StartOptions {
config: leaf::Config::Str(_config.to_string()),
#[cfg(feature = "auto-reload")]
auto_reload: false,
runtime_opt: leaf::RuntimeOption::SingleThread,
};
if let Err(e) = leaf::start(rt_id, opts) {
return to_errno(e);
}
ERR_OK
} else {
ERR_CONFIG
}
} 接口调用: leaf_run_with_config(987, config.cString(using: .utf8)) 配置文件: {
"log": {
"level": "trace"
},
"inbounds": [
{
"protocol": "tun",
"settings": {
"fd": \(fd)
},
"tag": "tun"
}
],
"outbounds": [
{
"protocol": "socks",
"settings": {
"address": "127.0.0.1",
"port": 8080
},
"tag": "clash"
}
]
} 输出日志: ^[[37m[2022-04-17 12:24:24][^[[37mDEBUG^[[0m^[[37m] default handler [clash]^[[0m 崩溃堆栈:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 14 replies
-
同崩溃:
大佬可以加下非官网tg群讨论学习: ref: #156 |
Beta Was this translation helpful? Give feedback.
-
Close!!! 初始化顺序导致。 |
Beta Was this translation helpful? Give feedback.
-
请问一下使用make ios 命令怎么编译的libleaf.a 有没有具体一些的操作步骤? |
Beta Was this translation helpful? Give feedback.
Close!!!
初始化顺序导致。