chore: bump version to 0.3.3 and add auto-version bumping script to GHA

This commit is contained in:
ospab 2026-06-18 02:02:58 +03:00
parent f9c048f4f1
commit 774d926bf9
9 changed files with 107 additions and 193 deletions

View File

@ -25,6 +25,10 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Bump version based on tag
if: startsWith(github.ref, 'refs/tags/v')
run: python scripts/bump_version.py ${{ github.ref_name }}
- name: Setup Rust toolchain - name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
with: with:
@ -138,6 +142,10 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Bump version based on tag
if: startsWith(github.ref, 'refs/tags/v')
run: python scripts/bump_version.py ${{ github.ref_name }}
# ── Rust toolchain ───────────────────────────────────────────────────── # ── Rust toolchain ─────────────────────────────────────────────────────
- name: Setup Rust toolchain - name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
@ -240,6 +248,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Bump version based on tag
if: startsWith(github.ref, 'refs/tags/v')
run: python scripts/bump_version.py ${{ github.ref_name }}
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
@ -312,6 +324,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Bump version based on tag
if: startsWith(github.ref, 'refs/tags/v')
run: python scripts/bump_version.py ${{ github.ref_name }}
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
@ -374,6 +390,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Bump version based on tag
if: startsWith(github.ref, 'refs/tags/v')
run: python scripts/bump_version.py ${{ github.ref_name }}
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
@ -434,6 +454,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Bump version based on tag
if: startsWith(github.ref, 'refs/tags/v')
run: python scripts/bump_version.py ${{ github.ref_name }}
- name: Setup Java - name: Setup Java
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:

View File

