Skip to content

Commit a89dc95

Browse files
author
e1732a364fed
committed
rm tun feature (always enabled)
1 parent 310bef9 commit a89dc95

File tree

22 files changed

+36
-68
lines changed

22 files changed

+36
-68
lines changed

.github/workflows/build_ruci_cmd_cross.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: Build ${{ matrix.target }}
5252
run: |
5353
54-
compile_features="-f file_server -f api_server -f api_client -f utils -f tun -f quinn -f native-tls-vendored -f lua54 -f lwip -f steganography"
54+
compile_features="-f file_server -f api_server -f api_client -f utils -f quinn -f native-tls-vendored -f lua54 -f lwip -f steganography"
5555
5656
cd crates/ruci-cmd
5757
./build_cross.sh -v ${{ inputs.tag || github.ref_name }} -t ${{ matrix.target }} $compile_features

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
run: cargo test --verbose --all-features
4444

4545
- name: Run Rucimp tests
46-
run: cd rucimp && cargo test --verbose --features "tun quinn lua sockopt use-native-tls ruci-rustls21 trace steganography"
46+
run: cd rucimp && cargo test --verbose --features "quinn lua sockopt use-native-tls ruci-rustls21 trace steganography"
4747

4848
- name: Run Ruci-cmd tests
49-
run: cd crates/ruci-cmd && cargo test --verbose --features "steganography lua file_server api_server api_client utils quinn use-native-tls tun lwip smoltcp"
49+
run: cd crates/ruci-cmd && cargo test --verbose --features "steganography lua file_server api_server api_client utils quinn use-native-tls lwip smoltcp"

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,10 @@ sha2 = "0.10" #for trojan
9393
hickory-resolver = { version = "0.24", features = ["serde-config"] }
9494

9595

96-
tun = { version = "0.7", features = ["async"], optional = true }
96+
tun = { version = "0.7", features = ["async"] }
9797

9898
[features]
9999

100-
default = ["tun"]
101100

102101
trace = []
103102

crates/ruci-cmd/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ default = ["api_server", "utils"]
6363
lua = ["rucimp/lua"]
6464
lua54 = ["rucimp/lua54"]
6565

66-
tun = ["rucimp/tun"]
6766

6867
# quic = ["rucimp/quic"]
6968
quinn = ["rucimp/quinn"]

crates/ruci-cmd/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
define compile
2-
cargo build --target ${BUILD_TRIPLET} -F steganography -F lua -F file_server -F api_server -F api_client -F utils -F quinn -F use-native-tls -F tun -F lwip -F smoltcp ${EXTRA} --release
2+
cargo build --target ${BUILD_TRIPLET} -F steganography -F lua -F file_server -F api_server -F api_client -F utils -F quinn -F use-native-tls -F lwip -F smoltcp ${EXTRA} --release
33
endef
44

55
define default_target
6-
cargo build -F steganography -F lua -F file_server -F api_server -F api_client -F utils -F quinn -F use-native-tls -F tun -F lwip -F smoltcp ${EXTRA} --release
6+
cargo build -F steganography -F lua -F file_server -F api_server -F api_client -F utils -F quinn -F use-native-tls -F lwip -F smoltcp ${EXTRA} --release
77
endef
88

99
define compile_cross
10-
cargo build --target ${BUILD_TRIPLET} -F steganography -F lua54 -F file_server -F api_server -F api_client -F utils -F quinn -F native-tls-vendored -F tun -F lwip -F smoltcp ${EXTRA} --release
10+
cargo build --target ${BUILD_TRIPLET} -F steganography -F lua54 -F file_server -F api_server -F api_client -F utils -F quinn -F native-tls-vendored -F lwip -F smoltcp ${EXTRA} --release
1111
endef
1212

1313

crates/ruci-cmd/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ debug:
1717
```sh
1818

1919
# 指定不生成 log
20-
RUST_LOG=none,ruci=debug cargo run --features "lua utils use-native-tls quinn tun steganography lwip smoltcp" -- --log-file ""
20+
RUST_LOG=none,ruci=debug cargo run --features "lua utils use-native-tls quinn steganography lwip smoltcp" -- --log-file ""
2121

2222
# 指定lua配置
23-
RUST_LOG=none,ruci=debug cargo run --features "lua utils use-native-tls quinn tun steganography lwip" -- --log-file "" -c remote.lua
23+
RUST_LOG=none,ruci=debug cargo run --features "lua utils use-native-tls quinn steganography lwip" -- --log-file "" -c remote.lua
2424

2525
# powershell
26-
$Env:RUST_LOG="none,ruci=debug";cargo run --features "lua utils use-native-tls quinn tun" -- --log-file ""
26+
$Env:RUST_LOG="none,ruci=debug";cargo run --features "lua utils use-native-tls quinn " -- --log-file ""
2727

2828
# 运行 grpc 的 lua 配置. 注意要加 --infinite
29-
RUST_LOG=none,ruci=debug cargo run --features "lua utils use-native-tls quinn tun" -- --log-file "" -c local_mux2_h2.lua --infinite
29+
RUST_LOG=none,ruci=debug cargo run --features "lua utils use-native-tls quinn " -- --log-file "" -c local_mux2_h2.lua --infinite
3030

3131
# 开启所有功能并启用 trace
32-
RUST_LOG=debug cargo run --features "api_server api_client trace lua utils use-native-tls quinn tun" -- -a --trace
32+
RUST_LOG=debug cargo run --features "api_server api_client trace lua utils use-native-tls quinn " -- -a --trace
3333
```
3434

