Skip to content

Commit 12252ea

Browse files
committed
upgrade rstun and bump version
1 parent ea70100 commit 12252ea

File tree

15 files changed

+139
-69
lines changed

15 files changed

+139
-69
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Rust
33
on:
44
push:
55
tags:
6-
- 'release/*'
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
77

88
jobs:
99
linux-gnu-x86_64:

Cargo.lock

Lines changed: 63 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
22
name = "omnip"
3-
version = "0.7.3"
3+
version = "0.7.5"
44
edition = "2021"
55

66
[lib]
77
crate-type = ["dylib", "lib"]
88

99
[dependencies]
1010
clap = { version = "4.5", features = ["derive"] }
11-
tokio = { version = "1.40", features = ["full"] }
11+
tokio = { version = "1.47", features = ["full"] }
1212
pretty_env_logger = "0.5"
1313
log = "0.4"
1414
chrono = "0.4"
@@ -28,7 +28,7 @@ lazy_static = "1.5"
2828
async-trait = "0.1"
2929
byte-pool = { git = "https://github.com/neevek/byte-pool" }
3030
# rstun = { path = "../rstun" }
31-
rstun = { git = "https://github.com/neevek/rstun", tag = "release/0.7.1" }
31+
rstun = { git = "https://github.com/neevek/rstun", tag = "v0.7.4" }
3232
hyper = { version = "0.14", features = ["full"]}
3333
http = "0.2"
3434
http-body = "0.4"

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ Options:
132132
-R, --retry-interval-ms <RETRY_INTERVAL_MS>
133133
Applicable only for quic protocol as upstream
134134
Max idle timeout for the QUIC connections [default: 5000]
135+
--hop-interval-ms <HOP_INTERVAL_MS>
136+
Applicable only for quic protocol as upstream
137+
Interval between hops in the QUIC connections [default: 180000]
135138
--tcp-nodelay
136139
Set TCP_NODELAY
137140
-w, --watch-proxy-rules-change

build.sh

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

3+
# npm install -g typescript
4+
# npm install react react-dom
5+
# npm install --save-dev @types/react @types/react-dom
6+
37
pushd src/omnip-web
48
npm run build
59
popd

src/api.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub struct QuicTunnelConfig {
2727
pub password: String,
2828
pub idle_timeout: u64,
2929
pub retry_interval: u64,
30+
pub hop_interval: u64,
3031
}
3132

3233
#[derive(Serialize, Deserialize, Debug)]

src/bin/omnip.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use anyhow::{bail, Context, Result};
1+
use anyhow::{Context, Result};
22
use base64::prelude::*;
33
use clap::builder::TypedValueParser as _;
44
use clap::{builder::PossibleValuesParser, Parser};
@@ -43,6 +43,7 @@ fn main() -> Result<()> {
4343
tcp_timeout_ms: args.tcp_timeout_ms,
4444
udp_timeout_ms: args.udp_timeout_ms,
4545
retry_interval_ms: args.retry_interval_ms,
46+
hop_interval_ms: args.hop_interval_ms,
4647
workers: args.threads,
4748
};
4849

@@ -174,6 +175,11 @@ struct OmnipArgs {
174175
#[arg(short = 'R', long, verbatim_doc_comment, default_value = "5000")]
175176
retry_interval_ms: u64,
176177

178+
/// Applicable only for quic protocol as upstream
179+
/// Interval between hops in the QUIC connections
180+
#[arg(long, verbatim_doc_comment, default_value = "0")]
181+
hop_interval_ms: u64,
182+
177183
/// Set TCP_NODELAY
178184
#[arg(long, action)]
179185
tcp_nodelay: bool,

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ pub struct CommonQuicConfig {
360360
pub tcp_timeout_ms: u64,
361361
pub udp_timeout_ms: u64,
362362
pub retry_interval_ms: u64,
363+
pub hop_interval_ms: u64,
363364
pub workers: usize,
364365
}
365366

@@ -604,6 +605,7 @@ pub mod android {
604605
jpassword: JString,
605606
jquicTimeoutMs: jint,
606607
jretryIntervalMs: jint,
608+
jhopIntervalMs: jint,
607609
jworkers: jint,
608610
jtcpNoDelay: jboolean,
609611
jtcpTimeoutMs: jlong,
@@ -649,6 +651,7 @@ pub mod android {
649651
cipher,
650652
quic_timeout_ms: jquicTimeoutMs as u64,
651653
retry_interval_ms: jretryIntervalMs as u64,
654+
hop_interval_ms: jhopIntervalMs as u64,
652655
workers: jworkers as usize,
653656
tcp_timeout_ms: jtcpTimeoutMs as u64,
654657
udp_timeout_ms: judpTimeoutMs as u64,

0 commit comments

Comments
 (0)