Skip to content

Commit

Permalink
move .suit.toml from resource/ to dev_res/
Browse files Browse the repository at this point in the history
to prevent distributing it again since it's deprecated
  • Loading branch information
e1732a364fed committed Jan 1, 2099
1 parent ed79da7 commit 29324d8
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 9 deletions.
8 changes: 3 additions & 5 deletions crates/ruci-cmd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ enum Mode {
/// Chain mode, which uses lua file
#[default]
C,

/// Suit mode, which uses toml file
S,
// Suit mode, which uses toml file
// S,
}

/// ruci command line parameters:
Expand Down Expand Up @@ -304,8 +303,7 @@ async fn start_engine(
opts,
)
.await?;
}
Mode::S => todo!(),
} //Mode::S => todo!(),
}
Ok(())
}
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions doc/book/src/app/cmd.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,39 @@

./ruci-cmd -c remote.lua

macOS 版本要在 系统App:Settings - Privacy & Security 里 allow 一下。

ruci-cmd 会在 下面文件夹中 找 指定的 配置文件

"./",
"ruci_config/",
"resource/",

因此如果不想使用 默认打包的 resource 文件夹,可以将其改名为 resource_default,
然后 自己创建一个 ruci_config 文件夹,将自己的配置放在 ruci_config 中,这样
就不会产生混淆

## log

两种选择,使用命令行参数 或者使用 环境变量

-l, --log-level <LOG_LEVEL>

可为 ERROR, WARN, INFO , DEBUG, TRACE

环境变量法比较高级:

在命令的开头加上

RUST_LOG=none,ruci=debug

powershell
$Env:RUST_LOG="none,ruci=debug";

这是在过滤 log, 对其它依赖包的 日志通通不要,只留 ruci 包自己的日志



## 高级用法

使用 infinite:
Expand Down
4 changes: 4 additions & 0 deletions doc/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,3 +467,7 @@ ip route add {v} dev {original_dev_name} metric 100
}
```

## 日志

从0.0.6起,ruci 不再继续开发 suit 模式。所留代码仅作参考使用

2 changes: 0 additions & 2 deletions resource/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

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

local.suit.toml, remote.suit.toml 为 suit 模式的示例配置文件

test.crt, test.key 用于测试用于tls的自签名证书

test.crt 为 pem 格式的 x509 证书, test.key 为 pem 格式的 EC key
Expand Down
3 changes: 2 additions & 1 deletion rucimp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ pub mod route;

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

pub const COMMON_DIRS: [&str; 5] = [
pub const COMMON_DIRS: [&str; 6] = [
"./",
"ruci_config/",
"resource/",
"dev_res/",
"../resource/",
"../../resource/",
];
2 changes: 1 addition & 1 deletion rucimp/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use tracing::{debug, info};

use crate::COMMON_DIRS;

/// try current folder and ruci_config, resource, ../resource folder
/// try folders in COMMON_DIRS
///
/// try the default_file given or the first cmd argument
///
Expand Down

0 comments on commit 29324d8

Please sign in to comment.