Skip to content

Commit 542d149

Browse files
committed
🎉 0.4.2
1 parent ec62e15 commit 542d149

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ homepage = "https://github.com/XDSEC/WebSocketReflectorX"
99
license = "MIT"
1010
repository = "https://github.com/XDSEC/WebSocketReflectorX"
1111
rust-version = "1.85.0"
12-
version = "0.4.1"
12+
version = "0.4.2"
1313

1414
[profile.release]
1515
codegen-units = 1

crates/desktop/src/daemon/api_controller.rs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -358,23 +358,21 @@ async fn request_control(
358358
let (scope_name, scope_features) = if let Some(json_body) = json_body {
359359
(json_body.name.clone(), json_body.features.clone())
360360
} else {
361-
(req_scope.clone(), vec!["v0".to_string()])
361+
(req_scope.clone(), vec!["basic".to_string()])
362362
};
363363

364364
let mut scopes = state.scopes.write().await;
365365
if scopes.iter().any(|scope| scope.host == req_scope) {
366-
return Err((
367-
StatusCode::BAD_REQUEST,
368-
format!("Scope {} already exists", req_scope),
369-
));
366+
return Ok(StatusCode::ACCEPTED);
370367
}
368+
let scope_name = if scope_name.is_empty() {
369+
req_scope.clone()
370+
} else {
371+
scope_name.clone()
372+
};
371373
let scope = ScopeData {
372-
host: if scope_name.is_empty() {
373-
req_scope.clone()
374-
} else {
375-
scope_name.clone()
376-
},
377-
name: req_scope.clone(),
374+
name: scope_name.clone(),
375+
host: req_scope.clone(),
378376
state: "pending".to_string(),
379377
features: scope_features.clone(),
380378
};
@@ -390,7 +388,7 @@ async fn request_control(
390388
}
391389
let scope = Scope {
392390
host: req_scope.clone().into(),
393-
name: req_scope.into(),
391+
name: scope_name.into(),
394392
state: "pending".into(),
395393
features: scope_features.join(",").into(),
396394
};

windows/setup.nsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Unicode True
1111
!define DESCRIPTION "Controlled TCP-over-WebSocket forwarding tunnel."
1212
!define VERSIONMAJOR 0
1313
!define VERSIONMINOR 4
14-
!define VERSIONBUILD 1
14+
!define VERSIONBUILD 2
1515
!define INSTALL_DIR_DEFAULT "$PROGRAMFILES64\${APPNAME}"
1616
!define MUI_ABORTWARNING
1717
!define MUI_FINISHPAGE_RUN

0 commit comments

Comments
 (0)