Skip to content

Commit 29324d8

Browse files
committed
move .suit.toml from resource/ to dev_res/
to prevent distributing it again since it's deprecated
1 parent ed79da7 commit 29324d8

File tree

8 files changed

+43
-9
lines changed

8 files changed

+43
-9
lines changed

crates/ruci-cmd/src/main.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ enum Mode {
2525
/// Chain mode, which uses lua file
2626
#[default]
2727
C,
28-
29-
/// Suit mode, which uses toml file
30-
S,
28+
// Suit mode, which uses toml file
29+
// S,
3130
}
3231

3332
/// ruci command line parameters:
@@ -304,8 +303,7 @@ async fn start_engine(
304303
opts,
305304
)
306305
.await?;
307-
}
308-
Mode::S => todo!(),
306+
} //Mode::S => todo!(),
309307
}
310308
Ok(())
311309
}

doc/book/src/app/cmd.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,39 @@
1111

1212
./ruci-cmd -c remote.lua
1313

14+
macOS 版本要在 系统App:Settings - Privacy & Security 里 allow 一下。
15+
16+
ruci-cmd 会在 下面文件夹中 找 指定的 配置文件
17+
18+
"./",
19+
"ruci_config/",
20+
"resource/",
21+
22+
因此如果不想使用 默认打包的 resource 文件夹,可以将其改名为 resource_default,
23+
然后 自己创建一个 ruci_config 文件夹,将自己的配置放在 ruci_config 中,这样
24+
就不会产生混淆
25+
26+
## log
27+
28+
两种选择,使用命令行参数 或者使用 环境变量
29+
30+
-l, --log-level <LOG_LEVEL>
31+
32+
可为 ERROR, WARN, INFO , DEBUG, TRACE
33+
34+
环境变量法比较高级:
35+
36+
在命令的开头加上
37+
38+
RUST_LOG=none,ruci=debug
39+
40+
powershell
41+
$Env:RUST_LOG="none,ruci=debug";
42+
43+
这是在过滤 log, 对其它依赖包的 日志通通不要,只留 ruci 包自己的日志
44+
45+
46+
1447
## 高级用法
1548

1649
使用 infinite:

doc/notes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,3 +467,7 @@ ip route add {v} dev {original_dev_name} metric 100
467467
}
468468
```
469469

470+
## 日志
471+
472+
从0.0.6起,ruci 不再继续开发 suit 模式。所留代码仅作参考使用
473+

resource/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
local*.lua, remote.lua 为 chain 模式的示例配置文件
44

5-
local.suit.toml, remote.suit.toml 为 suit 模式的示例配置文件
6-
75
test.crt, test.key 用于测试用于tls的自签名证书
86

97
test.crt 为 pem 格式的 x509 证书, test.key 为 pem 格式的 EC key

rucimp/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ pub mod route;
1414

1515
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
1616

17-
pub const COMMON_DIRS: [&str; 5] = [
17+
pub const COMMON_DIRS: [&str; 6] = [
1818
"./",
1919
"ruci_config/",
2020
"resource/",
21+
"dev_res/",
2122
"../resource/",
2223
"../../resource/",
2324
];

rucimp/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use tracing::{debug, info};
99

1010
use crate::COMMON_DIRS;
1111

12-
/// try current folder and ruci_config, resource, ../resource folder
12+
/// try folders in COMMON_DIRS
1313
///
1414
/// try the default_file given or the first cmd argument
1515
///

0 commit comments

Comments
 (0)