3535
make:
@@ -56,7 +56,7 @@ CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android32-clang cargo buil
5656

5757
# features
5858

59-
features: lua, lua54, api_server, api_client, utils, trace, use-native-tls, native-tls-vendored, quic, quinn, tun, smoltcp, lwip
59+
features: lua, lua54, api_server, api_client, utils, trace, use-native-tls, native-tls-vendored, quic, quinn, , smoltcp, lwip
6060
default enables api_server,utils.
6161

6262
api_server, trace 这两个feature都会少许降低 performance.

crates/ruci-cmd/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@ fn log_setup(args: Args) -> Option<tracing_appender::non_blocking::WorkerGuard>
652652
"quinn",
653653
// #[cfg(feature = "quic")]
654654
// "quic",
655-
#[cfg(feature = "tun")]
656655
"tun",
657656
#[cfg(feature = "smoltcp")]
658657
"smoltcp",

dev_res/run_h2_trojans_recorder_pair.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22

3-
RUST_LOG=none,ruci=debug cargo run --features "lua quinn tun lwip use-native-tls" --example chain -- remote.lua &
3+
RUST_LOG=none,ruci=debug cargo run --features "lua quinn lwip use-native-tls" --example chain -- remote.lua &
44
PID1=$!
55

6-
RUST_LOG=none,ruci=debug cargo run --features "lua quinn tun lwip use-native-tls" --example chain_infinite -- local_mux_h2_recorder.lua &
6+
RUST_LOG=none,ruci=debug cargo run --features "lua quinn lwip use-native-tls" --example chain_infinite -- local_mux_h2_recorder.lua &
77
PID2=$!
88

99
sleep 5

dev_res/test_all_lua_examples.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test_lua_file() {
1818
echo "Testing $file..."
1919

2020
# 运行命令
21-
RUST_LOG=none,ruci=debug cargo run --features "lua quinn tun lwip smoltcp use-native-tls steganography" --example lua "../$file" &
21+
RUST_LOG=none,ruci=debug cargo run --features "lua quinn lwip smoltcp use-native-tls steganography" --example lua "../$file" &
2222
local pid=$!
2323

2424
sleep 2
@@ -45,7 +45,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4545
cd "$SCRIPT_DIR/../rucimp" || exit 1
4646
echo "Building example lua ..."
4747

48-
RUST_LOG=none,ruci=debug cargo build --example lua --features "lua quinn tun lwip smoltcp use-native-tls steganography"
48+
RUST_LOG=none,ruci=debug cargo build --example lua --features "lua quinn lwip smoltcp use-native-tls steganography"
4949

5050
# 主测试逻辑
5151
echo "Starting Lua examples test..."

dev_res/test_all_lua_examples_with_ruci_cmd.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test_lua_file() {
1818
echo "Testing $file..."
1919

2020
# 运行命令
21-
RUST_LOG=none,ruci=debug cargo run --features "lua utils use-native-tls quinn tun steganography lwip smoltcp" -- --log-file "" -c "../../$file" &
21+
RUST_LOG=none,ruci=debug cargo run --features "lua utils use-native-tls quinn steganography lwip smoltcp" -- --log-file "" -c "../../$file" &
2222
local pid=$!
2323

2424
sleep 2
@@ -46,7 +46,7 @@ cd "$SCRIPT_DIR/../crates/ruci-cmd" || exit 1
4646

4747
echo "Building ruci-cmd..."
4848

49-
RUST_LOG=none,ruci=debug cargo build --features "lua utils use-native-tls quinn tun steganography lwip smoltcp"
49+
RUST_LOG=none,ruci=debug cargo build --features "lua utils use-native-tls quinn steganography lwip smoltcp"
5050

5151
# 主测试逻辑
5252
echo "Starting Lua examples test with ruci-cmd..."

0 commit comments

Comments
 (0)