This commit is contained in:
Tw93
2025-10-20 15:26:17 +08:00
parent 0f80e02f69
commit f01500888c
3 changed files with 8 additions and 11 deletions

2
dist/cli.js vendored
View File

@@ -23,7 +23,7 @@ import sharp from 'sharp';
import * as psl from 'psl'; import * as psl from 'psl';
var name = "pake-cli"; var name = "pake-cli";
var version = "3.4.1"; var version = "3.4.2";
var description = "🤱🏻 Turn any webpage into a desktop app with one command. 🤱🏻 一键打包网页生成轻量桌面应用。"; var description = "🤱🏻 Turn any webpage into a desktop app with one command. 🤱🏻 一键打包网页生成轻量桌面应用。";
var engines = { var engines = {
node: ">=18.0.0" node: ">=18.0.0"

View File

@@ -1,6 +1,6 @@
{ {
"name": "pake-cli", "name": "pake-cli",
"version": "3.4.1", "version": "3.4.2",
"description": "🤱🏻 Turn any webpage into a desktop app with one command. 🤱🏻 一键打包网页生成轻量桌面应用。", "description": "🤱🏻 Turn any webpage into a desktop app with one command. 🤱🏻 一键打包网页生成轻量桌面应用。",
"engines": { "engines": {
"node": ">=18.0.0" "node": ">=18.0.0"

View File

@@ -10,13 +10,11 @@ use tauri::{Theme, TitleBarStyle};
fn build_proxy_browser_arg(url: &Url) -> Option<String> { fn build_proxy_browser_arg(url: &Url) -> Option<String> {
let host = url.host_str()?; let host = url.host_str()?;
let scheme = url.scheme(); let scheme = url.scheme();
let port = url let port = url.port().or_else(|| match scheme {
.port() "http" => Some(80),
.or_else(|| match scheme { "socks5" => Some(1080),
"http" => Some(80), _ => None,
"socks5" => Some(1080), })?;
_ => None,
})?;
match scheme { match scheme {
"http" | "socks5" => Some(format!("--proxy-server={scheme}://{host}:{port}")), "http" | "socks5" => Some(format!("--proxy-server={scheme}://{host}:{port}")),
@@ -82,8 +80,7 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
let mut windows_browser_args = String::from("--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection --disable-blink-features=AutomationControlled"); let mut windows_browser_args = String::from("--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection --disable-blink-features=AutomationControlled");
#[cfg(all(not(target_os = "windows"), not(target_os = "macos")))] #[cfg(all(not(target_os = "windows"), not(target_os = "macos")))]
let mut linux_browser_args = let mut linux_browser_args = String::from("--disable-blink-features=AutomationControlled");
String::from("--disable-blink-features=AutomationControlled");
if window_config.enable_wasm { if window_config.enable_wasm {
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]