@ -1,174 +0,0 @@
# CRITICAL FIXES - Summary Report
**Date:** 2026-06-17
**Status:** COMPLETED
## Changes Made
### 1. ostp-client (Commit: b5e830a)
#### Buffer Optimization
```diff
- .stack_buffer_size(1024) → + .stack_buffer_size(65536) (64 KB)
- .tcp_buffer_size(1024) → + .tcp_buffer_size(131072) (128 KB)
- .udp_buffer_size(1024) → + .udp_buffer_size(65536) (64 KB)
```
**Impact:** +15-20% throughput improvement, reduced blocking
#### UDP Handler Implementation
- **Before:** `Err(anyhow!("OSTP UDP handler not yet fully migrated"))`
- **After:** Complete implementation with proper session routing
- Encodes UDP packets with OSTP protocol
- Supports ConnectOk/Data/Close relay messages
- Handles timeouts and keep-alive
#### Router Performance
- **Problem:** `to_lowercase()` called per rule check in hot path
- **Fix:** Cache lowercase values outside iterator
- Domain matching: Single `to_lowercase()` for SNI
- Process matching: Single `to_lowercase()` for process name
- **Impact:** ~30% faster routing
#### Cleanup
- Deleted `bridge.rs.bak` (113KB unused file)
- Deleted `runner.rs.bak` (15KB unused file)
---
### 2. ostp-gui (Commit: d91d5de)
#### IPC Security
- **Problem:** Plain JSON messages between GUI and helper
- **Solution:** ChaCha20Poly1305 encryption
- New module: `ipc_crypto.rs`
- Key derivation from auth token using SHA-256
- All messages encrypted/decrypted before transmission
- Hex encoding for safe transport
#### Connection Timeout
```diff
- timeout(Duration::from_secs(60)) → timeout(Duration::from_secs(15))
```
**Impact:** Users see errors faster, better UX
#### Error Handling
```diff
- listener.local_addr().unwrap().port()
+ listener.local_addr().map_err(...)?.port()
```
- Replaced `.unwrap()` with proper `?` propagation
- Better error messages for debugging
#### Dependencies Added
```toml
chacha20poly1305 = "0.10"
sha2 = "0.10"
hex = "0.4.3"
```
---
## Metrics
### Before Fixes
| Component | Throughput | Stability | Latency |
|-----------|-----------|-----------|---------|
| ostp-client | ~85 Mbps | 7/10 | Good |
| ostp-gui | Timeout=60s | 6/10 | Variable |
### After Fixes
| Component | Throughput | Stability | Latency |
|-----------|-----------|-----------|---------|
| ostp-client | ~100 Mbps | 8/10 | Good |
| ostp-gui | Timeout=15s | 8/10 | Fast |
**Improvements:**
- Client throughput: +18% (buffer optimization + UDP handler)
- GUI stability: +33% (encryption + error handling)
- GUI UX: Much faster failure detection (75% timeout reduction)
---
## Remaining Critical Issues
### ostp-flutter
- [ ] Implement event-based updates instead of polling
- [ ] Add file logging support
- [ ] Fix traffic parsing (string manipulation)
- [ ] Encrypt native bridge with TLS
### ostp-client (Minor)
- [ ] Add physical interface detection for Windows bypass
- [ ] Implement connection rate limiting
### ostp-gui (Minor)
- [ ] Async process list loading (don't block UI)
- [ ] Add version negotiation for IPC messages
---
## Testing Recommendations
### ostp-client
```bash
# Test buffer optimization
iperf3 -c <server> -b 100M # Should achieve ~100Mbps
# Test UDP handler
tcpdump -i any 'udp port 53' # Verify DNS relay works
```
### ostp-gui
```bash
# Test encryption
tcpdump -i lo 'port 127.0.0.1 and tcp' # Verify no plaintext config
# Test timeout
killall ostp-tun-helper && connect # Should fail in 15s (was 60s)
```
---
## Files Modified
### ostp-client
- `ostp-client/src/tunnel/inbounds/tun.rs` - Buffer config
- `ostp-client/src/tunnel/outbounds/ostp.rs` - UDP handler
- `ostp-client/src/tunnel/router.rs` - Performance optimization
### ostp-gui
- `ostp-gui/src-tauri/src/lib.rs` - Encryption integration
- `ostp-gui/src-tauri/src/ipc_crypto.rs` - New crypto module
- `ostp-gui/src-tauri/Cargo.toml` - Dependencies
### Cleanup
- Deleted `ostp-client/src/bridge.rs.bak`
- Deleted `ostp-client/src/runner.rs.bak`
---
## Next Steps
1. **Week 1 (Complete):**
- Buffer optimization ✓
- UDP handler ✓
- IPC encryption ✓
- Timeout reduction ✓
2. **Week 2-3 (Planned):**
- Flutter polling → events
- Async process list in GUI
- Version negotiation for IPC
3. **Month 1 (Planned):**
- Crash reporting (Sentry)
- Integration tests
- Performance benchmarks
---
## Status
**ostp-client:** 7.3/10 → **8.0/10** ✅ Ready for production
**ostp-gui:** 6.3/10 → **7.8/10** ⚠️ Beta (good security now)
**ostp-flutter:** 5.7/10 → **5.7/10** 🔴 Still needs work

12
Cargo.lock generated
View File

@ -1431,7 +1431,7 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
[[package]] [[package]]
name = "ostp" name = "ostp"
version = "0.3.2" version = "0.3.3"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64", "base64",
@ -1453,7 +1453,7 @@ dependencies = [
[[package]] [[package]]
name = "ostp-client" name = "ostp-client"
version = "0.3.2" version = "0.3.3"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64", "base64",
@ -1488,7 +1488,7 @@ dependencies = [
[[package]] [[package]]
name = "ostp-core" name = "ostp-core"
version = "0.3.2" version = "0.3.3"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -1522,7 +1522,7 @@ dependencies = [
[[package]] [[package]]
name = "ostp-server" name = "ostp-server"
version = "0.3.2" version = "0.3.3"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"axum", "axum",
@ -1554,7 +1554,7 @@ dependencies = [
[[package]] [[package]]
name = "ostp-tun" name = "ostp-tun"
version = "0.3.2" version = "0.3.3"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"libc", "libc",
@ -1566,7 +1566,7 @@ dependencies = [
[[package]] [[package]]
name = "ostp-tun-helper" name = "ostp-tun-helper"
version = "0.3.2" version = "0.3.3"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",

View File

@ -12,7 +12,7 @@ resolver = "2"
[workspace.package] [workspace.package]
edition = "2021" edition = "2021"
license = "BSL 1.1" license = "BSL 1.1"
version = "0.3.2" version = "0.3.3"
[workspace.dependencies] [workspace.dependencies]
anyhow = "1.0" anyhow = "1.0"

View File

@ -1,7 +1,7 @@
{ {
"name": "ostp-gui", "name": "ostp-gui",
"private": true, "private": true,
"version": "0.1.0", "version": "0.3.3",
"type": "module", "type": "module",
"scripts": { "scripts": {
"tauri": "tauri", "tauri": "tauri",
@ -13,4 +13,4 @@
"devDependencies": { "devDependencies": {
"@tauri-apps/cli": "^2" "@tauri-apps/cli": "^2"
} }
} }

View File

@ -1,6 +1,6 @@
[package] [package]
name = "ostp-gui" name = "ostp-gui"
version = "0.1.0" version = "0.3.3"
description = "A Tauri App" description = "A Tauri App"
authors = ["you"] authors = ["you"]
edition = "2021" edition = "2021"

View File

@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "ostp-gui", "productName": "ostp-gui",
"version": "0.3.2", "version": "0.3.3",
"identifier": "com.ospab.ostp", "identifier": "com.ospab.ostp",
"build": { "build": {
"frontendDist": "../src" "frontendDist": "../src"
@ -32,4 +32,4 @@
"icons/icon.ico" "icons/icon.ico"
] ]
} }
} }

View File

@ -180,9 +180,10 @@ enum AppMode {
#[derive(Debug, Deserialize, Serialize)] #[derive(Debug, Deserialize, Serialize)]
struct UnifiedConfig { struct UnifiedConfig {
version: Option<String>,
log: Option<serde_json::Value>,
#[serde(flatten)] #[serde(flatten)]
mode: AppMode, mode: AppMode,
log_level: Option<String>,
} }
impl UnifiedConfig { impl UnifiedConfig {
@ -791,7 +792,9 @@ fn run_setup_wizard(config_path: &std::path::Path) -> Result<()> {
let server_json = serde_json::json!({ let server_json = serde_json::json!({
"mode": "server", "mode": "server",
"version": "0.3.1", "version": "0.3.1",
"log_level": "info", "log": {
"level": "info"
},
"listen": listen, "listen": listen,
"access_keys": access_keys, "access_keys": access_keys,
"outbound": { "outbound": {
@ -918,7 +921,9 @@ fn run_setup_wizard(config_path: &std::path::Path) -> Result<()> {
let server_json = serde_json::json!({ let server_json = serde_json::json!({
"mode": "server", "mode": "server",
"version": "0.3.1", "version": "0.3.1",
"log_level": "info", "log": {
"level": "info"
},
"listen": listen, "listen": listen,
"access_keys": access_keys, "access_keys": access_keys,
"outbound": { "outbound": {
@ -1043,6 +1048,9 @@ By downloading, installing, or using the Control Panel, you agree to the followi
let relay_json = serde_json::json!({ let relay_json = serde_json::json!({
"mode": "relay", "mode": "relay",
"version": "0.3.1", "version": "0.3.1",
"log": {
"level": "info"
},
"listen": listen, "listen": listen,
"upstream_tcp": upstream, "upstream_tcp": upstream,
"upstream_udp": upstream, "upstream_udp": upstream,
@ -1244,7 +1252,8 @@ async fn run_app() -> Result<()> {
.map_err(|e| anyhow!("Share Link Error: {e}"))?; .map_err(|e| anyhow!("Share Link Error: {e}"))?;
let unified = UnifiedConfig { let unified = UnifiedConfig {
mode: AppMode::Client(client_cfg), mode: AppMode::Client(client_cfg),
log_level: Some("info".to_string()), version: Some("0.3.1".to_string()),
log: Some(serde_json::json!({ "level": "info" })),
}; };
let content = serde_json::to_string_pretty(&unified)?; let content = serde_json::to_string_pretty(&unified)?;
if let Some(parent) = args.config.parent() { if let Some(parent) = args.config.parent() {
@ -1396,9 +1405,13 @@ async fn run_app() -> Result<()> {
let key = generate_secure_key("hex"); let key = generate_secure_key("hex");
let content = if is_server { let content = if is_server {
format!(r#"{{ format!(r#"{{
// OSTP Server Configuration // OSTP Configuration v0.3.1
// DO NOT EDIT THIS COMMENT - Migrator relies on it
"version": "0.3.1",
"mode": "server", "mode": "server",
"log_level": "info", "log": {{
"level": "info"
}},
// The address and port the server listens on for incoming OSTP connections. // The address and port the server listens on for incoming OSTP connections.
"listen": "0.0.0.0:50000", "listen": "0.0.0.0:50000",
@ -1450,8 +1463,13 @@ async fn run_app() -> Result<()> {
}}"#, key) }}"#, key)
} else if mode_str == "relay" { } else if mode_str == "relay" {
r#"{ r#"{
// OSTP Relay Node Configuration // OSTP Configuration v0.3.1
// DO NOT EDIT THIS COMMENT - Migrator relies on it
"version": "0.3.1",
"mode": "relay", "mode": "relay",
"log": {
"level": "info"
},
"listen": "0.0.0.0:50000", "listen": "0.0.0.0:50000",
"upstream_tcp": "TARGET_SERVER_IP:50000", "upstream_tcp": "TARGET_SERVER_IP:50000",
"upstream_udp": "TARGET_SERVER_IP:50000", "upstream_udp": "TARGET_SERVER_IP:50000",

46
scripts/bump_version.py Normal file
View File

@ -0,0 +1,46 @@
import os
import sys
import json
import re
def main():
if len(sys.argv) < 2:
print("Usage: python bump_version.py <version>")
sys.exit(1)
version = sys.argv[1]
if version.startswith("v"):
version = version[1:]
print(f"Bumping version to {version}")
cargo_paths = ["Cargo.toml", "ostp-gui/src-tauri/Cargo.toml"]
for cp in cargo_paths:
if os.path.exists(cp):
content = open(cp, "r", encoding="utf-8").read()
content = re.sub(r'(?m)^version = ".*"$', f'version = "{version}"', content, count=1)
open(cp, "w", encoding="utf-8").write(content)
print(f"Updated {cp}")
# 2. Update ostp-gui/package.json
pkg_path = "ostp-gui/package.json"
if os.path.exists(pkg_path):
with open(pkg_path, "r", encoding="utf-8") as f:
data = json.load(f)
data["version"] = version
with open(pkg_path, "w", encoding="utf-8") as f:
json.dump(data, f, indent=2)
print(f"Updated {pkg_path}")
# 3. Update ostp-gui/src-tauri/tauri.conf.json
tauri_path = "ostp-gui/src-tauri/tauri.conf.json"
if os.path.exists(tauri_path):
with open(tauri_path, "r", encoding="utf-8") as f:
data = json.load(f)
data["version"] = version
with open(tauri_path, "w", encoding="utf-8") as f:
json.dump(data, f, indent=2)
print(f"Updated {tauri_path}")
if __name__ == "__main__":
main()