diff --git a/.github/update.log b/.github/update.log index 75e1d8b45d..1af448faa1 100644 --- a/.github/update.log +++ b/.github/update.log @@ -694,3 +694,4 @@ Update On Tue Jul 2 20:34:08 CEST 2024 Update On Wed Jul 3 20:29:03 CEST 2024 Update On Thu Jul 4 20:30:48 CEST 2024 Update On Fri Jul 5 20:32:45 CEST 2024 +Update On Sat Jul 6 20:29:28 CEST 2024 diff --git a/clash-nyanpasu/backend/Cargo.lock b/clash-nyanpasu/backend/Cargo.lock index a98c7ec087..a0cedb8c3f 100644 --- a/clash-nyanpasu/backend/Cargo.lock +++ b/clash-nyanpasu/backend/Cargo.lock @@ -869,6 +869,7 @@ dependencies = [ "base64 0.22.1", "chrono", "clap", + "cocoa 0.25.0", "ctrlc", "dashmap 6.0.1", "deelevate", @@ -890,6 +891,7 @@ dependencies = [ "md-5", "nanoid", "num_cpus", + "objc", "once_cell", "open 5.2.0", "parking_lot", diff --git a/clash-nyanpasu/backend/tauri/Cargo.toml b/clash-nyanpasu/backend/tauri/Cargo.toml index f752c5fede..e4a544d04c 100644 --- a/clash-nyanpasu/backend/tauri/Cargo.toml +++ b/clash-nyanpasu/backend/tauri/Cargo.toml @@ -101,6 +101,10 @@ md-5 = "0.10.6" hex = "0.4" rand = "0.8" +[target.'cfg(target_os = "macos")'.dependencies] +cocoa = "0.25.0" +objc = "0.2.7" + [target.'cfg(windows)'.dependencies] deelevate = "0.2.0" winreg = { version = "0.52", features = ["transactions"] } diff --git a/clash-nyanpasu/backend/tauri/src/main.rs b/clash-nyanpasu/backend/tauri/src/main.rs index ddbfc2e161..6e5d8266d3 100644 --- a/clash-nyanpasu/backend/tauri/src/main.rs +++ b/clash-nyanpasu/backend/tauri/src/main.rs @@ -3,6 +3,14 @@ windows_subsystem = "windows" )] +#[cfg(target_os = "macos")] +#[macro_use] +extern crate cocoa; + +#[cfg(target_os = "macos")] +#[macro_use] +extern crate objc; + mod cmds; mod config; mod core; diff --git a/clash-nyanpasu/backend/tauri/src/utils/resolve.rs b/clash-nyanpasu/backend/tauri/src/utils/resolve.rs index fe90206959..006faa00b7 100644 --- a/clash-nyanpasu/backend/tauri/src/utils/resolve.rs +++ b/clash-nyanpasu/backend/tauri/src/utils/resolve.rs @@ -17,6 +17,40 @@ use serde_yaml::Mapping; use std::net::TcpListener; use tauri::{api::process::Command, App, AppHandle, Manager}; +#[cfg(target_os = "macos")] +fn set_window_controls_pos(window: cocoa::base::id, x: f64, y: f64) { + use cocoa::{ + appkit::{NSView, NSWindow, NSWindowButton}, + foundation::NSRect, + }; + + unsafe { + let close = window.standardWindowButton_(NSWindowButton::NSWindowCloseButton); + let miniaturize = window.standardWindowButton_(NSWindowButton::NSWindowMiniaturizeButton); + let zoom = window.standardWindowButton_(NSWindowButton::NSWindowZoomButton); + + let title_bar_container_view = close.superview().superview(); + + let close_rect: NSRect = msg_send![close, frame]; + let button_height = close_rect.size.height; + + let title_bar_frame_height = button_height + y; + let mut title_bar_rect = NSView::frame(title_bar_container_view); + title_bar_rect.size.height = title_bar_frame_height; + title_bar_rect.origin.y = NSView::frame(window).size.height - title_bar_frame_height; + let _: () = msg_send![title_bar_container_view, setFrame: title_bar_rect]; + + let window_buttons = vec![close, miniaturize, zoom]; + let space_between = NSView::frame(miniaturize).origin.x - NSView::frame(close).origin.x; + + for (i, button) in window_buttons.into_iter().enumerate() { + let mut rect: NSRect = NSView::frame(button); + rect.origin.x = x + (i as f64 * space_between); + button.setFrameOrigin(rect.origin); + } + } +} + pub fn find_unused_port() -> Result { match TcpListener::bind("127.0.0.1:0") { Ok(listener) => { @@ -244,6 +278,18 @@ pub fn create_window(app_handle: &AppHandle) { #[cfg(target_os = "macos")] { + fn set_controls_and_log_error(app_handle: &tauri::AppHandle, window_name: &str) { + match app_handle.get_window(window_name).unwrap().ns_window() { + Ok(raw_window) => { + let window_id: cocoa::base::id = raw_window as _; + set_window_controls_pos(window_id, 33.0, 26.0); + } + Err(err) => { + log::error!(target: "app", "failed to get ns_window, {err}"); + } + } + } + match builder .decorations(true) .hidden_title(true) @@ -252,9 +298,16 @@ pub fn create_window(app_handle: &AppHandle) { { Ok(win) => { #[cfg(debug_assertions)] - { - win.open_devtools(); - } + win.open_devtools(); + + set_controls_and_log_error(&app_handle, "main"); + + let app_handle_clone = app_handle.clone(); + win.on_window_event(move |event| { + if let tauri::WindowEvent::Resized(_) = event { + set_controls_and_log_error(&app_handle_clone, "main"); + } + }); } Err(err) => { log::error!(target: "app", "failed to create window, {err}"); diff --git a/clash-nyanpasu/frontend/nyanpasu/package.json b/clash-nyanpasu/frontend/nyanpasu/package.json index 3b4cafd30f..fbb6052e6c 100644 --- a/clash-nyanpasu/frontend/nyanpasu/package.json +++ b/clash-nyanpasu/frontend/nyanpasu/package.json @@ -19,7 +19,7 @@ "@mui/icons-material": "5.16.0", "@mui/lab": "5.0.0-alpha.171", "@mui/material": "5.16.0", - "@mui/x-data-grid": "7.8.0", + "@mui/x-data-grid": "7.9.0", "@nyanpasu/interface": "workspace:^", "@nyanpasu/ui": "workspace:^", "@tauri-apps/api": "1.6.0", diff --git a/clash-nyanpasu/frontend/nyanpasu/src/components/app/app-container.tsx b/clash-nyanpasu/frontend/nyanpasu/src/components/app/app-container.tsx index 239605ddc9..b3329a0873 100644 --- a/clash-nyanpasu/frontend/nyanpasu/src/components/app/app-container.tsx +++ b/clash-nyanpasu/frontend/nyanpasu/src/components/app/app-container.tsx @@ -6,6 +6,7 @@ import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels"; import { LayoutControl } from "../layout/layout-control"; import styles from "./app-container.module.scss"; import AppDrawer from "./app-drawer"; +import { alpha, useTheme } from "@mui/material"; const OS = getSystem(); @@ -21,6 +22,8 @@ export const AppContainer = ({ // wait: 100, // }); + const { palette } = useTheme(); + return ( )} -
+ {OS === "macos" && ( +
+ )} + +
{children}
diff --git a/clash-nyanpasu/frontend/nyanpasu/src/components/app/app-drawer.tsx b/clash-nyanpasu/frontend/nyanpasu/src/components/app/app-drawer.tsx index bd9aaca7b1..60c623036f 100644 --- a/clash-nyanpasu/frontend/nyanpasu/src/components/app/app-drawer.tsx +++ b/clash-nyanpasu/frontend/nyanpasu/src/components/app/app-drawer.tsx @@ -7,6 +7,8 @@ import { useState } from "react"; import { Panel } from "react-resizable-panels"; import AnimatedLogo from "../layout/animated-logo"; import RouteListItem from "./modules/route-list-item"; +import { classNames } from "@/utils"; +import getSystem from "@/utils/get-system"; export const AppDrawer = ({ isDrawer }: { isDrawer?: boolean }) => { const { palette } = useTheme(); @@ -21,7 +23,7 @@ export const AppDrawer = ({ isDrawer }: { isDrawer?: boolean }) => { className={clsx( isDrawer ? ["max-w-60", "min-w-28"] : "w-full", "p-4", - "pt-8", + getSystem() === "macos" ? "pt-14" : "pt-8", "h-full", "flex", "flex-col", @@ -70,7 +72,10 @@ export const AppDrawer = ({ isDrawer }: { isDrawer?: boolean }) => { const DrawerTitle = () => { return (
=12.0.0'} - peerDependencies: - '@types/react': npm:types-react@rc - react: npm:react@rc - peerDependenciesMeta: - '@types/react': - optional: true - '@mui/private-theming@5.16.0': resolution: {integrity: sha512-sYpubkO1MZOnxNyVOClrPNOTs0MfuRVVnAvCeMaOaXt6GimgQbnUcshYv2pSr6PFj+Mqzdff/FYOBceK8u5QgA==} engines: {node: '>=12.0.0'} @@ -1202,22 +1192,6 @@ packages: '@emotion/styled': optional: true - '@mui/system@5.15.20': - resolution: {integrity: sha512-LoMq4IlAAhxzL2VNUDBTQxAb4chnBe8JvRINVNDiMtHE2PiPOoHlhOPutSxEbaL5mkECPVWSv6p8JEV+uykwIA==} - engines: {node: '>=12.0.0'} - peerDependencies: - '@emotion/react': ^11.5.0 - '@emotion/styled': ^11.3.0 - '@types/react': npm:types-react@rc - react: npm:react@rc - peerDependenciesMeta: - '@emotion/react': - optional: true - '@emotion/styled': - optional: true - '@types/react': - optional: true - '@mui/system@5.16.0': resolution: {integrity: sha512-9YbkC2m3+pNumAvubYv+ijLtog6puJ0fJ6rYfzfLCM47pWrw3m+30nXNM8zMgDaKL6vpfWJcCXm+LPaWBpy7sw==} engines: {node: '>=12.0.0'} @@ -1242,16 +1216,6 @@ packages: '@types/react': optional: true - '@mui/utils@5.15.20': - resolution: {integrity: sha512-mAbYx0sovrnpAu1zHc3MDIhPqL8RPVC5W5xcO1b7PiSCJPtckIZmBkp8hefamAvUiAV8gpfMOM6Zb+eSisbI2A==} - engines: {node: '>=12.0.0'} - peerDependencies: - '@types/react': npm:types-react@rc - react: npm:react@rc - peerDependenciesMeta: - '@types/react': - optional: true - '@mui/utils@5.16.0': resolution: {integrity: sha512-kLLi5J1xY+mwtUlMb8Ubdxf4qFAA1+U7WPBvjM/qQ4CIwLCohNb0sHo1oYPufjSIH/Z9+dhVxD7dJlfGjd1AVA==} engines: {node: '>=12.0.0'} @@ -1262,14 +1226,20 @@ packages: '@types/react': optional: true - '@mui/x-data-grid@7.8.0': - resolution: {integrity: sha512-X3t6EVSZ28vVKY9NfqKcClchw2o/KmHsywybp1tNFevIJiwjZSp7NDJ091GyTqMgyDt1Dy5z2hGxoTDUYYfeGg==} + '@mui/x-data-grid@7.9.0': + resolution: {integrity: sha512-RkrVD+tfcR/h3j2p2uqohxA00C5tCJIV5gb5+2ap8XdM0Y8XMF81bB8UADWenU5W83UTErWvtU7n4gCl7hJO9g==} engines: {node: '>=14.0.0'} peerDependencies: '@mui/material': ^5.15.14 react: npm:react@rc react-dom: npm:react-dom@rc + '@mui/x-internals@7.9.0': + resolution: {integrity: sha512-RJRrM6moaDZ8S11gDt8OKVclKm2v9khpIyLkpenNze+tT4dQYoU3liW5P2t31hA4Na/T6JQKNosB4qmB2TYfZw==} + engines: {node: '>=14.0.0'} + peerDependencies: + react: npm:react@rc + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1935,8 +1905,8 @@ packages: '@types/node@20.12.10': resolution: {integrity: sha512-Eem5pH9pmWBHoGAT8Dr5fdc5rYA+4NAovdM4EktRPVAAiJhmWWfQrA0cFhAbOsQdSfIHjAud6YdkbL69+zSKjw==} - '@types/node@20.14.9': - resolution: {integrity: sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==} + '@types/node@20.14.10': + resolution: {integrity: sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==} '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -5905,11 +5875,11 @@ snapshots: '@babel/helper-validator-identifier': 7.24.5 to-fast-properties: 2.0.0 - '@commitlint/cli@19.3.0(@types/node@20.14.9)(typescript@5.5.3)': + '@commitlint/cli@19.3.0(@types/node@20.14.10)(typescript@5.5.3)': dependencies: '@commitlint/format': 19.3.0 '@commitlint/lint': 19.2.2 - '@commitlint/load': 19.2.0(@types/node@20.14.9)(typescript@5.5.3) + '@commitlint/load': 19.2.0(@types/node@20.14.10)(typescript@5.5.3) '@commitlint/read': 19.2.1 '@commitlint/types': 19.0.3 execa: 8.0.1 @@ -5956,7 +5926,7 @@ snapshots: '@commitlint/rules': 19.0.3 '@commitlint/types': 19.0.3 - '@commitlint/load@19.2.0(@types/node@20.14.9)(typescript@5.5.3)': + '@commitlint/load@19.2.0(@types/node@20.14.10)(typescript@5.5.3)': dependencies: '@commitlint/config-validator': 19.0.3 '@commitlint/execute-rule': 19.0.0 @@ -5964,7 +5934,7 @@ snapshots: '@commitlint/types': 19.0.3 chalk: 5.3.0 cosmiconfig: 9.0.0(typescript@5.5.3) - cosmiconfig-typescript-loader: 5.0.0(@types/node@20.14.9)(cosmiconfig@9.0.0(typescript@5.5.3))(typescript@5.5.3) + cosmiconfig-typescript-loader: 5.0.0(@types/node@20.14.10)(cosmiconfig@9.0.0(typescript@5.5.3))(typescript@5.5.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -6338,13 +6308,13 @@ snapshots: postcss: 7.0.32 purgecss: 2.3.0 - '@generouted/react-router@1.19.5(react-router-dom@6.24.1(react-dom@19.0.0-rc-fb9a90fa48-20240614(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614)(vite@5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0))': + '@generouted/react-router@1.19.5(react-router-dom@6.24.1(react-dom@19.0.0-rc-fb9a90fa48-20240614(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0))': dependencies: fast-glob: 3.3.2 - generouted: 1.19.5(vite@5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0)) + generouted: 1.19.5(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0)) react: 19.0.0-rc-fb9a90fa48-20240614 react-router-dom: 6.24.1(react-dom@19.0.0-rc-fb9a90fa48-20240614(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614) - vite: 5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) + vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) '@humanwhocodes/config-array@0.11.14': dependencies: @@ -6450,15 +6420,6 @@ snapshots: '@emotion/styled': 11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) '@types/react': types-react@19.0.0-rc.1 - '@mui/private-theming@5.15.20(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1)': - dependencies: - '@babel/runtime': 7.24.7 - '@mui/utils': 5.15.20(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) - prop-types: 15.8.1 - react: 19.0.0-rc-fb9a90fa48-20240614 - optionalDependencies: - '@types/react': types-react@19.0.0-rc.1 - '@mui/private-theming@5.16.0(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.24.7 @@ -6479,22 +6440,6 @@ snapshots: '@emotion/react': 11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) '@emotion/styled': 11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) - '@mui/system@5.15.20(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1)': - dependencies: - '@babel/runtime': 7.24.7 - '@mui/private-theming': 5.15.20(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) - '@mui/styled-engine': 5.15.14(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614) - '@mui/types': 7.2.14(types-react@19.0.0-rc.1) - '@mui/utils': 5.15.20(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) - clsx: 2.1.1 - csstype: 3.1.3 - prop-types: 15.8.1 - react: 19.0.0-rc-fb9a90fa48-20240614 - optionalDependencies: - '@emotion/react': 11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) - '@emotion/styled': 11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) - '@types/react': types-react@19.0.0-rc.1 - '@mui/system@5.16.0(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.24.7 @@ -6515,16 +6460,6 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@mui/utils@5.15.20(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1)': - dependencies: - '@babel/runtime': 7.24.7 - '@types/prop-types': 15.7.12 - prop-types: 15.8.1 - react: 19.0.0-rc-fb9a90fa48-20240614 - react-is: 18.3.1 - optionalDependencies: - '@types/react': types-react@19.0.0-rc.1 - '@mui/utils@5.16.0(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.24.7 @@ -6535,12 +6470,13 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@mui/x-data-grid@7.8.0(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(@mui/material@5.16.0(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-fb9a90fa48-20240614(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-fb9a90fa48-20240614(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1)': + '@mui/x-data-grid@7.9.0(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(@mui/material@5.16.0(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-fb9a90fa48-20240614(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-fb9a90fa48-20240614(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.24.7 '@mui/material': 5.16.0(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-fb9a90fa48-20240614(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) - '@mui/system': 5.15.20(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) - '@mui/utils': 5.15.20(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) + '@mui/system': 5.16.0(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) + '@mui/utils': 5.16.0(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) + '@mui/x-internals': 7.9.0(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) clsx: 2.1.1 prop-types: 15.8.1 react: 19.0.0-rc-fb9a90fa48-20240614 @@ -6551,6 +6487,14 @@ snapshots: - '@emotion/styled' - '@types/react' + '@mui/x-internals@7.9.0(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1)': + dependencies: + '@babel/runtime': 7.24.7 + '@mui/utils': 5.16.0(react@19.0.0-rc-fb9a90fa48-20240614)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-fb9a90fa48-20240614 + transitivePeerDependencies: + - '@types/react' + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -7039,12 +6983,12 @@ snapshots: dependencies: '@types/http-cache-semantics': 4.0.4 '@types/keyv': 3.1.4 - '@types/node': 20.14.9 + '@types/node': 20.14.10 '@types/responselike': 1.0.3 '@types/conventional-commits-parser@5.0.0': dependencies: - '@types/node': 20.14.9 + '@types/node': 20.14.10 '@types/d3-array@3.2.1': {} @@ -7178,7 +7122,7 @@ snapshots: '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 20.14.9 + '@types/node': 20.14.10 '@types/geojson@7946.0.14': {} @@ -7194,11 +7138,11 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 20.14.9 + '@types/node': 20.14.10 '@types/keyv@3.1.4': dependencies: - '@types/node': 20.14.9 + '@types/node': 20.14.10 '@types/lodash-es@4.17.12': dependencies: @@ -7218,7 +7162,7 @@ snapshots: dependencies: undici-types: 5.26.5 - '@types/node@20.14.9': + '@types/node@20.14.10': dependencies: undici-types: 5.26.5 @@ -7240,7 +7184,7 @@ snapshots: '@types/responselike@1.0.3': dependencies: - '@types/node': 20.14.9 + '@types/node': 20.14.10 '@types/unist@2.0.10': {} @@ -7248,7 +7192,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 20.14.9 + '@types/node': 20.14.10 optional: true '@typescript-eslint/eslint-plugin@7.15.0(@typescript-eslint/parser@7.15.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3)': @@ -7334,21 +7278,21 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-react-swc@3.7.0(vite@5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0))': + '@vitejs/plugin-react-swc@3.7.0(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0))': dependencies: '@swc/core': 1.6.1 - vite: 5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) + vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) transitivePeerDependencies: - '@swc/helpers' - '@vitejs/plugin-react@4.3.1(vite@5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0))': + '@vitejs/plugin-react@4.3.1(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0))': dependencies: '@babel/core': 7.24.5 '@babel/plugin-transform-react-jsx-self': 7.24.5(@babel/core@7.24.5) '@babel/plugin-transform-react-jsx-source': 7.24.1(@babel/core@7.24.5) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) + vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) transitivePeerDependencies: - supports-color @@ -7836,9 +7780,9 @@ snapshots: dependencies: is-what: 3.14.1 - cosmiconfig-typescript-loader@5.0.0(@types/node@20.14.9)(cosmiconfig@9.0.0(typescript@5.5.3))(typescript@5.5.3): + cosmiconfig-typescript-loader@5.0.0(@types/node@20.14.10)(cosmiconfig@9.0.0(typescript@5.5.3))(typescript@5.5.3): dependencies: - '@types/node': 20.14.9 + '@types/node': 20.14.10 cosmiconfig: 9.0.0(typescript@5.5.3) jiti: 1.21.0 typescript: 5.5.3 @@ -8829,9 +8773,9 @@ snapshots: functions-have-names@1.2.3: {} - generouted@1.19.5(vite@5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0)): + generouted@1.19.5(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0)): dependencies: - vite: 5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) + vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) gensync@1.0.0-beta.2: {} @@ -11345,43 +11289,43 @@ snapshots: esbuild: 0.19.12 monaco-editor: 0.50.0 - vite-plugin-sass-dts@1.3.22(postcss@8.4.39)(prettier@3.3.2)(sass@1.77.6)(vite@5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0)): + vite-plugin-sass-dts@1.3.22(postcss@8.4.39)(prettier@3.3.2)(sass@1.77.6)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0)): dependencies: postcss: 8.4.39 postcss-js: 4.0.1(postcss@8.4.39) prettier: 3.3.2 sass: 1.77.6 - vite: 5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) + vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) - vite-plugin-svgr@4.2.0(rollup@4.17.2)(typescript@5.5.3)(vite@5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0)): + vite-plugin-svgr@4.2.0(rollup@4.17.2)(typescript@5.5.3)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0)): dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.17.2) '@svgr/core': 8.1.0(typescript@5.5.3) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.5.3)) - vite: 5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) + vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) transitivePeerDependencies: - rollup - supports-color - typescript - vite-tsconfig-paths@4.3.2(typescript@5.5.3)(vite@5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0)): + vite-tsconfig-paths@4.3.2(typescript@5.5.3)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0)): dependencies: debug: 4.3.4 globrex: 0.1.2 tsconfck: 3.0.3(typescript@5.5.3) optionalDependencies: - vite: 5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) + vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0) transitivePeerDependencies: - supports-color - typescript - vite@5.3.3(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0): + vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.77.6)(stylus@0.62.0): dependencies: esbuild: 0.21.5 postcss: 8.4.39 rollup: 4.17.2 optionalDependencies: - '@types/node': 20.14.9 + '@types/node': 20.14.10 fsevents: 2.3.3 less: 4.2.0 sass: 1.77.6 diff --git a/clash-verge-rev/UPDATELOG.md b/clash-verge-rev/UPDATELOG.md index 6794960775..93d9da646a 100644 --- a/clash-verge-rev/UPDATELOG.md +++ b/clash-verge-rev/UPDATELOG.md @@ -1,3 +1,18 @@ +## v1.7.3 + +### Features + +- 支持可视化编辑订阅代理组 +- 支持可视化编辑订阅节点 +- 支持可视化编辑订阅规则 +- 扩展脚本支持订阅名称参数 `function main(config, profileName)` + +### Bugs Fixes + +- 代理绕过格式检查错误 + +--- + ## v1.7.2 ### Break Changes diff --git a/clash-verge-rev/package.json b/clash-verge-rev/package.json index ca2b6a4dc1..e736201cad 100644 --- a/clash-verge-rev/package.json +++ b/clash-verge-rev/package.json @@ -1,6 +1,6 @@ { "name": "clash-verge", - "version": "1.7.2", + "version": "1.7.3", "license": "GPL-3.0-only", "scripts": { "dev": "tauri dev", @@ -24,10 +24,10 @@ "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", "@juggle/resize-observer": "^3.4.0", - "@mui/icons-material": "^5.15.21", + "@mui/icons-material": "^5.16.0", "@mui/lab": "5.0.0-alpha.149", - "@mui/material": "^5.15.21", - "@mui/x-data-grid": "^7.8.0", + "@mui/material": "^5.16.0", + "@mui/x-data-grid": "^7.9.0", "@tauri-apps/api": "^1.6.0", "@types/json-schema": "^7.0.15", "ahooks": "^3.8.0", diff --git a/clash-verge-rev/pnpm-lock.yaml b/clash-verge-rev/pnpm-lock.yaml index f0404aff8a..0f0f0e4c45 100644 --- a/clash-verge-rev/pnpm-lock.yaml +++ b/clash-verge-rev/pnpm-lock.yaml @@ -26,17 +26,17 @@ importers: specifier: ^3.4.0 version: 3.4.0 "@mui/icons-material": - specifier: ^5.15.21 - version: 5.15.21(@mui/material@5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.0 + version: 5.16.0(@mui/material@5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) "@mui/lab": specifier: 5.0.0-alpha.149 - version: 5.0.0-alpha.149(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.0.0-alpha.149(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) "@mui/material": - specifier: ^5.15.21 - version: 5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^5.16.0 + version: 5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) "@mui/x-data-grid": - specifier: ^7.8.0 - version: 7.8.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^7.9.0 + version: 7.9.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) "@tauri-apps/api": specifier: ^1.6.0 version: 1.6.0 @@ -154,10 +154,10 @@ importers: version: 4.4.10 "@vitejs/plugin-legacy": specifier: ^5.4.1 - version: 5.4.1(terser@5.31.1)(vite@5.3.3(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1)) + version: 5.4.1(terser@5.31.1)(vite@5.3.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1)) "@vitejs/plugin-react": specifier: ^4.3.1 - version: 4.3.1(vite@5.3.3(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1)) + version: 4.3.1(vite@5.3.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1)) adm-zip: specifier: ^0.5.14 version: 0.5.14 @@ -193,13 +193,13 @@ importers: version: 5.5.3 vite: specifier: ^5.3.3 - version: 5.3.3(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1) + version: 5.3.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1) vite-plugin-monaco-editor: specifier: ^1.1.0 version: 1.1.0(monaco-editor@0.49.0) vite-plugin-svgr: specifier: ^4.2.0 - version: 4.2.0(rollup@4.18.0)(typescript@5.5.3)(vite@5.3.3(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1)) + version: 4.2.0(rollup@4.18.0)(typescript@5.5.3)(vite@5.3.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1)) packages: "@actions/github@5.1.1": @@ -1580,16 +1580,16 @@ packages: "@types/react": optional: true - "@mui/core-downloads-tracker@5.15.21": + "@mui/core-downloads-tracker@5.16.0": resolution: { - integrity: sha512-dp9lXBaJZzJYeJfQY3Ow4Rb49QaCEdkl2KKYscdQHQm6bMJ+l4XPY3Cd9PCeeJTsHPIDJ60lzXbeRgs6sx/rpw==, + integrity: sha512-8SLffXYPRVpcZx5QzxNE8fytTqzp+IuU3deZbQWg/vSaTlDpR5YVrQ4qQtXTi5cRdhOufV5INylmwlKK+//nPw==, } - "@mui/icons-material@5.15.21": + "@mui/icons-material@5.16.0": resolution: { - integrity: sha512-yqkq1MbdkmX5ZHyvZTBuAaA6RkvoqkoAgwBSx9Oh0L0jAfj9T/Ih/NhMNjkl8PWVSonjfDUkKroBnjRyo/1M9Q==, + integrity: sha512-6ISoOhkp9w5gD0PEW9JklrcbyARDkFWNTBdwXZ1Oy5IGlyu9B0zG0hnUIe4H17IaF1Vgj6C8VI+v4tkSdK0veg==, } engines: { node: ">=12.0.0" } peerDependencies: @@ -1621,10 +1621,10 @@ packages: "@types/react": optional: true - "@mui/material@5.15.21": + "@mui/material@5.16.0": resolution: { - integrity: sha512-nTyCcgduKwHqiuQ/B03EQUa+utSMzn2sQp0QAibsnYe4tvc3zkMbO0amKpl48vhABIY3IvT6w9615BFIgMt0YA==, + integrity: sha512-DbR1NckTLpjt9Zut9EGQ70th86HfN0BYQgyYro6aXQrNfjzSwe3BJS1AyBQ5mJ7TdL6YVRqohfukxj9JlqZZUg==, } engines: { node: ">=12.0.0" } peerDependencies: @@ -1641,10 +1641,10 @@ packages: "@types/react": optional: true - "@mui/private-theming@5.15.20": + "@mui/private-theming@5.16.0": resolution: { - integrity: sha512-BK8F94AIqSrnaPYXf2KAOjGZJgWfvqAVQ2gVR3EryvQFtuBnG6RwodxrCvd3B48VuMy6Wsk897+lQMUxJyk+6g==, + integrity: sha512-sYpubkO1MZOnxNyVOClrPNOTs0MfuRVVnAvCeMaOaXt6GimgQbnUcshYv2pSr6PFj+Mqzdff/FYOBceK8u5QgA==, } engines: { node: ">=12.0.0" } peerDependencies: @@ -1670,10 +1670,10 @@ packages: "@emotion/styled": optional: true - "@mui/system@5.15.20": + "@mui/system@5.16.0": resolution: { - integrity: sha512-LoMq4IlAAhxzL2VNUDBTQxAb4chnBe8JvRINVNDiMtHE2PiPOoHlhOPutSxEbaL5mkECPVWSv6p8JEV+uykwIA==, + integrity: sha512-9YbkC2m3+pNumAvubYv+ijLtog6puJ0fJ6rYfzfLCM47pWrw3m+30nXNM8zMgDaKL6vpfWJcCXm+LPaWBpy7sw==, } engines: { node: ">=12.0.0" } peerDependencies: @@ -1700,10 +1700,10 @@ packages: "@types/react": optional: true - "@mui/utils@5.15.20": + "@mui/utils@5.16.0": resolution: { - integrity: sha512-mAbYx0sovrnpAu1zHc3MDIhPqL8RPVC5W5xcO1b7PiSCJPtckIZmBkp8hefamAvUiAV8gpfMOM6Zb+eSisbI2A==, + integrity: sha512-kLLi5J1xY+mwtUlMb8Ubdxf4qFAA1+U7WPBvjM/qQ4CIwLCohNb0sHo1oYPufjSIH/Z9+dhVxD7dJlfGjd1AVA==, } engines: { node: ">=12.0.0" } peerDependencies: @@ -1713,10 +1713,10 @@ packages: "@types/react": optional: true - "@mui/x-data-grid@7.8.0": + "@mui/x-data-grid@7.9.0": resolution: { - integrity: sha512-X3t6EVSZ28vVKY9NfqKcClchw2o/KmHsywybp1tNFevIJiwjZSp7NDJ091GyTqMgyDt1Dy5z2hGxoTDUYYfeGg==, + integrity: sha512-RkrVD+tfcR/h3j2p2uqohxA00C5tCJIV5gb5+2ap8XdM0Y8XMF81bB8UADWenU5W83UTErWvtU7n4gCl7hJO9g==, } engines: { node: ">=14.0.0" } peerDependencies: @@ -1724,6 +1724,15 @@ packages: react: ^17.0.0 || ^18.0.0 react-dom: ^17.0.0 || ^18.0.0 + "@mui/x-internals@7.9.0": + resolution: + { + integrity: sha512-RJRrM6moaDZ8S11gDt8OKVclKm2v9khpIyLkpenNze+tT4dQYoU3liW5P2t31hA4Na/T6JQKNosB4qmB2TYfZw==, + } + engines: { node: ">=14.0.0" } + peerDependencies: + react: ^17.0.0 || ^18.0.0 + "@mui/x-tree-view@6.0.0-alpha.1": resolution: { @@ -2268,10 +2277,10 @@ packages: integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==, } - "@types/node@20.14.9": + "@types/node@20.14.10": resolution: { - integrity: sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==, + integrity: sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==, } "@types/parse-json@4.0.2": @@ -2740,10 +2749,10 @@ packages: integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==, } - electron-to-chromium@1.4.816: + electron-to-chromium@1.4.818: resolution: { - integrity: sha512-EKH5X5oqC6hLmiS7/vYtZHZFTNdhsYG5NVPRN6Yn0kQHNBlT59+xSM8HBy66P5fxWpKgZbPqb+diC64ng295Jw==, + integrity: sha512-eGvIk2V0dGImV9gWLq8fDfTTsCAeMDwZqEPMr+jMInxZdnp9Us8UpovYpRCf9NQ7VOFgrN2doNSgvISbsbNpxA==, } end-of-stream@1.4.4: @@ -5587,7 +5596,7 @@ snapshots: "@babel/runtime": 7.24.7 "@floating-ui/react-dom": 2.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) "@mui/types": 7.2.14(@types/react@18.3.3) - "@mui/utils": 5.15.20(@types/react@18.3.3)(react@18.3.1) + "@mui/utils": 5.16.0(@types/react@18.3.3)(react@18.3.1) "@popperjs/core": 2.11.8 clsx: 2.1.1 prop-types: 15.8.1 @@ -5601,7 +5610,7 @@ snapshots: "@babel/runtime": 7.24.7 "@floating-ui/react-dom": 2.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) "@mui/types": 7.2.14(@types/react@18.3.3) - "@mui/utils": 5.15.20(@types/react@18.3.3)(react@18.3.1) + "@mui/utils": 5.16.0(@types/react@18.3.3)(react@18.3.1) "@popperjs/core": 2.11.8 clsx: 2.1.1 prop-types: 15.8.1 @@ -5610,25 +5619,25 @@ snapshots: optionalDependencies: "@types/react": 18.3.3 - "@mui/core-downloads-tracker@5.15.21": {} + "@mui/core-downloads-tracker@5.16.0": {} - "@mui/icons-material@5.15.21(@mui/material@5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)": + "@mui/icons-material@5.16.0(@mui/material@5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)": dependencies: "@babel/runtime": 7.24.7 - "@mui/material": 5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + "@mui/material": 5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 optionalDependencies: "@types/react": 18.3.3 - "@mui/lab@5.0.0-alpha.149(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)": + "@mui/lab@5.0.0-alpha.149(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)": dependencies: "@babel/runtime": 7.24.7 "@mui/base": 5.0.0-beta.20(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - "@mui/material": 5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - "@mui/system": 5.15.20(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + "@mui/material": 5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + "@mui/system": 5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) "@mui/types": 7.2.14(@types/react@18.3.3) - "@mui/utils": 5.15.20(@types/react@18.3.3)(react@18.3.1) - "@mui/x-tree-view": 6.0.0-alpha.1(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/base@5.0.0-beta.20(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/material@5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/system@5.15.20(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + "@mui/utils": 5.16.0(@types/react@18.3.3)(react@18.3.1) + "@mui/x-tree-view": 6.0.0-alpha.1(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/base@5.0.0-beta.20(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/material@5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/system@5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) clsx: 2.1.1 prop-types: 15.8.1 react: 18.3.1 @@ -5638,14 +5647,14 @@ snapshots: "@emotion/styled": 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) "@types/react": 18.3.3 - "@mui/material@5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)": + "@mui/material@5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)": dependencies: "@babel/runtime": 7.24.7 "@mui/base": 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - "@mui/core-downloads-tracker": 5.15.21 - "@mui/system": 5.15.20(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + "@mui/core-downloads-tracker": 5.16.0 + "@mui/system": 5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) "@mui/types": 7.2.14(@types/react@18.3.3) - "@mui/utils": 5.15.20(@types/react@18.3.3)(react@18.3.1) + "@mui/utils": 5.16.0(@types/react@18.3.3)(react@18.3.1) "@types/react-transition-group": 4.4.10 clsx: 2.1.1 csstype: 3.1.3 @@ -5659,10 +5668,10 @@ snapshots: "@emotion/styled": 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) "@types/react": 18.3.3 - "@mui/private-theming@5.15.20(@types/react@18.3.3)(react@18.3.1)": + "@mui/private-theming@5.16.0(@types/react@18.3.3)(react@18.3.1)": dependencies: "@babel/runtime": 7.24.7 - "@mui/utils": 5.15.20(@types/react@18.3.3)(react@18.3.1) + "@mui/utils": 5.16.0(@types/react@18.3.3)(react@18.3.1) prop-types: 15.8.1 react: 18.3.1 optionalDependencies: @@ -5679,13 +5688,13 @@ snapshots: "@emotion/react": 11.11.4(@types/react@18.3.3)(react@18.3.1) "@emotion/styled": 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - "@mui/system@5.15.20(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)": + "@mui/system@5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)": dependencies: "@babel/runtime": 7.24.7 - "@mui/private-theming": 5.15.20(@types/react@18.3.3)(react@18.3.1) + "@mui/private-theming": 5.16.0(@types/react@18.3.3)(react@18.3.1) "@mui/styled-engine": 5.15.14(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(react@18.3.1) "@mui/types": 7.2.14(@types/react@18.3.3) - "@mui/utils": 5.15.20(@types/react@18.3.3)(react@18.3.1) + "@mui/utils": 5.16.0(@types/react@18.3.3)(react@18.3.1) clsx: 2.1.1 csstype: 3.1.3 prop-types: 15.8.1 @@ -5699,7 +5708,7 @@ snapshots: optionalDependencies: "@types/react": 18.3.3 - "@mui/utils@5.15.20(@types/react@18.3.3)(react@18.3.1)": + "@mui/utils@5.16.0(@types/react@18.3.3)(react@18.3.1)": dependencies: "@babel/runtime": 7.24.7 "@types/prop-types": 15.7.12 @@ -5709,12 +5718,13 @@ snapshots: optionalDependencies: "@types/react": 18.3.3 - "@mui/x-data-grid@7.8.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)": + "@mui/x-data-grid@7.9.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)": dependencies: "@babel/runtime": 7.24.7 - "@mui/material": 5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - "@mui/system": 5.15.20(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - "@mui/utils": 5.15.20(@types/react@18.3.3)(react@18.3.1) + "@mui/material": 5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + "@mui/system": 5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + "@mui/utils": 5.16.0(@types/react@18.3.3)(react@18.3.1) + "@mui/x-internals": 7.9.0(@types/react@18.3.3)(react@18.3.1) clsx: 2.1.1 prop-types: 15.8.1 react: 18.3.1 @@ -5725,15 +5735,23 @@ snapshots: - "@emotion/styled" - "@types/react" - "@mui/x-tree-view@6.0.0-alpha.1(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/base@5.0.0-beta.20(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/material@5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/system@5.15.20(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)": + "@mui/x-internals@7.9.0(@types/react@18.3.3)(react@18.3.1)": + dependencies: + "@babel/runtime": 7.24.7 + "@mui/utils": 5.16.0(@types/react@18.3.3)(react@18.3.1) + react: 18.3.1 + transitivePeerDependencies: + - "@types/react" + + "@mui/x-tree-view@6.0.0-alpha.1(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/base@5.0.0-beta.20(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/material@5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/system@5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)": dependencies: "@babel/runtime": 7.24.7 "@emotion/react": 11.11.4(@types/react@18.3.3)(react@18.3.1) "@emotion/styled": 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) "@mui/base": 5.0.0-beta.20(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - "@mui/material": 5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - "@mui/system": 5.15.20(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - "@mui/utils": 5.15.20(@types/react@18.3.3)(react@18.3.1) + "@mui/material": 5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + "@mui/system": 5.16.0(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + "@mui/utils": 5.16.0(@types/react@18.3.3)(react@18.3.1) "@types/react-transition-group": 4.4.10 clsx: 2.1.1 prop-types: 15.8.1 @@ -6019,7 +6037,7 @@ snapshots: "@types/fs-extra@9.0.13": dependencies: - "@types/node": 20.14.9 + "@types/node": 20.14.10 "@types/hast@3.0.4": dependencies: @@ -6043,7 +6061,7 @@ snapshots: "@types/ms@0.7.34": {} - "@types/node@20.14.9": + "@types/node@20.14.10": dependencies: undici-types: 5.26.5 @@ -6070,7 +6088,7 @@ snapshots: "@ungap/structured-clone@1.2.0": {} - "@vitejs/plugin-legacy@5.4.1(terser@5.31.1)(vite@5.3.3(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1))": + "@vitejs/plugin-legacy@5.4.1(terser@5.31.1)(vite@5.3.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1))": dependencies: "@babel/core": 7.24.7 "@babel/preset-env": 7.24.7(@babel/core@7.24.7) @@ -6081,18 +6099,18 @@ snapshots: regenerator-runtime: 0.14.1 systemjs: 6.15.1 terser: 5.31.1 - vite: 5.3.3(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1) + vite: 5.3.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - supports-color - "@vitejs/plugin-react@4.3.1(vite@5.3.3(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1))": + "@vitejs/plugin-react@4.3.1(vite@5.3.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1))": dependencies: "@babel/core": 7.24.7 "@babel/plugin-transform-react-jsx-self": 7.24.7(@babel/core@7.24.7) "@babel/plugin-transform-react-jsx-source": 7.24.7(@babel/core@7.24.7) "@types/babel__core": 7.20.5 react-refresh: 0.14.2 - vite: 5.3.3(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1) + vite: 5.3.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - supports-color @@ -6188,7 +6206,7 @@ snapshots: browserslist@4.23.1: dependencies: caniuse-lite: 1.0.30001640 - electron-to-chromium: 1.4.816 + electron-to-chromium: 1.4.818 node-releases: 2.0.14 update-browserslist-db: 1.1.0(browserslist@4.23.1) @@ -6321,7 +6339,7 @@ snapshots: no-case: 3.0.4 tslib: 2.6.3 - electron-to-chromium@1.4.816: {} + electron-to-chromium@1.4.818: {} end-of-stream@1.4.4: dependencies: @@ -7393,24 +7411,24 @@ snapshots: dependencies: monaco-editor: 0.49.0 - vite-plugin-svgr@4.2.0(rollup@4.18.0)(typescript@5.5.3)(vite@5.3.3(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1)): + vite-plugin-svgr@4.2.0(rollup@4.18.0)(typescript@5.5.3)(vite@5.3.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1)): dependencies: "@rollup/pluginutils": 5.1.0(rollup@4.18.0) "@svgr/core": 8.1.0(typescript@5.5.3) "@svgr/plugin-jsx": 8.1.0(@svgr/core@8.1.0(typescript@5.5.3)) - vite: 5.3.3(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1) + vite: 5.3.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - rollup - supports-color - typescript - vite@5.3.3(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1): + vite@5.3.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1): dependencies: esbuild: 0.21.5 postcss: 8.4.39 rollup: 4.18.0 optionalDependencies: - "@types/node": 20.14.9 + "@types/node": 20.14.10 fsevents: 2.3.3 sass: 1.77.6 terser: 5.31.1 diff --git a/clash-verge-rev/src-tauri/Cargo.lock b/clash-verge-rev/src-tauri/Cargo.lock index c11de2b0f5..12db319125 100644 --- a/clash-verge-rev/src-tauri/Cargo.lock +++ b/clash-verge-rev/src-tauri/Cargo.lock @@ -99,7 +99,7 @@ dependencies = [ "clipboard-win", "core-graphics 0.23.2", "image 0.25.1", - "log 0.4.21", + "log 0.4.22", "objc2", "objc2-app-kit", "objc2-foundation", @@ -203,7 +203,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-lite 1.13.0", - "log 0.4.21", + "log 0.4.22", "parking", "polling 2.8.0", "rustix 0.37.27", @@ -307,7 +307,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -342,7 +342,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -433,9 +433,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block" @@ -489,7 +489,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b6fb81ca0f301f33aff7401e2ffab37dc9e0e4a1cf0ccf6b34f4d9e60aa0682" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "boa_interner", "boa_macros", "indexmap 2.2.6", @@ -504,7 +504,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "600e4e4a65b26efcef08a7b1cf2899d3845a32e82e067ee3b75eaf7e413ff31c" dependencies = [ "arrayvec", - "bitflags 2.5.0", + "bitflags 2.6.0", "boa_ast", "boa_gc", "boa_interner", @@ -578,7 +578,7 @@ checksum = "6be9c93793b60dac381af475b98634d4b451e28336e72218cad9a20176218dbc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", "synstructure", ] @@ -588,7 +588,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8592556849f0619ed142ce2b3a19086769314a8d657f93a5765d06dbce4818" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "boa_ast", "boa_interner", "boa_macros", @@ -661,7 +661,7 @@ checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -715,9 +715,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.99" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "74b6a57f98764a267ff415d50a25e6e166f3831a5071af4995296ea97d210490" [[package]] name = "cesu8" @@ -767,6 +767,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.38" @@ -779,12 +785,12 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "clash-verge" -version = "1.7.2" +version = "1.7.3" dependencies = [ "anyhow", "auto-launch", @@ -794,11 +800,11 @@ dependencies = [ "delay_timer", "dirs 5.0.1", "dunce", - "log 0.4.21", + "log 0.4.22", "log4rs", "nanoid", "once_cell", - "open 5.1.4", + "open 5.2.0", "parking_lot", "percent-encoding", "port_scanner", @@ -896,7 +902,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f76990911f2267d837d9d0ad060aa63aaad170af40904b29461734c339030d4d" dependencies = [ "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1064,7 +1070,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1074,7 +1080,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1098,7 +1104,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1109,7 +1115,7 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ "darling_core", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1137,7 +1143,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c7397f8c48906dd9b5afc75001368c979418e5dff5575998a831eb2319b424e" dependencies = [ - "lazy_static 1.4.0", + "lazy_static 1.5.0", "pathsearch", "rand 0.8.5", "shared_library", @@ -1159,7 +1165,7 @@ dependencies = [ "dashmap", "event-listener 5.3.0", "futures", - "log 0.4.21", + "log 0.4.22", "lru", "once_cell", "rs-snowflake", @@ -1199,7 +1205,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1212,7 +1218,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1310,13 +1316,13 @@ checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1325,7 +1331,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.3", + "libloading 0.8.4", ] [[package]] @@ -1357,9 +1363,9 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "embed-resource" @@ -1414,7 +1420,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1589,7 +1595,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1707,7 +1713,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1843,7 +1849,7 @@ checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" dependencies = [ "cc", "libc", - "log 0.4.21", + "log 0.4.22", "rustversion", "windows 0.48.0", ] @@ -1985,7 +1991,7 @@ checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ "aho-corasick 1.1.3", "bstr", - "log 0.4.21", + "log 0.4.22", "regex-automata 0.4.7", "regex-syntax 0.8.4", ] @@ -2203,7 +2209,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" dependencies = [ - "log 0.4.21", + "log 0.4.22", "mac", "markup5ever", "proc-macro2", @@ -2317,9 +2323,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "c4fe55fb7a772d59a5ff1dfbff4fe0258d19b89fec4b233e75d35d5d2316badc" dependencies = [ "bytes", "futures-channel", @@ -2343,7 +2349,7 @@ checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.3.1", + "hyper 1.4.0", "hyper-util", "rustls", "rustls-pki-types", @@ -2374,7 +2380,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.0", "hyper-util", "native-tls", "tokio", @@ -2384,16 +2390,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.0", - "hyper 1.3.1", + "hyper 1.4.0", "pin-project-lite", "socket2 0.5.7", "tokio", @@ -2516,9 +2522,9 @@ checksum = "e3744fecc0df9ce19999cdaf1f9f3a48c253431ce1d67ef499128fe9d0b607ab" [[package]] name = "icu_properties" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8173ba888885d250016e957b8ebfd5a65cdb690123d8833a19f6833f9c2b579" +checksum = "db9e559598096627aeca8cdfb98138a70eb4078025f8d1d5f2416a361241f756" dependencies = [ "displaydoc", "icu_collections", @@ -2560,7 +2566,7 @@ checksum = "d2abdd3a62551e8337af119c5899e600ca0c88ec8f23a46c60ba216c803dcf1a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -2587,7 +2593,7 @@ checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" dependencies = [ "crossbeam-deque", "globset", - "log 0.4.21", + "log 0.4.22", "memchr", "regex-automata 0.4.7", "same-file", @@ -2678,7 +2684,7 @@ dependencies = [ "bitflags 1.3.2", "cc", "handlebars", - "lazy_static 1.4.0", + "lazy_static 1.5.0", "libc", "nix 0.23.2", "serde", @@ -2794,7 +2800,7 @@ dependencies = [ "cesu8", "combine", "jni-sys", - "log 0.4.21", + "log 0.4.22", "thiserror", "walkdir", ] @@ -2852,9 +2858,9 @@ checksum = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libappindicator" @@ -2866,7 +2872,7 @@ dependencies = [ "gtk", "gtk-sys", "libappindicator-sys", - "log 0.4.21", + "log 0.4.22", ] [[package]] @@ -2898,12 +2904,12 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2912,16 +2918,10 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", ] -[[package]] -name = "line-wrap" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd1bc4d24ad230d21fb898d1116b1801d7adfc449d42026475862ab48b11e70e" - [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -2956,14 +2956,14 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" dependencies = [ - "log 0.4.21", + "log 0.4.22", ] [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" dependencies = [ "serde", ] @@ -2987,7 +2987,7 @@ dependencies = [ "fnv", "humantime", "libc", - "log 0.4.21", + "log 0.4.22", "log-mdc", "once_cell", "parking_lot", @@ -3060,7 +3060,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" dependencies = [ - "log 0.4.21", + "log 0.4.22", "phf 0.10.1", "phf_codegen 0.10.0", "string_cache", @@ -3130,9 +3130,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -3182,7 +3182,7 @@ dependencies = [ "futures-util", "http 0.2.12", "httparse", - "log 0.4.21", + "log 0.4.22", "memchr", "mime", "spin", @@ -3205,7 +3205,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ "libc", - "log 0.4.21", + "log 0.4.22", "openssl", "openssl-probe", "openssl-sys", @@ -3280,9 +3280,21 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", - "cfg_aliases", + "cfg_aliases 0.1.1", + "libc", +] + +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "cfg_aliases 0.2.1", "libc", "memoffset 0.9.1", ] @@ -3319,7 +3331,7 @@ version = "4.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5312f837191c317644f313f7b2b39f9cb1496570c74f7c17152dd3961219551f" dependencies = [ - "log 0.4.21", + "log 0.4.22", "mac-notification-sys", "serde", "tauri-winrt-notification", @@ -3347,9 +3359,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", @@ -3440,7 +3452,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -3495,7 +3507,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "block2", "libc", "objc2", @@ -3511,7 +3523,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "block2", "objc2", "objc2-foundation", @@ -3541,7 +3553,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "block2", "libc", "objc2", @@ -3553,7 +3565,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "block2", "objc2", "objc2-foundation", @@ -3565,7 +3577,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "block2", "objc2", "objc2-foundation", @@ -3592,9 +3604,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ "memchr", ] @@ -3623,9 +3635,9 @@ dependencies = [ [[package]] name = "open" -version = "5.1.4" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5ca541f22b1c46d4bb9801014f234758ab4297e7870b904b6a8415b980a7388" +checksum = "9d2c909a3fce3bd80efef4cd1c6c056bd9376a8fe06fcfdbebaf32cb485a7e37" dependencies = [ "is-wsl", "libc", @@ -3638,7 +3650,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "foreign-types 0.3.2", "libc", @@ -3655,7 +3667,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -3768,7 +3780,7 @@ dependencies = [ "libc", "redox_syscall 0.5.2", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3807,9 +3819,9 @@ checksum = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8" [[package]] name = "pest" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", "thiserror", @@ -3940,7 +3952,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -3987,7 +3999,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -4021,14 +4033,13 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plist" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d34169e64b3c7a80c8621a48adaf44e0cf62c78a9b25dd9dd35f1881a17cf9" +checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "indexmap 2.2.6", - "line-wrap", - "quick-xml", + "quick-xml 0.32.0", "serde", "time", ] @@ -4057,7 +4068,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "libc", - "log 0.4.21", + "log 0.4.22", "pin-project-lite", "windows-sys 0.48.0", ] @@ -4164,9 +4175,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -4186,6 +4197,24 @@ dependencies = [ "memchr", ] +[[package]] +name = "quick-xml" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" +dependencies = [ + "memchr", +] + +[[package]] +name = "quick-xml" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f24d770aeca0eacb81ac29dfbc55ebcc09312fdd1f8bbecdc7e4a84e000e3b4" +dependencies = [ + "memchr", +] + [[package]] name = "quinn" version = "0.11.2" @@ -4364,7 +4393,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -4472,7 +4501,7 @@ dependencies = [ "hyper-tls 0.5.0", "ipnet", "js-sys", - "log 0.4.21", + "log 0.4.22", "mime", "native-tls", "once_cell", @@ -4511,13 +4540,13 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.0", "hyper-rustls", "hyper-tls 0.6.0", "hyper-util", "ipnet", "js-sys", - "log 0.4.21", + "log 0.4.22", "mime", "native-tls", "once_cell", @@ -4556,8 +4585,8 @@ dependencies = [ "gobject-sys", "gtk-sys", "js-sys", - "lazy_static 1.4.0", - "log 0.4.21", + "lazy_static 1.5.0", + "log 0.4.22", "objc", "objc-foundation", "objc_id", @@ -4651,7 +4680,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys 0.4.14", @@ -4699,9 +4728,9 @@ checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" dependencies = [ "ring", "rustls-pki-types", @@ -4762,7 +4791,7 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -4789,7 +4818,7 @@ dependencies = [ "cssparser", "derive_more", "fxhash", - "log 0.4.21", + "log 0.4.22", "matches", "phf 0.8.0", "phf_codegen 0.8.0", @@ -4838,7 +4867,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" dependencies = [ - "pest 2.7.10", + "pest 2.7.11", ] [[package]] @@ -4868,14 +4897,14 @@ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "indexmap 2.2.6", "itoa 1.0.11", @@ -4891,7 +4920,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -4917,9 +4946,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.8.1" +version = "3.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +checksum = "e73139bc5ec2d45e6c5fd85be5a46949c1c39a4c18e56915f5eb4c12f975e377" dependencies = [ "base64 0.22.1", "chrono", @@ -4935,14 +4964,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.8.1" +version = "3.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +checksum = "b80d3d6b56b64335c0180e5ffde23b3c5e08c14c585b51a15bd0e95393f46703" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -5031,7 +5060,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ - "lazy_static 1.4.0", + "lazy_static 1.5.0", ] [[package]] @@ -5050,7 +5079,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" dependencies = [ - "lazy_static 1.4.0", + "lazy_static 1.5.0", "libc", ] @@ -5232,9 +5261,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0208408ba0c3df17ed26eb06992cb1a1268d41b2c0e12e65203fbe3972cee5" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -5249,9 +5278,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", @@ -5278,7 +5307,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -5303,7 +5332,7 @@ source = "git+https://github.com/zzzgydi/sysproxy-rs?branch=main#bd912f90ae7f20b dependencies = [ "interfaces", "iptools", - "log 0.4.21", + "log 0.4.22", "thiserror", "windows 0.52.0", "winreg 0.52.0", @@ -5384,10 +5413,10 @@ dependencies = [ "image 0.24.9", "instant", "jni", - "lazy_static 1.4.0", + "lazy_static 1.5.0", "libappindicator", "libc", - "log 0.4.21", + "log 0.4.22", "ndk", "ndk-context", "ndk-sys", @@ -5442,9 +5471,9 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tauri" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e3b2c32de5bf5bed15a376064286643862b84e4e091d093f7bcdf1fda4b9758" +checksum = "336bc661a3f3250853fa83c6e5245449ed1c26dce5dcb28bdee7efedf6278806" dependencies = [ "anyhow", "base64 0.21.7", @@ -5620,7 +5649,7 @@ dependencies = [ "infer 0.13.0", "json-patch", "kuchikiki", - "log 0.4.21", + "log 0.4.22", "memchr", "phf 0.11.2", "proc-macro2", @@ -5651,7 +5680,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f89f5fb70d6f62381f5d9b2ba9008196150b40b75f3068eb24faeddf1c686871" dependencies = [ - "quick-xml", + "quick-xml 0.31.0", "windows 0.56.0", "windows-version", ] @@ -5713,9 +5742,9 @@ dependencies = [ "cfg-if", "filedescriptor", "hex", - "lazy_static 1.4.0", + "lazy_static 1.5.0", "libc", - "log 0.4.21", + "log 0.4.22", "memmem", "num-derive", "num-traits", @@ -5762,7 +5791,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -5781,7 +5810,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" dependencies = [ - "lazy_static 1.4.0", + "lazy_static 1.5.0", ] [[package]] @@ -5851,9 +5880,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "ce6b6a2fb3a985e99cebfaefa9faa3024743da73304ca1c683a36429613d3d22" dependencies = [ "tinyvec_macros", ] @@ -5891,7 +5920,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -5922,7 +5951,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" dependencies = [ "futures-util", - "log 0.4.21", + "log 0.4.22", "tokio", "tungstenite", ] @@ -6052,7 +6081,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log 0.4.21", + "log 0.4.22", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -6066,7 +6095,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -6085,7 +6114,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "log 0.4.21", + "log 0.4.22", "once_cell", "tracing-core", ] @@ -6139,7 +6168,7 @@ dependencies = [ "data-encoding", "http 1.1.0", "httparse", - "log 0.4.21", + "log 0.4.22", "rand 0.8.5", "sha1", "thiserror", @@ -6261,7 +6290,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24cc0f6d6f267b73e5a2cadf007ba8f9bc39c6a6f9666f8cf25ea809a153b032" dependencies = [ "libc", - "log 0.4.21", + "log 0.4.22", ] [[package]] @@ -6296,9 +6325,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.8.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" dependencies = [ "getrandom 0.2.15", ] @@ -6399,7 +6428,7 @@ dependencies = [ "headers", "http 0.2.12", "hyper 0.14.29", - "log 0.4.21", + "log 0.4.22", "mime", "mime_guess", "multer", @@ -6445,11 +6474,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", - "log 0.4.21", + "log 0.4.22", "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", "wasm-bindgen-shared", ] @@ -6483,7 +6512,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6509,9 +6538,9 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e9e6b6d4a2bb4e7e69433e0b35c7923b95d4dc8503a84d25ec917a4bbfdf07" +checksum = "269c04f203640d0da2092d1b8d89a2d081714ae3ac2f1b53e99f205740517198" dependencies = [ "cc", "downcast-rs", @@ -6523,11 +6552,11 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.3" +version = "0.31.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e63801c85358a431f986cffa74ba9599ff571fc5774ac113ed3b490c19a1133" +checksum = "08bd0f46c069d3382a36c8666c1b9ccef32b8b04f41667ca1fef06a1adcc2982" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "rustix 0.38.34", "wayland-backend", "wayland-scanner", @@ -6539,7 +6568,7 @@ version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -6551,7 +6580,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -6560,23 +6589,23 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.2" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67da50b9f80159dec0ea4c11c13e24ef9e7574bd6ce24b01860a175010cea565" +checksum = "edf466fc49a4feb65a511ca403fec3601494d0dee85dbf37fff6fa0dd4eec3b6" dependencies = [ "proc-macro2", - "quick-xml", + "quick-xml 0.34.0", "quote", ] [[package]] name = "wayland-sys" -version = "0.31.2" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "105b1842da6554f91526c14a2a2172897b7f745a805d62af4ce698706be79c12" +checksum = "4a6754825230fa5b27bafaa28c30b3c9e72c55530581220cef401fa422c0fae7" dependencies = [ "dlib", - "log 0.4.21", + "log 0.4.22", "pkg-config", ] @@ -6788,7 +6817,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core 0.52.0", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6798,7 +6827,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" dependencies = [ "windows-core 0.56.0", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6817,7 +6846,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6829,7 +6858,7 @@ dependencies = [ "windows-implement 0.56.0", "windows-interface", "windows-result", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6850,7 +6879,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -6861,7 +6890,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -6876,7 +6905,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6909,7 +6938,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6929,18 +6958,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -6955,7 +6984,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6972,9 +7001,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -7002,9 +7031,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -7032,15 +7061,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -7068,9 +7097,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -7098,9 +7127,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -7116,9 +7145,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -7146,9 +7175,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -7205,7 +7234,7 @@ checksum = "12b41773911497b18ca8553c3daaf8ec9fe9819caf93d451d3055f69de028adb" dependencies = [ "derive-new", "libc", - "log 0.4.21", + "log 0.4.22", "nix 0.28.0", "os_pipe", "tempfile", @@ -7249,7 +7278,7 @@ dependencies = [ "http 0.2.12", "kuchikiki", "libc", - "log 0.4.21", + "log 0.4.22", "objc", "objc_id", "once_cell", @@ -7352,15 +7381,15 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", "synstructure", ] [[package]] name = "zbus" -version = "4.3.0" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23915fcb26e7a9a9dc05fd93a9870d336d6d032cd7e8cebf1c5c37666489fdd5" +checksum = "851238c133804e0aa888edf4a0229481c753544ca12a60fd1c3230c8a500fe40" dependencies = [ "async-broadcast", "async-executor", @@ -7378,7 +7407,7 @@ dependencies = [ "futures-sink", "futures-util", "hex", - "nix 0.28.0", + "nix 0.29.0", "ordered-stream", "rand 0.8.5", "serde", @@ -7396,14 +7425,14 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "4.3.0" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02bcca0b586d2f8589da32347b4784ba424c4891ed86aa5b50d5e88f6b2c4f5d" +checksum = "8d5a3f12c20bd473be3194af6b49d50d7bb804ef3192dc70eddedb26b85d9da7" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", "zvariant_utils", ] @@ -7420,22 +7449,22 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -7455,7 +7484,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", "synstructure", ] @@ -7467,9 +7496,9 @@ checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zerovec" -version = "0.10.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" dependencies = [ "yoke", "zerofrom", @@ -7478,13 +7507,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -7500,9 +7529,9 @@ dependencies = [ [[package]] name = "zvariant" -version = "4.1.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aa6d31a02fbfb602bfde791de7fedeb9c2c18115b3d00f3a36e489f46ffbbc7" +checksum = "1724a2b330760dc7d2a8402d841119dc869ef120b139d29862d6980e9c75bfc9" dependencies = [ "endi", "enumflags2", @@ -7513,14 +7542,14 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "4.1.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642bf1b6b6d527988b3e8193d20969d53700a36eac734d21ae6639db168701c8" +checksum = "55025a7a518ad14518fb243559c058a2e5b848b015e31f1d90414f36e3317859" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", "zvariant_utils", ] @@ -7532,5 +7561,5 @@ checksum = "fc242db087efc22bd9ade7aa7809e4ba828132edc312871584a6b4391bdf8786" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] diff --git a/clash-verge-rev/src-tauri/Cargo.toml b/clash-verge-rev/src-tauri/Cargo.toml index 0171e52cef..32a320c903 100644 --- a/clash-verge-rev/src-tauri/Cargo.toml +++ b/clash-verge-rev/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clash-verge" -version = "1.7.2" +version = "1.7.3" description = "clash verge" authors = ["zzzgydi", "wonfen", "MystiPanda"] license = "GPL-3.0-only" diff --git a/clash-verge-rev/src-tauri/tauri.conf.json b/clash-verge-rev/src-tauri/tauri.conf.json index c33c989c34..ad5b936570 100644 --- a/clash-verge-rev/src-tauri/tauri.conf.json +++ b/clash-verge-rev/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "../node_modules/@tauri-apps/cli/schema.json", "package": { "productName": "Clash Verge", - "version": "1.7.2" + "version": "1.7.3" }, "build": { "distDir": "../dist", diff --git a/clash-verge-rev/src/components/profile/group-item.tsx b/clash-verge-rev/src/components/profile/group-item.tsx index 7bf18cf567..79d67f66a4 100644 --- a/clash-verge-rev/src/components/profile/group-item.tsx +++ b/clash-verge-rev/src/components/profile/group-item.tsx @@ -137,7 +137,7 @@ export const GroupItem = (props: Props) => { ); }; -const StyledPrimary = styled("span")` +const StyledPrimary = styled("div")` font-size: 15px; font-weight: 700; line-height: 1.5; diff --git a/clash-verge-rev/src/components/profile/groups-editor-viewer.tsx b/clash-verge-rev/src/components/profile/groups-editor-viewer.tsx index 8f6557d44c..5a59e09848 100644 --- a/clash-verge-rev/src/components/profile/groups-editor-viewer.tsx +++ b/clash-verge-rev/src/components/profile/groups-editor-viewer.tsx @@ -78,10 +78,18 @@ export const GroupsEditorViewer = (props: Props) => { const [appendSeq, setAppendSeq] = useState([]); const [deleteSeq, setDeleteSeq] = useState([]); + const filteredPrependSeq = useMemo( + () => prependSeq.filter((group) => match(group.name)), + [prependSeq, match] + ); const filteredGroupList = useMemo( () => groupList.filter((group) => match(group.name)), [groupList, match] ); + const filteredAppendSeq = useMemo( + () => appendSeq.filter((group) => match(group.name)), + [appendSeq, match] + ); const sensors = useSensors( useSensor(PointerSensor), @@ -376,6 +384,7 @@ export const GroupsEditorViewer = (props: Props) => { }} multiple options={proxyPolicyList} + disableCloseOnSelect onChange={(_, value) => value && field.onChange(value)} renderInput={(params) => } /> @@ -393,6 +402,7 @@ export const GroupsEditorViewer = (props: Props) => { sx={{ width: "calc(100% - 150px)" }} multiple options={proxyProviderList} + disableCloseOnSelect onChange={(_, value) => value && field.onChange(value)} renderInput={(params) => } /> @@ -541,23 +551,33 @@ export const GroupsEditorViewer = (props: Props) => { { @@ -576,7 +596,6 @@ export const GroupsEditorViewer = (props: Props) => { { @@ -705,13 +724,13 @@ export const GroupsEditorViewer = (props: Props) => { style={{ height: "calc(100% - 24px)", marginTop: "8px" }} totalCount={ filteredGroupList.length + - (prependSeq.length > 0 ? 1 : 0) + - (appendSeq.length > 0 ? 1 : 0) + (filteredPrependSeq.length > 0 ? 1 : 0) + + (filteredAppendSeq.length > 0 ? 1 : 0) } increaseViewportBy={256} itemContent={(index) => { - let shift = prependSeq.length > 0 ? 1 : 0; - if (prependSeq.length > 0 && index === 0) { + let shift = filteredPrependSeq.length > 0 ? 1 : 0; + if (filteredPrependSeq.length > 0 && index === 0) { return ( { onDragEnd={onPrependDragEnd} > { + items={filteredPrependSeq.map((x) => { return x.name; })} > - {prependSeq.map((item, index) => { + {filteredPrependSeq.map((item, index) => { return ( { onDragEnd={onAppendDragEnd} > { + items={filteredAppendSeq.map((x) => { return x.name; })} > - {appendSeq.map((item, index) => { + {filteredAppendSeq.map((item, index) => { return ( { const [appendSeq, setAppendSeq] = useState([]); const [deleteSeq, setDeleteSeq] = useState([]); + const filteredPrependSeq = useMemo( + () => prependSeq.filter((proxy) => match(proxy.name)), + [prependSeq, match] + ); const filteredProxyList = useMemo( () => proxyList.filter((proxy) => match(proxy.name)), [proxyList, match] ); + const filteredAppendSeq = useMemo( + () => appendSeq.filter((proxy) => match(proxy.name)), + [appendSeq, match] + ); const sensors = useSensors( useSensor(PointerSensor), @@ -119,7 +127,31 @@ export const ProxiesEditorViewer = (props: Props) => { } } }; - + const handleParse = () => { + let proxies = [] as IProxyConfig[]; + let names: string[] = []; + let uris = ""; + try { + uris = atob(proxyUri); + } catch { + uris = proxyUri; + } + uris + .trim() + .split("\n") + .forEach((uri) => { + try { + let proxy = parseUri(uri.trim()); + if (!names.includes(proxy.name)) { + proxies.push(proxy); + names.push(proxy.name); + } + } catch (err: any) { + Notice.error(err.message || err.toString()); + } + }); + return proxies; + }; const fetchProfile = async () => { let data = await readProfileFile(profileUid); @@ -228,7 +260,6 @@ export const ProxiesEditorViewer = (props: Props) => { placeholder={t("Use newlines for multiple uri")} fullWidth rows={9} - sx={{ height: "100px" }} multiline size="small" onChange={(e) => setProxyUri(e.target.value)} @@ -240,18 +271,7 @@ export const ProxiesEditorViewer = (props: Props) => { fullWidth variant="contained" onClick={() => { - let proxies = [] as IProxyConfig[]; - proxyUri - .trim() - .split("\n") - .forEach((uri) => { - try { - let proxy = parseUri(uri.trim()); - proxies.push(proxy); - } catch (err: any) { - Notice.error(err.message || err.toString()); - } - }); + let proxies = handleParse(); setPrependSeq([...prependSeq, ...proxies]); }} > @@ -263,18 +283,7 @@ export const ProxiesEditorViewer = (props: Props) => { fullWidth variant="contained" onClick={() => { - let proxies = [] as IProxyConfig[]; - proxyUri - .trim() - .split("\n") - .forEach((uri) => { - try { - let proxy = parseUri(uri.trim()); - proxies.push(proxy); - } catch (err: any) { - Notice.error(err.message || err.toString()); - } - }); + let proxies = handleParse(); setAppendSeq([...appendSeq, ...proxies]); }} > @@ -297,13 +306,13 @@ export const ProxiesEditorViewer = (props: Props) => { style={{ height: "calc(100% - 24px)", marginTop: "8px" }} totalCount={ filteredProxyList.length + - (prependSeq.length > 0 ? 1 : 0) + - (appendSeq.length > 0 ? 1 : 0) + (filteredPrependSeq.length > 0 ? 1 : 0) + + (filteredAppendSeq.length > 0 ? 1 : 0) } increaseViewportBy={256} itemContent={(index) => { - let shift = prependSeq.length > 0 ? 1 : 0; - if (prependSeq.length > 0 && index === 0) { + let shift = filteredPrependSeq.length > 0 ? 1 : 0; + if (filteredPrependSeq.length > 0 && index === 0) { return ( { onDragEnd={onPrependDragEnd} > { + items={filteredPrependSeq.map((x) => { return x.name; })} > - {prependSeq.map((item, index) => { + {filteredPrependSeq.map((item, index) => { return ( { onDragEnd={onAppendDragEnd} > { + items={filteredAppendSeq.map((x) => { return x.name; })} > - {appendSeq.map((item, index) => { + {filteredAppendSeq.map((item, index) => { return ( { ); }; -const StyledPrimary = styled("span")` +const StyledPrimary = styled("div")` font-size: 15px; font-weight: 700; line-height: 1.5; diff --git a/clash-verge-rev/src/components/profile/rule-item.tsx b/clash-verge-rev/src/components/profile/rule-item.tsx index 44e1478951..dfff9ef8a7 100644 --- a/clash-verge-rev/src/components/profile/rule-item.tsx +++ b/clash-verge-rev/src/components/profile/rule-item.tsx @@ -18,7 +18,12 @@ interface Props { export const RuleItem = (props: Props) => { let { type, ruleRaw, onDelete } = props; const sortable = type === "prepend" || type === "append"; - const rule = ruleRaw.replace(",no-resolve", "").split(","); + const rule = ruleRaw.replace(",no-resolve", ""); + + const ruleType = rule.match(/^[^,]+/)?.[0] ?? ""; + const proxyPolicy = rule.match(/[^,]+$/)?.[0] ?? ""; + const ruleContent = rule.slice(ruleType.length + 1, -proxyPolicy.length - 1); + const { attributes, listeners, setNodeRef, transform, transition } = sortable ? useSortable({ id: ruleRaw }) : { @@ -56,7 +61,7 @@ export const RuleItem = (props: Props) => { - {rule.length === 3 ? rule[1] : "-"} + {ruleContent || "-"} } secondary={ @@ -70,10 +75,10 @@ export const RuleItem = (props: Props) => { }} > - {rule[0]} + {ruleType} - {rule.length === 3 ? rule[2] : rule[1]} + {proxyPolicy} } @@ -92,7 +97,7 @@ export const RuleItem = (props: Props) => { ); }; -const StyledPrimary = styled("span")` +const StyledPrimary = styled("div")` font-size: 15px; font-weight: 700; line-height: 1.5; diff --git a/clash-verge-rev/src/components/profile/rules-editor-viewer.tsx b/clash-verge-rev/src/components/profile/rules-editor-viewer.tsx index 99e20db5dc..e4cb130288 100644 --- a/clash-verge-rev/src/components/profile/rules-editor-viewer.tsx +++ b/clash-verge-rev/src/components/profile/rules-editor-viewer.tsx @@ -254,10 +254,18 @@ export const RulesEditorViewer = (props: Props) => { const [appendSeq, setAppendSeq] = useState([]); const [deleteSeq, setDeleteSeq] = useState([]); + const filteredPrependSeq = useMemo( + () => prependSeq.filter((rule) => match(rule)), + [prependSeq, match] + ); const filteredRuleList = useMemo( () => ruleList.filter((rule) => match(rule)), [ruleList, match] ); + const filteredAppendSeq = useMemo( + () => appendSeq.filter((rule) => match(rule)), + [appendSeq, match] + ); const sensors = useSensors( useSensor(PointerSensor), @@ -573,13 +581,13 @@ export const RulesEditorViewer = (props: Props) => { style={{ height: "calc(100% - 24px)", marginTop: "8px" }} totalCount={ filteredRuleList.length + - (prependSeq.length > 0 ? 1 : 0) + - (appendSeq.length > 0 ? 1 : 0) + (filteredPrependSeq.length > 0 ? 1 : 0) + + (filteredAppendSeq.length > 0 ? 1 : 0) } increaseViewportBy={256} itemContent={(index) => { - let shift = prependSeq.length > 0 ? 1 : 0; - if (prependSeq.length > 0 && index === 0) { + let shift = filteredPrependSeq.length > 0 ? 1 : 0; + if (filteredPrependSeq.length > 0 && index === 0) { return ( { onDragEnd={onPrependDragEnd} > { + items={filteredPrependSeq.map((x) => { return x; })} > - {prependSeq.map((item, index) => { + {filteredPrependSeq.map((item, index) => { return ( { onDragEnd={onAppendDragEnd} > { + items={filteredAppendSeq.map((x) => { return x; })} > - {appendSeq.map((item, index) => { + {filteredAppendSeq.map((item, index) => { return ( ((props, ref) => { let validReg; if (getSystem() === "windows") { validReg = - /^((\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}|(\d{1,3}\.){1,3}\d{1,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\*|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+|localhost|)(;((\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}|(\d{1,3}\.){1,3}\d{1,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\*|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+|localhost|))*;?$/; + /^((\*\.)?([a-zA-Z0-9-]+\.?)+(local|test|example|invalid|localhost|onion|([a-zA-Z]{2,}))|(\d{1,3}\.){1,3}\d{1,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\*|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+|localhost|)(;((\*\.)?([a-zA-Z0-9-]+\.?)+(local|test|example|invalid|localhost|onion|([a-zA-Z]{2,}))|(\d{1,3}\.){1,3}\d{1,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\*|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+|localhost|))*;?$/; } else { validReg = - /^((\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}|(\d{1,3}\.){1,3}\d{1,3}(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+(\/\d{1,3})?|localhost|)(,((\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}|(\d{1,3}\.){1,3}\d{1,3}(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+(\/\d{1,3})?|localhost|))*,?$/; + /^((\*\.)?([a-zA-Z0-9-]+\.?)+(local|test|example|invalid|localhost|onion|([a-zA-Z]{2,}))|(\d{1,3}\.){1,3}\d{1,3}(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+(\/\d{1,3})?|localhost|)(,((\*\.)?([a-zA-Z0-9-]+\.?)+(local|test|example|invalid|localhost|onion|([a-zA-Z]{2,}))|(\d{1,3}\.){1,3}\d{1,3}(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\*(\/3[0-2])?|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+(\/\d{1,3})?|localhost|))*,?$/; } const [open, setOpen] = useState(false); diff --git a/clash-verge-rev/src/services/types.d.ts b/clash-verge-rev/src/services/types.d.ts index e2e47c7c72..3c1c357663 100644 --- a/clash-verge-rev/src/services/types.d.ts +++ b/clash-verge-rev/src/services/types.d.ts @@ -223,7 +223,7 @@ interface IProxyGroupConfig { filter?: string; "exclude-filter"?: string; "exclude-type"?: string; - "expected-status"?: number; + "expected-status"?: string; hidden?: boolean; icon?: string; } @@ -243,7 +243,7 @@ interface HttpOptions { method?: string; path?: string[]; headers?: { - [key: string]: string; + [key: string]: string[]; }; } @@ -262,7 +262,38 @@ interface RealityOptions { } type NetworkType = "ws" | "http" | "h2" | "grpc"; - +type CipherType = + | "none" + | "auto" + | "dummy" + | "aes-128-gcm" + | "aes-192-gcm" + | "aes-256-gcm" + | "lea-128-gcm" + | "lea-192-gcm" + | "lea-256-gcm" + | "aes-128-gcm-siv" + | "aes-256-gcm-siv" + | "2022-blake3-aes-128-gcm" + | "2022-blake3-aes-256-gcm" + | "aes-128-cfb" + | "aes-192-cfb" + | "aes-256-cfb" + | "aes-128-ctr" + | "aes-192-ctr" + | "aes-256-ctr" + | "chacha20" + | "chacha20-ietf" + | "chacha20-ietf-poly1305" + | "2022-blake3-chacha20-poly1305" + | "rabbit128-poly1305" + | "xchacha20-ietf-poly1305" + | "xchacha20" + | "aegis-128l" + | "aegis-256" + | "aez-384" + | "deoxys-ii-256-128" + | "rc4-md5"; // base interface IProxyBaseConfig { tfo?: boolean; @@ -294,7 +325,9 @@ interface IProxyHttpConfig extends IProxyBaseConfig { sni?: string; "skip-cert-verify"?: boolean; fingerprint?: string; - headers?: {}; + headers?: { + [key: string]: string; + }; } // socks5 interface IProxySocks5Config extends IProxyBaseConfig { @@ -399,7 +432,9 @@ interface IProxyVlessConfig extends IProxyBaseConfig { "grpc-opts"?: GrpcOptions; "ws-opts"?: WsOptions; "ws-path"?: string; - "ws-headers"?: {}; + "ws-headers"?: { + [key: string]: string; + }; "skip-cert-verify"?: boolean; fingerprint?: string; servername?: string; @@ -413,7 +448,7 @@ interface IProxyVmessConfig extends IProxyBaseConfig { port?: number; uuid?: string; alterId?: number; - cipher?: string; + cipher?: CipherType; udp?: boolean; network?: NetworkType; tls?: boolean; @@ -516,7 +551,7 @@ interface IProxyShadowsocksConfig extends IProxyBaseConfig { server?: string; port?: number; password?: string; - cipher?: string; + cipher?: CipherType; udp?: boolean; plugin?: "obfs" | "v2ray-plugin" | "shadow-tls" | "restls"; "plugin-opts"?: { @@ -526,7 +561,9 @@ interface IProxyShadowsocksConfig extends IProxyBaseConfig { path?: string; tls?: string; fingerprint?: string; - headers?: {}; + headers?: { + [key: string]: string; + }; "skip-cert-verify"?: boolean; version?: number; mux?: boolean; @@ -546,7 +583,7 @@ interface IProxyshadowsocksRConfig extends IProxyBaseConfig { server?: string; port?: number; password?: string; - cipher?: string; + cipher?: CipherType; obfs?: string; "obfs-param"?: string; protocol?: string; diff --git a/clash-verge-rev/src/utils/uri-parser.ts b/clash-verge-rev/src/utils/uri-parser.ts index ea9d0c1880..6d6131e54c 100644 --- a/clash-verge-rev/src/utils/uri-parser.ts +++ b/clash-verge-rev/src/utils/uri-parser.ts @@ -80,10 +80,83 @@ function decodeBase64OrOriginal(str: string): string { } } +function getCipher(str: string | undefined) { + switch (str) { + case "none": + return "none"; + case "auto": + return "auto"; + case "dummy": + return "dummy"; + case "aes-128-gcm": + return "aes-128-gcm"; + case "aes-192-gcm": + return "aes-192-gcm"; + case "aes-256-gcm": + return "aes-256-gcm"; + case "lea-128-gcm": + return "lea-128-gcm"; + case "lea-192-gcm": + return "lea-192-gcm"; + case "lea-256-gcm": + return "lea-256-gcm"; + case "aes-128-gcm-siv": + return "aes-128-gcm-siv"; + case "aes-256-gcm-siv": + return "aes-256-gcm-siv"; + case "2022-blake3-aes-128-gcm": + return "2022-blake3-aes-128-gcm"; + case "2022-blake3-aes-256-gcm": + return "2022-blake3-aes-256-gcm"; + case "aes-128-cfb": + return "aes-128-cfb"; + case "aes-192-cfb": + return "aes-192-cfb"; + case "aes-256-cfb": + return "aes-256-cfb"; + case "aes-128-ctr": + return "aes-128-ctr"; + case "aes-192-ctr": + return "aes-192-ctr"; + case "aes-256-ctr": + return "aes-256-ctr"; + case "chacha20": + return "chacha20"; + case "chacha20-poly1305": + return "chacha20-ietf-poly1305"; + case "chacha20-ietf": + return "chacha20-ietf"; + case "chacha20-ietf-poly1305": + return "chacha20-ietf-poly1305"; + case "2022-blake3-chacha20-poly1305": + return "2022-blake3-chacha20-poly1305"; + case "rabbit128-poly1305": + return "rabbit128-poly1305"; + case "xchacha20-ietf-poly1305": + return "xchacha20-ietf-poly1305"; + case "xchacha20": + return "xchacha20"; + case "aegis-128l": + return "aegis-128l"; + case "aegis-256": + return "aegis-256"; + case "aez-384": + return "aez-384"; + case "deoxys-ii-256-128": + return "deoxys-ii-256-128"; + case "rc4-md5": + return "rc4-md5"; + case undefined: + return "none"; + default: + return "auto"; + } +} + function URI_SS(line: string): IProxyShadowsocksConfig { // parse url let content = line.split("ss://")[1]; - content = decodeBase64OrOriginal(content); + const proxy: IProxyShadowsocksConfig = { name: decodeURIComponent(line.split("#")[1]).trim(), type: "ss", @@ -125,7 +198,7 @@ function URI_SS(line: string): IProxyShadowsocksConfig { `${serverAndPort?.substring(portIdx + 1)}`.match(/\d+/)?.[0] ?? "" ); const userInfo = userInfoStr.match(/(^.*?):(.*$)/); - proxy.cipher = userInfo?.[1]; + proxy.cipher = getCipher(userInfo?.[1]); proxy.password = userInfo?.[2]; // handle obfs @@ -172,7 +245,7 @@ function URI_SS(line: string): IProxyShadowsocksConfig { function URI_SSR(line: string): IProxyshadowsocksRConfig { line = decodeBase64OrOriginal(line.split("ssr://")[1]); - line = decodeBase64OrOriginal(line); + // handle IPV6 & IPV4 format let splitIdx = line.indexOf(":origin"); if (splitIdx === -1) { @@ -194,7 +267,7 @@ function URI_SSR(line: string): IProxyshadowsocksRConfig { server, port, protocol: params[0], - cipher: params[1], + cipher: getCipher(params[1]), obfs: params[2], password: decodeBase64OrOriginal(params[3]), }; @@ -243,7 +316,7 @@ function URI_VMESS(line: string): IProxyVmessConfig { type: "vmess", server: partitions[1], port: parseInt(partitions[2], 10), - cipher: getIfNotBlank(partitions[3], "auto"), + cipher: getCipher(getIfNotBlank(partitions[3], "auto")), uuid: partitions[4].match(/^"(.*)"$/)?.[1] || "", tls: params.obfs === "wss", udp: getIfPresent(params["udp-relay"]), @@ -320,7 +393,7 @@ function URI_VMESS(line: string): IProxyVmessConfig { type: "vmess", server, port, - cipher: getIfPresent(params.scy, "auto"), + cipher: getCipher(getIfPresent(params.scy, "auto")), uuid: params.id, tls: ["tls", true, 1, "1"].includes(params.tls), "skip-cert-verify": isPresent(params.verify_cert) @@ -411,7 +484,6 @@ function URI_VMESS(line: string): IProxyVmessConfig { function URI_VLESS(line: string): IProxyVlessConfig { line = line.split("vless://")[1]; - line = decodeBase64OrOriginal(line); let isShadowrocket; let parsed = /^(.*?)@(.*?):(\d+)\/?(\?(.*?))?(?:#(.*?))?$/.exec(line)!; if (!parsed) { @@ -578,7 +650,6 @@ function URI_Trojan(line: string): IProxyTrojanConfig { function URI_Hysteria2(line: string): IProxyHysteria2Config { line = line.split(/(hysteria2|hy2):\/\//)[2]; - line = decodeBase64OrOriginal(line); // eslint-disable-next-line no-unused-vars let [__, password, server, ___, port, ____, addons = "", name] = /^(.*?)@(.*?)(:(\d+))?\/?(\?(.*?))?(?:#(.*?))?$/.exec(line) || []; @@ -627,7 +698,6 @@ function URI_Hysteria2(line: string): IProxyHysteria2Config { function URI_Hysteria(line: string): IProxyHysteriaConfig { line = line.split(/(hysteria|hy):\/\//)[2]; - line = decodeBase64OrOriginal(line); let [__, server, ___, port, ____, addons = "", name] = /^(.*?)(:(\d+))?\/?(\?(.*?))?(?:#(.*?))?$/.exec(line)!; let portNum = parseInt(`${port}`, 10); @@ -723,7 +793,7 @@ function URI_Hysteria(line: string): IProxyHysteriaConfig { function URI_TUIC(line: string): IProxyTuicConfig { line = line.split(/tuic:\/\//)[1]; - line = decodeBase64OrOriginal(line); + let [__, uuid, password, server, ___, port, ____, addons = "", name] = /^(.*?):(.*?)@(.*?)(:(\d+))?\/?(\?(.*?))?(?:#(.*?))?$/.exec(line) || []; @@ -803,7 +873,6 @@ function URI_TUIC(line: string): IProxyTuicConfig { function URI_Wireguard(line: string): IProxyWireguardConfig { line = line.split(/(wireguard|wg):\/\//)[2]; - line = decodeBase64OrOriginal(line); let [__, ___, privateKey, server, ____, port, _____, addons = "", name] = /^((.*?)@)?(.*?)(:(\d+))?\/?(\?(.*?))?(?:#(.*?))?$/.exec(line)!; @@ -886,7 +955,6 @@ function URI_Wireguard(line: string): IProxyWireguardConfig { function URI_HTTP(line: string): IProxyHttpConfig { line = line.split(/(http|https):\/\//)[2]; - line = decodeBase64OrOriginal(line); let [__, ___, auth, server, ____, port, _____, addons = "", name] = /^((.*?)@)?(.*?)(:(\d+))?\/?(\?(.*?))?(?:#(.*?))?$/.exec(line)!; @@ -951,7 +1019,6 @@ function URI_HTTP(line: string): IProxyHttpConfig { function URI_SOCKS(line: string): IProxySocks5Config { line = line.split(/socks5:\/\//)[1]; - line = decodeBase64OrOriginal(line); let [__, ___, auth, server, ____, port, _____, addons = "", name] = /^((.*?)@)?(.*?)(:(\d+))?\/?(\?(.*?))?(?:#(.*?))?$/.exec(line)!; diff --git a/geoip/lib/common.go b/geoip/lib/common.go new file mode 100644 index 0000000000..81d8a2283b --- /dev/null +++ b/geoip/lib/common.go @@ -0,0 +1,21 @@ +package lib + +import ( + "fmt" + "io" + "net/http" +) + +func getRemoteURLContent(url string) ([]byte, error) { + resp, err := http.Get(url) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("failed to get remote content -> %s: %s", url, resp.Status) + } + + return io.ReadAll(resp.Body) +} diff --git a/geoip/lib/container.go b/geoip/lib/container.go new file mode 100644 index 0000000000..7427d85194 --- /dev/null +++ b/geoip/lib/container.go @@ -0,0 +1,183 @@ +package lib + +import ( + "fmt" + "strings" + + "go4.org/netipx" +) + +type Container interface { + GetEntry(name string) (*Entry, bool) + Add(entry *Entry, opts ...IgnoreIPOption) error + Remove(entry *Entry, rCase CaseRemove, opts ...IgnoreIPOption) error + Loop() <-chan *Entry +} + +type container struct { + entries map[string]*Entry +} + +func NewContainer() Container { + return &container{ + entries: make(map[string]*Entry), + } +} + +func (c *container) isValid() bool { + return c.entries != nil +} + +func (c *container) GetEntry(name string) (*Entry, bool) { + if !c.isValid() { + return nil, false + } + val, ok := c.entries[strings.ToUpper(strings.TrimSpace(name))] + if !ok { + return nil, false + } + return val, true +} + +func (c *container) Loop() <-chan *Entry { + ch := make(chan *Entry, 300) + go func() { + for _, val := range c.entries { + ch <- val + } + close(ch) + }() + return ch +} + +func (c *container) Add(entry *Entry, opts ...IgnoreIPOption) error { + var ignoreIPType IPType + for _, opt := range opts { + if opt != nil { + ignoreIPType = opt() + } + } + + name := entry.GetName() + val, found := c.GetEntry(name) + + switch found { + case true: + var ipv4set, ipv6set *netipx.IPSet + var err4, err6 error + if entry.hasIPv4Builder() { + ipv4set, err4 = entry.ipv4Builder.IPSet() + if err4 != nil { + return err4 + } + } + if entry.hasIPv6Builder() { + ipv6set, err6 = entry.ipv6Builder.IPSet() + if err6 != nil { + return err6 + } + } + switch ignoreIPType { + case IPv4: + if !val.hasIPv6Builder() { + val.ipv6Builder = new(netipx.IPSetBuilder) + } + val.ipv6Builder.AddSet(ipv6set) + case IPv6: + if !val.hasIPv4Builder() { + val.ipv4Builder = new(netipx.IPSetBuilder) + } + val.ipv4Builder.AddSet(ipv4set) + default: + if !val.hasIPv4Builder() { + val.ipv4Builder = new(netipx.IPSetBuilder) + } + if !val.hasIPv6Builder() { + val.ipv6Builder = new(netipx.IPSetBuilder) + } + val.ipv4Builder.AddSet(ipv4set) + val.ipv6Builder.AddSet(ipv6set) + } + + case false: + switch ignoreIPType { + case IPv4: + entry.ipv4Builder = nil + case IPv6: + entry.ipv6Builder = nil + } + c.entries[name] = entry + } + + return nil +} + +func (c *container) Remove(entry *Entry, rCase CaseRemove, opts ...IgnoreIPOption) error { + name := entry.GetName() + val, found := c.GetEntry(name) + if !found { + return fmt.Errorf("entry %s not found", name) + } + + var ignoreIPType IPType + for _, opt := range opts { + if opt != nil { + ignoreIPType = opt() + } + } + + switch rCase { + case CaseRemovePrefix: + var ipv4set, ipv6set *netipx.IPSet + var err4, err6 error + if entry.hasIPv4Builder() { + ipv4set, err4 = entry.ipv4Builder.IPSet() + if err4 != nil { + return err4 + } + } + if entry.hasIPv6Builder() { + ipv6set, err6 = entry.ipv6Builder.IPSet() + if err6 != nil { + return err6 + } + } + + switch ignoreIPType { + case IPv4: + if !val.hasIPv6Builder() { + val.ipv6Builder = new(netipx.IPSetBuilder) + } + val.ipv6Builder.RemoveSet(ipv6set) + case IPv6: + if !val.hasIPv4Builder() { + val.ipv4Builder = new(netipx.IPSetBuilder) + } + val.ipv4Builder.RemoveSet(ipv4set) + default: + if !val.hasIPv4Builder() { + val.ipv4Builder = new(netipx.IPSetBuilder) + } + if !val.hasIPv6Builder() { + val.ipv6Builder = new(netipx.IPSetBuilder) + } + val.ipv4Builder.RemoveSet(ipv4set) + val.ipv6Builder.RemoveSet(ipv6set) + } + + case CaseRemoveEntry: + switch ignoreIPType { + case IPv4: + val.ipv6Builder = nil + case IPv6: + val.ipv4Builder = nil + default: + delete(c.entries, name) + } + + default: + return fmt.Errorf("unknown remove case %d", rCase) + } + + return nil +} diff --git a/geoip/lib/func.go b/geoip/lib/converter.go similarity index 79% rename from geoip/lib/func.go rename to geoip/lib/converter.go index c1ce55919f..e660efb73d 100644 --- a/geoip/lib/func.go +++ b/geoip/lib/converter.go @@ -2,8 +2,6 @@ package lib import ( "fmt" - "io" - "net/http" "sort" "strings" ) @@ -54,17 +52,3 @@ func RegisterOutputConverter(name string, c OutputConverter) error { outputConverterMap[name] = c return nil } - -func getRemoteURLContent(url string) ([]byte, error) { - resp, err := http.Get(url) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("failed to get remote content -> %s: %s", url, resp.Status) - } - - return io.ReadAll(resp.Body) -} diff --git a/geoip/lib/entry.go b/geoip/lib/entry.go new file mode 100644 index 0000000000..311e89cb02 --- /dev/null +++ b/geoip/lib/entry.go @@ -0,0 +1,328 @@ +package lib + +import ( + "fmt" + "net" + "net/netip" + "strings" + "sync" + + "go4.org/netipx" +) + +type Entry struct { + name string + mu *sync.Mutex + ipv4Builder *netipx.IPSetBuilder + ipv6Builder *netipx.IPSetBuilder +} + +func NewEntry(name string) *Entry { + return &Entry{ + name: strings.ToUpper(strings.TrimSpace(name)), + mu: new(sync.Mutex), + ipv4Builder: new(netipx.IPSetBuilder), + ipv6Builder: new(netipx.IPSetBuilder), + } +} + +func (e *Entry) GetName() string { + return e.name +} + +func (e *Entry) hasIPv4Builder() bool { + return e.ipv4Builder != nil +} + +func (e *Entry) hasIPv6Builder() bool { + return e.ipv6Builder != nil +} + +func (e *Entry) processPrefix(src any) (*netip.Prefix, IPType, error) { + switch src := src.(type) { + case net.IP: + ip, ok := netipx.FromStdIP(src) + if !ok { + return nil, "", ErrInvalidIP + } + ip = ip.Unmap() + switch { + case ip.Is4(): + prefix := netip.PrefixFrom(ip, 32) + return &prefix, IPv4, nil + case ip.Is6(): + prefix := netip.PrefixFrom(ip, 128) + return &prefix, IPv6, nil + default: + return nil, "", ErrInvalidIPLength + } + + case *net.IPNet: + prefix, ok := netipx.FromStdIPNet(src) + if !ok { + return nil, "", ErrInvalidIPNet + } + ip := prefix.Addr().Unmap() + switch { + case ip.Is4(): + return &prefix, IPv4, nil + case ip.Is6(): + return &prefix, IPv6, nil + default: + return nil, "", ErrInvalidIPLength + } + + case netip.Addr: + src = src.Unmap() + switch { + case src.Is4(): + prefix := netip.PrefixFrom(src, 32) + return &prefix, IPv4, nil + case src.Is6(): + prefix := netip.PrefixFrom(src, 128) + return &prefix, IPv6, nil + default: + return nil, "", ErrInvalidIPLength + } + + case *netip.Addr: + *src = (*src).Unmap() + switch { + case src.Is4(): + prefix := netip.PrefixFrom(*src, 32) + return &prefix, IPv4, nil + case src.Is6(): + prefix := netip.PrefixFrom(*src, 128) + return &prefix, IPv6, nil + default: + return nil, "", ErrInvalidIPLength + } + + case netip.Prefix: + ip := src.Addr() + switch { + case ip.Is4(): + prefix, err := ip.Prefix(src.Bits()) + if err != nil { + return nil, "", ErrInvalidPrefix + } + return &prefix, IPv4, nil + case ip.Is4In6(): + ip = ip.Unmap() + bits := src.Bits() + if bits < 96 { + return nil, "", ErrInvalidPrefix + } + prefix, err := ip.Prefix(bits - 96) + if err != nil { + return nil, "", ErrInvalidPrefix + } + return &prefix, IPv4, nil + case ip.Is6(): + prefix, err := ip.Prefix(src.Bits()) + if err != nil { + return nil, "", ErrInvalidPrefix + } + return &prefix, IPv6, nil + default: + return nil, "", ErrInvalidIPLength + } + + case *netip.Prefix: + ip := src.Addr() + switch { + case ip.Is4(): + prefix, err := ip.Prefix(src.Bits()) + if err != nil { + return nil, "", ErrInvalidPrefix + } + return &prefix, IPv4, nil + case ip.Is4In6(): + ip = ip.Unmap() + bits := src.Bits() + if bits < 96 { + return nil, "", ErrInvalidPrefix + } + prefix, err := ip.Prefix(bits - 96) + if err != nil { + return nil, "", ErrInvalidPrefix + } + return &prefix, IPv4, nil + case ip.Is6(): + prefix, err := ip.Prefix(src.Bits()) + if err != nil { + return nil, "", ErrInvalidPrefix + } + return &prefix, IPv6, nil + default: + return nil, "", ErrInvalidIPLength + } + + case string: + src, _, _ = strings.Cut(src, "#") + src, _, _ = strings.Cut(src, "//") + src, _, _ = strings.Cut(src, "/*") + src = strings.TrimSpace(src) + if src == "" { + return nil, "", ErrCommentLine + } + + switch strings.Contains(src, "/") { + case true: // src is CIDR notation + ip, network, err := net.ParseCIDR(src) + if err != nil { + return nil, "", ErrInvalidCIDR + } + addr, ok := netipx.FromStdIP(ip) + if !ok { + return nil, "", ErrInvalidIP + } + if addr.Unmap().Is4() && strings.Contains(network.String(), "::") { // src is invalid IPv4-mapped IPv6 address + return nil, "", ErrInvalidCIDR + } + prefix, ok := netipx.FromStdIPNet(network) + if !ok { + return nil, "", ErrInvalidIPNet + } + + addr = prefix.Addr().Unmap() + switch { + case addr.Is4(): + return &prefix, IPv4, nil + case addr.Is6(): + return &prefix, IPv6, nil + default: + return nil, "", ErrInvalidIPLength + } + + case false: // src is IP address + ip, err := netip.ParseAddr(src) + if err != nil { + return nil, "", ErrInvalidIP + } + ip = ip.Unmap() + switch { + case ip.Is4(): + prefix := netip.PrefixFrom(ip, 32) + return &prefix, IPv4, nil + case ip.Is6(): + prefix := netip.PrefixFrom(ip, 128) + return &prefix, IPv6, nil + default: + return nil, "", ErrInvalidIPLength + } + } + } + + return nil, "", ErrInvalidPrefixType +} + +func (e *Entry) add(prefix *netip.Prefix, ipType IPType) error { + e.mu.Lock() + defer e.mu.Unlock() + + switch ipType { + case IPv4: + if !e.hasIPv4Builder() { + e.ipv4Builder = new(netipx.IPSetBuilder) + } + e.ipv4Builder.AddPrefix(*prefix) + case IPv6: + if !e.hasIPv6Builder() { + e.ipv6Builder = new(netipx.IPSetBuilder) + } + e.ipv6Builder.AddPrefix(*prefix) + default: + return ErrInvalidIPType + } + + return nil +} + +func (e *Entry) remove(prefix *netip.Prefix, ipType IPType) error { + e.mu.Lock() + defer e.mu.Unlock() + + switch ipType { + case IPv4: + if e.hasIPv4Builder() { + e.ipv4Builder.RemovePrefix(*prefix) + } + case IPv6: + if e.hasIPv6Builder() { + e.ipv6Builder.RemovePrefix(*prefix) + } + default: + return ErrInvalidIPType + } + + return nil +} + +func (e *Entry) AddPrefix(cidr any) error { + prefix, ipType, err := e.processPrefix(cidr) + if err != nil && err != ErrCommentLine { + return err + } + if err := e.add(prefix, ipType); err != nil { + return err + } + return nil +} + +func (e *Entry) RemovePrefix(cidr string) error { + prefix, ipType, err := e.processPrefix(cidr) + if err != nil && err != ErrCommentLine { + return err + } + if err := e.remove(prefix, ipType); err != nil { + return err + } + return nil +} + +func (e *Entry) MarshalText(opts ...IgnoreIPOption) ([]string, error) { + var ignoreIPType IPType + for _, opt := range opts { + if opt != nil { + ignoreIPType = opt() + } + } + disableIPv4, disableIPv6 := false, false + switch ignoreIPType { + case IPv4: + disableIPv4 = true + case IPv6: + disableIPv6 = true + } + + prefixSet := make([]string, 0, 1024) + + if !disableIPv4 && e.hasIPv4Builder() { + ipv4set, err := e.ipv4Builder.IPSet() + if err != nil { + return nil, err + } + prefixes := ipv4set.Prefixes() + for _, prefix := range prefixes { + prefixSet = append(prefixSet, prefix.String()) + } + } + + if !disableIPv6 && e.hasIPv6Builder() { + ipv6set, err := e.ipv6Builder.IPSet() + if err != nil { + return nil, err + } + prefixes := ipv6set.Prefixes() + for _, prefix := range prefixes { + prefixSet = append(prefixSet, prefix.String()) + } + } + + if len(prefixSet) > 0 { + return prefixSet, nil + } + + return nil, fmt.Errorf("entry %s has no prefix", e.GetName()) +} diff --git a/geoip/lib/error.go b/geoip/lib/error.go index 1b8e4518b9..80dcc736fd 100644 --- a/geoip/lib/error.go +++ b/geoip/lib/error.go @@ -10,6 +10,8 @@ var ( ErrInvalidIP = errors.New("invalid IP address") ErrInvalidIPLength = errors.New("invalid IP address length") ErrInvalidIPNet = errors.New("invalid IPNet address") + ErrInvalidCIDR = errors.New("invalid CIDR") + ErrInvalidPrefix = errors.New("invalid prefix") ErrInvalidPrefixType = errors.New("invalid prefix type") ErrCommentLine = errors.New("comment line") ) diff --git a/geoip/lib/lib.go b/geoip/lib/lib.go index 430a39f345..691708ff75 100644 --- a/geoip/lib/lib.go +++ b/geoip/lib/lib.go @@ -1,16 +1,5 @@ package lib -import ( - "fmt" - "log" - "net" - "net/netip" - "strings" - "sync" - - "go4.org/netipx" -) - const ( ActionAdd Action = "add" ActionRemove Action = "remove" @@ -18,6 +7,9 @@ const ( IPv4 IPType = "ipv4" IPv6 IPType = "ipv6" + + CaseRemovePrefix CaseRemove = 0 + CaseRemoveEntry CaseRemove = 1 ) var ActionsRegistry = map[Action]bool{ @@ -30,6 +22,8 @@ type Action string type IPType string +type CaseRemove int + type Typer interface { GetType() string } @@ -56,280 +50,6 @@ type OutputConverter interface { Output(Container) error } -type Entry struct { - name string - mu *sync.Mutex - ipv4Builder *netipx.IPSetBuilder - ipv6Builder *netipx.IPSetBuilder -} - -func NewEntry(name string) *Entry { - return &Entry{ - name: strings.ToUpper(strings.TrimSpace(name)), - mu: new(sync.Mutex), - ipv4Builder: new(netipx.IPSetBuilder), - ipv6Builder: new(netipx.IPSetBuilder), - } -} - -func (e *Entry) GetName() string { - return e.name -} - -func (e *Entry) hasIPv4Builder() bool { - return e.ipv4Builder != nil -} - -func (e *Entry) hasIPv6Builder() bool { - return e.ipv6Builder != nil -} - -func (e *Entry) processPrefix(src any) (*netip.Prefix, IPType, error) { - switch src := src.(type) { - case net.IP: - ip, ok := netipx.FromStdIP(src) - if !ok { - return nil, "", ErrInvalidIP - } - switch { - case ip.Is4(): - prefix := netip.PrefixFrom(ip, 32) - return &prefix, IPv4, nil - case ip.Is6(): - prefix := netip.PrefixFrom(ip, 128) - return &prefix, IPv6, nil - default: - return nil, "", ErrInvalidIPLength - } - - case *net.IPNet: - prefix, ok := netipx.FromStdIPNet(src) - if !ok { - return nil, "", ErrInvalidIPNet - } - ip := prefix.Addr() - switch { - case ip.Is4(): - return &prefix, IPv4, nil - case ip.Is6(): - return &prefix, IPv6, nil - default: - return nil, "", ErrInvalidIPLength - } - - case netip.Addr: - switch { - case src.Is4(): - prefix := netip.PrefixFrom(src, 32) - return &prefix, IPv4, nil - case src.Is6(): - prefix := netip.PrefixFrom(src, 128) - return &prefix, IPv6, nil - default: - return nil, "", ErrInvalidIPLength - } - - case *netip.Addr: - switch { - case src.Is4(): - prefix := netip.PrefixFrom(*src, 32) - return &prefix, IPv4, nil - case src.Is6(): - prefix := netip.PrefixFrom(*src, 128) - return &prefix, IPv6, nil - default: - return nil, "", ErrInvalidIPLength - } - - case netip.Prefix: - ip := src.Addr() - switch { - case ip.Is4(): - return &src, IPv4, nil - case ip.Is6(): - return &src, IPv6, nil - default: - return nil, "", ErrInvalidIPLength - } - - case *netip.Prefix: - ip := src.Addr() - switch { - case ip.Is4(): - return src, IPv4, nil - case ip.Is6(): - return src, IPv6, nil - default: - return nil, "", ErrInvalidIPLength - } - - case string: - src, _, _ = strings.Cut(src, "#") - src, _, _ = strings.Cut(src, "//") - src, _, _ = strings.Cut(src, "/*") - src = strings.TrimSpace(src) - if src == "" { - return nil, "", ErrCommentLine - } - - _, network, err := net.ParseCIDR(src) - switch err { - case nil: - prefix, err2 := netip.ParsePrefix(network.String()) - if err2 != nil { - return nil, "", ErrInvalidIPNet - } - ip := prefix.Addr() - switch { - case ip.Is4(): - return &prefix, IPv4, nil - case ip.Is6(): - return &prefix, IPv6, nil - default: - return nil, "", ErrInvalidIPLength - } - - default: - ip, err := netip.ParseAddr(src) - if err != nil { - return nil, "", err - } - switch { - case ip.Is4(): - prefix := netip.PrefixFrom(ip, 32) - return &prefix, IPv4, nil - case ip.Is4In6(): - _, network, err2 := net.ParseCIDR(src + "/128") - if err2 != nil { - return nil, "", ErrInvalidIPNet - } - prefix, err3 := netip.ParsePrefix(network.String()) - if err3 != nil { - return nil, "", ErrInvalidIPNet - } - return &prefix, IPv4, nil - case ip.Is6(): - prefix := netip.PrefixFrom(ip, 128) - return &prefix, IPv6, nil - default: - return nil, "", ErrInvalidIPLength - } - } - } - - return nil, "", ErrInvalidPrefixType -} - -func (e *Entry) add(prefix *netip.Prefix, ipType IPType) error { - e.mu.Lock() - defer e.mu.Unlock() - - switch ipType { - case IPv4: - if !e.hasIPv4Builder() { - e.ipv4Builder = new(netipx.IPSetBuilder) - } - e.ipv4Builder.AddPrefix(*prefix) - case IPv6: - if !e.hasIPv6Builder() { - e.ipv6Builder = new(netipx.IPSetBuilder) - } - e.ipv6Builder.AddPrefix(*prefix) - default: - return ErrInvalidIPType - } - - return nil -} - -func (e *Entry) remove(prefix *netip.Prefix, ipType IPType) error { - e.mu.Lock() - defer e.mu.Unlock() - - switch ipType { - case IPv4: - if e.hasIPv4Builder() { - e.ipv4Builder.RemovePrefix(*prefix) - } - case IPv6: - if e.hasIPv6Builder() { - e.ipv6Builder.RemovePrefix(*prefix) - } - default: - return ErrInvalidIPType - } - - return nil -} - -func (e *Entry) AddPrefix(cidr any) error { - prefix, ipType, err := e.processPrefix(cidr) - if err != nil && err != ErrCommentLine { - return err - } - if err := e.add(prefix, ipType); err != nil { - return err - } - return nil -} - -func (e *Entry) RemovePrefix(cidr string) error { - prefix, ipType, err := e.processPrefix(cidr) - if err != nil && err != ErrCommentLine { - return err - } - if err := e.remove(prefix, ipType); err != nil { - return err - } - return nil -} - -func (e *Entry) MarshalText(opts ...IgnoreIPOption) ([]string, error) { - var ignoreIPType IPType - for _, opt := range opts { - if opt != nil { - ignoreIPType = opt() - } - } - disableIPv4, disableIPv6 := false, false - switch ignoreIPType { - case IPv4: - disableIPv4 = true - case IPv6: - disableIPv6 = true - } - - prefixSet := make([]string, 0, 1024) - - if !disableIPv4 && e.hasIPv4Builder() { - ipv4set, err := e.ipv4Builder.IPSet() - if err != nil { - return nil, err - } - prefixes := ipv4set.Prefixes() - for _, prefix := range prefixes { - prefixSet = append(prefixSet, prefix.String()) - } - } - - if !disableIPv6 && e.hasIPv6Builder() { - ipv6set, err := e.ipv6Builder.IPSet() - if err != nil { - return nil, err - } - prefixes := ipv6set.Prefixes() - for _, prefix := range prefixes { - prefixSet = append(prefixSet, prefix.String()) - } - } - - if len(prefixSet) > 0 { - return prefixSet, nil - } - - return nil, fmt.Errorf("entry %s has no prefix", e.GetName()) -} - type IgnoreIPOption func() IPType func IgnoreIPv4() IPType { @@ -339,138 +59,3 @@ func IgnoreIPv4() IPType { func IgnoreIPv6() IPType { return IPv6 } - -type Container interface { - GetEntry(name string) (*Entry, bool) - Add(entry *Entry, opts ...IgnoreIPOption) error - Remove(name string, opts ...IgnoreIPOption) - Loop() <-chan *Entry -} - -type container struct { - entries *sync.Map // map[name]*Entry -} - -func NewContainer() Container { - return &container{ - entries: new(sync.Map), - } -} - -func (c *container) isValid() bool { - if c == nil || c.entries == nil { - return false - } - return true -} - -func (c *container) GetEntry(name string) (*Entry, bool) { - if !c.isValid() { - return nil, false - } - val, ok := c.entries.Load(strings.ToUpper(strings.TrimSpace(name))) - if !ok { - return nil, false - } - return val.(*Entry), true -} - -func (c *container) Loop() <-chan *Entry { - ch := make(chan *Entry, 300) - go func() { - c.entries.Range(func(key, value any) bool { - ch <- value.(*Entry) - return true - }) - close(ch) - }() - return ch -} - -func (c *container) Add(entry *Entry, opts ...IgnoreIPOption) error { - var ignoreIPType IPType - for _, opt := range opts { - if opt != nil { - ignoreIPType = opt() - } - } - - name := entry.GetName() - val, found := c.GetEntry(name) - switch found { - case true: - var ipv4set, ipv6set *netipx.IPSet - var err4, err6 error - if entry.hasIPv4Builder() { - ipv4set, err4 = entry.ipv4Builder.IPSet() - if err4 != nil { - return err4 - } - } - if entry.hasIPv6Builder() { - ipv6set, err6 = entry.ipv6Builder.IPSet() - if err6 != nil { - return err6 - } - } - switch ignoreIPType { - case IPv4: - if !val.hasIPv6Builder() { - val.ipv6Builder = new(netipx.IPSetBuilder) - } - val.ipv6Builder.AddSet(ipv6set) - case IPv6: - if !val.hasIPv4Builder() { - val.ipv4Builder = new(netipx.IPSetBuilder) - } - val.ipv4Builder.AddSet(ipv4set) - default: - if !val.hasIPv4Builder() { - val.ipv4Builder = new(netipx.IPSetBuilder) - } - if !val.hasIPv6Builder() { - val.ipv6Builder = new(netipx.IPSetBuilder) - } - val.ipv4Builder.AddSet(ipv4set) - val.ipv6Builder.AddSet(ipv6set) - } - c.entries.Store(name, val) - - case false: - switch ignoreIPType { - case IPv4: - entry.ipv4Builder = nil - case IPv6: - entry.ipv6Builder = nil - } - c.entries.Store(name, entry) - } - - return nil -} - -func (c *container) Remove(name string, opts ...IgnoreIPOption) { - val, found := c.GetEntry(name) - if !found { - log.Printf("failed to remove non-existent entry %s", name) - return - } - - var ignoreIPType IPType - for _, opt := range opts { - if opt != nil { - ignoreIPType = opt() - } - } - - switch ignoreIPType { - case IPv4: - val.ipv6Builder = nil - c.entries.Store(name, val) - case IPv6: - val.ipv4Builder = nil - c.entries.Store(name, val) - default: - c.entries.Delete(name) - } -} diff --git a/geoip/plugin/maxmind/country_csv.go b/geoip/plugin/maxmind/country_csv.go index 4608f12162..aea07a7313 100644 --- a/geoip/plugin/maxmind/country_csv.go +++ b/geoip/plugin/maxmind/country_csv.go @@ -4,6 +4,7 @@ import ( "encoding/csv" "encoding/json" "errors" + "fmt" "os" "path/filepath" "strings" @@ -113,6 +114,10 @@ func (g *geoLite2CountryCSV) Input(container lib.Container) (lib.Container, erro } } + if len(entries) == 0 { + return nil, fmt.Errorf("❌ [type %s | action %s] no entry is generated", typeCountryCSV, g.Action) + } + var ignoreIPType lib.IgnoreIPOption switch g.OnlyIPType { case lib.IPv4: @@ -121,14 +126,16 @@ func (g *geoLite2CountryCSV) Input(container lib.Container) (lib.Container, erro ignoreIPType = lib.IgnoreIPv4 } - for name, entry := range entries { + for _, entry := range entries { switch g.Action { case lib.ActionAdd: if err := container.Add(entry, ignoreIPType); err != nil { return nil, err } case lib.ActionRemove: - container.Remove(name, ignoreIPType) + if err := container.Remove(entry, lib.CaseRemovePrefix, ignoreIPType); err != nil { + return nil, err + } default: return nil, lib.ErrUnknownAction } @@ -193,10 +200,8 @@ func (g *geoLite2CountryCSV) process(file string, ccMap map[string]string, entri for _, line := range lines[1:] { ccID := strings.TrimSpace(line[1]) if countryCode, found := ccMap[ccID]; found { - if len(wantList) > 0 { - if _, found := wantList[countryCode]; !found { - continue - } + if len(wantList) > 0 && !wantList[countryCode] { + continue } cidrStr := strings.ToLower(strings.TrimSpace(line[0])) entry, found := entries[countryCode] diff --git a/geoip/plugin/maxmind/mmdb_in.go b/geoip/plugin/maxmind/mmdb_in.go index eef4c7d68a..0c94a12c25 100644 --- a/geoip/plugin/maxmind/mmdb_in.go +++ b/geoip/plugin/maxmind/mmdb_in.go @@ -107,7 +107,7 @@ func (g *maxmindMMDBIn) Input(container lib.Container) (lib.Container, error) { } if len(entries) == 0 { - return nil, fmt.Errorf("❌ [type %s | action %s] no entry is newly generated", typeMaxmindMMDBIn, g.Action) + return nil, fmt.Errorf("❌ [type %s | action %s] no entry is generated", typeMaxmindMMDBIn, g.Action) } var ignoreIPType lib.IgnoreIPOption @@ -138,7 +138,11 @@ func (g *maxmindMMDBIn) Input(container lib.Container) (lib.Container, error) { return nil, err } case lib.ActionRemove: - container.Remove(name, ignoreIPType) + if err := container.Remove(entry, lib.CaseRemovePrefix, ignoreIPType); err != nil { + return nil, err + } + default: + return nil, lib.ErrUnknownAction } } @@ -197,23 +201,14 @@ func (g *maxmindMMDBIn) generateEntries(entries map[string]*lib.Entry) error { continue } - var entry *lib.Entry name := strings.ToUpper(record.Country.IsoCode) - if theEntry, found := entries[name]; found { - entry = theEntry - } else { + entry, found := entries[name] + if !found { entry = lib.NewEntry(name) } - switch g.Action { - case lib.ActionAdd: - if err := entry.AddPrefix(subnet); err != nil { - return err - } - case lib.ActionRemove: - if err := entry.RemovePrefix(subnet.String()); err != nil { - return err - } + if err := entry.AddPrefix(subnet); err != nil { + return err } entries[name] = entry diff --git a/geoip/plugin/plaintext/text_in.go b/geoip/plugin/plaintext/text_in.go index 246a4ac10f..0180e52c08 100644 --- a/geoip/plugin/plaintext/text_in.go +++ b/geoip/plugin/plaintext/text_in.go @@ -106,7 +106,7 @@ func (t *textIn) Input(container lib.Container) (lib.Container, error) { } if len(entries) == 0 { - return nil, fmt.Errorf("type %s | action %s no entry are generated", t.Type, t.Action) + return nil, fmt.Errorf("type %s | action %s no entry is generated", t.Type, t.Action) } for _, entry := range entries { @@ -116,7 +116,11 @@ func (t *textIn) Input(container lib.Container) (lib.Container, error) { return nil, err } case lib.ActionRemove: - container.Remove(entry.GetName(), ignoreIPType) + if err := container.Remove(entry, lib.CaseRemovePrefix, ignoreIPType); err != nil { + return nil, err + } + default: + return nil, lib.ErrUnknownAction } } diff --git a/geoip/plugin/singbox/srs_in.go b/geoip/plugin/singbox/srs_in.go index 343fd4ca66..44812cb82e 100644 --- a/geoip/plugin/singbox/srs_in.go +++ b/geoip/plugin/singbox/srs_in.go @@ -114,7 +114,7 @@ func (s *srsIn) Input(container lib.Container) (lib.Container, error) { } if len(entries) == 0 { - return nil, fmt.Errorf("type %s | action %s no entry are generated", s.Type, s.Action) + return nil, fmt.Errorf("type %s | action %s no entry is generated", s.Type, s.Action) } for _, entry := range entries { @@ -124,7 +124,11 @@ func (s *srsIn) Input(container lib.Container) (lib.Container, error) { return nil, err } case lib.ActionRemove: - container.Remove(entry.GetName(), ignoreIPType) + if err := container.Remove(entry, lib.CaseRemovePrefix, ignoreIPType); err != nil { + return nil, err + } + default: + return nil, lib.ErrUnknownAction } } @@ -200,10 +204,9 @@ func (s *srsIn) walkRemoteFile(url, name string, entries map[string]*lib.Entry) } func (s *srsIn) generateEntries(name string, reader io.Reader, entries map[string]*lib.Entry) error { - entry := lib.NewEntry(name) - if theEntry, found := entries[entry.GetName()]; found { - fmt.Printf("⚠️ [type %s | action %s] found duplicated entry: %s. Process anyway\n", typeSRSIn, s.Action, name) - entry = theEntry + entry, found := entries[name] + if !found { + entry = lib.NewEntry(name) } plainRuleSet, err := srs.Read(reader, true) @@ -213,20 +216,12 @@ func (s *srsIn) generateEntries(name string, reader io.Reader, entries map[strin for _, rule := range plainRuleSet.Rules { for _, cidrStr := range rule.DefaultOptions.IPCIDR { - switch s.Action { - case lib.ActionAdd: - if err := entry.AddPrefix(cidrStr); err != nil { - return err - } - case lib.ActionRemove: - if err := entry.RemovePrefix(cidrStr); err != nil { - return err - } + if err := entry.AddPrefix(cidrStr); err != nil { + return err } } } - entries[entry.GetName()] = entry - + entries[name] = entry return nil } diff --git a/geoip/plugin/special/cutter.go b/geoip/plugin/special/cutter.go index c5543c2b99..d14e286d0e 100644 --- a/geoip/plugin/special/cutter.go +++ b/geoip/plugin/special/cutter.go @@ -89,7 +89,9 @@ func (c *cutter) Input(container lib.Container) (lib.Container, error) { if len(wantList) > 0 && !wantList[name] { continue } - container.Remove(name, ignoreIPType) + if err := container.Remove(entry, lib.CaseRemoveEntry, ignoreIPType); err != nil { + return nil, err + } } return container, nil diff --git a/geoip/plugin/special/private.go b/geoip/plugin/special/private.go index a3907aee7c..ec81acd15a 100644 --- a/geoip/plugin/special/private.go +++ b/geoip/plugin/special/private.go @@ -85,7 +85,9 @@ func (p *private) Input(container lib.Container) (lib.Container, error) { return nil, err } case lib.ActionRemove: - container.Remove(entryNamePrivate) + if err := container.Remove(entry, lib.CaseRemovePrefix); err != nil { + return nil, err + } default: return nil, lib.ErrUnknownAction } diff --git a/geoip/plugin/special/stdin.go b/geoip/plugin/special/stdin.go index 1f59c1fea6..4f56d75623 100644 --- a/geoip/plugin/special/stdin.go +++ b/geoip/plugin/special/stdin.go @@ -3,6 +3,7 @@ package special import ( "bufio" "encoding/json" + "fmt" "os" "strings" @@ -35,6 +36,10 @@ func newStdin(action lib.Action, data json.RawMessage) (lib.InputConverter, erro } } + if tmp.Name == "" { + return nil, fmt.Errorf("type %s | action %s missing name", typeStdin, action) + } + return &stdin{ Type: typeStdin, Action: action, @@ -81,15 +86,8 @@ func (s *stdin) Input(container lib.Container) (lib.Container, error) { continue } - switch s.Action { - case lib.ActionAdd: - if err := entry.AddPrefix(line); err != nil { - continue - } - case lib.ActionRemove: - if err := entry.RemovePrefix(line); err != nil { - continue - } + if err := entry.AddPrefix(line); err != nil { + continue } } @@ -105,8 +103,17 @@ func (s *stdin) Input(container lib.Container) (lib.Container, error) { ignoreIPType = lib.IgnoreIPv4 } - if err := container.Add(entry, ignoreIPType); err != nil { - return nil, err + switch s.Action { + case lib.ActionAdd: + if err := container.Add(entry, ignoreIPType); err != nil { + return nil, err + } + case lib.ActionRemove: + if err := container.Remove(entry, lib.CaseRemovePrefix, ignoreIPType); err != nil { + return nil, err + } + default: + return nil, lib.ErrUnknownAction } return container, nil diff --git a/geoip/plugin/special/stdout.go b/geoip/plugin/special/stdout.go index 736d642f48..9437e59770 100644 --- a/geoip/plugin/special/stdout.go +++ b/geoip/plugin/special/stdout.go @@ -74,31 +74,17 @@ func (s *stdout) Output(container lib.Container) error { } } - switch len(wantList) { - case 0: - for entry := range container.Loop() { - cidrList, err := s.generateCIDRList(entry) - if err != nil { - continue - } - for _, cidr := range cidrList { - io.WriteString(os.Stdout, cidr+"\n") - } + for entry := range container.Loop() { + if len(wantList) > 0 && !wantList[entry.GetName()] { + continue } - default: - for name := range wantList { - entry, found := container.GetEntry(name) - if !found { - continue - } - cidrList, err := s.generateCIDRList(entry) - if err != nil { - continue - } - for _, cidr := range cidrList { - io.WriteString(os.Stdout, cidr+"\n") - } + cidrList, err := s.generateCIDRList(entry) + if err != nil { + continue + } + for _, cidr := range cidrList { + io.WriteString(os.Stdout, cidr+"\n") } } diff --git a/geoip/plugin/special/test.go b/geoip/plugin/special/test.go index 9a19004fca..cf83ed83ce 100644 --- a/geoip/plugin/special/test.go +++ b/geoip/plugin/special/test.go @@ -65,7 +65,9 @@ func (t *test) Input(container lib.Container) (lib.Container, error) { return nil, err } case lib.ActionRemove: - container.Remove(entryNameTest) + if err := container.Remove(entry, lib.CaseRemovePrefix); err != nil { + return nil, err + } default: return nil, lib.ErrUnknownAction } diff --git a/geoip/plugin/v2ray/dat_in.go b/geoip/plugin/v2ray/dat_in.go index 65b9a67456..5baf32f20a 100644 --- a/geoip/plugin/v2ray/dat_in.go +++ b/geoip/plugin/v2ray/dat_in.go @@ -92,7 +92,7 @@ func (g *geoIPDatIn) Input(container lib.Container) (lib.Container, error) { } if len(entries) == 0 { - return nil, fmt.Errorf("❌ [type %s | action %s] no entry is newly generated", typeGeoIPdatIn, g.Action) + return nil, fmt.Errorf("❌ [type %s | action %s] no entry is generated", typeGeoIPdatIn, g.Action) } var ignoreIPType lib.IgnoreIPOption @@ -123,7 +123,11 @@ func (g *geoIPDatIn) Input(container lib.Container) (lib.Container, error) { return nil, err } case lib.ActionRemove: - container.Remove(name, ignoreIPType) + if err := container.Remove(entry, lib.CaseRemovePrefix, ignoreIPType); err != nil { + return nil, err + } + default: + return nil, lib.ErrUnknownAction } } @@ -174,26 +178,16 @@ func (g *geoIPDatIn) generateEntries(reader io.Reader, entries map[string]*lib.E } for _, geoip := range geoipList.Entry { - var entry *lib.Entry name := geoip.CountryCode - if theEntry, found := entries[name]; found { - fmt.Printf("⚠️ [type %s | action %s] found duplicated entry: %s. Process anyway\n", typeGeoIPdatIn, g.Action, name) - entry = theEntry - } else { + entry, found := entries[name] + if !found { entry = lib.NewEntry(name) } for _, v2rayCIDR := range geoip.Cidr { ipStr := net.IP(v2rayCIDR.GetIp()).String() + "/" + fmt.Sprint(v2rayCIDR.GetPrefix()) - switch g.Action { - case lib.ActionAdd: - if err := entry.AddPrefix(ipStr); err != nil { - return err - } - case lib.ActionRemove: - if err := entry.RemovePrefix(ipStr); err != nil { - return err - } + if err := entry.AddPrefix(ipStr); err != nil { + return err } } diff --git a/geoip/plugin/v2ray/dat_out.go b/geoip/plugin/v2ray/dat_out.go index 345b85ce79..46e3baa2f0 100644 --- a/geoip/plugin/v2ray/dat_out.go +++ b/geoip/plugin/v2ray/dat_out.go @@ -155,10 +155,10 @@ func (g *geoIPDatOut) Output(container lib.Container) error { } } - // Sort to make reproducible builds - g.sort(geoIPList) - if !g.OneFilePerList && updated { + // Sort to make reproducible builds + g.sort(geoIPList) + geoIPBytes, err := proto.Marshal(geoIPList) if err != nil { return err diff --git a/lede/package/base-files/files/bin/config_generate b/lede/package/base-files/files/bin/config_generate index 4c83b49f72..a9ca4d5b26 100755 --- a/lede/package/base-files/files/bin/config_generate +++ b/lede/package/base-files/files/bin/config_generate @@ -305,10 +305,10 @@ generate_static_system() { set system.ntp='timeserver' set system.ntp.enabled='1' set system.ntp.enable_server='1' - add_list system.ntp.server='ntp.aliyun.com' - add_list system.ntp.server='time1.cloud.tencent.com' - add_list system.ntp.server='time.ustc.edu.cn' - add_list system.ntp.server='cn.pool.ntp.org' + add_list system.ntp.server='time.apple.com' + add_list system.ntp.server='time.google.com' + add_list system.ntp.server='time.windows.com' + add_list system.ntp.server='time.cloudflare.com' EOF if json_is_a system object; then diff --git a/lede/package/lean/default-settings/files/zzz-default-settings b/lede/package/lean/default-settings/files/zzz-default-settings index 13177d8c5d..1d820559e3 100755 --- a/lede/package/lean/default-settings/files/zzz-default-settings +++ b/lede/package/lean/default-settings/files/zzz-default-settings @@ -3,8 +3,16 @@ uci set luci.main.lang=zh_cn uci commit luci -uci set system.@system[0].timezone=CST-8 -uci set system.@system[0].zonename=Asia/Shanghai +uci -q batch <<-EOF + set system.@system[0].timezone='CST-8' + set system.@system[0].zonename='Asia/Shanghai' + + delete system.ntp.server + add_list system.ntp.server='ntp1.aliyun.com' + add_list system.ntp.server='ntp.tencent.com' + add_list system.ntp.server='ntp.ntsc.ac.cn' + add_list system.ntp.server='time.ustc.edu.cn' +EOF uci commit system uci set fstab.@global[0].anon_mount=1 @@ -28,9 +36,7 @@ sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/usb_printer.lua sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/xunlei.lua sed -i 's/services/nas/g' /usr/lib/lua/luci/view/minidlna_status.htm -#ln -sf /sbin/ip /usr/bin/ip - -sed -i 's#downloads.openwrt.org#mirrors.cloud.tencent.com/lede#g' /etc/opkg/distfeeds.conf +sed -i 's#downloads.openwrt.org#mirrors.tencent.com/lede#g' /etc/opkg/distfeeds.conf sed -i 's/root::0:0:99999:7:::/root:$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF.:0:0:99999:7:::/g' /etc/shadow sed -i 's/root:::0:99999:7:::/root:$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF.:0:0:99999:7:::/g' /etc/shadow @@ -40,12 +46,6 @@ sed -i '/openwrt_luci/ { s/snapshots/releases\/18.06.9/g; }' /etc/opkg/distfeed sed -i '/check_signature/d' /etc/opkg.conf sed -i '/REDIRECT --to-ports 53/d' /etc/firewall.user -#echo 'iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53' >> /etc/firewall.user -#echo 'iptables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53' >> /etc/firewall.user -#echo '[ -n "$(command -v ip6tables)" ] && ip6tables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53' >> /etc/firewall.user -#echo '[ -n "$(command -v ip6tables)" ] && ip6tables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53' >> /etc/firewall.user - -#echo 'iptables -A OUTPUT -m string --string "api.installer.xiaomi.cn" --algo bm --to 65535 -j DROP' >> /etc/firewall.user sed -i '/option disabled/d' /etc/config/wireless sed -i '/set wireless.radio${devidx}.disabled/d' /lib/wifi/mac80211.sh @@ -58,11 +58,7 @@ echo "DISTRIB_DESCRIPTION='OpenWrt '" >> /etc/openwrt_release sed -i '/log-facility/d' /etc/dnsmasq.conf echo "log-facility=/dev/null" >> /etc/dnsmasq.conf -if [ -f /www/luci-static/resources/luci.js ]; then - sed -i 's/ifname/device/g' /etc/config/network -else - sed -i 's/device/ifname/g' /etc/config/network -fi +#ln -sf /sbin/ip /usr/bin/ip rm -rf /tmp/luci-modulecache/ rm -f /tmp/luci-indexcache diff --git a/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-360v6.dts b/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-360v6.dts index e8872c86f7..30c5ab88a0 100644 --- a/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-360v6.dts +++ b/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-360v6.dts @@ -184,25 +184,25 @@ &dp1 { status = "okay"; phy-handle = <&qca8075_0>; - label = "wan"; + label = "lan1"; }; &dp2 { status = "okay"; phy-handle = <&qca8075_1>; - label = "lan1"; + label = "lan2"; }; &dp3 { status = "okay"; phy-handle = <&qca8075_2>; - label = "lan2"; + label = "lan3"; }; &dp4 { status = "okay"; phy-handle = <&qca8075_3>; - label = "lan3"; + label = "wan"; }; &wifi { diff --git a/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-02.dts b/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-02.dts index a7ec1be5f4..b5f97cb424 100644 --- a/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-02.dts +++ b/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-02.dts @@ -271,6 +271,5 @@ &wifi { status = "okay"; - qcom,ath11k-calibration-variant = "JDC-AX1800-Pro"; - qcom,ath11k-fw-memory-mode = <1>; + qcom,ath11k-calibration-variant = "JDC-AX6600"; }; diff --git a/openwrt-packages/adguardhome/Makefile b/openwrt-packages/adguardhome/Makefile index f30b58dd29..fdcfea33df 100644 --- a/openwrt-packages/adguardhome/Makefile +++ b/openwrt-packages/adguardhome/Makefile @@ -12,6 +12,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/AdGuardHome/tar.gz/v$(PKG_VERSION)? PKG_HASH:=de6d99c4420d131b76e5d22b58ac91159e74e5783f02ada8b2f993f353e254f9 +PKG_BUILD_DIR:=$(BUILD_DIR)/AdGuardHome-$(PKG_VERSION) PKG_LICENSE:=GPL-3.0-only PKG_LICENSE_FILES:=LICENSE.txt @@ -57,17 +58,13 @@ define Download/adguardhome-frontend URL:=https://github.com/AdguardTeam/AdGuardHome/releases/download/v$(PKG_VERSION)/ URL_FILE:=AdGuardHome_frontend.tar.gz FILE:=$(FRONTEND_FILE) - HASH:=af9ae57b55a09a0aaf7c9a69a46734827443f98135d4c4b176874de3f9a449d8 + HASH:=af9ae57b55a09a0aaf7c9a69a46734827443f98135d4c4b176874de3f9a449d8 endef define Build/Prepare $(call Build/Prepare/Default) - if [ -d "$(BUILD_DIR)/AdGuardHome-$(PKG_VERSION)" ]; then \ - mv "$(BUILD_DIR)/AdGuardHome-$(PKG_VERSION)/"* "$(BUILD_DIR)/adguardhome-$(PKG_VERSION)/"; \ - fi gzip -dc $(DL_DIR)/$(FRONTEND_FILE) | $(HOST_TAR) -C $(PKG_BUILD_DIR)/ $(TAR_OPTIONS) - ( cd "$(BUILD_DIR)/adguardhome-$(PKG_VERSION)"; go mod tidy ) endef define Package/adguardhome/install diff --git a/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/iptables.sh b/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/iptables.sh index b718166b30..93ec84c125 100755 --- a/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/iptables.sh +++ b/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/iptables.sh @@ -1111,7 +1111,7 @@ add_firewall_rule() { $ip6t_m -I OUTPUT $(comment "mangle-OUTPUT-PSW") -o lo -j RETURN insert_rule_before "$ip6t_m" "OUTPUT" "mwan3" "$(comment mangle-OUTPUT-PSW) -m mark --mark 1 -j RETURN" - [ $(config_t_get global dns_redirect) == "1" ] && { + [ $(config_t_get global dns_redirect "0") = "1" ] && { $ipt_m -A PSW -p udp --dport 53 -j RETURN $ip6t_m -A PSW -p udp --dport 53 -j RETURN $ipt_n -I PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53 -m comment --comment "PSW_DNS_Hijack" 2>/dev/null diff --git a/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/nftables.sh b/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/nftables.sh index ca75f6904b..690c9eeeed 100755 --- a/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/nftables.sh +++ b/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/nftables.sh @@ -1152,7 +1152,7 @@ add_firewall_rule() { nft "add rule inet fw4 mangle_output oif lo counter return comment \"PSW_OUTPUT_MANGLE\"" nft "add rule inet fw4 mangle_output meta mark 1 counter return comment \"PSW_OUTPUT_MANGLE\"" - [ $(config_t_get global dns_redirect) == "1" ] && { + [ $(config_t_get global dns_redirect "0") = "1" ] && { nft "add rule inet fw4 PSW_MANGLE ip protocol udp udp dport 53 counter return" nft "add rule inet fw4 PSW_MANGLE_V6 meta l4proto udp udp dport 53 counter return" nft insert rule inet fw4 dstnat position 0 tcp dport 53 counter redirect to :53 comment \"PSW_DNS_Hijack\" 2>/dev/null diff --git a/shadowsocks-rust/crates/shadowsocks/src/relay/tcprelay/aead.rs b/shadowsocks-rust/crates/shadowsocks/src/relay/tcprelay/aead.rs index 4d0c7fc882..1d4e5a22b9 100644 --- a/shadowsocks-rust/crates/shadowsocks/src/relay/tcprelay/aead.rs +++ b/shadowsocks-rust/crates/shadowsocks/src/relay/tcprelay/aead.rs @@ -1,6 +1,6 @@ //! AEAD packet I/O facilities //! -//! AEAD protocol is defined in . +//! AEAD protocol is defined in . //! //! ```plain //! TCP request (before encryption) @@ -305,7 +305,7 @@ impl DecryptedReader { }; if plen > MAX_PACKET_SIZE { - // https://shadowsocks.org/en/spec/AEAD-Ciphers.html + // https://shadowsocks.org/doc/aead.html // // AEAD TCP protocol have reserved the higher two bits for future use return Err(ProtocolError::DataTooLong(plen)); diff --git a/shadowsocks-rust/src/service/local.rs b/shadowsocks-rust/src/service/local.rs index 78a0f86281..1eca5668c5 100644 --- a/shadowsocks-rust/src/service/local.rs +++ b/shadowsocks-rust/src/service/local.rs @@ -181,7 +181,7 @@ pub fn define_command_line_options(mut app: Command) -> Command { .action(ArgAction::Set) .value_hint(ValueHint::CommandName) .requires("SERVER_ADDR") - .help("SIP003 (https://shadowsocks.org/guide/sip003.html) plugin"), + .help("SIP003 (https://shadowsocks.org/doc/sip003.html) plugin"), ) .arg( Arg::new("PLUGIN_MODE") @@ -206,7 +206,7 @@ pub fn define_command_line_options(mut app: Command) -> Command { .action(ArgAction::Set) .value_hint(ValueHint::Url) .value_parser(vparser::parse_server_url) - .help("Server address in SIP002 (https://shadowsocks.org/guide/sip002.html) URL"), + .help("Server address in SIP002 (https://shadowsocks.org/doc/sip002.html) URL"), ) .group(ArgGroup::new("SERVER_CONFIG") .arg("SERVER_ADDR").arg("SERVER_URL").multiple(true)) diff --git a/shadowsocks-rust/src/service/manager.rs b/shadowsocks-rust/src/service/manager.rs index 0d44a8fad9..aac9d86d8d 100644 --- a/shadowsocks-rust/src/service/manager.rs +++ b/shadowsocks-rust/src/service/manager.rs @@ -93,7 +93,7 @@ pub fn define_command_line_options(mut app: Command) -> Command { .num_args(1) .action(ArgAction::Set) .value_hint(ValueHint::CommandName) - .help("Default SIP003 (https://shadowsocks.org/guide/sip003.html) plugin"), + .help("Default SIP003 (https://shadowsocks.org/doc/sip003.html) plugin"), ) .arg( Arg::new("PLUGIN_MODE") diff --git a/shadowsocks-rust/src/service/server.rs b/shadowsocks-rust/src/service/server.rs index bdb01262c2..1585c6446f 100644 --- a/shadowsocks-rust/src/service/server.rs +++ b/shadowsocks-rust/src/service/server.rs @@ -121,7 +121,7 @@ pub fn define_command_line_options(mut app: Command) -> Command { .action(ArgAction::Set) .value_hint(ValueHint::CommandName) .requires("SERVER_ADDR") - .help("SIP003 (https://shadowsocks.org/guide/sip003.html) plugin"), + .help("SIP003 (https://shadowsocks.org/doc/sip003.html) plugin"), ) .arg( Arg::new("PLUGIN_MODE") @@ -494,7 +494,7 @@ pub fn create(matches: &ArgMatches) -> Result<(Runtime, impl Future Result { match ServerConfig::from_url(v) { Ok(t) => Ok(t), - Err(..) => Err("should be SIP002 (https://shadowsocks.org/guide/sip002.html) format".to_owned()), + Err(..) => Err("should be SIP002 (https://shadowsocks.org/doc/sip002.html) format".to_owned()), } } diff --git a/small/luci-app-passwall/root/usr/share/passwall/iptables.sh b/small/luci-app-passwall/root/usr/share/passwall/iptables.sh index b718166b30..93ec84c125 100755 --- a/small/luci-app-passwall/root/usr/share/passwall/iptables.sh +++ b/small/luci-app-passwall/root/usr/share/passwall/iptables.sh @@ -1111,7 +1111,7 @@ add_firewall_rule() { $ip6t_m -I OUTPUT $(comment "mangle-OUTPUT-PSW") -o lo -j RETURN insert_rule_before "$ip6t_m" "OUTPUT" "mwan3" "$(comment mangle-OUTPUT-PSW) -m mark --mark 1 -j RETURN" - [ $(config_t_get global dns_redirect) == "1" ] && { + [ $(config_t_get global dns_redirect "0") = "1" ] && { $ipt_m -A PSW -p udp --dport 53 -j RETURN $ip6t_m -A PSW -p udp --dport 53 -j RETURN $ipt_n -I PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53 -m comment --comment "PSW_DNS_Hijack" 2>/dev/null diff --git a/small/luci-app-passwall/root/usr/share/passwall/nftables.sh b/small/luci-app-passwall/root/usr/share/passwall/nftables.sh index ca75f6904b..690c9eeeed 100755 --- a/small/luci-app-passwall/root/usr/share/passwall/nftables.sh +++ b/small/luci-app-passwall/root/usr/share/passwall/nftables.sh @@ -1152,7 +1152,7 @@ add_firewall_rule() { nft "add rule inet fw4 mangle_output oif lo counter return comment \"PSW_OUTPUT_MANGLE\"" nft "add rule inet fw4 mangle_output meta mark 1 counter return comment \"PSW_OUTPUT_MANGLE\"" - [ $(config_t_get global dns_redirect) == "1" ] && { + [ $(config_t_get global dns_redirect "0") = "1" ] && { nft "add rule inet fw4 PSW_MANGLE ip protocol udp udp dport 53 counter return" nft "add rule inet fw4 PSW_MANGLE_V6 meta l4proto udp udp dport 53 counter return" nft insert rule inet fw4 dstnat position 0 tcp dport 53 counter redirect to :53 comment \"PSW_DNS_Hijack\" 2>/dev/null diff --git a/v2rayu/Build/appdmg.sh b/v2rayu/Build/appdmg.sh index cbda668a97..11c58ec2f1 100755 --- a/v2rayu/Build/appdmg.sh +++ b/v2rayu/Build/appdmg.sh @@ -35,8 +35,6 @@ do echo "appdmg V2rayU-64.dmg" rm -f V2rayU-64.dmg appdmg appdmg.json "V2rayU-64.dmg" - #rm -fr release/V2rayU.app - ./sign_update "V2rayU-64.dmg" break ;; @@ -48,8 +46,6 @@ do echo "appdmg V2rayU-arm64.dmg" rm -f V2rayU-arm64.dmg appdmg appdmg.json "V2rayU-arm64.dmg" - #rm -fr release/V2rayU.app - ./sign_update "V2rayU-64.dmg" break ;; diff --git a/v2rayu/Build/build.plist b/v2rayu/Build/build.plist index 30596a7a27..e49f5ec64b 100644 --- a/v2rayu/Build/build.plist +++ b/v2rayu/Build/build.plist @@ -1,10 +1,10 @@ - - - - - compileBitcode - - method - development - - + + + + + method + + development + + + diff --git a/v2rayu/Build/publish.sh b/v2rayu/Build/publish.sh deleted file mode 100755 index 2a4f2be30b..0000000000 --- a/v2rayu/Build/publish.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# publish.sh -# V2rayU -# -# Created by yanue on 2019/7/18. -# Copyright © 2019 yanue. All rights reserved. - -read -p "请输入版本描述: " release_note -#pushRelease ${release_note} -generateAppcast ${release_note} - -echo "Done" diff --git a/v2rayu/Build/release.sh b/v2rayu/Build/release.sh index 86935e6d41..7cb0643297 100755 --- a/v2rayu/Build/release.sh +++ b/v2rayu/Build/release.sh @@ -13,26 +13,60 @@ APP_TITLE="${APP_NAME} - V${APP_Version}" AppCastDir=$HOME/swift/appcast function updatePlistVersion() { + echo "Updating plist version..." buildString=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${BASE_DIR}/V2rayU/${INFOPLIST_FILE}") - /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildString" "${BASE_DIR}/V2rayU/${INFOPLIST_FILE}" + if [ $? -eq 0 ]; then + /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildString" "${BASE_DIR}/V2rayU/${INFOPLIST_FILE}" + if [ $? -ne 0 ]; then + echo "Error: Failed to set CFBundleVersion" + exit 1 + fi + else + echo "Error: Failed to read CFBundleShortVersionString" + exit 1 + fi } function build() { - echo "Building V2rayU."${APP_Version} + echo "Building V2rayU version ${APP_Version}" + echo "Cleaning up old archive & app..." rm -rf ${V2rayU_ARCHIVE} ${V2rayU_RELEASE} + if [ $? -ne 0 ]; then + echo "Error: Failed to clean up old archive & app" + exit 1 + fi echo "Building archive... please wait a minute" xcodebuild -workspace ${BASE_DIR}/V2rayU.xcworkspace -config Release -scheme V2rayU -archivePath ${V2rayU_ARCHIVE} archive + if [ $? -ne 0 ]; then + echo "Error: Failed to build archive" + exit 1 + fi echo "Exporting archive..." xcodebuild -archivePath ${V2rayU_ARCHIVE} -exportArchive -exportPath ${V2rayU_RELEASE} -exportOptionsPlist ./build.plist + if [ $? -ne 0 ]; then + echo "Error: Failed to export archive" + exit 1 + fi echo "Cleaning up archive..." rm -rf ${V2rayU_ARCHIVE} + if [ $? -ne 0 ]; then + echo "Error: Failed to clean up archive" + exit 1 + fi + echo "Setting permissions for resources..." chmod -R 755 "${V2rayU_RELEASE}/${APP_NAME}.app/Contents/Resources/v2ray-core" chmod -R 755 "${V2rayU_RELEASE}/${APP_NAME}.app/Contents/Resources/unzip.sh" + if [ $? -ne 0 ]; then + echo "Error: Failed to set permissions for resources" + exit 1 + fi + + echo "Build and export completed successfully." } function createDmg() { @@ -209,9 +243,6 @@ function createDmgByAppdmg() { echo ${BUILD_DIR}/appdmg.json appdmg appdmg.json ${DMG_FINAL} - # appcast sign update - ${AppCastDir}/bin/sign_update ${DMG_FINAL} - # umount "/Volumes/${APP_NAME}" } @@ -256,7 +287,7 @@ function makeDmg() { } - - +#makeDmg +createDmgByAppdmg echo 'done' diff --git a/v2rayu/Build/sign.sh b/v2rayu/Build/sign.sh deleted file mode 100755 index 85f56bbe20..0000000000 --- a/v2rayu/Build/sign.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# sign.sh -# V2rayU -# -# Created by yanue on 2023/8/1. -# Copyright © 2023 yanue. All rights reserved. -set -ex - -TOKEN=$1 -release_id=$2 - -echo "token $TOKEN, release ${RELEASE_ID}" - -curl -X "PATCH" "https://api.appcenter.ms/v0.1/apps/yanue/V2rayU/releases/${release_id}" \ - -H "X-API-Token: $TOKEN" \ - -H 'Content-Type: application/json; charset=utf-8' \ - -d '{ - "release_notes": "test", - "metadata": { - "ed_signature": "PW8pDnr5VZkmC93gZjUDlHI8gkJSspPoDU3DdhsMkps" - } -}' diff --git a/v2rayu/Build/sign_update b/v2rayu/Build/sign_update deleted file mode 100755 index 2814c1609d..0000000000 Binary files a/v2rayu/Build/sign_update and /dev/null differ diff --git a/v2rayu/Podfile b/v2rayu/Podfile index e4ffe1ba23..e52e06fe4d 100644 --- a/v2rayu/Podfile +++ b/v2rayu/Podfile @@ -10,8 +10,7 @@ target 'V2rayU' do # Pods for V2rayU pod 'FirebaseAnalytics', '~> 10.24.0' pod 'FirebaseCrashlytics' - pod 'Alamofire' - pod 'SwiftyJSON' + pod 'SwiftyJSON'/ # master branch pod 'Preferences', :git => 'https://github.com/sindresorhus/Preferences.git' pod 'QRCoder' @@ -21,11 +20,11 @@ target 'V2rayU' do end -# fix libarclite_macosx.a need min deploy target 10.14 +# fix libarclite_macosx.a need min deploy target 11.0 post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| - config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.14' + config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '11.0' end end end diff --git a/v2rayu/Podfile.lock b/v2rayu/Podfile.lock index 177acccf5d..3eb133ccf5 100644 --- a/v2rayu/Podfile.lock +++ b/v2rayu/Podfile.lock @@ -1,5 +1,4 @@ PODS: - - Alamofire (4.8.2) - FirebaseAnalytics (10.24.0): - FirebaseAnalytics/AdIdSupport (= 10.24.0) - FirebaseCore (~> 10.0) @@ -112,26 +111,22 @@ PODS: - PromisesSwift (2.4.0): - PromisesObjC (= 2.4.0) - QRCoder (1.1.0) - - Sparkle (2.6.2) - Swifter (1.4.7) - SwiftyJSON (5.0.0) - Yams (5.0.6) DEPENDENCIES: - - Alamofire - FirebaseAnalytics (~> 10.24.0) - FirebaseCrashlytics - MASShortcut - Preferences (from `https://github.com/sindresorhus/Preferences.git`) - QRCoder - - Sparkle (~> 2.0) - Swifter - SwiftyJSON - Yams SPEC REPOS: https://github.com/CocoaPods/Specs.git: - - Alamofire - FirebaseAnalytics - FirebaseCore - FirebaseCoreExtension @@ -148,7 +143,6 @@ SPEC REPOS: - PromisesObjC - PromisesSwift - QRCoder - - Sparkle - Swifter - SwiftyJSON - Yams @@ -163,7 +157,6 @@ CHECKOUT OPTIONS: :git: https://github.com/sindresorhus/Preferences.git SPEC CHECKSUMS: - Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3 FirebaseAnalytics: b5efc493eb0f40ec560b04a472e3e1a15d39ca13 FirebaseCore: 11dc8a16dfb7c5e3c3f45ba0e191a33ac4f50894 FirebaseCoreExtension: af5fd85e817ea9d19f9a2659a376cf9cf99f03c0 @@ -181,11 +174,10 @@ SPEC CHECKSUMS: PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851 QRCoder: cbd2bee531cc86d286df7942334cfed94c803ae4 - Sparkle: a62c7dc4f410ced73beb2169cf1d3cc3f028a295 Swifter: 2327ef5d872c638aebab79646ce494af508b0c8f SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7 Yams: e10dae147f517ed57ecae37c5e8681bdf8fcab65 -PODFILE CHECKSUM: 071aabe40b11d56fb50a9b83f6ed47079838bdee +PODFILE CHECKSUM: d61ad825ad5d61b2b98237544e21946c9babe3a0 COCOAPODS: 1.15.2 diff --git a/v2rayu/V2rayU.xcodeproj/project.pbxproj b/v2rayu/V2rayU.xcodeproj/project.pbxproj index 5dc3a9e413..1ab46b93f8 100755 --- a/v2rayu/V2rayU.xcodeproj/project.pbxproj +++ b/v2rayu/V2rayU.xcodeproj/project.pbxproj @@ -25,7 +25,6 @@ 664EB377216C9A5F00B6AE0D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 664EB376216C9A5F00B6AE0D /* Assets.xcassets */; }; 664EB392216CA9E800B6AE0D /* ConfigWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 664EB390216CA9E800B6AE0D /* ConfigWindow.swift */; }; 6662C20B240EA782000AF6CD /* PreferenceDns.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6662C209240EA782000AF6CD /* PreferenceDns.xib */; }; - 667029CA21AF8E7A0079EF41 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 667029C921AF8E7A0079EF41 /* Sparkle.framework */; }; 667029D321AFB86E0079EF41 /* QrcodeWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 667029D121AFB86E0079EF41 /* QrcodeWindow.xib */; }; 66784AFC2170486D00AD307F /* Util.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66784AFB2170486D00AD307F /* Util.swift */; }; 667ECE722A9A05EC009B00EC /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 667ECE712A9A05EC009B00EC /* main.swift */; }; @@ -110,15 +109,11 @@ 6608D9DD2182C92D00A0E0DD /* v2rayOutbound.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = v2rayOutbound.swift; sourceTree = ""; }; 6608D9E12182C9C100A0E0DD /* v2rayStream.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = v2rayStream.swift; sourceTree = ""; }; 660D0E59216E0158000C2922 /* V2rayServer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = V2rayServer.swift; sourceTree = ""; usesTabs = 0; wrapsLines = 0; }; - 66107B8722DEDBE4002FFB60 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; 66107B8922DEE445002FFB60 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 6618372823E9BF1A000F7410 /* ToastWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ToastWindow.swift; sourceTree = ""; }; 6618372D23E9BF73000F7410 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/ToastWindow.xib; sourceTree = ""; }; 66193A8523EE45B200289B6A /* PreferenceRouting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferenceRouting.swift; sourceTree = ""; }; 66193A8823EE46BC00289B6A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = V2rayU/Base.lproj/PreferenceRouting.xib; sourceTree = SOURCE_ROOT; }; - 66193A9323EF1EF600289B6A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "../zh-Hans.lproj/PreferenceRouting.strings"; sourceTree = ""; }; - 66193A9523EF1EFA00289B6A /* zh-HK */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-HK"; path = "../zh-HK.lproj/PreferenceRouting.strings"; sourceTree = ""; }; - 6625848D2AB745E700DFDC1E /* sign.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = sign.sh; sourceTree = ""; }; 6625848E2AB746D500DFDC1E /* appdmg.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = appdmg.sh; sourceTree = ""; }; 662F0ACE2AB720C700884C17 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = ../en.lproj/PreferenceGeneral.strings; sourceTree = ""; }; 663F040525ED4B2C00687600 /* V2rayLaunch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = V2rayLaunch.swift; sourceTree = ""; }; @@ -126,19 +121,17 @@ 664B95DD217062A500DBC941 /* Alamofire */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Alamofire; path = Pods/Alamofire; sourceTree = ""; }; 664BAC462C2DB0E100654FB7 /* V2rayRouting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = V2rayRouting.swift; sourceTree = ""; }; 664BAC482C314CD600654FB7 /* AppVersion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppVersion.swift; sourceTree = ""; }; + 664BAC4F2C394AA000654FB7 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "../zh-Hans.lproj/PreferenceRouting.strings"; sourceTree = ""; }; 664EB371216C9A5E00B6AE0D /* V2rayU.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = V2rayU.app; sourceTree = BUILT_PRODUCTS_DIR; }; 664EB374216C9A5E00B6AE0D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 664EB376216C9A5F00B6AE0D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 664EB379216C9A5F00B6AE0D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 664EB37B216C9A5F00B6AE0D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 664EB390216CA9E800B6AE0D /* ConfigWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigWindow.swift; sourceTree = ""; }; - 664FC05321A70C4300048FE3 /* build.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = build.plist; sourceTree = ""; }; - 6653C20422E0A2B700754D66 /* publish.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = publish.sh; sourceTree = ""; }; 665DC9BA22A542F90062337B /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 6662C20A240EA782000AF6CD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = V2rayU/Base.lproj/PreferenceDns.xib; sourceTree = SOURCE_ROOT; }; 6662C20C240EA794000AF6CD /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "../zh-Hans.lproj/PreferenceDns.strings"; sourceTree = ""; }; 6662C20D240EA797000AF6CD /* zh-HK */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-HK"; path = "../zh-HK.lproj/PreferenceDns.strings"; sourceTree = ""; }; - 667029C921AF8E7A0079EF41 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = "../../Downloads/Sparkle-1.21.0/Sparkle.framework"; sourceTree = ""; }; 667029D221AFB86E0079EF41 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/QrcodeWindow.xib; sourceTree = ""; }; 66784AFB2170486D00AD307F /* Util.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Util.swift; sourceTree = ""; }; 667ECE6F2A9A05EB009B00EC /* V2rayUTool */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = V2rayUTool; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -154,7 +147,9 @@ 669A73AC233776B900807CF9 /* zh-HK */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-HK"; path = "../zh-HK.lproj/PreferenceGeneral.strings"; sourceTree = ""; }; 669A73AD233776B900807CF9 /* zh-HK */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-HK"; path = "../zh-HK.lproj/PreferencePac.strings"; sourceTree = ""; }; 669A73AE233776B900807CF9 /* zh-HK */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-HK"; path = "../zh-HK.lproj/PreferenceSubscription.strings"; sourceTree = ""; }; - 669A73AF233776B900807CF9 /* zh-HK */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-HK"; path = "zh-HK.lproj/Localizable.strings"; sourceTree = ""; }; + 66A358662C39517B00914A25 /* zh-HK */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-HK"; path = "zh-HK.lproj/Localizable.strings"; sourceTree = ""; }; + 66A358672C39517F00914A25 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; + 66A358682C3959AE00914A25 /* build.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = build.plist; sourceTree = ""; }; 66A5CE4521706B5A009B08B2 /* Pods_V2rayU.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Pods_V2rayU.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 66A77BE2268225790097A126 /* v2ray-core */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "v2ray-core"; path = "Build/v2ray-core"; sourceTree = ""; }; 66ACB19F21757D5B005B5881 /* MainMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenu.swift; sourceTree = ""; }; @@ -205,7 +200,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 667029CA21AF8E7A0079EF41 /* Sparkle.framework in Frameworks */, 66973EB721797719001FEA1E /* ServiceManagement.framework in Frameworks */, F260898E336CFA5EAB07ADC9 /* Pods_V2rayU.framework in Frameworks */, ); @@ -313,12 +307,10 @@ 66FEAD44217D75D7009DECF9 /* Build */ = { isa = PBXGroup; children = ( + 66A358682C3959AE00914A25 /* build.plist */, 6625848E2AB746D500DFDC1E /* appdmg.sh */, - 6625848D2AB745E700DFDC1E /* sign.sh */, - 664FC05321A70C4300048FE3 /* build.plist */, 66FEAD45217D75FC009DECF9 /* release.sh */, 6D6DFD93CE866018306A090E /* pac */, - 6653C20422E0A2B700754D66 /* publish.sh */, 6D6DF927AC79EEF7378C192A /* appdmg.json */, ); path = Build; @@ -360,7 +352,6 @@ children = ( 665DC9BA22A542F90062337B /* AppKit.framework */, 664666A021CBD6C60094F0B7 /* libPods-V2rayUTool.a */, - 667029C921AF8E7A0079EF41 /* Sparkle.framework */, 66973EB621797719001FEA1E /* ServiceManagement.framework */, 66A5CE4521706B5A009B08B2 /* Pods_V2rayU.framework */, 664B95DD217062A500DBC941 /* Alamofire */, @@ -595,9 +586,9 @@ 66107B8822DEDBE4002FFB60 /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( - 66107B8722DEDBE4002FFB60 /* zh-Hans */, 66107B8922DEE445002FFB60 /* en */, - 669A73AF233776B900807CF9 /* zh-HK */, + 66A358662C39517B00914A25 /* zh-HK */, + 66A358672C39517F00914A25 /* zh-Hans */, ); name = Localizable.strings; sourceTree = ""; @@ -614,8 +605,7 @@ isa = PBXVariantGroup; children = ( 66193A8823EE46BC00289B6A /* Base */, - 66193A9323EF1EF600289B6A /* zh-Hans */, - 66193A9523EF1EFA00289B6A /* zh-HK */, + 664BAC4F2C394AA000654FB7 /* zh-Hans */, ); name = PreferenceRouting.xib; sourceTree = ""; @@ -844,14 +834,15 @@ buildSettings = { ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4.0.0; + CURRENT_PROJECT_VERSION = 4.2.0; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = RJYEH6TCJD; ENABLE_ONLY_ACTIVE_RESOURCES = YES; INFOPLIST_FILE = V2rayU/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = V2rayU; @@ -860,7 +851,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - MARKETING_VERSION = 4.0.0; + MARKETING_VERSION = 4.2.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = net.yanue.V2rayU; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -878,14 +869,15 @@ buildSettings = { ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4.0.0; + CURRENT_PROJECT_VERSION = 4.2.0; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = RJYEH6TCJD; ENABLE_ONLY_ACTIVE_RESOURCES = YES; INFOPLIST_FILE = V2rayU/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = V2rayU; @@ -894,7 +886,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - MARKETING_VERSION = 4.0.0; + MARKETING_VERSION = 4.2.0; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = net.yanue.V2rayU; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -912,8 +904,9 @@ ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = RJYEH6TCJD; ENABLE_HARDENED_RUNTIME = YES; MACOSX_DEPLOYMENT_TARGET = 11.0; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -927,8 +920,9 @@ ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = RJYEH6TCJD; ENABLE_HARDENED_RUNTIME = YES; MACOSX_DEPLOYMENT_TARGET = 11.0; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/v2rayu/V2rayU/AppVersion.swift b/v2rayu/V2rayU/AppVersion.swift index ea0b929490..c4a040c67c 100644 --- a/v2rayu/V2rayU/AppVersion.swift +++ b/v2rayu/V2rayU/AppVersion.swift @@ -45,6 +45,16 @@ struct GithubAsset: Codable { } } +struct GithubError: Codable { + let message: String + let documentationUrl: String + + enum CodingKeys: String, CodingKey { + case message + case documentationUrl = "documentation_url" + } +} + let V2rayUpdater = AppCheckController() // AppCheckController - 检查新版本页面 @@ -169,22 +179,46 @@ class AppCheckController: NSWindowController { } } } catch { - print("Error decoding JSON: \(error)") - DispatchQueue.main.async { - // update progress text - self.bindData.progressText = "Check failed: \(error)" - var title = "Check failed!" - var toast = "\(error)" - if isMainland { - title = "检查失败" - toast = "\(error)"; + // 可能请求太频繁了 + do { + let decoder = JSONDecoder() + + // try decode data + let data: GithubError = try decoder.decode(GithubError.self, from: data) + DispatchQueue.main.async { + // update progress text + self.bindData.progressText = "Check failed: \(error)" + var title = "Check failed!" + if isMainland { + title = "检查失败" + } + var toast = "\(data.message)\n\(data.documentationUrl)"; + // open dialog + alertDialog(title: title, message: toast) + // sleep 2s + DispatchQueue.main.asyncAfter(deadline: .now() + 1) { + // close window + self.closeWindow() + } } - // open dialog - alertDialog(title: title, message: toast) - // sleep 2s - DispatchQueue.main.asyncAfter(deadline: .now() + 1) { - // close window - self.closeWindow() + } catch { + print("Error decoding JSON: \(error)") + DispatchQueue.main.async { + // update progress text + self.bindData.progressText = "Check failed: \(error)" + var title = "Check failed!" + var toast = "\(error)" + if isMainland { + title = "检查失败" + toast = "\(error)"; + } + // open dialog + alertDialog(title: title, message: toast) + // sleep 2s + DispatchQueue.main.asyncAfter(deadline: .now() + 1) { + // close window + self.closeWindow() + } } } } @@ -258,7 +292,7 @@ class AppVersionController: NSWindowController { let window = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 500, height: 300), styleMask: [.titled, .closable, .resizable], backing: .buffered, defer: false) - window.title = "Software Update" + window.title = "V2rayU Update" window.contentView = contentView super.init(window: window) @@ -272,19 +306,37 @@ class AppVersionController: NSWindowController { } func show(release: GithubRelease) { - bindData.title = "A new version of V2rayU is available!" - bindData.description = "V2rayU \(appVersion) is now available—you have \(release.tagName). Would you like to download it now?" - bindData.releaseNotes = release.name + "\n" + release.body - self.release = release - print("bindData.releaseNotes", bindData.releaseNotes) - // bring window to front - window?.orderFrontRegardless() - // center position - window?.center() - // make window key - window?.makeKeyAndOrderFront(nil) - // activate app - NSApp.activate(ignoringOtherApps: true) + DispatchQueue.main.async { + self.release = release + if isMainland { + self.bindData.title = "A new version of V2rayU is available!" + if release.prerelease{ + self.bindData.description = "V2rayU \(release.tagName) preview is now available, you have \(appVersion). Would you like to download it now?" + } else { + self.bindData.description = "V2rayU \(release.tagName) is now available, you have \(appVersion). Would you like to download it now?" + } + self.bindData.releaseNotes = release.name + "\n" + release.body + } else { + self.bindData.title = "V2rayU 有新版本上线了!" + if release.prerelease { + self.bindData.description = "V2rayU 已上线 \(release.tagName) 预览版,您有的版本 \(appVersion) —,需要立即下载吗?" + } else { + self.bindData.description = "V2rayU 已上线 \(release.tagName),您有的版本 \(appVersion) —,需要立即下载吗?" + } + self.bindData.releaseNotes = release.name + "\n" + release.body + self.bindData.releaseNodesTitle = "更新日志" + self.bindData.skipVersion = "跳过此版本" + self.bindData.installUpdate = "安装此版本" + } + // bring window to front + self.window?.orderFrontRegardless() + // center position + self.window?.center() + // make window key + self.window?.makeKeyAndOrderFront(nil) + // activate app + NSApp.activate(ignoringOtherApps: true) + } } required init?(coder: NSCoder) { @@ -309,10 +361,10 @@ class AppVersionController: NSWindowController { func skipAction() { print("Skip action") - // UserDefaults 记录是否跳过版本更新 - UserDefaults.standard.set(release.tagName, forKey: "skipAppVersion") - // 关闭窗口 DispatchQueue.main.async { + // UserDefaults 记录是否跳过版本更新 + UserDefaults.standard.set(self.release.tagName, forKey: "skipAppVersion") + // 关闭窗口 self.window?.close() } } @@ -320,8 +372,10 @@ class AppVersionController: NSWindowController { class BindData: ObservableObject { @Published var title = "A new version of V2rayU App is available!" @Published var description = "" - @Published var releaseNotes = """ - """ + @Published var releaseNotes = "" + @Published var releaseNodesTitle = "Release Notes:" + @Published var skipVersion = "Skip This Version!" + @Published var installUpdate = "Install Update!" } struct ContentView: View { @@ -347,7 +401,7 @@ class AppVersionController: NSWindowController { Text(bindData.description) .padding(.trailing, 20) - Text("Release Notes:") + Text(bindData.releaseNodesTitle) .font(.headline) .bold() .padding(.top, 20) @@ -364,22 +418,25 @@ class AppVersionController: NSWindowController { Spacer(minLength: 20) // 右边 margin 40 } + + HStack { + Button(bindData.skipVersion) { + skipAction() + } + + Spacer() + + Button(bindData.installUpdate) { + installAction() + } + .padding(.trailing, 20) + .keyboardShortcut(.defaultAction) + } + .padding(.top,20) + .padding(.bottom,20) } } - HStack { - Button("Skip This Version") { - skipAction() - } - - Spacer() - - Button("Install Update") { - installAction() - } - .keyboardShortcut(.defaultAction) - } - .padding(20) } .frame(width: 500, height: 300) } diff --git a/v2rayu/V2rayU/Base.lproj/PreferenceDns.xib b/v2rayu/V2rayU/Base.lproj/PreferenceDns.xib index 154c84255d..aeeb67d413 100755 --- a/v2rayu/V2rayU/Base.lproj/PreferenceDns.xib +++ b/v2rayu/V2rayU/Base.lproj/PreferenceDns.xib @@ -1,8 +1,8 @@ - + - + @@ -51,7 +51,7 @@ - + @@ -82,7 +82,7 @@ - + @@ -91,7 +91,7 @@ - + diff --git a/v2rayu/V2rayU/Info.plist b/v2rayu/V2rayU/Info.plist index 2fca0a39bb..ea56de5ddb 100644 --- a/v2rayu/V2rayU/Info.plist +++ b/v2rayu/V2rayU/Info.plist @@ -4,14 +4,14 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - AppIcon - CFBundleGetInfoString - CFBundleDisplayName + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleGetInfoString + + CFBundleIconFile + AppIcon CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion diff --git a/v2rayu/V2rayU/Ping.swift b/v2rayu/V2rayU/Ping.swift index 456f2ca663..d2b18d1625 100644 --- a/v2rayu/V2rayU/Ping.swift +++ b/v2rayu/V2rayU/Ping.swift @@ -6,8 +6,6 @@ // Copyright © 2019 yanue. All rights reserved. // -import SwiftyJSON - // ping and choose fastest v2ray var inPing = false var inPingCurrent = false diff --git a/v2rayu/V2rayU/Preference/PreferenceSubscription.swift b/v2rayu/V2rayU/Preference/PreferenceSubscription.swift index 214b8afdcd..86b0e42bbd 100644 --- a/v2rayu/V2rayU/Preference/PreferenceSubscription.swift +++ b/v2rayu/V2rayU/Preference/PreferenceSubscription.swift @@ -8,7 +8,6 @@ import Cocoa import Preferences -import SwiftyJSON final class PreferenceSubscribeViewController: NSViewController, PreferencePane, NSTabViewDelegate { let preferencePaneIdentifier = PreferencePane.Identifier.subscribeTab diff --git a/v2rayu/V2rayU/V2rayLaunch.swift b/v2rayu/V2rayU/V2rayLaunch.swift index ee7ff2f109..47ba283b73 100644 --- a/v2rayu/V2rayU/V2rayLaunch.swift +++ b/v2rayu/V2rayU/V2rayLaunch.swift @@ -9,7 +9,6 @@ import Cocoa import SystemConfiguration import Swifter -import Alamofire let LAUNCH_AGENT_NAME = "yanue.v2rayu.v2ray-core" let AppResourcesPath = Bundle.main.bundlePath + "/Contents/Resources" diff --git a/v2rayu/V2rayU/V2rayServer.swift b/v2rayu/V2rayU/V2rayServer.swift index b627da81c6..d714cfc21a 100644 --- a/v2rayu/V2rayU/V2rayServer.swift +++ b/v2rayu/V2rayU/V2rayServer.swift @@ -7,7 +7,6 @@ // import Cocoa -import SwiftyJSON // ----- v2ray server manager ----- class V2rayServer: NSObject { diff --git a/v2rayu/V2rayU/V2raySubscription.swift b/v2rayu/V2rayU/V2raySubscription.swift index e0d9add155..4052aca74c 100644 --- a/v2rayu/V2rayU/V2raySubscription.swift +++ b/v2rayu/V2rayU/V2raySubscription.swift @@ -7,7 +7,6 @@ // import Cocoa -import SwiftyJSON import Yams // ----- v2ray subscribe manager ----- diff --git a/v2rayu/V2rayU/en.lproj/Localizable.strings b/v2rayu/V2rayU/en.lproj/Localizable.strings index 7c264b2ac6..1da9de2959 100644 --- a/v2rayu/V2rayU/en.lproj/Localizable.strings +++ b/v2rayu/V2rayU/en.lproj/Localizable.strings @@ -5,4 +5,3 @@ Created by yanue on 2019/7/17. Copyright © 2019 yanue. All rights reserved. */ -// Localizable App Name是App在英语环境环境下显示的名称 diff --git a/v2rayu/V2rayU/zh-HK.lproj/Localizable.strings b/v2rayu/V2rayU/zh-HK.lproj/Localizable.strings index 7c264b2ac6..1da9de2959 100644 --- a/v2rayu/V2rayU/zh-HK.lproj/Localizable.strings +++ b/v2rayu/V2rayU/zh-HK.lproj/Localizable.strings @@ -5,4 +5,3 @@ Created by yanue on 2019/7/17. Copyright © 2019 yanue. All rights reserved. */ -// Localizable App Name是App在英语环境环境下显示的名称 diff --git a/v2rayu/V2rayU/zh-HK.lproj/PreferenceRouting.strings b/v2rayu/V2rayU/zh-HK.lproj/PreferenceRouting.strings index 40cc57ce04..aea250a4b8 100644 --- a/v2rayu/V2rayU/zh-HK.lproj/PreferenceRouting.strings +++ b/v2rayu/V2rayU/zh-HK.lproj/PreferenceRouting.strings @@ -1,45 +1,45 @@ -/* Class = "NSTextFieldCell"; title = "Domain Strategy:"; ObjectID = "22k-l7-G7a"; */ -"22k-l7-G7a.title" = "域名策略:"; +/* Class = "NSTextFieldCell"; title = "Block:"; ObjectID = "0Cd-bg-07K"; */ +"0Cd-bg-07K.title" = "Block:"; -/* Class = "NSMenuItem"; title = "Bypassing LAN and mainland address"; ObjectID = "3qq-dt-TS9"; */ -"3qq-dt-TS9.title" = "绕过局域网和大陆地址"; +/* Class = "NSMenuItem"; title = "IPOnDemand"; ObjectID = "2ST-s0-RrI"; */ +"2ST-s0-RrI.title" = "IPOnDemand"; -/* Class = "NSTextFieldCell"; title = "Routing Rule:"; ObjectID = "4rB-9k-291"; */ -"4rB-9k-291.title" = "路由模式:"; +/* Class = "NSTextFieldCell"; title = "Direct:"; ObjectID = "3hZ-qS-PUG"; */ +"3hZ-qS-PUG.title" = "Direct:"; /* Class = "NSButtonCell"; title = "save"; ObjectID = "8g2-Nj-m07"; */ -"8g2-Nj-m07.title" = "保存"; +"8g2-Nj-m07.title" = "save"; -/* Class = "NSMenuItem"; title = "IPIfNonMatch"; ObjectID = "92h-JU-wqn"; */ -"92h-JU-wqn.title" = "IPIfNonMatch"; +/* Class = "NSTextFieldCell"; title = "Rouing Rules"; ObjectID = "E4W-rN-0eq"; */ +"E4W-rN-0eq.title" = "Rouing Rules"; -/* Class = "NSMenuItem"; title = "Bypassing the LAN Address"; ObjectID = "CoE-cp-7fn"; */ -"CoE-cp-7fn.title" = "绕过局域网地址"; +/* Class = "NSTextFieldCell"; title = "Custom Rule Name"; ObjectID = "Ecy-wl-v5i"; */ +"Ecy-wl-v5i.title" = "Custom Rule Name"; -/* Class = "NSMenuItem"; title = "Bypassing mainland address"; ObjectID = "EaD-tR-ldB"; */ -"EaD-tR-ldB.title" = "绕过大陆地址"; +/* Class = "NSTextFieldCell"; title = "Routing Rule:"; ObjectID = "J2T-Pf-s5D"; */ +"J2T-Pf-s5D.title" = "Routing Rule:"; -/* Class = "NSMenuItem"; title = "IPOnDemand"; ObjectID = "Js7-cb-bWa"; */ -"Js7-cb-bWa.title" = "IPOnDemand"; +/* Class = "NSMenuItem"; title = "AsIs"; ObjectID = "Kl2-gr-bsh"; */ +"Kl2-gr-bsh.title" = "AsIs"; -/* Class = "NSMenuItem"; title = "AsIs"; ObjectID = "LX1-ye-51i"; */ -"LX1-ye-51i.title" = "AsIs"; +/* Class = "NSTextFieldCell"; title = "Custom Rule JSON Text"; ObjectID = "Q0v-Ic-TRt"; */ +"Q0v-Ic-TRt.title" = "Custom Rule JSON Text"; -/* Class = "NSButtonCell"; title = "load default"; ObjectID = "RSN-g5-vmP"; */ -"RSN-g5-vmP.title" = "load default"; +/* Class = "NSTextFieldCell"; title = "Domain Strategy:"; ObjectID = "Qp3-K0-xA9"; */ +"Qp3-K0-xA9.title" = "Domain Strategy:"; -/* Class = "NSTextFieldCell"; title = "* Set the rules line by line: domain or ip"; ObjectID = "ccq-gn-C6Z"; */ -"ccq-gn-C6Z.title" = "*按行设置域名或ip"; +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "YQ1-7i-YOl"; */ +"YQ1-7i-YOl.title" = "Text Cell"; -/* Class = "NSTabViewItem"; label = "Block"; ObjectID = "nsT-BW-R2Z"; */ -"nsT-BW-R2Z.label" = "阻止ip或域名"; +/* Class = "NSTextFieldCell"; title = "Proxy:"; ObjectID = "cfS-8I-8Au"; */ +"cfS-8I-8Au.title" = "Proxy:"; -/* Class = "NSTabViewItem"; label = "Proxy"; ObjectID = "pnL-Z8-fIK"; */ -"pnL-Z8-fIK.label" = "代理ip或域名"; +/* Class = "NSMenuItem"; title = "IPIfNonMatch"; ObjectID = "dSb-GT-n2n"; */ +"dSb-GT-n2n.title" = "IPIfNonMatch"; -/* Class = "NSTabViewItem"; label = "Direct"; ObjectID = "yc0-Po-cG1"; */ -"yc0-Po-cG1.label" = "直连ip或域名"; +/* Class = "NSTextFieldCell"; title = "like: { \"domainStrategy\": \"IPOnDemand\", \"rules\": []}"; ObjectID = "ejH-X7-8Fb"; */ +"ejH-X7-8Fb.title" = "like: { \"domainStrategy\": \"IPOnDemand\", \"rules\": []}"; -/* Class = "NSMenuItem"; title = "Global"; ObjectID = "zLf-pT-xlm"; */ -"zLf-pT-xlm.title" = "全局"; +/* Class = "NSTextFieldCell"; title = "* Set the rules line by line: domain or ip"; ObjectID = "ymo-ds-No9"; */ +"ymo-ds-No9.title" = "* Set the rules line by line: domain or ip"; diff --git a/v2rayu/V2rayU/zh-Hans.lproj/PreferenceRouting.strings b/v2rayu/V2rayU/zh-Hans.lproj/PreferenceRouting.strings index 40cc57ce04..cbbf840748 100644 --- a/v2rayu/V2rayU/zh-Hans.lproj/PreferenceRouting.strings +++ b/v2rayu/V2rayU/zh-Hans.lproj/PreferenceRouting.strings @@ -1,45 +1,45 @@ -/* Class = "NSTextFieldCell"; title = "Domain Strategy:"; ObjectID = "22k-l7-G7a"; */ -"22k-l7-G7a.title" = "域名策略:"; +/* Class = "NSTextFieldCell"; title = "Block:"; ObjectID = "0Cd-bg-07K"; */ +"0Cd-bg-07K.title" = "阻止ip或域名:"; -/* Class = "NSMenuItem"; title = "Bypassing LAN and mainland address"; ObjectID = "3qq-dt-TS9"; */ -"3qq-dt-TS9.title" = "绕过局域网和大陆地址"; +/* Class = "NSMenuItem"; title = "IPOnDemand"; ObjectID = "2ST-s0-RrI"; */ +"2ST-s0-RrI.title" = "IPOnDemand"; -/* Class = "NSTextFieldCell"; title = "Routing Rule:"; ObjectID = "4rB-9k-291"; */ -"4rB-9k-291.title" = "路由模式:"; +/* Class = "NSTextFieldCell"; title = "Direct:"; ObjectID = "3hZ-qS-PUG"; */ +"3hZ-qS-PUG.title" = "直连ip或域名:"; /* Class = "NSButtonCell"; title = "save"; ObjectID = "8g2-Nj-m07"; */ "8g2-Nj-m07.title" = "保存"; -/* Class = "NSMenuItem"; title = "IPIfNonMatch"; ObjectID = "92h-JU-wqn"; */ -"92h-JU-wqn.title" = "IPIfNonMatch"; +/* Class = "NSTextFieldCell"; title = "Rouing Rules"; ObjectID = "E4W-rN-0eq"; */ +"E4W-rN-0eq.title" = "路由规则列表"; -/* Class = "NSMenuItem"; title = "Bypassing the LAN Address"; ObjectID = "CoE-cp-7fn"; */ -"CoE-cp-7fn.title" = "绕过局域网地址"; +/* Class = "NSTextFieldCell"; title = "Custom Rule Name"; ObjectID = "Ecy-wl-v5i"; */ +"Ecy-wl-v5i.title" = "自定义路由名称"; -/* Class = "NSMenuItem"; title = "Bypassing mainland address"; ObjectID = "EaD-tR-ldB"; */ -"EaD-tR-ldB.title" = "绕过大陆地址"; +/* Class = "NSTextFieldCell"; title = "Routing Rule:"; ObjectID = "J2T-Pf-s5D"; */ +"J2T-Pf-s5D.title" = "路由规则:"; -/* Class = "NSMenuItem"; title = "IPOnDemand"; ObjectID = "Js7-cb-bWa"; */ -"Js7-cb-bWa.title" = "IPOnDemand"; +/* Class = "NSMenuItem"; title = "AsIs"; ObjectID = "Kl2-gr-bsh"; */ +"Kl2-gr-bsh.title" = "AsIs"; -/* Class = "NSMenuItem"; title = "AsIs"; ObjectID = "LX1-ye-51i"; */ -"LX1-ye-51i.title" = "AsIs"; +/* Class = "NSTextFieldCell"; title = "Custom Rule JSON Text"; ObjectID = "Q0v-Ic-TRt"; */ +"Q0v-Ic-TRt.title" = "自定义路由 json 内容"; -/* Class = "NSButtonCell"; title = "load default"; ObjectID = "RSN-g5-vmP"; */ -"RSN-g5-vmP.title" = "load default"; +/* Class = "NSTextFieldCell"; title = "Domain Strategy:"; ObjectID = "Qp3-K0-xA9"; */ +"Qp3-K0-xA9.title" = "域名策略:"; -/* Class = "NSTextFieldCell"; title = "* Set the rules line by line: domain or ip"; ObjectID = "ccq-gn-C6Z"; */ -"ccq-gn-C6Z.title" = "*按行设置域名或ip"; +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "YQ1-7i-YOl"; */ +"YQ1-7i-YOl.title" = ""; -/* Class = "NSTabViewItem"; label = "Block"; ObjectID = "nsT-BW-R2Z"; */ -"nsT-BW-R2Z.label" = "阻止ip或域名"; +/* Class = "NSTextFieldCell"; title = "Proxy:"; ObjectID = "cfS-8I-8Au"; */ +"cfS-8I-8Au.title" = "代理ip或域名:"; -/* Class = "NSTabViewItem"; label = "Proxy"; ObjectID = "pnL-Z8-fIK"; */ -"pnL-Z8-fIK.label" = "代理ip或域名"; +/* Class = "NSMenuItem"; title = "IPIfNonMatch"; ObjectID = "dSb-GT-n2n"; */ +"dSb-GT-n2n.title" = "IPIfNonMatch"; -/* Class = "NSTabViewItem"; label = "Direct"; ObjectID = "yc0-Po-cG1"; */ -"yc0-Po-cG1.label" = "直连ip或域名"; +/* Class = "NSTextFieldCell"; title = "like: { \"domainStrategy\": \"IPOnDemand\", \"rules\": []}"; ObjectID = "ejH-X7-8Fb"; */ +"ejH-X7-8Fb.title" = "例如: { \"domainStrategy\": \"IPOnDemand\", \"rules\": []}"; -/* Class = "NSMenuItem"; title = "Global"; ObjectID = "zLf-pT-xlm"; */ -"zLf-pT-xlm.title" = "全局"; +/* Class = "NSTextFieldCell"; title = "* Set the rules line by line: domain or ip"; ObjectID = "ymo-ds-No9"; */ +"ymo-ds-No9.title" = "* 按行设置域名或ip"; diff --git a/xray-core/go.mod b/xray-core/go.mod index 31b32a8d4e..4de34e82e0 100644 --- a/xray-core/go.mod +++ b/xray-core/go.mod @@ -25,7 +25,7 @@ require ( golang.org/x/crypto v0.24.0 golang.org/x/net v0.26.0 golang.org/x/sync v0.7.0 - golang.org/x/sys v0.21.0 + golang.org/x/sys v0.22.0 golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 google.golang.org/grpc v1.65.0 google.golang.org/protobuf v1.34.2 diff --git a/xray-core/go.sum b/xray-core/go.sum index 60e11526c4..ab32e8d78e 100644 --- a/xray-core/go.sum +++ b/xray-core/go.sum @@ -226,8 +226,8 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220804214406-8e32c043e418/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/youtube-dl/youtube_dl/extractor/yandexmusic.py b/youtube-dl/youtube_dl/extractor/yandexmusic.py index 84969f8e11..55d4fb5a01 100644 --- a/youtube-dl/youtube_dl/extractor/yandexmusic.py +++ b/youtube-dl/youtube_dl/extractor/yandexmusic.py @@ -120,6 +120,7 @@ class YandexMusicTrackIE(YandexMusicBaseIE): download_data = self._download_json( 'https://music.yandex.ru/api/v2.1/handlers/track/%s:%s/web-album_track-track-track-main/download/m' % (track_id, album_id), track_id, 'Downloading track location url JSON', + query={'hq': 1}, headers={'X-Retpath-Y': url}) fd_data = self._download_json( diff --git a/yt-dlp/yt_dlp/extractor/_extractors.py b/yt-dlp/yt_dlp/extractor/_extractors.py index 7f6507defd..34dea79ef9 100644 --- a/yt-dlp/yt_dlp/extractor/_extractors.py +++ b/yt-dlp/yt_dlp/extractor/_extractors.py @@ -2324,6 +2324,7 @@ from .vidio import ( ) from .vidlii import VidLiiIE from .vidly import VidlyIE +from .vidyard import VidyardIE from .viewlift import ( ViewLiftEmbedIE, ViewLiftIE, diff --git a/yt-dlp/yt_dlp/extractor/abematv.py b/yt-dlp/yt_dlp/extractor/abematv.py index 293a6c40e0..9471df1da9 100644 --- a/yt-dlp/yt_dlp/extractor/abematv.py +++ b/yt-dlp/yt_dlp/extractor/abematv.py @@ -368,6 +368,7 @@ class AbemaTVIE(AbemaTVBaseIE): info['episode_number'] = epis if epis < 2000 else None is_live, m3u8_url = False, None + availability = 'public' if video_type == 'now-on-air': is_live = True channel_url = 'https://api.abema.io/v1/channels' @@ -389,6 +390,7 @@ class AbemaTVIE(AbemaTVBaseIE): if 3 not in ondemand_types: # cannot acquire decryption key for these streams self.report_warning('This is a premium-only stream') + availability = 'premium_only' info.update(traverse_obj(api_response, { 'series': ('series', 'title'), 'season': ('season', 'name'), @@ -408,6 +410,7 @@ class AbemaTVIE(AbemaTVBaseIE): headers=headers) if not traverse_obj(api_response, ('slot', 'flags', 'timeshiftFree'), default=False): self.report_warning('This is a premium-only stream') + availability = 'premium_only' m3u8_url = f'https://vod-abematv.akamaized.net/slot/{video_id}/playlist.m3u8' else: @@ -425,6 +428,7 @@ class AbemaTVIE(AbemaTVBaseIE): 'description': description, 'formats': formats, 'is_live': is_live, + 'availability': availability, }) return info diff --git a/yt-dlp/yt_dlp/extractor/cellebrite.py b/yt-dlp/yt_dlp/extractor/cellebrite.py index e90365a8be..54367c4d52 100644 --- a/yt-dlp/yt_dlp/extractor/cellebrite.py +++ b/yt-dlp/yt_dlp/extractor/cellebrite.py @@ -1,63 +1,50 @@ -from .common import InfoExtractor -from ..utils import traverse_obj +from .vidyard import VidyardBaseIE, VidyardIE +from ..utils import ExtractorError, make_archive_id, url_basename -class CellebriteIE(InfoExtractor): +class CellebriteIE(VidyardBaseIE): _VALID_URL = r'https?://cellebrite\.com/(?:\w+)?/(?P[\w-]+)' _TESTS = [{ 'url': 'https://cellebrite.com/en/collect-data-from-android-devices-with-cellebrite-ufed/', 'info_dict': { - 'id': '16025876', + 'id': 'ZqmUss3dQfEMGpauambPuH', + 'display_id': '16025876', 'ext': 'mp4', - 'description': 'md5:174571cb97083fd1d457d75c684f4e2b', - 'thumbnail': 'https://cellebrite.com/wp-content/uploads/2021/05/Chat-Capture-1024x559.png', 'title': 'Ask the Expert: Chat Capture - Collect Data from Android Devices in Cellebrite UFED', - 'duration': 455, - 'tags': [], + 'description': 'md5:dee48fe12bbae5c01fe6a053f7676da4', + 'thumbnail': 'https://cellebrite.com/wp-content/uploads/2021/05/Chat-Capture-1024x559.png', + 'duration': 455.979, + '_old_archive_ids': ['cellebrite 16025876'], }, }, { 'url': 'https://cellebrite.com/en/how-to-lawfully-collect-the-maximum-amount-of-data-from-android-devices/', 'info_dict': { - 'id': '29018255', + 'id': 'QV1U8a2yzcxigw7VFnqKyg', + 'display_id': '29018255', 'ext': 'mp4', - 'duration': 134, - 'tags': [], - 'description': 'md5:e9a3d124c7287b0b07bad2547061cacf', + 'title': 'How to Lawfully Collect the Maximum Amount of Data From Android Devices', + 'description': 'md5:0e943a9ac14c374d5d74faed634d773c', 'thumbnail': 'https://cellebrite.com/wp-content/uploads/2022/07/How-to-Lawfully-Collect-the-Maximum-Amount-of-Data-From-Android-Devices.png', - 'title': 'Android Extractions Explained', + 'duration': 134.315, + '_old_archive_ids': ['cellebrite 29018255'], }, }] - def _get_formats_and_subtitles(self, json_data, display_id): - formats = [{'url': url} for url in traverse_obj(json_data, ('mp4', ..., 'url')) or []] - subtitles = {} - - for url in traverse_obj(json_data, ('hls', ..., 'url')) or []: - fmt, sub = self._extract_m3u8_formats_and_subtitles( - url, display_id, ext='mp4', headers={'Referer': 'https://play.vidyard.com/'}) - formats.extend(fmt) - self._merge_subtitles(sub, target=subtitles) - - return formats, subtitles - def _real_extract(self, url): - display_id = self._match_id(url) - webpage = self._download_webpage(url, display_id) + slug = self._match_id(url) + webpage = self._download_webpage(url, slug) + vidyard_url = next(VidyardIE._extract_embed_urls(url, webpage), None) + if not vidyard_url: + raise ExtractorError('No Vidyard video embeds found on page') - player_uuid = self._search_regex( - r']*\bdata-uuid\s*=\s*"([^"\?]+)', webpage, 'player UUID') - json_data = self._download_json( - f'https://play.vidyard.com/player/{player_uuid}.json', display_id)['payload']['chapters'][0] + video_id = url_basename(vidyard_url) + info = self._process_video_json(self._fetch_video_json(video_id)['chapters'][0], video_id) + if info.get('display_id'): + info['_old_archive_ids'] = [make_archive_id(self, info['display_id'])] + if thumbnail := self._og_search_thumbnail(webpage, default=None): + info.setdefault('thumbnails', []).append({'url': thumbnail}) - formats, subtitles = self._get_formats_and_subtitles(json_data['sources'], display_id) return { - 'id': str(json_data['videoId']), - 'title': json_data.get('name') or self._og_search_title(webpage), - 'formats': formats, - 'subtitles': subtitles, - 'description': json_data.get('description') or self._og_search_description(webpage), - 'duration': json_data.get('seconds'), - 'tags': json_data.get('tags'), - 'thumbnail': self._og_search_thumbnail(webpage), - 'http_headers': {'Referer': 'https://play.vidyard.com/'}, + 'description': self._og_search_description(webpage, default=None), + **info, } diff --git a/yt-dlp/yt_dlp/extractor/chzzk.py b/yt-dlp/yt_dlp/extractor/chzzk.py index 420fe0514b..e0b9980afd 100644 --- a/yt-dlp/yt_dlp/extractor/chzzk.py +++ b/yt-dlp/yt_dlp/extractor/chzzk.py @@ -36,7 +36,7 @@ class CHZZKLiveIE(InfoExtractor): def _real_extract(self, url): channel_id = self._match_id(url) live_detail = self._download_json( - f'https://api.chzzk.naver.com/service/v2/channels/{channel_id}/live-detail', channel_id, + f'https://api.chzzk.naver.com/service/v3/channels/{channel_id}/live-detail', channel_id, note='Downloading channel info', errnote='Unable to download channel info')['content'] if live_detail.get('status') == 'CLOSE': @@ -106,12 +106,45 @@ class CHZZKVideoIE(InfoExtractor): 'upload_date': '20231219', 'view_count': int, }, + 'skip': 'Replay video is expired', + }, { + # Manually uploaded video + 'url': 'https://chzzk.naver.com/video/1980', + 'info_dict': { + 'id': '1980', + 'ext': 'mp4', + 'title': '※시청주의※한번보면 잊기 힘든 영상', + 'channel': '라디유radiyu', + 'channel_id': '68f895c59a1043bc5019b5e08c83a5c5', + 'channel_is_verified': False, + 'thumbnail': r're:^https?://.*\.jpg$', + 'duration': 95, + 'timestamp': 1703102631.722, + 'upload_date': '20231220', + 'view_count': int, + }, + }, { + # Partner channel replay video + 'url': 'https://chzzk.naver.com/video/2458', + 'info_dict': { + 'id': '2458', + 'ext': 'mp4', + 'title': '첫 방송', + 'channel': '강지', + 'channel_id': 'b5ed5db484d04faf4d150aedd362f34b', + 'channel_is_verified': True, + 'thumbnail': r're:^https?://.*\.jpg$', + 'duration': 4433, + 'timestamp': 1703307460.214, + 'upload_date': '20231223', + 'view_count': int, + }, }] def _real_extract(self, url): video_id = self._match_id(url) video_meta = self._download_json( - f'https://api.chzzk.naver.com/service/v2/videos/{video_id}', video_id, + f'https://api.chzzk.naver.com/service/v3/videos/{video_id}', video_id, note='Downloading video info', errnote='Unable to download video info')['content'] formats, subtitles = self._extract_mpd_formats_and_subtitles( f'https://apis.naver.com/neonplayer/vodplay/v1/playback/{video_meta["videoId"]}', video_id, diff --git a/yt-dlp/yt_dlp/extractor/swearnet.py b/yt-dlp/yt_dlp/extractor/swearnet.py index b4835c5adc..2d6fb3eb47 100644 --- a/yt-dlp/yt_dlp/extractor/swearnet.py +++ b/yt-dlp/yt_dlp/extractor/swearnet.py @@ -1,55 +1,31 @@ -from .common import InfoExtractor -from ..utils import ExtractorError, int_or_none, traverse_obj +from .vidyard import VidyardBaseIE +from ..utils import ExtractorError, int_or_none, make_archive_id -class SwearnetEpisodeIE(InfoExtractor): +class SwearnetEpisodeIE(VidyardBaseIE): _VALID_URL = r'https?://www\.swearnet\.com/shows/(?P[\w-]+)/seasons/(?P\d+)/episodes/(?P\d+)' _TESTS = [{ 'url': 'https://www.swearnet.com/shows/gettin-learnt-with-ricky/seasons/1/episodes/1', 'info_dict': { - 'id': '232819', + 'id': 'wicK2EOzjOdxkUXGDIgcPw', + 'display_id': '232819', 'ext': 'mp4', 'episode_number': 1, 'episode': 'Episode 1', 'duration': 719, - 'description': 'md5:c48ef71440ce466284c07085cd7bd761', + 'description': r're:Are you drunk and high and craving a grilled cheese sandwich.+', 'season': 'Season 1', 'title': 'Episode 1 - Grilled Cheese Sammich', 'season_number': 1, - 'thumbnail': 'https://cdn.vidyard.com/thumbnails/232819/_RX04IKIq60a2V6rIRqq_Q_small.jpg', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/custom/0dd74f9b-388a-452e-b570-b407fb64435b_small.jpg', + 'tags': ['Getting Learnt with Ricky', 'drunk', 'grilled cheese', 'high'], + '_old_archive_ids': ['swearnetepisode 232819'], }, }] - def _get_formats_and_subtitle(self, video_source, video_id): - video_source = video_source or {} - formats, subtitles = [], {} - for key, value in video_source.items(): - if key == 'hls': - for video_hls in value: - fmts, subs = self._extract_m3u8_formats_and_subtitles(video_hls.get('url'), video_id) - formats.extend(fmts) - self._merge_subtitles(subs, target=subtitles) - else: - formats.extend({ - 'url': video_mp4.get('url'), - 'ext': 'mp4', - } for video_mp4 in value) - - return formats, subtitles - - def _get_direct_subtitle(self, caption_json): - subs = {} - for caption in caption_json: - subs.setdefault(caption.get('language') or 'und', []).append({ - 'url': caption.get('vttUrl'), - 'name': caption.get('name'), - }) - - return subs - def _real_extract(self, url): - display_id, season_number, episode_number = self._match_valid_url(url).group('id', 'season_num', 'episode_num') - webpage = self._download_webpage(url, display_id) + slug, season_number, episode_number = self._match_valid_url(url).group('id', 'season_num', 'episode_num') + webpage = self._download_webpage(url, slug) try: external_id = self._search_regex(r'externalid\s*=\s*"([^"]+)', webpage, 'externalid') @@ -58,22 +34,12 @@ class SwearnetEpisodeIE(InfoExtractor): self.raise_login_required() raise - json_data = self._download_json( - f'https://play.vidyard.com/player/{external_id}.json', display_id)['payload']['chapters'][0] - - formats, subtitles = self._get_formats_and_subtitle(json_data['sources'], display_id) - self._merge_subtitles(self._get_direct_subtitle(json_data.get('captions')), target=subtitles) + info = self._process_video_json(self._fetch_video_json(external_id)['chapters'][0], external_id) + if info.get('display_id'): + info['_old_archive_ids'] = [make_archive_id(self, info['display_id'])] return { - 'id': str(json_data['videoId']), - 'title': json_data.get('name') or self._html_search_meta(['og:title', 'twitter:title'], webpage), - 'description': (json_data.get('description') - or self._html_search_meta(['og:description', 'twitter:description'], webpage)), - 'duration': int_or_none(json_data.get('seconds')), - 'formats': formats, - 'subtitles': subtitles, + **info, 'season_number': int_or_none(season_number), 'episode_number': int_or_none(episode_number), - 'thumbnails': [{'url': thumbnail_url} - for thumbnail_url in traverse_obj(json_data, ('thumbnailUrls', ...))], } diff --git a/yt-dlp/yt_dlp/extractor/vidyard.py b/yt-dlp/yt_dlp/extractor/vidyard.py new file mode 100644 index 0000000000..20a54b1618 --- /dev/null +++ b/yt-dlp/yt_dlp/extractor/vidyard.py @@ -0,0 +1,426 @@ +import functools +import re + +from .common import InfoExtractor +from ..utils import ( + extract_attributes, + float_or_none, + int_or_none, + join_nonempty, + mimetype2ext, + parse_resolution, + str_or_none, + unescapeHTML, + url_or_none, +) +from ..utils.traversal import traverse_obj + + +class VidyardBaseIE(InfoExtractor): + _HEADERS = {'Referer': 'https://play.vidyard.com/'} + + def _get_formats_and_subtitles(self, sources, video_id): + formats, subtitles = [], {} + + def add_hls_fmts_and_subs(m3u8_url): + fmts, subs = self._extract_m3u8_formats_and_subtitles( + m3u8_url, video_id, 'mp4', m3u8_id='hls', headers=self._HEADERS, fatal=False) + formats.extend(fmts) + self._merge_subtitles(subs, target=subtitles) + + hls_list = isinstance(sources, dict) and sources.pop('hls', None) + if master_m3u8_url := traverse_obj( + hls_list, (lambda _, v: v['profile'] == 'auto', 'url', {url_or_none}, any)): + add_hls_fmts_and_subs(master_m3u8_url) + if not formats: # These are duplicate and unnecesary requests if we got 'auto' hls fmts + for variant_m3u8_url in traverse_obj(hls_list, (..., 'url', {url_or_none})): + add_hls_fmts_and_subs(variant_m3u8_url) + + for source_type, source_list in traverse_obj(sources, ({dict.items}, ...)): + for source in traverse_obj(source_list, lambda _, v: url_or_none(v['url'])): + profile = source.get('profile') + formats.append({ + 'url': source['url'], + 'ext': mimetype2ext(source.get('mimeType'), default=None), + 'format_id': join_nonempty('http', source_type, profile), + **parse_resolution(profile), + }) + + self._remove_duplicate_formats(formats) + return formats, subtitles + + def _get_direct_subtitles(self, caption_json): + subs = {} + for caption in traverse_obj(caption_json, lambda _, v: url_or_none(v['vttUrl'])): + subs.setdefault(caption.get('language') or 'und', []).append({ + 'url': caption['vttUrl'], + 'name': caption.get('name'), + }) + + return subs + + def _fetch_video_json(self, video_id): + return self._download_json( + f'https://play.vidyard.com/player/{video_id}.json', video_id)['payload'] + + def _process_video_json(self, json_data, video_id): + formats, subtitles = self._get_formats_and_subtitles(json_data['sources'], video_id) + self._merge_subtitles(self._get_direct_subtitles(json_data.get('captions')), target=subtitles) + + return { + **traverse_obj(json_data, { + 'id': ('facadeUuid', {str}), + 'display_id': ('videoId', {int}, {str_or_none}), + 'title': ('name', {str}), + 'description': ('description', {str}, {unescapeHTML}, {lambda x: x or None}), + 'duration': (( + ('milliseconds', {functools.partial(float_or_none, scale=1000)}), + ('seconds', {int_or_none})), any), + 'thumbnails': ('thumbnailUrls', ('small', 'normal'), {'url': {url_or_none}}), + 'tags': ('tags', ..., 'name', {str}), + }), + 'formats': formats, + 'subtitles': subtitles, + 'http_headers': self._HEADERS, + } + + +class VidyardIE(VidyardBaseIE): + _VALID_URL = [ + r'https?://[\w-]+(?:\.hubs)?\.vidyard\.com/watch/(?P[\w-]+)', + r'https?://(?:embed|share)\.vidyard\.com/share/(?P[\w-]+)', + r'https?://play\.vidyard\.com/(?:player/)?(?P[\w-]+)', + ] + _EMBED_REGEX = [r']* src=["\'](?P(?:https?:)?//play\.vidyard\.com/[\w-]+)'] + _TESTS = [{ + 'url': 'https://vyexample03.hubs.vidyard.com/watch/oTDMPlUv--51Th455G5u7Q', + 'info_dict': { + 'id': 'oTDMPlUv--51Th455G5u7Q', + 'display_id': '50347', + 'ext': 'mp4', + 'title': 'Homepage Video', + 'description': 'Look I changed the description.', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/50347/OUPa5LTKV46849sLYngMqQ_small.jpg', + 'duration': 99, + 'tags': ['these', 'are', 'all', 'tags'], + }, + }, { + 'url': 'https://share.vidyard.com/watch/PaQzDAT1h8JqB8ivEu2j6Y?', + 'info_dict': { + 'id': 'PaQzDAT1h8JqB8ivEu2j6Y', + 'display_id': '9281024', + 'ext': 'mp4', + 'title': 'Inline Embed', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/spacer.gif', + 'duration': 41.186, + }, + }, { + 'url': 'https://embed.vidyard.com/share/oTDMPlUv--51Th455G5u7Q', + 'info_dict': { + 'id': 'oTDMPlUv--51Th455G5u7Q', + 'display_id': '50347', + 'ext': 'mp4', + 'title': 'Homepage Video', + 'description': 'Look I changed the description.', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/50347/OUPa5LTKV46849sLYngMqQ_small.jpg', + 'duration': 99, + 'tags': ['these', 'are', 'all', 'tags'], + }, + }, { + # First video from playlist below + 'url': 'https://embed.vidyard.com/share/SyStyHtYujcBHe5PkZc5DL', + 'info_dict': { + 'id': 'SyStyHtYujcBHe5PkZc5DL', + 'display_id': '41974005', + 'ext': 'mp4', + 'title': 'Prepare the Frame and Track for Palm Beach Polysatin Shutters With BiFold Track', + 'description': r're:In this video, you will learn how to prepare the frame.+', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/41974005/IJw7oCaJcF1h7WWu3OVZ8A_small.png', + 'duration': 258.666, + }, + }, { + # Playlist + 'url': 'https://thelink.hubs.vidyard.com/watch/pwu7pCYWSwAnPxs8nDoFrE', + 'info_dict': { + 'id': 'pwu7pCYWSwAnPxs8nDoFrE', + 'title': 'PLAYLIST - Palm Beach Shutters- Bi-Fold Track System Installation', + 'entries': [{ + 'id': 'SyStyHtYujcBHe5PkZc5DL', + 'display_id': '41974005', + 'ext': 'mp4', + 'title': 'Prepare the Frame and Track for Palm Beach Polysatin Shutters With BiFold Track', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/41974005/IJw7oCaJcF1h7WWu3OVZ8A_small.png', + 'duration': 258.666, + }, { + 'id': '1Fw4B84jZTXLXWqkE71RiM', + 'display_id': '5861113', + 'ext': 'mp4', + 'title': 'Palm Beach - Bi-Fold Track System "Frame Installation"', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/5861113/29CJ54s5g1_aP38zkKLHew_small.jpg', + 'duration': 167.858, + }, { + 'id': 'DqP3wBvLXSpxrcqpT5kEeo', + 'display_id': '41976334', + 'ext': 'mp4', + 'title': 'Install the Track for Palm Beach Polysatin Shutters With BiFold Track', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/5861090/RwG2VaTylUa6KhSTED1r1Q_small.png', + 'duration': 94.229, + }, { + 'id': 'opfybfxpzQArxqtQYB6oBU', + 'display_id': '41976364', + 'ext': 'mp4', + 'title': 'Install the Panel for Palm Beach Polysatin Shutters With BiFold Track', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/5860926/JIOaJR08dM4QgXi_iQ2zGA_small.png', + 'duration': 191.467, + }, { + 'id': 'rWrXvkbTNNaNqD6189HJya', + 'display_id': '41976382', + 'ext': 'mp4', + 'title': 'Adjust the Panels for Palm Beach Polysatin Shutters With BiFold Track', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/5860687/CwHxBv4UudAhOh43FVB4tw_small.png', + 'duration': 138.155, + }, { + 'id': 'eYPTB521MZ9TPEArSethQ5', + 'display_id': '41976409', + 'ext': 'mp4', + 'title': 'Assemble and Install the Valance for Palm Beach Polysatin Shutters With BiFold Track', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/5861425/0y68qlMU4O5VKU7bJ8i_AA_small.png', + 'duration': 148.224, + }], + }, + 'playlist_count': 6, + }, { + # Non hubs.vidyard.com playlist + 'url': 'https://salesforce.vidyard.com/watch/d4vqPjs7Q5EzVEis5QT3jd', + 'info_dict': { + 'id': 'd4vqPjs7Q5EzVEis5QT3jd', + 'title': 'How To: Service Cloud: Import External Content in Lightning Knowledge', + 'entries': [{ + 'id': 'mcjDpSZir2iSttbvFkx6Rv', + 'display_id': '29479036', + 'ext': 'mp4', + 'title': 'Welcome to this Expert Coaching Series', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/ouyQi9WuwyiOupChUWNmjQ/7170d3485ba602e012df05_small.jpg', + 'duration': 38.205, + }, { + 'id': '84bPYwpg243G6xYEfJdYw9', + 'display_id': '21820704', + 'ext': 'mp4', + 'title': 'Chapter 1 - Title + Agenda', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/HFPN0ZgQq4Ow8BghGcQSow/bfaa30123c8f6601e7d7f2_small.jpg', + 'duration': 98.016, + }, { + 'id': 'nP17fMuvA66buVHUrzqjTi', + 'display_id': '21820707', + 'ext': 'mp4', + 'title': 'Chapter 2 - Import Options', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/rGRIF5nFjPI9OOA2qJ_Dbg/86a8d02bfec9a566845dd4_small.jpg', + 'duration': 199.136, + }, { + 'id': 'm54EcwXdpA5gDBH5rgCYoV', + 'display_id': '21820710', + 'ext': 'mp4', + 'title': 'Chapter 3 - Importing Article Translations', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/IVX4XR8zpSsiNIHx45kz-A/1ccbf8a29a33856d06b3ed_small.jpg', + 'duration': 184.352, + }, { + 'id': 'j4nzS42oq4hE9oRV73w3eQ', + 'display_id': '21820716', + 'ext': 'mp4', + 'title': 'Chapter 4 - Best Practices', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/BtrRrQpRDLbA4AT95YQyog/1f1e6b8e7fdc3fa95ec8d3_small.jpg', + 'duration': 296.960, + }, { + 'id': 'y28PYfW5pftvers9PXzisC', + 'display_id': '21820727', + 'ext': 'mp4', + 'title': 'Chapter 5 - Migration Steps', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/K2CdQOXDfLcrVTF60r0bdw/a09239ada28b6ffce12b1f_small.jpg', + 'duration': 620.640, + }, { + 'id': 'YWU1eQxYvhj29SjYoPw5jH', + 'display_id': '21820733', + 'ext': 'mp4', + 'title': 'Chapter 6 - Demo', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/rsmhP-cO8dAa8ilvFGCX0g/7911ef415167cd14032068_small.jpg', + 'duration': 631.456, + }, { + 'id': 'nmEvVqpwdJUgb74zKsLGxn', + 'display_id': '29479037', + 'ext': 'mp4', + 'title': 'Schedule Your Follow-Up', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/Rtwc7X4PEkF4Ae5kHi-Jvw/174ebed3f34227b1ffa1d0_small.jpg', + 'duration': 33.608, + }], + }, + 'playlist_count': 8, + }, { + # URL of iframe embed src + 'url': 'https://play.vidyard.com/iDqTwWGrd36vaLuaCY3nTs.html', + 'info_dict': { + 'id': 'iDqTwWGrd36vaLuaCY3nTs', + 'display_id': '9281009', + 'ext': 'mp4', + 'title': 'Lightbox Embed', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/spacer.gif', + 'duration': 39.035, + }, + }, { + # Player JSON URL + 'url': 'https://play.vidyard.com/player/7GAApnNNbcZZ46k6JqJQSh.json?disable_analytics=0', + 'info_dict': { + 'id': '7GAApnNNbcZZ46k6JqJQSh', + 'display_id': '820026', + 'ext': 'mp4', + 'title': 'The Art of Storytelling: How to Deliver Your Brand Story with Content & Social', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/MhbE-5sEFQu4x3fI6FkNlA/41eb5717c557cd19456910_small.jpg', + 'duration': 2153.013, + 'tags': ['Summit2017'], + }, + }, { + 'url': 'http://share.vidyard.com/share/diYeo6YR2yiGgL8odvS8Ri', + 'only_matching': True, + }, { + 'url': 'https://play.vidyard.com/FFlz3ZpxhIfKQ1fd9DAryA', + 'only_matching': True, + }, { + 'url': 'https://play.vidyard.com/qhMAu5A76GZVrFzOPgSf9A/type/standalone', + 'only_matching': True, + }] + _WEBPAGE_TESTS = [{ + # URL containing inline/lightbox embedded video + 'url': 'https://resources.altium.com/p/2-the-extreme-importance-of-pc-board-stack-up', + 'info_dict': { + 'id': 'GDx1oXrFWj4XHbipfoXaMn', + 'display_id': '3225198', + 'ext': 'mp4', + 'title': 'The Extreme Importance of PC Board Stack Up', + 'thumbnail': 'https://cdn.vidyard.com/thumbnails/73_Q3_hBexWX7Og1sae6cg/9998fa4faec921439e2c04_small.jpg', + 'duration': 3422.742, + }, + }, { + #