mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-22 16:07:49 +08:00
Update On Tue Apr 16 20:28:40 CEST 2024
This commit is contained in:
@@ -618,3 +618,4 @@ Update On Fri Apr 12 20:24:06 CEST 2024
|
||||
Update On Sat Apr 13 20:24:55 CEST 2024
|
||||
Update On Mon Apr 15 01:03:26 CEST 2024
|
||||
Update On Mon Apr 15 20:26:48 CEST 2024
|
||||
Update On Tue Apr 16 20:28:30 CEST 2024
|
||||
|
||||
Generated
+4
-4
@@ -5028,9 +5028,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.115"
|
||||
version = "1.0.116"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd"
|
||||
checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813"
|
||||
dependencies = [
|
||||
"indexmap 2.2.6",
|
||||
"itoa 1.0.11",
|
||||
@@ -5248,9 +5248,9 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
|
||||
|
||||
[[package]]
|
||||
name = "simd-json"
|
||||
version = "0.13.9"
|
||||
version = "0.13.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b0b84c23a1066e1d650ebc99aa8fb9f8ed0ab96fd36e2e836173c92fc9fb29bc"
|
||||
checksum = "570c430b3d902ea083097e853263ae782dfe40857d93db019a12356c8e8143fa"
|
||||
dependencies = [
|
||||
"getrandom 0.2.14",
|
||||
"halfbrown",
|
||||
|
||||
@@ -5,7 +5,7 @@ export const useNyanpasu = (options?: {
|
||||
onUpdate?: (data?: VergeConfig) => void;
|
||||
onError?: (error: any) => void;
|
||||
}) => {
|
||||
const { data, error, mutate } = useSWR<VergeConfig>("nynpasuConfig", () =>
|
||||
const { data, error, mutate } = useSWR<VergeConfig>("nyanpasuConfig", () =>
|
||||
nyanpasuConfig.get(),
|
||||
);
|
||||
|
||||
|
||||
@@ -16,16 +16,18 @@
|
||||
"@emotion/styled": "11.11.5",
|
||||
"@generouted/react-router": "1.19.3",
|
||||
"@juggle/resize-observer": "3.4.0",
|
||||
"@material/material-color-utilities": "0.2.7",
|
||||
"@mui/icons-material": "5.15.15",
|
||||
"@mui/lab": "5.0.0-alpha.170",
|
||||
"@mui/material": "5.15.15",
|
||||
"@mui/x-data-grid": "7.2.0",
|
||||
"@nyanpasu/interface": "workspace:^",
|
||||
"@nyanpasu/ui": "workspace:^",
|
||||
"@tauri-apps/api": "1.5.3",
|
||||
"ahooks": "3.7.11",
|
||||
"axios": "1.6.8",
|
||||
"dayjs": "1.11.10",
|
||||
"framer-motion": "11.0.28",
|
||||
"framer-motion": "11.1.0",
|
||||
"i18next": "23.11.2",
|
||||
"monaco-editor": "0.47.0",
|
||||
"mui-color-input": "2.0.3",
|
||||
@@ -43,15 +45,15 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-cookie": "3.0.6",
|
||||
"@types/react": "18.2.78",
|
||||
"@types/react": "18.2.79",
|
||||
"@types/react-dom": "18.2.25",
|
||||
"@types/react-transition-group": "4.4.10",
|
||||
"@typescript-eslint/eslint-plugin": "7.6.0",
|
||||
"@typescript-eslint/parser": "7.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "7.7.0",
|
||||
"@typescript-eslint/parser": "7.7.0",
|
||||
"@vitejs/plugin-react": "4.2.1",
|
||||
"sass": "1.75.0",
|
||||
"shiki": "1.3.0",
|
||||
"vite": "5.2.8",
|
||||
"vite": "5.2.9",
|
||||
"vite-plugin-monaco-editor": "1.1.0",
|
||||
"vite-plugin-sass-dts": "1.3.17",
|
||||
"vite-plugin-svgr": "4.2.0",
|
||||
|
||||
@@ -1,130 +1,85 @@
|
||||
import { useEffect, useMemo } from "react";
|
||||
import { useRecoilState } from "recoil";
|
||||
import { alpha, createTheme, Theme } from "@mui/material";
|
||||
import { alpha, Theme } from "@mui/material";
|
||||
import { appWindow } from "@tauri-apps/api/window";
|
||||
import { atomThemeMode } from "@/services/states";
|
||||
import { defaultTheme, defaultDarkTheme } from "@/pages/_theme";
|
||||
import { useVerge } from "@/hooks/use-verge";
|
||||
import { useNyanpasu } from "@nyanpasu/interface";
|
||||
import { createMDYTheme } from "@nyanpasu/ui";
|
||||
|
||||
const applyRootStyleVar = (mode: "light" | "dark", theme: Theme) => {
|
||||
const root = document.documentElement;
|
||||
|
||||
root.style.setProperty(
|
||||
"--background-color",
|
||||
mode === "light" ? "#ffffff" : "#121212",
|
||||
);
|
||||
|
||||
root.style.setProperty(
|
||||
"--selection-color",
|
||||
mode === "light" ? "#f5f5f5" : "#d5d5d5",
|
||||
);
|
||||
|
||||
root.style.setProperty(
|
||||
"--scroller-color",
|
||||
mode === "light" ? "#90939980" : "#54545480",
|
||||
);
|
||||
|
||||
root.style.setProperty("--primary-main", theme.palette.primary.main);
|
||||
|
||||
root.style.setProperty(
|
||||
"--background-color-alpha",
|
||||
alpha(theme.palette.primary.main, 0.1),
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* custom theme
|
||||
*/
|
||||
export const useCustomTheme = () => {
|
||||
const { verge } = useVerge();
|
||||
const { theme_mode, theme_setting } = verge ?? {};
|
||||
const { nyanpasuConfig } = useNyanpasu();
|
||||
|
||||
const [mode, setMode] = useRecoilState(atomThemeMode);
|
||||
|
||||
useEffect(() => {
|
||||
const themeMode = ["light", "dark", "system"].includes(theme_mode!)
|
||||
? theme_mode!
|
||||
const themeMode = ["light", "dark", "system"].includes(
|
||||
nyanpasuConfig?.theme_mode,
|
||||
)
|
||||
? nyanpasuConfig?.theme_mode
|
||||
: "light";
|
||||
|
||||
if (themeMode !== "system") {
|
||||
setMode(themeMode);
|
||||
return;
|
||||
}
|
||||
const handleThemeChange = (mode: "light" | "dark" | "system") => {
|
||||
if (mode !== "system") {
|
||||
setMode(themeMode);
|
||||
return;
|
||||
}
|
||||
appWindow.theme().then((m) => m && setMode(m));
|
||||
};
|
||||
|
||||
appWindow.theme().then((m) => m && setMode(m));
|
||||
const unlisten = appWindow.onThemeChanged((e) => setMode(e.payload));
|
||||
const unlisten = appWindow.onThemeChanged((e) => {
|
||||
handleThemeChange(e.payload);
|
||||
});
|
||||
|
||||
return () => {
|
||||
unlisten.then((fn) => fn());
|
||||
};
|
||||
}, [theme_mode]);
|
||||
}, [nyanpasuConfig?.theme_mode]);
|
||||
|
||||
const theme = useMemo(() => {
|
||||
const setting = theme_setting || {};
|
||||
const dt = mode === "light" ? defaultTheme : defaultDarkTheme;
|
||||
|
||||
let theme: Theme;
|
||||
|
||||
try {
|
||||
theme = createTheme({
|
||||
breakpoints: {
|
||||
values: { xs: 0, sm: 650, md: 900, lg: 1200, xl: 1536 },
|
||||
},
|
||||
palette: {
|
||||
mode,
|
||||
primary: { main: setting.primary_color || dt.primary_color },
|
||||
secondary: { main: setting.secondary_color || dt.secondary_color },
|
||||
info: { main: setting.info_color || dt.info_color },
|
||||
error: { main: setting.error_color || dt.error_color },
|
||||
warning: { main: setting.warning_color || dt.warning_color },
|
||||
success: { main: setting.success_color || dt.success_color },
|
||||
text: {
|
||||
primary: setting.primary_text || dt.primary_text,
|
||||
secondary: setting.secondary_text || dt.secondary_text,
|
||||
},
|
||||
},
|
||||
typography: {
|
||||
// todo
|
||||
fontFamily: setting.font_family
|
||||
? `${setting.font_family}, ${dt.font_family}`
|
||||
: dt.font_family,
|
||||
},
|
||||
});
|
||||
} catch {
|
||||
// fix #294
|
||||
theme = createTheme({
|
||||
breakpoints: {
|
||||
values: { xs: 0, sm: 650, md: 900, lg: 1200, xl: 1536 },
|
||||
},
|
||||
palette: {
|
||||
mode,
|
||||
primary: { main: dt.primary_color },
|
||||
secondary: { main: dt.secondary_color },
|
||||
info: { main: dt.info_color },
|
||||
error: { main: dt.error_color },
|
||||
warning: { main: dt.warning_color },
|
||||
success: { main: dt.success_color },
|
||||
text: { primary: dt.primary_text, secondary: dt.secondary_text },
|
||||
},
|
||||
typography: { fontFamily: dt.font_family },
|
||||
});
|
||||
}
|
||||
|
||||
// css
|
||||
const backgroundColor = mode === "light" ? "#ffffff" : "#121212";
|
||||
const selectColor = mode === "light" ? "#f5f5f5" : "#d5d5d5";
|
||||
const scrollColor = mode === "light" ? "#90939980" : "#54545480";
|
||||
|
||||
const rootEle = document.documentElement;
|
||||
rootEle.style.setProperty("--background-color", backgroundColor);
|
||||
rootEle.style.setProperty("--selection-color", selectColor);
|
||||
rootEle.style.setProperty("--scroller-color", scrollColor);
|
||||
rootEle.style.setProperty("--primary-main", theme.palette.primary.main);
|
||||
rootEle.style.setProperty(
|
||||
"--background-color-alpha",
|
||||
alpha(theme.palette.primary.main, 0.1),
|
||||
const theme = createMDYTheme(
|
||||
{
|
||||
...dt,
|
||||
...nyanpasuConfig?.theme_setting,
|
||||
},
|
||||
mode,
|
||||
);
|
||||
|
||||
// inject css
|
||||
let style = document.querySelector("style#verge-theme");
|
||||
if (!style) {
|
||||
style = document.createElement("style");
|
||||
style.id = "verge-theme";
|
||||
document.head.appendChild(style!);
|
||||
}
|
||||
if (style) {
|
||||
style.innerHTML = setting.css_injection || "";
|
||||
}
|
||||
|
||||
// update svg icon
|
||||
const { palette } = theme;
|
||||
|
||||
setTimeout(() => {
|
||||
const dom = document.querySelector("#Gradient2");
|
||||
if (dom) {
|
||||
dom.innerHTML = `
|
||||
<stop offset="0%" stop-color="${palette.primary.main}" />
|
||||
<stop offset="80%" stop-color="${palette.primary.dark}" />
|
||||
<stop offset="100%" stop-color="${palette.primary.dark}" />
|
||||
`;
|
||||
}
|
||||
}, 0);
|
||||
applyRootStyleVar(mode, theme);
|
||||
|
||||
return theme;
|
||||
}, [mode, theme_setting]);
|
||||
}, [mode, nyanpasuConfig?.theme_setting]);
|
||||
|
||||
return { theme };
|
||||
};
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./materialYou";
|
||||
@@ -0,0 +1,51 @@
|
||||
import createTheme from "@mui/material/styles/createTheme";
|
||||
import {
|
||||
argbFromHex,
|
||||
hexFromArgb,
|
||||
themeFromSourceColor,
|
||||
} from "@material/material-color-utilities";
|
||||
|
||||
interface ThemeSchema {
|
||||
primary_color: string;
|
||||
secondary_color: string;
|
||||
primary_text: string;
|
||||
secondary_text: string;
|
||||
info_color: string;
|
||||
error_color: string;
|
||||
warning_color: string;
|
||||
success_color: string;
|
||||
font_family?: string;
|
||||
}
|
||||
|
||||
export const createMDYTheme = (
|
||||
themeSchema: ThemeSchema,
|
||||
mode: "light" | "dark",
|
||||
) => {
|
||||
const materialColor = themeFromSourceColor(
|
||||
argbFromHex(themeSchema.primary_color),
|
||||
);
|
||||
|
||||
return createTheme({
|
||||
palette: {
|
||||
mode,
|
||||
primary: {
|
||||
main: hexFromArgb(materialColor.schemes[mode].primary),
|
||||
},
|
||||
secondary: {
|
||||
main: hexFromArgb(materialColor.schemes[mode].secondary),
|
||||
},
|
||||
error: {
|
||||
main: hexFromArgb(materialColor.schemes[mode].error),
|
||||
},
|
||||
text: {
|
||||
primary: hexFromArgb(materialColor.schemes[mode].onPrimaryContainer),
|
||||
secondary: hexFromArgb(
|
||||
materialColor.schemes[mode].onSecondaryContainer,
|
||||
),
|
||||
},
|
||||
},
|
||||
typography: {
|
||||
fontFamily: themeSchema?.font_family,
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./createTheme";
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"name": "@nyanpasu/ui",
|
||||
"version": "0.1.0"
|
||||
"version": "0.1.0",
|
||||
"main": "index.ts",
|
||||
"module": "index.ts",
|
||||
"dependencies": {
|
||||
"@material/material-color-utilities": "0.2.7",
|
||||
"@mui/material": "5.15.15"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"target": "ESNext",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||
"allowJs": false,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "preserve",
|
||||
"paths": {
|
||||
"@/*": ["./*"],
|
||||
},
|
||||
},
|
||||
"include": ["./"],
|
||||
}
|
||||
Generated
+153
-136
@@ -155,31 +155,37 @@ importers:
|
||||
version: 3.2.2(react@18.2.0)
|
||||
'@emotion/react':
|
||||
specifier: 11.11.4
|
||||
version: 11.11.4(@types/react@18.2.78)(react@18.2.0)
|
||||
version: 11.11.4(@types/react@18.2.79)(react@18.2.0)
|
||||
'@emotion/styled':
|
||||
specifier: 11.11.5
|
||||
version: 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.78)(react@18.2.0)
|
||||
version: 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.79)(react@18.2.0)
|
||||
'@generouted/react-router':
|
||||
specifier: 1.19.3
|
||||
version: 1.19.3(react-router-dom@6.22.3)(react@18.2.0)(vite@5.2.8)
|
||||
version: 1.19.3(react-router-dom@6.22.3)(react@18.2.0)(vite@5.2.9)
|
||||
'@juggle/resize-observer':
|
||||
specifier: 3.4.0
|
||||
version: 3.4.0
|
||||
'@material/material-color-utilities':
|
||||
specifier: 0.2.7
|
||||
version: 0.2.7
|
||||
'@mui/icons-material':
|
||||
specifier: 5.15.15
|
||||
version: 5.15.15(@mui/material@5.15.15)(@types/react@18.2.78)(react@18.2.0)
|
||||
version: 5.15.15(@mui/material@5.15.15)(@types/react@18.2.79)(react@18.2.0)
|
||||
'@mui/lab':
|
||||
specifier: 5.0.0-alpha.170
|
||||
version: 5.0.0-alpha.170(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.15)(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0)
|
||||
version: 5.0.0-alpha.170(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.15)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@mui/material':
|
||||
specifier: 5.15.15
|
||||
version: 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0)
|
||||
version: 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@mui/x-data-grid':
|
||||
specifier: 7.2.0
|
||||
version: 7.2.0(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.15)(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0)
|
||||
version: 7.2.0(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.15)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@nyanpasu/interface':
|
||||
specifier: workspace:^
|
||||
version: link:../interface
|
||||
'@nyanpasu/ui':
|
||||
specifier: workspace:^
|
||||
version: link:../ui
|
||||
'@tauri-apps/api':
|
||||
specifier: 1.5.3
|
||||
version: 1.5.3
|
||||
@@ -193,8 +199,8 @@ importers:
|
||||
specifier: 1.11.10
|
||||
version: 1.11.10
|
||||
framer-motion:
|
||||
specifier: 11.0.28
|
||||
version: 11.0.28(react-dom@18.2.0)(react@18.2.0)
|
||||
specifier: 11.1.0
|
||||
version: 11.1.0(react-dom@18.2.0)(react@18.2.0)
|
||||
i18next:
|
||||
specifier: 23.11.2
|
||||
version: 23.11.2
|
||||
@@ -203,7 +209,7 @@ importers:
|
||||
version: 0.47.0
|
||||
mui-color-input:
|
||||
specifier: 2.0.3
|
||||
version: 2.0.3(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.15)(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0)
|
||||
version: 2.0.3(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.15)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0)
|
||||
react:
|
||||
specifier: 18.2.0
|
||||
version: 18.2.0
|
||||
@@ -221,7 +227,7 @@ importers:
|
||||
version: 14.1.0(i18next@23.11.2)(react-dom@18.2.0)(react@18.2.0)
|
||||
react-markdown:
|
||||
specifier: 9.0.1
|
||||
version: 9.0.1(@types/react@18.2.78)(react@18.2.0)
|
||||
version: 9.0.1(@types/react@18.2.79)(react@18.2.0)
|
||||
react-router-dom:
|
||||
specifier: 6.22.3
|
||||
version: 6.22.3(react-dom@18.2.0)(react@18.2.0)
|
||||
@@ -242,8 +248,8 @@ importers:
|
||||
specifier: 3.0.6
|
||||
version: 3.0.6
|
||||
'@types/react':
|
||||
specifier: 18.2.78
|
||||
version: 18.2.78
|
||||
specifier: 18.2.79
|
||||
version: 18.2.79
|
||||
'@types/react-dom':
|
||||
specifier: 18.2.25
|
||||
version: 18.2.25
|
||||
@@ -251,14 +257,14 @@ importers:
|
||||
specifier: 4.4.10
|
||||
version: 4.4.10
|
||||
'@typescript-eslint/eslint-plugin':
|
||||
specifier: 7.6.0
|
||||
version: 7.6.0(@typescript-eslint/parser@7.6.0)(eslint@8.57.0)(typescript@5.4.5)
|
||||
specifier: 7.7.0
|
||||
version: 7.7.0(@typescript-eslint/parser@7.7.0)(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/parser':
|
||||
specifier: 7.6.0
|
||||
version: 7.6.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
specifier: 7.7.0
|
||||
version: 7.7.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@vitejs/plugin-react':
|
||||
specifier: 4.2.1
|
||||
version: 4.2.1(vite@5.2.8)
|
||||
version: 4.2.1(vite@5.2.9)
|
||||
sass:
|
||||
specifier: 1.75.0
|
||||
version: 1.75.0
|
||||
@@ -266,22 +272,29 @@ importers:
|
||||
specifier: 1.3.0
|
||||
version: 1.3.0
|
||||
vite:
|
||||
specifier: 5.2.8
|
||||
version: 5.2.8(@types/node@20.12.7)(sass@1.75.0)
|
||||
specifier: 5.2.9
|
||||
version: 5.2.9(@types/node@20.12.7)(sass@1.75.0)
|
||||
vite-plugin-monaco-editor:
|
||||
specifier: npm:vite-plugin-monaco-editor-new@1.1.3
|
||||
version: /vite-plugin-monaco-editor-new@1.1.3(monaco-editor@0.47.0)
|
||||
vite-plugin-sass-dts:
|
||||
specifier: 1.3.17
|
||||
version: 1.3.17(postcss@8.4.38)(prettier@3.2.5)(sass@1.75.0)(vite@5.2.8)
|
||||
version: 1.3.17(postcss@8.4.38)(prettier@3.2.5)(sass@1.75.0)(vite@5.2.9)
|
||||
vite-plugin-svgr:
|
||||
specifier: 4.2.0
|
||||
version: 4.2.0(typescript@5.4.5)(vite@5.2.8)
|
||||
version: 4.2.0(typescript@5.4.5)(vite@5.2.9)
|
||||
vite-tsconfig-paths:
|
||||
specifier: 4.3.2
|
||||
version: 4.3.2(typescript@5.4.5)(vite@5.2.8)
|
||||
version: 4.3.2(typescript@5.4.5)(vite@5.2.9)
|
||||
|
||||
frontend/ui: {}
|
||||
frontend/ui:
|
||||
dependencies:
|
||||
'@material/material-color-utilities':
|
||||
specifier: 0.2.7
|
||||
version: 0.2.7
|
||||
'@mui/material':
|
||||
specifier: 5.15.15
|
||||
version: 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0)
|
||||
|
||||
scripts:
|
||||
dependencies:
|
||||
@@ -854,7 +867,7 @@ packages:
|
||||
resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==}
|
||||
dev: false
|
||||
|
||||
/@emotion/react@11.11.4(@types/react@18.2.78)(react@18.2.0):
|
||||
/@emotion/react@11.11.4(@types/react@18.2.79)(react@18.2.0):
|
||||
resolution: {integrity: sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==}
|
||||
peerDependencies:
|
||||
'@types/react': '*'
|
||||
@@ -870,7 +883,7 @@ packages:
|
||||
'@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0)
|
||||
'@emotion/utils': 1.2.1
|
||||
'@emotion/weak-memoize': 0.3.1
|
||||
'@types/react': 18.2.78
|
||||
'@types/react': 18.2.79
|
||||
hoist-non-react-statics: 3.3.2
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
@@ -889,7 +902,7 @@ packages:
|
||||
resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==}
|
||||
dev: false
|
||||
|
||||
/@emotion/styled@11.11.5(@emotion/react@11.11.4)(@types/react@18.2.78)(react@18.2.0):
|
||||
/@emotion/styled@11.11.5(@emotion/react@11.11.4)(@types/react@18.2.79)(react@18.2.0):
|
||||
resolution: {integrity: sha512-/ZjjnaNKvuMPxcIiUkf/9SHoG4Q196DRl1w82hQ3WCsjo1IUR8uaGWrC6a87CrYAW0Kb/pK7hk8BnLgLRi9KoQ==}
|
||||
peerDependencies:
|
||||
'@emotion/react': ^11.0.0-rc.0
|
||||
@@ -902,11 +915,11 @@ packages:
|
||||
'@babel/runtime': 7.24.1
|
||||
'@emotion/babel-plugin': 11.11.0
|
||||
'@emotion/is-prop-valid': 1.2.2
|
||||
'@emotion/react': 11.11.4(@types/react@18.2.78)(react@18.2.0)
|
||||
'@emotion/react': 11.11.4(@types/react@18.2.79)(react@18.2.0)
|
||||
'@emotion/serialize': 1.1.4
|
||||
'@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0)
|
||||
'@emotion/utils': 1.2.1
|
||||
'@types/react': 18.2.78
|
||||
'@types/react': 18.2.79
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
|
||||
@@ -1391,7 +1404,7 @@ packages:
|
||||
resolution: {integrity: sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==}
|
||||
dev: false
|
||||
|
||||
/@generouted/react-router@1.19.3(react-router-dom@6.22.3)(react@18.2.0)(vite@5.2.8):
|
||||
/@generouted/react-router@1.19.3(react-router-dom@6.22.3)(react@18.2.0)(vite@5.2.9):
|
||||
resolution: {integrity: sha512-3/Y0j302HnwxyU0KOoCOFSVwJZN4eD73+CVtSaOKUnLbGW1ftP1dT8Eur14PALGvZOVR4gsFrUJFq6a4c/kWvQ==}
|
||||
peerDependencies:
|
||||
react: '>=18'
|
||||
@@ -1399,10 +1412,10 @@ packages:
|
||||
vite: '>=4'
|
||||
dependencies:
|
||||
fast-glob: 3.3.2
|
||||
generouted: 1.19.3(vite@5.2.8)
|
||||
generouted: 1.19.3(vite@5.2.9)
|
||||
react: 18.2.0
|
||||
react-router-dom: 6.22.3(react-dom@18.2.0)(react@18.2.0)
|
||||
vite: 5.2.8(@types/node@20.12.7)(sass@1.75.0)
|
||||
vite: 5.2.9(@types/node@20.12.7)(sass@1.75.0)
|
||||
dev: false
|
||||
|
||||
/@humanwhocodes/config-array@0.11.14:
|
||||
@@ -1471,7 +1484,11 @@ packages:
|
||||
resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==}
|
||||
dev: false
|
||||
|
||||
/@mui/base@5.0.0-beta.40(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0):
|
||||
/@material/material-color-utilities@0.2.7:
|
||||
resolution: {integrity: sha512-0FCeqG6WvK4/Cc06F/xXMd/pv4FeisI0c1tUpBbfhA2n9Y8eZEv4Karjbmf2ZqQCPUWMrGp8A571tCjizxoTiQ==}
|
||||
dev: false
|
||||
|
||||
/@mui/base@5.0.0-beta.40(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0):
|
||||
resolution: {integrity: sha512-I/lGHztkCzvwlXpjD2+SNmvNQvB4227xBXhISPjEaJUXGImOQ9f3D2Yj/T3KasSI/h0MLWy74X0J6clhPmsRbQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
@@ -1484,10 +1501,10 @@ packages:
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.1
|
||||
'@floating-ui/react-dom': 2.0.8(react-dom@18.2.0)(react@18.2.0)
|
||||
'@mui/types': 7.2.14(@types/react@18.2.78)
|
||||
'@mui/utils': 5.15.14(@types/react@18.2.78)(react@18.2.0)
|
||||
'@mui/types': 7.2.14(@types/react@18.2.79)
|
||||
'@mui/utils': 5.15.14(@types/react@18.2.79)(react@18.2.0)
|
||||
'@popperjs/core': 2.11.8
|
||||
'@types/react': 18.2.78
|
||||
'@types/react': 18.2.79
|
||||
clsx: 2.1.0
|
||||
prop-types: 15.8.1
|
||||
react: 18.2.0
|
||||
@@ -1498,7 +1515,7 @@ packages:
|
||||
resolution: {integrity: sha512-aXnw29OWQ6I5A47iuWEI6qSSUfH6G/aCsW9KmW3LiFqr7uXZBK4Ks+z8G+qeIub8k0T5CMqlT2q0L+ZJTMrqpg==}
|
||||
dev: false
|
||||
|
||||
/@mui/icons-material@5.15.15(@mui/material@5.15.15)(@types/react@18.2.78)(react@18.2.0):
|
||||
/@mui/icons-material@5.15.15(@mui/material@5.15.15)(@types/react@18.2.79)(react@18.2.0):
|
||||
resolution: {integrity: sha512-kkeU/pe+hABcYDH6Uqy8RmIsr2S/y5bP2rp+Gat4CcRjCcVne6KudS1NrZQhUCRysrTDCAhcbcf9gt+/+pGO2g==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
@@ -1510,12 +1527,12 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.1
|
||||
'@mui/material': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@types/react': 18.2.78
|
||||
'@mui/material': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@types/react': 18.2.79
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
|
||||
/@mui/lab@5.0.0-alpha.170(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.15)(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0):
|
||||
/@mui/lab@5.0.0-alpha.170(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.15)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0):
|
||||
resolution: {integrity: sha512-0bDVECGmrNjd3+bLdcLiwYZ0O4HP5j5WSQm5DV6iA/Z9kr8O6AnvZ1bv9ImQbbX7Gj3pX4o43EKwCutj3EQxQg==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
@@ -1534,21 +1551,21 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.1
|
||||
'@emotion/react': 11.11.4(@types/react@18.2.78)(react@18.2.0)
|
||||
'@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.78)(react@18.2.0)
|
||||
'@mui/base': 5.0.0-beta.40(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@mui/material': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@mui/system': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.78)(react@18.2.0)
|
||||
'@mui/types': 7.2.14(@types/react@18.2.78)
|
||||
'@mui/utils': 5.15.14(@types/react@18.2.78)(react@18.2.0)
|
||||
'@types/react': 18.2.78
|
||||
'@emotion/react': 11.11.4(@types/react@18.2.79)(react@18.2.0)
|
||||
'@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.79)(react@18.2.0)
|
||||
'@mui/base': 5.0.0-beta.40(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@mui/material': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@mui/system': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.79)(react@18.2.0)
|
||||
'@mui/types': 7.2.14(@types/react@18.2.79)
|
||||
'@mui/utils': 5.15.14(@types/react@18.2.79)(react@18.2.0)
|
||||
'@types/react': 18.2.79
|
||||
clsx: 2.1.0
|
||||
prop-types: 15.8.1
|
||||
react: 18.2.0
|
||||
react-dom: 18.2.0(react@18.2.0)
|
||||
dev: false
|
||||
|
||||
/@mui/material@5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0):
|
||||
/@mui/material@5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0):
|
||||
resolution: {integrity: sha512-3zvWayJ+E1kzoIsvwyEvkTUKVKt1AjchFFns+JtluHCuvxgKcLSRJTADw37k0doaRtVAsyh8bz9Afqzv+KYrIA==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
@@ -1566,14 +1583,14 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.1
|
||||
'@emotion/react': 11.11.4(@types/react@18.2.78)(react@18.2.0)
|
||||
'@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.78)(react@18.2.0)
|
||||
'@mui/base': 5.0.0-beta.40(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@emotion/react': 11.11.4(@types/react@18.2.79)(react@18.2.0)
|
||||
'@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.79)(react@18.2.0)
|
||||
'@mui/base': 5.0.0-beta.40(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@mui/core-downloads-tracker': 5.15.15
|
||||
'@mui/system': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.78)(react@18.2.0)
|
||||
'@mui/types': 7.2.14(@types/react@18.2.78)
|
||||
'@mui/utils': 5.15.14(@types/react@18.2.78)(react@18.2.0)
|
||||
'@types/react': 18.2.78
|
||||
'@mui/system': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.79)(react@18.2.0)
|
||||
'@mui/types': 7.2.14(@types/react@18.2.79)
|
||||
'@mui/utils': 5.15.14(@types/react@18.2.79)(react@18.2.0)
|
||||
'@types/react': 18.2.79
|
||||
'@types/react-transition-group': 4.4.10
|
||||
clsx: 2.1.0
|
||||
csstype: 3.1.3
|
||||
@@ -1584,7 +1601,7 @@ packages:
|
||||
react-transition-group: 4.4.5(react-dom@18.2.0)(react@18.2.0)
|
||||
dev: false
|
||||
|
||||
/@mui/private-theming@5.15.14(@types/react@18.2.78)(react@18.2.0):
|
||||
/@mui/private-theming@5.15.14(@types/react@18.2.79)(react@18.2.0):
|
||||
resolution: {integrity: sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
@@ -1595,8 +1612,8 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.1
|
||||
'@mui/utils': 5.15.14(@types/react@18.2.78)(react@18.2.0)
|
||||
'@types/react': 18.2.78
|
||||
'@mui/utils': 5.15.14(@types/react@18.2.79)(react@18.2.0)
|
||||
'@types/react': 18.2.79
|
||||
prop-types: 15.8.1
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
@@ -1616,14 +1633,14 @@ packages:
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.1
|
||||
'@emotion/cache': 11.11.0
|
||||
'@emotion/react': 11.11.4(@types/react@18.2.78)(react@18.2.0)
|
||||
'@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.78)(react@18.2.0)
|
||||
'@emotion/react': 11.11.4(@types/react@18.2.79)(react@18.2.0)
|
||||
'@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.79)(react@18.2.0)
|
||||
csstype: 3.1.3
|
||||
prop-types: 15.8.1
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
|
||||
/@mui/system@5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.78)(react@18.2.0):
|
||||
/@mui/system@5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.79)(react@18.2.0):
|
||||
resolution: {integrity: sha512-aulox6N1dnu5PABsfxVGOZffDVmlxPOVgj56HrUnJE8MCSh8lOvvkd47cebIVQQYAjpwieXQXiDPj5pwM40jTQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
@@ -1640,20 +1657,20 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.1
|
||||
'@emotion/react': 11.11.4(@types/react@18.2.78)(react@18.2.0)
|
||||
'@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.78)(react@18.2.0)
|
||||
'@mui/private-theming': 5.15.14(@types/react@18.2.78)(react@18.2.0)
|
||||
'@emotion/react': 11.11.4(@types/react@18.2.79)(react@18.2.0)
|
||||
'@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.79)(react@18.2.0)
|
||||
'@mui/private-theming': 5.15.14(@types/react@18.2.79)(react@18.2.0)
|
||||
'@mui/styled-engine': 5.15.14(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(react@18.2.0)
|
||||
'@mui/types': 7.2.14(@types/react@18.2.78)
|
||||
'@mui/utils': 5.15.14(@types/react@18.2.78)(react@18.2.0)
|
||||
'@types/react': 18.2.78
|
||||
'@mui/types': 7.2.14(@types/react@18.2.79)
|
||||
'@mui/utils': 5.15.14(@types/react@18.2.79)(react@18.2.0)
|
||||
'@types/react': 18.2.79
|
||||
clsx: 2.1.0
|
||||
csstype: 3.1.3
|
||||
prop-types: 15.8.1
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
|
||||
/@mui/types@7.2.14(@types/react@18.2.78):
|
||||
/@mui/types@7.2.14(@types/react@18.2.79):
|
||||
resolution: {integrity: sha512-MZsBZ4q4HfzBsywtXgM1Ksj6HDThtiwmOKUXH1pKYISI9gAVXCNHNpo7TlGoGrBaYWZTdNoirIN7JsQcQUjmQQ==}
|
||||
peerDependencies:
|
||||
'@types/react': ^17.0.0 || ^18.0.0
|
||||
@@ -1661,10 +1678,10 @@ packages:
|
||||
'@types/react':
|
||||
optional: true
|
||||
dependencies:
|
||||
'@types/react': 18.2.78
|
||||
'@types/react': 18.2.79
|
||||
dev: false
|
||||
|
||||
/@mui/utils@5.15.14(@types/react@18.2.78)(react@18.2.0):
|
||||
/@mui/utils@5.15.14(@types/react@18.2.79)(react@18.2.0):
|
||||
resolution: {integrity: sha512-0lF/7Hh/ezDv5X7Pry6enMsbYyGKjADzvHyo3Qrc/SSlTsQ1VkbDMbH0m2t3OR5iIVLwMoxwM7yGd+6FCMtTFA==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
@@ -1676,13 +1693,13 @@ packages:
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.1
|
||||
'@types/prop-types': 15.7.11
|
||||
'@types/react': 18.2.78
|
||||
'@types/react': 18.2.79
|
||||
prop-types: 15.8.1
|
||||
react: 18.2.0
|
||||
react-is: 18.2.0
|
||||
dev: false
|
||||
|
||||
/@mui/x-data-grid@7.2.0(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.15)(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0):
|
||||
/@mui/x-data-grid@7.2.0(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.15)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0):
|
||||
resolution: {integrity: sha512-WKmFo0eKhj3W7Fv8u5n2XP4UcdzuJ+mEYALiMUDAYsah/hPBH9mA1miXn9DjXF3i3dxgzrTjdJemTgTJxAQZKg==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
@@ -1691,9 +1708,9 @@ packages:
|
||||
react-dom: ^17.0.0 || ^18.0.0
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.1
|
||||
'@mui/material': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@mui/system': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.78)(react@18.2.0)
|
||||
'@mui/utils': 5.15.14(@types/react@18.2.78)(react@18.2.0)
|
||||
'@mui/material': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@mui/system': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.79)(react@18.2.0)
|
||||
'@mui/utils': 5.15.14(@types/react@18.2.79)(react@18.2.0)
|
||||
clsx: 2.1.0
|
||||
prop-types: 15.8.1
|
||||
react: 18.2.0
|
||||
@@ -2318,16 +2335,16 @@ packages:
|
||||
/@types/react-dom@18.2.25:
|
||||
resolution: {integrity: sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA==}
|
||||
dependencies:
|
||||
'@types/react': 18.2.78
|
||||
'@types/react': 18.2.79
|
||||
dev: true
|
||||
|
||||
/@types/react-transition-group@4.4.10:
|
||||
resolution: {integrity: sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==}
|
||||
dependencies:
|
||||
'@types/react': 18.2.78
|
||||
'@types/react': 18.2.79
|
||||
|
||||
/@types/react@18.2.78:
|
||||
resolution: {integrity: sha512-qOwdPnnitQY4xKlKayt42q5W5UQrSHjgoXNVEtxeqdITJ99k4VXJOP3vt8Rkm9HmgJpH50UNU+rlqfkfWOqp0A==}
|
||||
/@types/react@18.2.79:
|
||||
resolution: {integrity: sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==}
|
||||
dependencies:
|
||||
'@types/prop-types': 15.7.11
|
||||
csstype: 3.1.3
|
||||
@@ -2344,8 +2361,8 @@ packages:
|
||||
resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==}
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/eslint-plugin@7.6.0(@typescript-eslint/parser@7.6.0)(eslint@8.57.0)(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A==}
|
||||
/@typescript-eslint/eslint-plugin@7.7.0(@typescript-eslint/parser@7.7.0)(eslint@8.57.0)(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': ^7.0.0
|
||||
@@ -2356,11 +2373,11 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.10.0
|
||||
'@typescript-eslint/parser': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/scope-manager': 7.6.0
|
||||
'@typescript-eslint/type-utils': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/utils': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/visitor-keys': 7.6.0
|
||||
'@typescript-eslint/parser': 7.7.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/scope-manager': 7.7.0
|
||||
'@typescript-eslint/type-utils': 7.7.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/utils': 7.7.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/visitor-keys': 7.7.0
|
||||
debug: 4.3.4
|
||||
eslint: 8.57.0
|
||||
graphemer: 1.4.0
|
||||
@@ -2373,8 +2390,8 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg==}
|
||||
/@typescript-eslint/parser@7.7.0(eslint@8.57.0)(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.56.0
|
||||
@@ -2383,10 +2400,10 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 7.6.0
|
||||
'@typescript-eslint/types': 7.6.0
|
||||
'@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5)
|
||||
'@typescript-eslint/visitor-keys': 7.6.0
|
||||
'@typescript-eslint/scope-manager': 7.7.0
|
||||
'@typescript-eslint/types': 7.7.0
|
||||
'@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5)
|
||||
'@typescript-eslint/visitor-keys': 7.7.0
|
||||
debug: 4.3.4
|
||||
eslint: 8.57.0
|
||||
typescript: 5.4.5
|
||||
@@ -2394,16 +2411,16 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/scope-manager@7.6.0:
|
||||
resolution: {integrity: sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w==}
|
||||
/@typescript-eslint/scope-manager@7.7.0:
|
||||
resolution: {integrity: sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 7.6.0
|
||||
'@typescript-eslint/visitor-keys': 7.6.0
|
||||
'@typescript-eslint/types': 7.7.0
|
||||
'@typescript-eslint/visitor-keys': 7.7.0
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/type-utils@7.6.0(eslint@8.57.0)(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw==}
|
||||
/@typescript-eslint/type-utils@7.7.0(eslint@8.57.0)(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.56.0
|
||||
@@ -2412,8 +2429,8 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5)
|
||||
'@typescript-eslint/utils': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5)
|
||||
'@typescript-eslint/utils': 7.7.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
debug: 4.3.4
|
||||
eslint: 8.57.0
|
||||
ts-api-utils: 1.3.0(typescript@5.4.5)
|
||||
@@ -2422,13 +2439,13 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/types@7.6.0:
|
||||
resolution: {integrity: sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ==}
|
||||
/@typescript-eslint/types@7.7.0:
|
||||
resolution: {integrity: sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/typescript-estree@7.6.0(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw==}
|
||||
/@typescript-eslint/typescript-estree@7.7.0(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
@@ -2436,8 +2453,8 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 7.6.0
|
||||
'@typescript-eslint/visitor-keys': 7.6.0
|
||||
'@typescript-eslint/types': 7.7.0
|
||||
'@typescript-eslint/visitor-keys': 7.7.0
|
||||
debug: 4.3.4
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
@@ -2449,8 +2466,8 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/utils@7.6.0(eslint@8.57.0)(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA==}
|
||||
/@typescript-eslint/utils@7.7.0(eslint@8.57.0)(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.56.0
|
||||
@@ -2458,9 +2475,9 @@ packages:
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
|
||||
'@types/json-schema': 7.0.15
|
||||
'@types/semver': 7.5.8
|
||||
'@typescript-eslint/scope-manager': 7.6.0
|
||||
'@typescript-eslint/types': 7.6.0
|
||||
'@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5)
|
||||
'@typescript-eslint/scope-manager': 7.7.0
|
||||
'@typescript-eslint/types': 7.7.0
|
||||
'@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5)
|
||||
eslint: 8.57.0
|
||||
semver: 7.6.0
|
||||
transitivePeerDependencies:
|
||||
@@ -2468,18 +2485,18 @@ packages:
|
||||
- typescript
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/visitor-keys@7.6.0:
|
||||
resolution: {integrity: sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==}
|
||||
/@typescript-eslint/visitor-keys@7.7.0:
|
||||
resolution: {integrity: sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 7.6.0
|
||||
'@typescript-eslint/types': 7.7.0
|
||||
eslint-visitor-keys: 3.4.3
|
||||
dev: true
|
||||
|
||||
/@ungap/structured-clone@1.2.0:
|
||||
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
|
||||
|
||||
/@vitejs/plugin-react@4.2.1(vite@5.2.8):
|
||||
/@vitejs/plugin-react@4.2.1(vite@5.2.9):
|
||||
resolution: {integrity: sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -2490,7 +2507,7 @@ packages:
|
||||
'@babel/plugin-transform-react-jsx-source': 7.23.3(@babel/core@7.23.6)
|
||||
'@types/babel__core': 7.20.5
|
||||
react-refresh: 0.14.0
|
||||
vite: 5.2.8(@types/node@20.12.7)(sass@1.75.0)
|
||||
vite: 5.2.9(@types/node@20.12.7)(sass@1.75.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
@@ -4108,8 +4125,8 @@ packages:
|
||||
resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==}
|
||||
dev: true
|
||||
|
||||
/framer-motion@11.0.28(react-dom@18.2.0)(react@18.2.0):
|
||||
resolution: {integrity: sha512-j/vNYTCH5MX5sY/3dwMs00z1+qAqKX3iIHF762bwqlU814ooD5dDbuj3pA0LmIT5YqyryCkXEb/q+zRblin0lw==}
|
||||
/framer-motion@11.1.0(react-dom@18.2.0)(react@18.2.0):
|
||||
resolution: {integrity: sha512-UVL4D5GvZ4LbwkUyAidMlbnB2b18VbPDITVreBuDULiz5E1sdVvUxNVpVAj4myuyH34LY/rwJEj8GOSG0TsEZg==}
|
||||
peerDependencies:
|
||||
'@emotion/is-prop-valid': '*'
|
||||
react: ^18.0.0
|
||||
@@ -4164,12 +4181,12 @@ packages:
|
||||
resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==}
|
||||
dev: true
|
||||
|
||||
/generouted@1.19.3(vite@5.2.8):
|
||||
/generouted@1.19.3(vite@5.2.9):
|
||||
resolution: {integrity: sha512-1KnOmPYBNryAm+9PvvOTOzKiWvuBKRwK+Xr4dP/I9U00y7UAv/VrFGeb0v7mYMiny6jpWBmfBFKaUvq4Q0Z4dQ==}
|
||||
peerDependencies:
|
||||
vite: '>=3'
|
||||
dependencies:
|
||||
vite: 5.2.8(@types/node@20.12.7)(sass@1.75.0)
|
||||
vite: 5.2.9(@types/node@20.12.7)(sass@1.75.0)
|
||||
dev: false
|
||||
|
||||
/gensync@1.0.0-beta.2:
|
||||
@@ -5480,7 +5497,7 @@ packages:
|
||||
/ms@2.1.2:
|
||||
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
|
||||
|
||||
/mui-color-input@2.0.3(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.15)(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0):
|
||||
/mui-color-input@2.0.3(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.15)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0):
|
||||
resolution: {integrity: sha512-rAd040qQ0Y+8dk4gE8kkCiJ/vCgA0j4vv1quJ43BfORTFE3uHarHj0xY1Vo9CPbojtx1f5vW+CjckYPRIZPIRg==}
|
||||
peerDependencies:
|
||||
'@emotion/react': ^11.5.0
|
||||
@@ -5494,10 +5511,10 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@ctrl/tinycolor': 4.0.3
|
||||
'@emotion/react': 11.11.4(@types/react@18.2.78)(react@18.2.0)
|
||||
'@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.78)(react@18.2.0)
|
||||
'@mui/material': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.78)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@types/react': 18.2.78
|
||||
'@emotion/react': 11.11.4(@types/react@18.2.79)(react@18.2.0)
|
||||
'@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.79)(react@18.2.0)
|
||||
'@mui/material': 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0)
|
||||
'@types/react': 18.2.79
|
||||
react: 18.2.0
|
||||
react-dom: 18.2.0(react@18.2.0)
|
||||
dev: false
|
||||
@@ -6038,14 +6055,14 @@ packages:
|
||||
resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==}
|
||||
dev: false
|
||||
|
||||
/react-markdown@9.0.1(@types/react@18.2.78)(react@18.2.0):
|
||||
/react-markdown@9.0.1(@types/react@18.2.79)(react@18.2.0):
|
||||
resolution: {integrity: sha512-186Gw/vF1uRkydbsOIkcGXw7aHq0sZOCRFFjGrr7b9+nVZg4UfA4enXCaxm4fUzecU38sWfrNDitGhshuU7rdg==}
|
||||
peerDependencies:
|
||||
'@types/react': '>=18'
|
||||
react: '>=18'
|
||||
dependencies:
|
||||
'@types/hast': 3.0.4
|
||||
'@types/react': 18.2.78
|
||||
'@types/react': 18.2.79
|
||||
devlop: 1.1.0
|
||||
hast-util-to-jsx-runtime: 2.3.0
|
||||
html-url-attributes: 3.0.0
|
||||
@@ -7126,7 +7143,7 @@ packages:
|
||||
monaco-editor: 0.47.0
|
||||
dev: true
|
||||
|
||||
/vite-plugin-sass-dts@1.3.17(postcss@8.4.38)(prettier@3.2.5)(sass@1.75.0)(vite@5.2.8):
|
||||
/vite-plugin-sass-dts@1.3.17(postcss@8.4.38)(prettier@3.2.5)(sass@1.75.0)(vite@5.2.9):
|
||||
resolution: {integrity: sha512-1YOEaDblFafFUhqOWdCBkJaJjBA7XPcX+Y8pFKFbn4BuNO5M57snN2A4w1DkA8pF6gL/QSvSpQfswHBDDC2fjQ==}
|
||||
engines: {node: '>=18'}
|
||||
peerDependencies:
|
||||
@@ -7139,10 +7156,10 @@ packages:
|
||||
postcss-js: 4.0.1(postcss@8.4.38)
|
||||
prettier: 3.2.5
|
||||
sass: 1.75.0
|
||||
vite: 5.2.8(@types/node@20.12.7)(sass@1.75.0)
|
||||
vite: 5.2.9(@types/node@20.12.7)(sass@1.75.0)
|
||||
dev: true
|
||||
|
||||
/vite-plugin-svgr@4.2.0(typescript@5.4.5)(vite@5.2.8):
|
||||
/vite-plugin-svgr@4.2.0(typescript@5.4.5)(vite@5.2.9):
|
||||
resolution: {integrity: sha512-SC7+FfVtNQk7So0XMjrrtLAbEC8qjFPifyD7+fs/E6aaNdVde6umlVVh0QuwDLdOMu7vp5RiGFsB70nj5yo0XA==}
|
||||
peerDependencies:
|
||||
vite: ^2.6.0 || 3 || 4 || 5
|
||||
@@ -7150,14 +7167,14 @@ packages:
|
||||
'@rollup/pluginutils': 5.0.5
|
||||
'@svgr/core': 8.1.0(typescript@5.4.5)
|
||||
'@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0)
|
||||
vite: 5.2.8(@types/node@20.12.7)(sass@1.75.0)
|
||||
vite: 5.2.9(@types/node@20.12.7)(sass@1.75.0)
|
||||
transitivePeerDependencies:
|
||||
- rollup
|
||||
- supports-color
|
||||
- typescript
|
||||
dev: true
|
||||
|
||||
/vite-tsconfig-paths@4.3.2(typescript@5.4.5)(vite@5.2.8):
|
||||
/vite-tsconfig-paths@4.3.2(typescript@5.4.5)(vite@5.2.9):
|
||||
resolution: {integrity: sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==}
|
||||
peerDependencies:
|
||||
vite: '*'
|
||||
@@ -7168,14 +7185,14 @@ packages:
|
||||
debug: 4.3.4
|
||||
globrex: 0.1.2
|
||||
tsconfck: 3.0.3(typescript@5.4.5)
|
||||
vite: 5.2.8(@types/node@20.12.7)(sass@1.75.0)
|
||||
vite: 5.2.9(@types/node@20.12.7)(sass@1.75.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- typescript
|
||||
dev: true
|
||||
|
||||
/vite@5.2.8(@types/node@20.12.7)(sass@1.75.0):
|
||||
resolution: {integrity: sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==}
|
||||
/vite@5.2.9(@types/node@20.12.7)(sass@1.75.0):
|
||||
resolution: {integrity: sha512-uOQWfuZBlc6Y3W/DTuQ1Sr+oIXWvqljLvS881SVmAj00d5RdgShLcuXWxseWPd4HXwiYBFW/vXHfKFeqj9uQnw==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
|
||||
@@ -13,7 +13,11 @@ const TAURI_DEV_APP_OVERRIDES_PATH = path.join(
|
||||
TAURI_APP_DIR,
|
||||
"overrides/nightly.conf.json",
|
||||
);
|
||||
const PACKAGE_JSON_PATH = path.join(cwd, "package.json");
|
||||
const ROOT_PACKAGE_JSON_PATH = path.join(cwd, "package.json");
|
||||
const NYANPASU_PACKAGE_JSON_PATH = path.join(
|
||||
cwd,
|
||||
"frontend/nyanpasu/package.json",
|
||||
);
|
||||
// blocked by https://github.com/tauri-apps/tauri/issues/8447
|
||||
// const WXS_PATH = path.join(TAURI_APP_DIR, "templates", "nightly.wxs");
|
||||
|
||||
@@ -25,7 +29,7 @@ async function main() {
|
||||
const tauriAppConf = await fs.readJSON(TAURI_APP_CONF);
|
||||
const tauriAppOverrides = await fs.readJSON(TAURI_DEV_APP_OVERRIDES_PATH);
|
||||
const tauriConf = merge(tauriAppConf, tauriAppOverrides);
|
||||
const packageJson = await fs.readJSON(PACKAGE_JSON_PATH);
|
||||
const packageJson = await fs.readJSON(NYANPASU_PACKAGE_JSON_PATH);
|
||||
// const wxsFile = await fs.readFile(WXS_PATH, "utf-8");
|
||||
|
||||
if (isNSIS) {
|
||||
@@ -58,7 +62,7 @@ async function main() {
|
||||
// 3. update package version
|
||||
consola.debug("Write tauri version to package.json");
|
||||
packageJson.version = version;
|
||||
await fs.writeJSON(PACKAGE_JSON_PATH, packageJson, { spaces: 2 });
|
||||
await fs.writeJSON(NYANPASU_PACKAGE_JSON_PATH, packageJson, { spaces: 2 });
|
||||
consola.debug("package.json updated");
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -48,8 +48,8 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3>🤗 Cards on the table</h3>
|
||||
<p>We have well-documented specifications and code for developers to contribute and build their own apps. And a helpful community, too.</p>
|
||||
<h3>🤗 Chill and supportive</h3>
|
||||
<p>We have well-documented specifications and code for developers to contribute and/or build their own apps. And a helpful community, too.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -254,6 +255,20 @@ func (c *serverConfig) fillTLSConfig(hyConfig *server.Config) error {
|
||||
if c.TLS.Cert == "" || c.TLS.Key == "" {
|
||||
return configError{Field: "tls", Err: errors.New("empty cert or key path")}
|
||||
}
|
||||
// Try loading the cert-key pair here to catch errors early
|
||||
// (e.g. invalid files or insufficient permissions)
|
||||
certPEMBlock, err := os.ReadFile(c.TLS.Cert)
|
||||
if err != nil {
|
||||
return configError{Field: "tls.cert", Err: err}
|
||||
}
|
||||
keyPEMBlock, err := os.ReadFile(c.TLS.Key)
|
||||
if err != nil {
|
||||
return configError{Field: "tls.key", Err: err}
|
||||
}
|
||||
_, err = tls.X509KeyPair(certPEMBlock, keyPEMBlock)
|
||||
if err != nil {
|
||||
return configError{Field: "tls", Err: fmt.Errorf("invalid cert-key pair: %w", err)}
|
||||
}
|
||||
// Use GetCertificate instead of Certificates so that
|
||||
// users can update the cert without restarting the server.
|
||||
hyConfig.TLSConfig.GetCertificate = func(info *tls.ClientHelloInfo) (*tls.Certificate, error) {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"github.com/apernet/quic-go/congestion"
|
||||
)
|
||||
|
||||
const (
|
||||
maxBurstPackets = 10
|
||||
maxBurstPackets = 10
|
||||
maxBurstPacingDelayMultiplier = 4
|
||||
)
|
||||
|
||||
// Pacer implements a token bucket pacing algorithm.
|
||||
@@ -46,12 +46,12 @@ func (p *Pacer) Budget(now time.Time) congestion.ByteCount {
|
||||
if budget < 0 { // protect against overflows
|
||||
budget = congestion.ByteCount(1<<62 - 1)
|
||||
}
|
||||
return minByteCount(p.maxBurstSize(), budget)
|
||||
return min(p.maxBurstSize(), budget)
|
||||
}
|
||||
|
||||
func (p *Pacer) maxBurstSize() congestion.ByteCount {
|
||||
return maxByteCount(
|
||||
congestion.ByteCount((congestion.MinPacingDelay+time.Millisecond).Nanoseconds())*p.getBandwidth()/1e9,
|
||||
return max(
|
||||
congestion.ByteCount((maxBurstPacingDelayMultiplier*congestion.MinPacingDelay).Nanoseconds())*p.getBandwidth()/1e9,
|
||||
maxBurstPackets*p.maxDatagramSize,
|
||||
)
|
||||
}
|
||||
@@ -62,34 +62,18 @@ func (p *Pacer) TimeUntilSend() time.Time {
|
||||
if p.budgetAtLastSent >= p.maxDatagramSize {
|
||||
return time.Time{}
|
||||
}
|
||||
return p.lastSentTime.Add(maxDuration(
|
||||
congestion.MinPacingDelay,
|
||||
time.Duration(math.Ceil(float64(p.maxDatagramSize-p.budgetAtLastSent)*1e9/
|
||||
float64(p.getBandwidth())))*time.Nanosecond,
|
||||
))
|
||||
diff := 1e9 * uint64(p.maxDatagramSize-p.budgetAtLastSent)
|
||||
bw := uint64(p.getBandwidth())
|
||||
// We might need to round up this value.
|
||||
// Otherwise, we might have a budget (slightly) smaller than the datagram size when the timer expires.
|
||||
d := diff / bw
|
||||
// this is effectively a math.Ceil, but using only integer math
|
||||
if diff%bw > 0 {
|
||||
d++
|
||||
}
|
||||
return p.lastSentTime.Add(max(congestion.MinPacingDelay, time.Duration(d)*time.Nanosecond))
|
||||
}
|
||||
|
||||
func (p *Pacer) SetMaxDatagramSize(s congestion.ByteCount) {
|
||||
p.maxDatagramSize = s
|
||||
}
|
||||
|
||||
func maxByteCount(a, b congestion.ByteCount) congestion.ByteCount {
|
||||
if a < b {
|
||||
return b
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
func minByteCount(a, b congestion.ByteCount) congestion.ByteCount {
|
||||
if a < b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func maxDuration(a, b time.Duration) time.Duration {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ define KernelPackage/can
|
||||
KCONFIG:=\
|
||||
CONFIG_CAN=m \
|
||||
CONFIG_CAN_DEV \
|
||||
CONFIG_CAN_NETLINK=y \
|
||||
CONFIG_CAN_CALC_BITTIMING=y \
|
||||
CONFIG_CAN_LEDS=y \
|
||||
CONFIG_CAN_AT91=n \
|
||||
@@ -119,7 +120,9 @@ $(eval $(call KernelPackage,can-c-can-platform))
|
||||
define KernelPackage/can-flexcan
|
||||
TITLE:=Support for Freescale FLEXCAN based chips
|
||||
KCONFIG:=CONFIG_CAN_FLEXCAN
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/flexcan.ko
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/net/can/flexcan.ko@lt5.17 \
|
||||
$(LINUX_DIR)/drivers/net/can/flexcan/flexcan.ko@ge5.17
|
||||
AUTOLOAD:=$(call AutoProbe,flexcan)
|
||||
$(call AddDepends/can,@TARGET_imx)
|
||||
endef
|
||||
@@ -182,7 +185,9 @@ $(eval $(call KernelPackage,can-raw))
|
||||
define KernelPackage/can-slcan
|
||||
TITLE:=Serial / USB serial CAN Adaptors (slcan)
|
||||
KCONFIG:=CONFIG_CAN_SLCAN
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/slcan.ko
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/net/can/slcan.ko@lt6.0 \
|
||||
$(LINUX_DIR)/drivers/net/can/slcan/slcan.ko@ge6.0
|
||||
AUTOLOAD:=$(call AutoProbe,slcan)
|
||||
$(call AddDepends/can)
|
||||
endef
|
||||
|
||||
@@ -289,8 +289,12 @@ $(eval $(call KernelPackage,crypto-xcbc))
|
||||
|
||||
define KernelPackage/crypto-gf128
|
||||
TITLE:=GF(2^128) multiplication functions CryptoAPI module
|
||||
KCONFIG:=CONFIG_CRYPTO_GF128MUL
|
||||
FILES:=$(LINUX_DIR)/crypto/gf128mul.ko
|
||||
KCONFIG:= \
|
||||
CONFIG_CRYPTO_GF128MUL \
|
||||
CONFIG_CRYPTO_LIB_GF128MUL
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/crypto/gf128mul.ko@lt6.2 \
|
||||
$(LINUX_DIR)/lib/crypto/gf128mul.ko@ge6.2
|
||||
AUTOLOAD:=$(call AutoLoad,09,gf128mul)
|
||||
$(call AddDepends/crypto)
|
||||
endef
|
||||
@@ -314,7 +318,8 @@ define KernelPackage/crypto-ghash/arm-ce
|
||||
AUTOLOAD+=$(call AutoLoad,09,ghash-arm-ce)
|
||||
endef
|
||||
|
||||
KernelPackage/crypto-ghash/imx=$(KernelPackage/crypto-ghash/arm-ce)
|
||||
KernelPackage/crypto-ghash/imx/cortexa7=$(KernelPackage/crypto-ghash/arm-ce)
|
||||
KernelPackage/crypto-ghash/imx/cortexa9=$(KernelPackage/crypto-ghash/arm-ce)
|
||||
KernelPackage/crypto-ghash/ipq40xx=$(KernelPackage/crypto-ghash/arm-ce)
|
||||
KernelPackage/crypto-ghash/mvebu/cortexa9=$(KernelPackage/crypto-ghash/arm-ce)
|
||||
|
||||
@@ -924,7 +929,8 @@ define KernelPackage/crypto-sha1/aarch64-ce
|
||||
AUTOLOAD+=$(call AutoLoad,09,sha1-ce)
|
||||
endef
|
||||
|
||||
KernelPackage/crypto-sha1/imx=$(KernelPackage/crypto-sha1/arm-neon)
|
||||
KernelPackage/crypto-sha1/imx/cortexa7=$(KernelPackage/crypto-sha1/arm-neon)
|
||||
KernelPackage/crypto-sha1/imx/cortexa9=$(KernelPackage/crypto-sha1/arm-neon)
|
||||
KernelPackage/crypto-sha1/ipq40xx=$(KernelPackage/crypto-sha1/arm-neon)
|
||||
KernelPackage/crypto-sha1/mediatek/filogic=$(KernelPackage/crypto-sha1/aarch64-ce)
|
||||
KernelPackage/crypto-sha1/mediatek/mt7622=$(KernelPackage/crypto-sha1/aarch64-ce)
|
||||
@@ -1057,7 +1063,8 @@ define KernelPackage/crypto-sha512/aarch64
|
||||
AUTOLOAD+=$(call AutoLoad,09,sha512-arm64)
|
||||
endef
|
||||
|
||||
KernelPackage/crypto-sha512/imx=$(KernelPackage/crypto-sha512/arm)
|
||||
KernelPackage/crypto-sha512/imx/cortexa7=$(KernelPackage/crypto-sha512/arm)
|
||||
KernelPackage/crypto-sha512/imx/cortexa9=$(KernelPackage/crypto-sha512/arm)
|
||||
KernelPackage/crypto-sha512/ipq40xx=$(KernelPackage/crypto-sha512/arm)
|
||||
KernelPackage/crypto-sha512/mvebu/cortexa9=$(KernelPackage/crypto-sha512/arm)
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ define KernelPackage/hwmon-coretemp
|
||||
KCONFIG:=CONFIG_SENSORS_CORETEMP
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/coretemp.ko
|
||||
AUTOLOAD:=$(call AutoProbe,coretemp)
|
||||
$(call AddDepends/hwmon,)
|
||||
$(call AddDepends/hwmon,@TARGET_x86)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-coretemp/description
|
||||
@@ -572,6 +572,21 @@ endef
|
||||
$(eval $(call KernelPackage,hwmon-sht3x))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-tc654
|
||||
TITLE:=TC654 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_TC654
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/tc654.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,tc654)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-tc654/description
|
||||
Kernel module for Microchip TC654/TC655 and compatibles
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-tc654))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-tmp102
|
||||
TITLE:=Texas Instruments TMP102 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_TMP102
|
||||
|
||||
@@ -365,7 +365,7 @@ define KernelPackage/phy-smsc
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=SMSC PHY driver
|
||||
KCONFIG:=CONFIG_SMSC_PHY
|
||||
DEPENDS:=+kmod-libphy
|
||||
DEPENDS:=+kmod-libphy +LINUX_6_6:kmod-lib-crc16
|
||||
FILES:=$(LINUX_DIR)/drivers/net/phy/smsc.ko
|
||||
AUTOLOAD:=$(call AutoProbe,smsc)
|
||||
endef
|
||||
|
||||
@@ -282,15 +282,11 @@ define KernelPackage/drm
|
||||
HIDDEN:=1
|
||||
DEPENDS:=+kmod-dma-buf +kmod-i2c-core +kmod-backlight \
|
||||
+(LINUX_5_15||LINUX_6_1||LINUX_6_6):kmod-fb
|
||||
KCONFIG:=CONFIG_DRM \
|
||||
CONFIG_DRM_EXEC@ge6.6 \
|
||||
CONFIG_DRM_SUBALLOC_HELPER@ge6.4
|
||||
KCONFIG:=CONFIG_DRM
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/drm.ko \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/drm_panel_orientation_quirks.ko \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/drm_exec.ko@ge6.6 \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/drm_suballoc_helper.ko@ge6.4
|
||||
AUTOLOAD:=$(call AutoLoad,05,drm_exec@ge6.6 drm_suballoc_helper@ge6.4 drm)
|
||||
$(LINUX_DIR)/drivers/gpu/drm/drm_panel_orientation_quirks.ko
|
||||
AUTOLOAD:=$(call AutoLoad,05,drm)
|
||||
endef
|
||||
|
||||
define KernelPackage/drm/description
|
||||
@@ -329,6 +325,22 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,drm-display-helper))
|
||||
|
||||
define KernelPackage/drm-exec
|
||||
SUBMENU:=$(VIDEO_MENU)
|
||||
HIDDEN:=1
|
||||
TITLE:=Execution context for command submissions
|
||||
DEPENDS:=@DISPLAY_SUPPORT +kmod-drm @LINUX_6_6
|
||||
KCONFIG:=CONFIG_DRM_EXEC
|
||||
FILES:=$(LINUX_DIR)/drivers/gpu/drm/drm_exec.ko
|
||||
AUTOLOAD:=$(call AutoProbe,drm_exec)
|
||||
endef
|
||||
|
||||
define KernelPackage/drm-exec/description
|
||||
Execution context for command submissions.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,drm-exec))
|
||||
|
||||
define KernelPackage/drm-ttm
|
||||
SUBMENU:=$(VIDEO_MENU)
|
||||
TITLE:=GPU memory management subsystem
|
||||
@@ -377,12 +389,29 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,drm-kms-helper))
|
||||
|
||||
define KernelPackage/drm-suballoc-helper
|
||||
SUBMENU:=$(VIDEO_MENU)
|
||||
HIDDEN:=1
|
||||
TITLE:=DRM suballocation helper
|
||||
DEPENDS:=@DISPLAY_SUPPORT +kmod-drm @LINUX_6_6
|
||||
KCONFIG:=CONFIG_DRM_SUBALLOC_HELPER
|
||||
FILES:=$(LINUX_DIR)/drivers/gpu/drm/drm_suballoc_helper.ko
|
||||
AUTOLOAD:=$(call AutoProbe,drm_suballoc_helper)
|
||||
endef
|
||||
|
||||
define KernelPackage/drm-suballoc-helper/description
|
||||
DRM suballocation helper.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,drm-suballoc-helper))
|
||||
|
||||
define KernelPackage/drm-amdgpu
|
||||
SUBMENU:=$(VIDEO_MENU)
|
||||
TITLE:=AMDGPU DRM support
|
||||
DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-ttm \
|
||||
+kmod-drm-ttm-helper +kmod-drm-kms-helper +kmod-i2c-algo-bit +amdgpu-firmware \
|
||||
+kmod-drm-display-helper +kmod-drm-buddy +kmod-acpi-video
|
||||
+kmod-drm-display-helper +kmod-drm-buddy +kmod-acpi-video \
|
||||
+LINUX_6_6:kmod-drm-exec +LINUX_6_6:kmod-drm-suballoc-helper
|
||||
KCONFIG:=CONFIG_DRM_AMDGPU \
|
||||
CONFIG_DRM_AMDGPU_SI=y \
|
||||
CONFIG_DRM_AMDGPU_CIK=y \
|
||||
@@ -514,7 +543,8 @@ define KernelPackage/drm-radeon
|
||||
TITLE:=Radeon DRM support
|
||||
DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-kms-helper \
|
||||
+kmod-drm-ttm +kmod-drm-ttm-helper +kmod-i2c-algo-bit +radeon-firmware \
|
||||
+kmod-drm-display-helper +(LINUX_6_1||LINUX_6_6):kmod-acpi-video
|
||||
+kmod-drm-display-helper +(LINUX_6_1||LINUX_6_6):kmod-acpi-video \
|
||||
+LINUX_6_6:kmod-drm-suballoc-helper
|
||||
KCONFIG:=CONFIG_DRM_RADEON
|
||||
FILES:=$(LINUX_DIR)/drivers/gpu/drm/radeon/radeon.ko
|
||||
AUTOLOAD:=$(call AutoProbe,radeon)
|
||||
@@ -625,7 +655,7 @@ $(eval $(call KernelPackage,video-videobuf2))
|
||||
|
||||
define KernelPackage/video-cpia2
|
||||
TITLE:=CPIA2 video driver
|
||||
DEPENDS:=@USB_SUPPORT +kmod-usb-core
|
||||
DEPENDS:=@USB_SUPPORT +kmod-usb-core @LINUX_5_15
|
||||
KCONFIG:=CONFIG_VIDEO_CPIA2
|
||||
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/cpia2/cpia2.ko
|
||||
AUTOLOAD:=$(call AutoProbe,cpia2)
|
||||
@@ -1251,7 +1281,7 @@ $(eval $(call KernelPackage,video-dma))
|
||||
|
||||
define KernelPackage/video-coda
|
||||
TITLE:=i.MX VPU support
|
||||
DEPENDS:=@(TARGET_imx&&!TARGET_imx_cortexa7) +kmod-video-mem2mem +kmod-video-dma
|
||||
DEPENDS:=@(TARGET_imx&&TARGET_imx_cortexa9) +kmod-video-mem2mem +kmod-video-dma
|
||||
KCONFIG:= \
|
||||
CONFIG_VIDEO_CODA \
|
||||
CONFIG_VIDEO_IMX_VDOA
|
||||
|
||||
@@ -22,6 +22,7 @@ define KernelPackage/kvm-x86
|
||||
KCONFIG:=\
|
||||
CONFIG_KVM \
|
||||
CONFIG_KVM_MMU_AUDIT=n \
|
||||
CONFIG_KVM_SMM=y@ge6.6 \
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm.ko
|
||||
AUTOLOAD:=$(call AutoProbe,kvm.ko)
|
||||
@@ -85,7 +86,7 @@ define KernelPackage/vfio
|
||||
MODPARAMS.vfio:=enable_unsafe_noiommu_mode=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/vfio/vfio.ko \
|
||||
$(LINUX_DIR)/drivers/vfio/vfio_virqfd.ko \
|
||||
$(LINUX_DIR)/drivers/vfio/vfio_virqfd.ko@lt6.2 \
|
||||
$(LINUX_DIR)/drivers/vfio/vfio_iommu_type1.ko
|
||||
AUTOLOAD:=$(call AutoProbe,vfio vfio_iommu_type1 vfio_virqfd)
|
||||
endef
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
::sysinit:/etc/init.d/rcS S boot
|
||||
::shutdown:/etc/init.d/rcS K shutdown
|
||||
::askconsole:/usr/libexec/login.sh
|
||||
tty1::askfirst:/usr/libexec/login.sh
|
||||
@@ -7,7 +7,7 @@ define Device/advantech_rsb4810
|
||||
DEVICE_MODEL := RSB4810
|
||||
SOC := rk3568
|
||||
UBOOT_DEVICE_NAME := advantech-rsb4810-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-ata-ahci kmod-ata-ahci-platform -urngd
|
||||
endef
|
||||
TARGET_DEVICES += advantech_rsb4810
|
||||
@@ -17,8 +17,8 @@ define Device/ariaboard_photonicat
|
||||
DEVICE_MODEL := Photonicat
|
||||
SOC := rk3568
|
||||
UBOOT_DEVICE_NAME := photonicat-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := photonicat-firmware kmod-ath10k kmod-ath10k-sdio pcat-manager wpad
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script vop | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := photonicat-firmware kmod-drm-rockchip kmod-ath10k kmod-ath10k-sdio pcat-manager wpad
|
||||
endef
|
||||
TARGET_DEVICES += ariaboard_photonicat
|
||||
|
||||
@@ -47,8 +47,8 @@ define Device/ezpro_mrkaio-m68s
|
||||
DEVICE_MODEL := Mrkaio M68S
|
||||
SOC := rk3568
|
||||
UBOOT_DEVICE_NAME := mrkaio-m68s-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-ata-ahci kmod-ata-ahci-platform
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script vop | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-ata-ahci kmod-ata-ahci-platform kmod-drm-rockchip
|
||||
endef
|
||||
TARGET_DEVICES += ezpro_mrkaio-m68s
|
||||
|
||||
@@ -57,8 +57,8 @@ define Device/ezpro_mrkaio-m68s-plus
|
||||
DEVICE_MODEL := Mrkaio M68S PLUS
|
||||
SOC := rk3568
|
||||
UBOOT_DEVICE_NAME := mrkaio-m68s-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-r8125 kmod-ata-ahci kmod-ata-ahci-platform kmod-nvme kmod-scsi-core
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script vop | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-r8125 kmod-ata-ahci kmod-ata-ahci-platform kmod-drm-rockchip
|
||||
endef
|
||||
TARGET_DEVICES += ezpro_mrkaio-m68s-plus
|
||||
|
||||
@@ -66,7 +66,7 @@ define Device/fastrhino_common
|
||||
DEVICE_VENDOR := FastRhino
|
||||
SOC := rk3568
|
||||
UBOOT_DEVICE_NAME := r66s-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-r8125
|
||||
endef
|
||||
|
||||
@@ -87,7 +87,7 @@ define Device/friendlyarm_nanopi-neo3
|
||||
DEVICE_MODEL := NanoPi NEO3
|
||||
SOC := rk3328
|
||||
UBOOT_DEVICE_NAME := nanopi-r2s-rk3328
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r2s | pine64-bin | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-bin | gzip | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-neo3
|
||||
|
||||
@@ -96,7 +96,7 @@ define Device/friendlyarm_nanopi-r2c
|
||||
DEVICE_MODEL := NanoPi R2C
|
||||
SOC := rk3328
|
||||
UBOOT_DEVICE_NAME := nanopi-r2c-rk3328
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r2s | pine64-bin | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-bin | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-usb-net-rtl8152
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r2c
|
||||
@@ -106,7 +106,7 @@ define Device/friendlyarm_nanopi-r2s
|
||||
DEVICE_MODEL := NanoPi R2S
|
||||
SOC := rk3328
|
||||
UBOOT_DEVICE_NAME := nanopi-r2s-rk3328
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r2s | pine64-bin | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-bin | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-usb-net-rtl8152
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r2s
|
||||
@@ -116,7 +116,7 @@ define Device/friendlyarm_nanopi-r4s
|
||||
DEVICE_MODEL := NanoPi R4S
|
||||
SOC := rk3399
|
||||
UBOOT_DEVICE_NAME := nanopi-r4s-rk3399
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r4s | pine64-bin | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-bin | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-r8168 -urngd
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r4s
|
||||
@@ -126,7 +126,7 @@ define Device/friendlyarm_nanopi-r4se
|
||||
DEVICE_MODEL := NanoPi R4SE
|
||||
SOC := rk3399
|
||||
UBOOT_DEVICE_NAME := nanopi-r4se-rk3399
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r4s | pine64-bin | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-bin | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-r8168 -urngd
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r4se
|
||||
@@ -136,7 +136,7 @@ define Device/friendlyarm_nanopi-r5c
|
||||
DEVICE_MODEL := NanoPi R5C
|
||||
SOC := rk3568
|
||||
UBOOT_DEVICE_NAME := nanopi-r5s-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-r8125 kmod-nvme kmod-scsi-core
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r5c
|
||||
@@ -146,7 +146,7 @@ define Device/friendlyarm_nanopi-r5s
|
||||
DEVICE_MODEL := NanoPi R5S
|
||||
SOC := rk3568
|
||||
UBOOT_DEVICE_NAME := nanopi-r5s-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-r8125 kmod-nvme kmod-scsi-core
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r5s
|
||||
@@ -156,7 +156,7 @@ define Device/firefly_station-p2
|
||||
DEVICE_MODEL := Station P2
|
||||
DEVICE_DTS := rockchip/rk3568-roc-pc
|
||||
UBOOT_DEVICE_NAME := station-p2-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-brcmfmac kmod-ikconfig kmod-ata-ahci-platform station-p2-firmware wpad-openssl
|
||||
endef
|
||||
TARGET_DEVICES += firefly_station-p2
|
||||
@@ -164,8 +164,8 @@ TARGET_DEVICES += firefly_station-p2
|
||||
define Device/hinlink_common
|
||||
DEVICE_VENDOR := HINLINK
|
||||
UBOOT_DEVICE_NAME := opc-h68k-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-ata-ahci-platform kmod-hwmon-pwmfan kmod-mt7921e kmod-r8125 wpad-openssl
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script vop | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-ata-ahci-platform kmod-drm-rockchip kmod-hwmon-pwmfan kmod-mt7921e kmod-r8125 wpad-openssl
|
||||
endef
|
||||
|
||||
define Device/hinlink_opc-h66k
|
||||
@@ -195,8 +195,8 @@ define Device/lyt_t68m
|
||||
DEVICE_MODEL := T68M
|
||||
SOC := rk3568
|
||||
UBOOT_DEVICE_NAME := lyt-t68m-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-mt7921e kmod-r8125 wpad-openssl uboot-envtools
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script vop | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-drm-rockchip kmod-mt7921e kmod-r8125 wpad-openssl uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += lyt_t68m
|
||||
|
||||
@@ -205,7 +205,7 @@ define Device/panther_x2
|
||||
DEVICE_MODEL := X2
|
||||
DEVICE_DTS := rockchip/rk3566-panther-x2
|
||||
UBOOT_DEVICE_NAME := panther-x2-rk3566
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-brcmfmac kmod-ikconfig panther-x2-firmware wpad-openssl
|
||||
endef
|
||||
TARGET_DEVICES += panther_x2
|
||||
@@ -225,7 +225,7 @@ define Device/radxa_e25
|
||||
DEVICE_MODEL := E25
|
||||
DEVICE_DTS := rockchip/rk3568-radxa-e25
|
||||
UBOOT_DEVICE_NAME := radxa-e25-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-ata-ahci-platform kmod-r8125
|
||||
endef
|
||||
TARGET_DEVICES += radxa_e25
|
||||
@@ -236,7 +236,7 @@ define Device/radxa_rock-3a
|
||||
SOC := rk3568
|
||||
SUPPORTED_DEVICES := radxa,rock3a
|
||||
UBOOT_DEVICE_NAME := rock-3a-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += radxa_rock-3a
|
||||
|
||||
@@ -256,7 +256,7 @@ define Device/rongpin_king3399
|
||||
DEVICE_MODEL := King3399
|
||||
SOC := rk3399
|
||||
UBOOT_DEVICE_NAME := rongpin-king3399-rk3399
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r4s | pine64-bin | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-bin | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-r8168 -urngd kmod-brcmfmac cypress-firmware-4356-sdio rongpin-king3399-firmware wpad-openssl
|
||||
endef
|
||||
TARGET_DEVICES += rongpin_king3399
|
||||
@@ -277,7 +277,7 @@ define Device/seewo_sv21-rk3568
|
||||
DEVICE_MODEL := sv21
|
||||
DEVICE_DTS := rockchip/rk3568-seewo-sv21
|
||||
UBOOT_DEVICE_NAME := seewo-sv21-rk3568
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-usb-net-rtl8152 kmod-ata-ahci kmod-ata-ahci-platform
|
||||
endef
|
||||
TARGET_DEVICES += seewo_sv21-rk3568
|
||||
@@ -287,7 +287,7 @@ define Device/sharevdi_h3399pc
|
||||
DEVICE_MODEL := H3399PC
|
||||
SOC := rk3399
|
||||
UBOOT_DEVICE_NAME := sharevdi-h3399pc-rk3399
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r4s | pine64-bin | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-bin | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-r8168 -urngd
|
||||
endef
|
||||
TARGET_DEVICES += sharevdi_h3399pc
|
||||
@@ -297,7 +297,7 @@ define Device/sharevdi_guangmiao-g4c
|
||||
DEVICE_MODEL := GuangMiao G4C
|
||||
SOC := rk3399
|
||||
UBOOT_DEVICE_NAME := guangmiao-g4c-rk3399
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r4s | pine64-img | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-r8168 -urngd
|
||||
endef
|
||||
TARGET_DEVICES += sharevdi_guangmiao-g4c
|
||||
@@ -307,7 +307,7 @@ define Device/xunlong_orangepi-r1-plus
|
||||
DEVICE_MODEL := Orange Pi R1 Plus
|
||||
SOC := rk3328
|
||||
UBOOT_DEVICE_NAME := orangepi-r1-plus-rk3328
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r2s | pine64-bin | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-bin | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-usb-net-rtl8152
|
||||
endef
|
||||
TARGET_DEVICES += xunlong_orangepi-r1-plus
|
||||
@@ -317,7 +317,7 @@ define Device/xunlong_orangepi-r1-plus-lts
|
||||
DEVICE_MODEL := Orange Pi R1 Plus LTS
|
||||
SOC := rk3328
|
||||
UBOOT_DEVICE_NAME := orangepi-r1-plus-lts-rk3328
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r2s | pine64-bin | gzip | append-metadata
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-bin | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-usb-net-rtl8152
|
||||
endef
|
||||
TARGET_DEVICES += xunlong_orangepi-r1-plus-lts
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
part uuid mmc ${devnum}:2 uuid
|
||||
|
||||
setenv bootargs "console=ttyS2,1500000 console=tty1 earlycon=uart8250,mmio32,0xff1a0000 root=PARTUUID=${uuid} rw rootwait"
|
||||
if test $stdout = 'serial@fe660000' ;
|
||||
then serial_addr=',0xfe660000';
|
||||
elif test $stdout = 'serial@ff130000' ;
|
||||
then serial_addr=',0xff130000';
|
||||
elif test $stdout = 'serial@ff1a0000' ;
|
||||
then serial_addr=',0xff1a0000';
|
||||
fi;
|
||||
|
||||
setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32${serial_addr} root=PARTUUID=${uuid} rw rootwait";
|
||||
|
||||
load mmc ${devnum}:1 ${fdt_addr_r} rockchip.dtb
|
||||
load mmc ${devnum}:1 ${kernel_addr_r} kernel.img
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
part uuid mmc ${devnum}:2 uuid
|
||||
|
||||
setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32,0xff130000 root=PARTUUID=${uuid} rw rootwait"
|
||||
|
||||
load mmc ${devnum}:1 ${fdt_addr_r} rockchip.dtb
|
||||
load mmc ${devnum}:1 ${kernel_addr_r} kernel.img
|
||||
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
@@ -1,8 +0,0 @@
|
||||
part uuid mmc ${devnum}:2 uuid
|
||||
|
||||
setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32,0xff1a0000 root=PARTUUID=${uuid} rw rootwait"
|
||||
|
||||
load mmc ${devnum}:1 ${fdt_addr_r} rockchip.dtb
|
||||
load mmc ${devnum}:1 ${kernel_addr_r} kernel.img
|
||||
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
@@ -1,8 +0,0 @@
|
||||
part uuid mmc ${devnum}:2 uuid
|
||||
|
||||
setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32,0xfe660000 root=PARTUUID=${uuid} rw rootwait"
|
||||
|
||||
load mmc ${devnum}:1 ${fdt_addr_r} rockchip.dtb
|
||||
load mmc ${devnum}:1 ${kernel_addr_r} kernel.img
|
||||
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
@@ -0,0 +1,16 @@
|
||||
part uuid mmc ${devnum}:2 uuid
|
||||
|
||||
if test $stdout = 'serial@fe660000' ;
|
||||
then serial_addr=',0xfe660000';
|
||||
elif test $stdout = 'serial@ff130000' ;
|
||||
then serial_addr=',0xff130000';
|
||||
elif test $stdout = 'serial@ff1a0000' ;
|
||||
then serial_addr=',0xff1a0000';
|
||||
fi;
|
||||
|
||||
setenv bootargs "console=ttyS2,1500000 console=tty1 earlycon=uart8250,mmio32${serial_addr} root=PARTUUID=${uuid} rw rootwait";
|
||||
|
||||
load mmc ${devnum}:1 ${fdt_addr_r} rockchip.dtb
|
||||
load mmc ${devnum}:1 ${kernel_addr_r} kernel.img
|
||||
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
@@ -6,7 +6,7 @@ define KernelPackage/drm-rockchip
|
||||
SUBMENU:=$(VIDEO_MENU)
|
||||
TITLE:=Rockchip DRM support
|
||||
DEPENDS:=@TARGET_rockchip +kmod-backlight +kmod-drm-kms-helper \
|
||||
+kmod-multimedia-input +LINUX_6_1:kmod-drm-display-helper
|
||||
+kmod-multimedia-input +(LINUX_6_1||LINUX_6_6):kmod-drm-display-helper
|
||||
KCONFIG:= \
|
||||
CONFIG_DRM_ROCKCHIP \
|
||||
CONFIG_DRM_LOAD_EDID_FIRMWARE=y \
|
||||
@@ -42,7 +42,7 @@ define KernelPackage/drm-rockchip
|
||||
$(LINUX_DIR)/drivers/gpu/drm/panel/panel-simple.ko \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/rockchip/rockchipdrm.ko \
|
||||
$(LINUX_DIR)/drivers/media/cec/core/cec.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rockchipdrm phy-rockchip-inno-hdmi dw-hdmi-cec)
|
||||
AUTOLOAD:=$(call AutoProbe,dw-hdmi-cec phy-rockchip-inno-hdmi rockchipdrm,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/drm-rockchip/description
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-amlogic
|
||||
PKG_VERSION:=3.1.229
|
||||
PKG_VERSION:=3.1.230
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0 License
|
||||
|
||||
@@ -264,7 +264,13 @@ done
|
||||
# you can change ROOT size(MB) >= 320
|
||||
ROOT1="960"
|
||||
ROOT2="960"
|
||||
if [[ "${AMLOGIC_SOC}" == "s912" || "${AMLOGIC_SOC}" == "s905d" ]]; then
|
||||
if [[ "${AMLOGIC_SOC}" == "s912" ]] && [[ "${boxtype}" == "213" || "${boxtype}" == "2e" ]]; then
|
||||
BOOT="512"
|
||||
BLANK1="700"
|
||||
BLANK2="220"
|
||||
BLANK3="0"
|
||||
BLANK4="0"
|
||||
elif [[ "${AMLOGIC_SOC}" == "s912" || "${AMLOGIC_SOC}" == "s905d" ]]; then
|
||||
BOOT="512"
|
||||
BLANK1="68"
|
||||
BLANK2="220"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=4.76-4
|
||||
PKG_VERSION:=4.76-5
|
||||
PKG_RELEASE:=
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -1282,7 +1282,7 @@ function gen_config(var)
|
||||
tag = "fragment",
|
||||
settings = {
|
||||
domainStrategy = (direct_dns_query_strategy and direct_dns_query_strategy ~= "") and direct_dns_query_strategy or "UseIP",
|
||||
fragments = {
|
||||
fragment = {
|
||||
packets = (xray_settings.fragment_packets and xray_settings.fragment_packets ~= "") and xray_settings.fragment_packets,
|
||||
length = (xray_settings.fragment_length and xray_settings.fragment_length ~= "") and xray_settings.fragment_length,
|
||||
interval = (xray_settings.fragment_interval and xray_settings.fragment_interval ~= "") and xray_settings.fragment_interval
|
||||
|
||||
@@ -1256,7 +1256,7 @@ start_dns() {
|
||||
|
||||
[ "$CHINADNS_NG" = "1" ] && [ -n "$(first_type chinadns-ng)" ] && ([ "${CHN_LIST}" = "direct" ] || [ "${USE_GFW_LIST}" = "1" ]) && {
|
||||
[ "$FILTER_PROXY_IPV6" = "1" ] && {
|
||||
local _no_ipv6_rules="gt"
|
||||
local _no_ipv6_rules="tag:gfw"
|
||||
FILTER_PROXY_IPV6=0
|
||||
}
|
||||
local china_ng_listen_port=$(expr $dns_listen_port + 1)
|
||||
@@ -1419,7 +1419,7 @@ acl_app() {
|
||||
|
||||
[ "$chinadns_ng" = "1" ] && [ -n "$(first_type chinadns-ng)" ] && ([ "${chn_list}" = "direct" ] || [ "${use_gfw_list}" = "1" ]) && {
|
||||
[ "$filter_proxy_ipv6" = "1" ] && {
|
||||
local _no_ipv6_rules="gt"
|
||||
local _no_ipv6_rules="tag:gfw"
|
||||
filter_proxy_ipv6=0
|
||||
}
|
||||
chinadns_port=$(expr $chinadns_port + 1)
|
||||
|
||||
@@ -19,7 +19,7 @@ local geoip_update = 0
|
||||
local geosite_update = 0
|
||||
|
||||
-- match comments/title/whitelist/ip address/excluded_domain
|
||||
local comment_pattern = "^[!\\[@]+"
|
||||
local comment_pattern = "^[#!\\[@]+"
|
||||
local ip_pattern = "^%d+%.%d+%.%d+%.%d+"
|
||||
local ip4_ipset_pattern = "^%d+%.%d+%.%d+%.%d+[%/][%d]+$"
|
||||
local ip6_ipset_pattern = ":-[%x]+%:+[%x]-[%/][%d]+$"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall2
|
||||
PKG_VERSION:=1.28-6
|
||||
PKG_VERSION:=1.28-7
|
||||
PKG_RELEASE:=
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -1421,7 +1421,7 @@ function gen_config(var)
|
||||
tag = "fragment",
|
||||
settings = {
|
||||
domainStrategy = (direct_dns_query_strategy and direct_dns_query_strategy ~= "") and direct_dns_query_strategy or "UseIP",
|
||||
fragments = {
|
||||
fragment = {
|
||||
packets = (xray_settings.fragment_packets and xray_settings.fragment_packets ~= "") and xray_settings.fragment_packets,
|
||||
length = (xray_settings.fragment_length and xray_settings.fragment_length ~= "") and xray_settings.fragment_length,
|
||||
interval = (xray_settings.fragment_interval and xray_settings.fragment_interval ~= "") and xray_settings.fragment_interval
|
||||
|
||||
@@ -245,9 +245,9 @@ namespace Ryujinx.Input.HLE
|
||||
{
|
||||
if (config is StandardControllerInputConfig controllerConfig)
|
||||
{
|
||||
bool needsMotionInputUpdate = _config == null || (_config is StandardControllerInputConfig oldControllerConfig &&
|
||||
(oldControllerConfig.Motion.EnableMotion != controllerConfig.Motion.EnableMotion) &&
|
||||
(oldControllerConfig.Motion.MotionBackend != controllerConfig.Motion.MotionBackend));
|
||||
bool needsMotionInputUpdate = _config is not StandardControllerInputConfig oldControllerConfig ||
|
||||
((oldControllerConfig.Motion.EnableMotion != controllerConfig.Motion.EnableMotion) &&
|
||||
(oldControllerConfig.Motion.MotionBackend != controllerConfig.Motion.MotionBackend));
|
||||
|
||||
if (needsMotionInputUpdate)
|
||||
{
|
||||
|
||||
@@ -23,6 +23,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- if: ${{ runner.os == 'Windows' }}
|
||||
uses: ilammy/setup-nasm@v1
|
||||
- name: Install Rust
|
||||
run: |
|
||||
rustup set profile minimal
|
||||
|
||||
@@ -23,6 +23,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- if: ${{ runner.os == 'Windows' }}
|
||||
uses: ilammy/setup-nasm@v1
|
||||
- name: Install Rust
|
||||
run: |
|
||||
rustup set profile minimal
|
||||
|
||||
@@ -106,6 +106,7 @@ jobs:
|
||||
RUST_BACKTRACE: full
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ilammy/setup-nasm@v1
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
|
||||
@@ -133,6 +133,7 @@ jobs:
|
||||
RUST_BACKTRACE: full
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ilammy/setup-nasm@v1
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
|
||||
@@ -23,6 +23,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- if: ${{ runner.os == 'Windows' }}
|
||||
uses: ilammy/setup-nasm@v1
|
||||
- name: Install Rust
|
||||
run: |
|
||||
rustup set profile minimal
|
||||
|
||||
Generated
+186
-11
@@ -165,9 +165,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
|
||||
|
||||
[[package]]
|
||||
name = "async-trait"
|
||||
version = "0.1.79"
|
||||
version = "0.1.80"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681"
|
||||
checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -180,6 +180,32 @@ version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
|
||||
|
||||
[[package]]
|
||||
name = "aws-lc-rs"
|
||||
version = "1.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f379c4e505c0692333bd90a334baa234990faa06bdabefd3261f765946aa920"
|
||||
dependencies = [
|
||||
"aws-lc-sys",
|
||||
"mirai-annotations",
|
||||
"paste",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-lc-sys"
|
||||
version = "0.14.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68aa3d613f42dbf301dbbcaf3dc260805fd33ffd95f6d290ad7231a9e5d877a7"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"cmake",
|
||||
"dunce",
|
||||
"fs_extra",
|
||||
"libc",
|
||||
"paste",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.71"
|
||||
@@ -219,6 +245,29 @@ version = "1.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
|
||||
|
||||
[[package]]
|
||||
name = "bindgen"
|
||||
version = "0.69.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0"
|
||||
dependencies = [
|
||||
"bitflags 2.5.0",
|
||||
"cexpr",
|
||||
"clang-sys",
|
||||
"itertools",
|
||||
"lazy_static",
|
||||
"lazycell",
|
||||
"log",
|
||||
"prettyplease",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"regex",
|
||||
"rustc-hash",
|
||||
"shlex",
|
||||
"syn 2.0.57",
|
||||
"which",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bit-vec"
|
||||
version = "0.6.3"
|
||||
@@ -359,6 +408,15 @@ dependencies = [
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cexpr"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
|
||||
dependencies = [
|
||||
"nom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.0"
|
||||
@@ -418,6 +476,17 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clang-sys"
|
||||
version = "1.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1"
|
||||
dependencies = [
|
||||
"glob",
|
||||
"libc",
|
||||
"libloading",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.4.18"
|
||||
@@ -678,6 +747,12 @@ dependencies = [
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dunce"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b"
|
||||
|
||||
[[package]]
|
||||
name = "ecdsa"
|
||||
version = "0.16.9"
|
||||
@@ -875,6 +950,12 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fs_extra"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
|
||||
|
||||
[[package]]
|
||||
name = "fsevent-sys"
|
||||
version = "4.1.0"
|
||||
@@ -1022,6 +1103,12 @@ version = "0.28.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
|
||||
|
||||
[[package]]
|
||||
name = "glob"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||
|
||||
[[package]]
|
||||
name = "group"
|
||||
version = "0.13.0"
|
||||
@@ -1219,6 +1306,15 @@ dependencies = [
|
||||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "home"
|
||||
version = "0.5.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
|
||||
dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hostname"
|
||||
version = "0.3.1"
|
||||
@@ -1295,9 +1391,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
|
||||
|
||||
[[package]]
|
||||
name = "hyper"
|
||||
version = "1.2.0"
|
||||
version = "1.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a"
|
||||
checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"futures-channel",
|
||||
@@ -1581,6 +1677,12 @@ version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "lazycell"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.153"
|
||||
@@ -1750,6 +1852,12 @@ version = "0.3.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
||||
|
||||
[[package]]
|
||||
name = "minimal-lexical"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.7.2"
|
||||
@@ -1771,6 +1879,12 @@ dependencies = [
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mirai-annotations"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1"
|
||||
|
||||
[[package]]
|
||||
name = "multimap"
|
||||
version = "0.8.3"
|
||||
@@ -1807,6 +1921,16 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "7.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"minimal-lexical",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "notify"
|
||||
version = "6.1.1"
|
||||
@@ -2035,6 +2159,12 @@ dependencies = [
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "paste"
|
||||
version = "1.0.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
|
||||
|
||||
[[package]]
|
||||
name = "percent-encoding"
|
||||
version = "2.3.1"
|
||||
@@ -2655,6 +2785,21 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls"
|
||||
version = "0.23.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8c4d6d8ad9f2492485e13453acbb291dd08f64441b6609c491f1c2cd2c6b4fe1"
|
||||
dependencies = [
|
||||
"aws-lc-rs",
|
||||
"log",
|
||||
"once_cell",
|
||||
"rustls-pki-types",
|
||||
"rustls-webpki 0.102.2",
|
||||
"subtle",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-native-certs"
|
||||
version = "0.6.3"
|
||||
@@ -2721,6 +2866,7 @@ version = "0.102.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610"
|
||||
dependencies = [
|
||||
"aws-lc-rs",
|
||||
"ring 0.17.8",
|
||||
"rustls-pki-types",
|
||||
"untrusted 0.9.0",
|
||||
@@ -3048,7 +3194,7 @@ dependencies = [
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
"tokio-rustls 0.25.0",
|
||||
"tokio-rustls 0.26.0",
|
||||
"tun",
|
||||
"webpki-roots 0.26.1",
|
||||
"windows-sys 0.52.0",
|
||||
@@ -3063,6 +3209,12 @@ dependencies = [
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shlex"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook-registry"
|
||||
version = "1.4.1"
|
||||
@@ -3244,9 +3396,9 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
|
||||
|
||||
[[package]]
|
||||
name = "sysexits"
|
||||
version = "0.7.11"
|
||||
version = "0.7.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1073811f017d0d128952468acaa3af7c71075819c214d08bec5993b0f74cf972"
|
||||
checksum = "7d9178a73d18d8bf05dd9b69526ce446ce71f1fd63c42bf4ae2ce8c1afc67ccb"
|
||||
|
||||
[[package]]
|
||||
name = "system-configuration"
|
||||
@@ -3348,9 +3500,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.34"
|
||||
version = "0.3.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
|
||||
checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
|
||||
dependencies = [
|
||||
"deranged",
|
||||
"itoa",
|
||||
@@ -3371,9 +3523,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
|
||||
|
||||
[[package]]
|
||||
name = "time-macros"
|
||||
version = "0.2.17"
|
||||
version = "0.2.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
|
||||
checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
|
||||
dependencies = [
|
||||
"num-conv",
|
||||
"time-core",
|
||||
@@ -3455,6 +3607,17 @@ dependencies = [
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-rustls"
|
||||
version = "0.26.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
|
||||
dependencies = [
|
||||
"rustls 0.23.4",
|
||||
"rustls-pki-types",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-tfo"
|
||||
version = "0.2.2"
|
||||
@@ -3832,6 +3995,18 @@ dependencies = [
|
||||
"rustls-pki-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "which"
|
||||
version = "4.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
|
||||
dependencies = [
|
||||
"either",
|
||||
"home",
|
||||
"once_cell",
|
||||
"rustix",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "widestring"
|
||||
version = "1.0.2"
|
||||
|
||||
@@ -145,7 +145,7 @@ tokio = { version = "1.5", features = [
|
||||
] }
|
||||
tokio-native-tls = { version = "0.3", optional = true }
|
||||
native-tls = { version = "0.2.8", optional = true, features = ["alpn"] }
|
||||
tokio-rustls = { version = "0.25", optional = true }
|
||||
tokio-rustls = { version = "0.26", optional = true }
|
||||
webpki-roots = { version = "0.26", optional = true }
|
||||
rustls-native-certs = { version = "0.7", optional = true }
|
||||
async-trait = "0.1"
|
||||
@@ -153,7 +153,7 @@ async-trait = "0.1"
|
||||
socket2 = { version = "0.5", features = ["all"] }
|
||||
libc = "0.2.141"
|
||||
|
||||
hyper = { version = "1.2", optional = true, features = ["full"] }
|
||||
hyper = { version = "1.3", optional = true, features = ["full"] }
|
||||
http-body-util = { version = "0.1", optional = true }
|
||||
|
||||
hickory-resolver = { version = "0.24", optional = true, features = [
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=4.76-4
|
||||
PKG_VERSION:=4.76-5
|
||||
PKG_RELEASE:=
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -1282,7 +1282,7 @@ function gen_config(var)
|
||||
tag = "fragment",
|
||||
settings = {
|
||||
domainStrategy = (direct_dns_query_strategy and direct_dns_query_strategy ~= "") and direct_dns_query_strategy or "UseIP",
|
||||
fragments = {
|
||||
fragment = {
|
||||
packets = (xray_settings.fragment_packets and xray_settings.fragment_packets ~= "") and xray_settings.fragment_packets,
|
||||
length = (xray_settings.fragment_length and xray_settings.fragment_length ~= "") and xray_settings.fragment_length,
|
||||
interval = (xray_settings.fragment_interval and xray_settings.fragment_interval ~= "") and xray_settings.fragment_interval
|
||||
|
||||
@@ -1256,7 +1256,7 @@ start_dns() {
|
||||
|
||||
[ "$CHINADNS_NG" = "1" ] && [ -n "$(first_type chinadns-ng)" ] && ([ "${CHN_LIST}" = "direct" ] || [ "${USE_GFW_LIST}" = "1" ]) && {
|
||||
[ "$FILTER_PROXY_IPV6" = "1" ] && {
|
||||
local _no_ipv6_rules="gt"
|
||||
local _no_ipv6_rules="tag:gfw"
|
||||
FILTER_PROXY_IPV6=0
|
||||
}
|
||||
local china_ng_listen_port=$(expr $dns_listen_port + 1)
|
||||
@@ -1419,7 +1419,7 @@ acl_app() {
|
||||
|
||||
[ "$chinadns_ng" = "1" ] && [ -n "$(first_type chinadns-ng)" ] && ([ "${chn_list}" = "direct" ] || [ "${use_gfw_list}" = "1" ]) && {
|
||||
[ "$filter_proxy_ipv6" = "1" ] && {
|
||||
local _no_ipv6_rules="gt"
|
||||
local _no_ipv6_rules="tag:gfw"
|
||||
filter_proxy_ipv6=0
|
||||
}
|
||||
chinadns_port=$(expr $chinadns_port + 1)
|
||||
|
||||
@@ -19,7 +19,7 @@ local geoip_update = 0
|
||||
local geosite_update = 0
|
||||
|
||||
-- match comments/title/whitelist/ip address/excluded_domain
|
||||
local comment_pattern = "^[!\\[@]+"
|
||||
local comment_pattern = "^[#!\\[@]+"
|
||||
local ip_pattern = "^%d+%.%d+%.%d+%.%d+"
|
||||
local ip4_ipset_pattern = "^%d+%.%d+%.%d+%.%d+[%/][%d]+$"
|
||||
local ip6_ipset_pattern = ":-[%x]+%:+[%x]-[%/][%d]+$"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall2
|
||||
PKG_VERSION:=1.28-6
|
||||
PKG_VERSION:=1.28-7
|
||||
PKG_RELEASE:=
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -1421,7 +1421,7 @@ function gen_config(var)
|
||||
tag = "fragment",
|
||||
settings = {
|
||||
domainStrategy = (direct_dns_query_strategy and direct_dns_query_strategy ~= "") and direct_dns_query_strategy or "UseIP",
|
||||
fragments = {
|
||||
fragment = {
|
||||
packets = (xray_settings.fragment_packets and xray_settings.fragment_packets ~= "") and xray_settings.fragment_packets,
|
||||
length = (xray_settings.fragment_length and xray_settings.fragment_length ~= "") and xray_settings.fragment_length,
|
||||
interval = (xray_settings.fragment_interval and xray_settings.fragment_interval ~= "") and xray_settings.fragment_interval
|
||||
|
||||
+2
-2
@@ -128,11 +128,11 @@ jobs:
|
||||
diff ./proxy-need-to-remove.txt ./proxy-list-without-redundant | awk '/^>/{print $2}' > temp-geolocation-\!cn.txt
|
||||
diff ./reject-need-to-remove.txt ./reject-list-without-redundant | awk '/^>/{print $2}' > temp-category-ads-all.txt
|
||||
|
||||
- name: Remove domains end with ".cn" in "temp-geolocation-!cn.txt" and write lists to data directory
|
||||
- name: Write lists to data directory
|
||||
run: |
|
||||
cat temp-cn.txt | sort --ignore-case -u | perl -ne '/^((?=^.{1,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})*)/ && print "$1\n"' > ./community/data/cn
|
||||
cat temp-cn.txt | sort --ignore-case -u | perl -ne 'print if not /^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/' > direct-tld-list.txt
|
||||
cat temp-geolocation-\!cn.txt | sort --ignore-case -u | perl -ne '/^((?=^.{1,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})*)/ && print "$1\n"' | perl -ne 'print if not /\.cn$/' > ./community/data/geolocation-\!cn
|
||||
cat temp-geolocation-\!cn.txt | sort --ignore-case -u | perl -ne '/^((?=^.{1,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})*)/ && print "$1\n"' > ./community/data/geolocation-\!cn
|
||||
cat temp-geolocation-\!cn.txt | sort --ignore-case -u | perl -ne 'print if not /^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/' > proxy-tld-list.txt
|
||||
cat temp-category-ads-all.txt | sort --ignore-case -u | perl -ne '/^((?=^.{1,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})*)/ && print "$1\n"' > ./community/data/category-ads-all
|
||||
cat temp-category-ads-all.txt | sort --ignore-case -u | perl -ne 'print if not /^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/' > reject-tld-list.txt
|
||||
|
||||
@@ -2,13 +2,12 @@ package com.v2ray.ang
|
||||
|
||||
import android.content.Context
|
||||
import androidx.multidex.MultiDexApplication
|
||||
import androidx.preference.PreferenceManager
|
||||
import androidx.work.Configuration
|
||||
import com.tencent.mmkv.MMKV
|
||||
|
||||
class AngApplication : MultiDexApplication(), Configuration.Provider {
|
||||
companion object {
|
||||
const val PREF_LAST_VERSION = "pref_last_version"
|
||||
//const val PREF_LAST_VERSION = "pref_last_version"
|
||||
lateinit var application: AngApplication
|
||||
}
|
||||
|
||||
@@ -17,18 +16,18 @@ class AngApplication : MultiDexApplication(), Configuration.Provider {
|
||||
application = this
|
||||
}
|
||||
|
||||
var firstRun = false
|
||||
private set
|
||||
//var firstRun = false
|
||||
// private set
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
// LeakCanary.install(this)
|
||||
|
||||
val defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
firstRun = defaultSharedPreferences.getInt(PREF_LAST_VERSION, 0) != BuildConfig.VERSION_CODE
|
||||
if (firstRun)
|
||||
defaultSharedPreferences.edit().putInt(PREF_LAST_VERSION, BuildConfig.VERSION_CODE).apply()
|
||||
// val defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
// firstRun = defaultSharedPreferences.getInt(PREF_LAST_VERSION, 0) != BuildConfig.VERSION_CODE
|
||||
// if (firstRun)
|
||||
// defaultSharedPreferences.edit().putInt(PREF_LAST_VERSION, BuildConfig.VERSION_CODE).apply()
|
||||
|
||||
//Logger.init().logLevel(if (BuildConfig.DEBUG) LogLevel.FULL else LogLevel.NONE)
|
||||
MMKV.initialize(this)
|
||||
|
||||
@@ -12,44 +12,59 @@ object AppConfig {
|
||||
// legacy
|
||||
const val ANG_CONFIG = "ang_config"
|
||||
const val PREF_INAPP_BUY_IS_PREMIUM = "pref_inapp_buy_is_premium"
|
||||
const val PREF_ROUTING_CUSTOM = "pref_routing_custom"
|
||||
|
||||
// Preferences mapped to MMKV
|
||||
const val PREF_MODE = "pref_mode"
|
||||
const val PREF_SPEED_ENABLED = "pref_speed_enabled"
|
||||
const val PREF_SNIFFING_ENABLED = "pref_sniffing_enabled"
|
||||
const val PREF_PROXY_SHARING = "pref_proxy_sharing_enabled"
|
||||
const val PREF_PER_APP_PROXY = "pref_per_app_proxy"
|
||||
const val PREF_PER_APP_PROXY_SET = "pref_per_app_proxy_set"
|
||||
const val PREF_BYPASS_APPS = "pref_bypass_apps"
|
||||
const val PREF_LOCAL_DNS_ENABLED = "pref_local_dns_enabled"
|
||||
const val PREF_FAKE_DNS_ENABLED = "pref_fake_dns_enabled"
|
||||
const val PREF_VPN_DNS = "pref_vpn_dns"
|
||||
const val PREF_REMOTE_DNS = "pref_remote_dns"
|
||||
const val PREF_DOMESTIC_DNS = "pref_domestic_dns"
|
||||
const val PREF_LOCAL_DNS_PORT = "pref_local_dns_port"
|
||||
const val PREF_ALLOW_INSECURE = "pref_allow_insecure"
|
||||
const val PREF_SOCKS_PORT = "pref_socks_port"
|
||||
const val PREF_HTTP_PORT = "pref_http_port"
|
||||
const val PREF_LOGLEVEL = "pref_core_loglevel"
|
||||
const val PREF_LANGUAGE = "pref_language"
|
||||
const val PREF_PREFER_IPV6 = "pref_prefer_ipv6"
|
||||
const val PREF_VPN_DNS = "pref_vpn_dns"
|
||||
|
||||
const val PREF_ROUTING_DOMAIN_STRATEGY = "pref_routing_domain_strategy"
|
||||
const val PREF_ROUTING_MODE = "pref_routing_mode"
|
||||
const val PREF_V2RAY_ROUTING_AGENT = "pref_v2ray_routing_agent"
|
||||
const val PREF_V2RAY_ROUTING_DIRECT = "pref_v2ray_routing_direct"
|
||||
const val PREF_V2RAY_ROUTING_BLOCKED = "pref_v2ray_routing_blocked"
|
||||
const val PREF_PER_APP_PROXY = "pref_per_app_proxy"
|
||||
const val PREF_PER_APP_PROXY_SET = "pref_per_app_proxy_set"
|
||||
const val PREF_BYPASS_APPS = "pref_bypass_apps"
|
||||
const val PREF_CONFIRM_REMOVE = "pref_confirm_remove"
|
||||
const val PREF_START_SCAN_IMMEDIATE = "pref_start_scan_immediate"
|
||||
const val PREF_ROUTING_CUSTOM = "pref_routing_custom"
|
||||
|
||||
const val PREF_MUX_ENABLED = "pref_mux_enabled"
|
||||
const val PREF_MUX_CONCURRENCY = "pref_mux_concurency"
|
||||
const val PREF_MUX_XUDP_CONCURRENCY = "pref_mux_xudp_concurency"
|
||||
const val PREF_MUX_XUDP_QUIC = "pref_mux_xudp_quic"
|
||||
|
||||
const val PREF_FRAGMENT_ENABLED = "pref_fragment_enabled"
|
||||
const val PREF_FRAGMENT_PACKETS = "pref_fragment_packets"
|
||||
const val PREF_FRAGMENT_LENGTH = "pref_fragment_length"
|
||||
const val PREF_FRAGMENT_INTERVAL = "pref_fragment_interval"
|
||||
|
||||
const val SUBSCRIPTION_AUTO_UPDATE = "pref_auto_update_subscription"
|
||||
const val SUBSCRIPTION_AUTO_UPDATE_INTERVAL = "pref_auto_update_interval"
|
||||
const val SUBSCRIPTION_DEFAULT_UPDATE_INTERVAL = "1440" // 24 hours
|
||||
const val SUBSCRIPTION_UPDATE_TASK_NAME = "subscription_updater"
|
||||
|
||||
const val PREF_SPEED_ENABLED = "pref_speed_enabled"
|
||||
const val PREF_CONFIRM_REMOVE = "pref_confirm_remove"
|
||||
const val PREF_START_SCAN_IMMEDIATE = "pref_start_scan_immediate"
|
||||
const val PREF_LANGUAGE = "pref_language"
|
||||
|
||||
const val PREF_PREFER_IPV6 = "pref_prefer_ipv6"
|
||||
const val PREF_PROXY_SHARING = "pref_proxy_sharing_enabled"
|
||||
const val PREF_ALLOW_INSECURE = "pref_allow_insecure"
|
||||
const val PREF_SOCKS_PORT = "pref_socks_port"
|
||||
const val PREF_HTTP_PORT = "pref_http_port"
|
||||
const val PREF_REMOTE_DNS = "pref_remote_dns"
|
||||
const val PREF_DOMESTIC_DNS = "pref_domestic_dns"
|
||||
const val PREF_LOGLEVEL = "pref_core_loglevel"
|
||||
const val PREF_MODE = "pref_mode"
|
||||
|
||||
const val CACHE_SUBSCRIPTION_ID = "cache_subscription_id"
|
||||
const val CACHE_KEYWORD_FILTER = "cache_keyword_filter"
|
||||
|
||||
//Preferences mapped to MMKV End
|
||||
|
||||
const val PROTOCOL_HTTP: String = "http://"
|
||||
const val PROTOCOL_HTTPS: String = "https://"
|
||||
const val PROTOCOL_FREEDOM: String = "freedom"
|
||||
@@ -107,13 +122,4 @@ object AppConfig {
|
||||
const val MSG_MEASURE_CONFIG = 7
|
||||
const val MSG_MEASURE_CONFIG_SUCCESS = 71
|
||||
const val MSG_MEASURE_CONFIG_CANCEL = 72
|
||||
|
||||
// subscription settings
|
||||
const val SUBSCRIPTION_AUTO_UPDATE = "pref_auto_update_subscription"
|
||||
const val SUBSCRIPTION_AUTO_UPDATE_INTERVAL = "pref_auto_update_interval"
|
||||
const val SUBSCRIPTION_DEFAULT_UPDATE_INTERVAL = "1440" // 24 hours
|
||||
const val SUBSCRIPTION_UPDATE_TASK_NAME = "subscription_updater"
|
||||
|
||||
const val CACHE_SUBSCRIPTION_ID = "cache_subscription_id"
|
||||
const val CACHE_KEYWORD_FILTER = "cache_keyword_filter"
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ class MainActivity : BaseActivity(), NavigationView.OnNavigationItemSelectedList
|
||||
|
||||
setupViewModel()
|
||||
copyAssets()
|
||||
migrateLegacy()
|
||||
//migrateLegacy()
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
RxPermissions(this)
|
||||
@@ -188,21 +188,21 @@ class MainActivity : BaseActivity(), NavigationView.OnNavigationItemSelectedList
|
||||
}
|
||||
}
|
||||
|
||||
private fun migrateLegacy() {
|
||||
lifecycleScope.launch(Dispatchers.IO) {
|
||||
val result = AngConfigManager.migrateLegacyConfig(this@MainActivity)
|
||||
if (result != null) {
|
||||
launch(Dispatchers.Main) {
|
||||
if (result) {
|
||||
toast(getString(R.string.migration_success))
|
||||
mainViewModel.reloadServerList()
|
||||
} else {
|
||||
toast(getString(R.string.migration_fail))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// private fun migrateLegacy() {
|
||||
// lifecycleScope.launch(Dispatchers.IO) {
|
||||
// val result = AngConfigManager.migrateLegacyConfig(this@MainActivity)
|
||||
// if (result != null) {
|
||||
// launch(Dispatchers.Main) {
|
||||
// if (result) {
|
||||
// toast(getString(R.string.migration_success))
|
||||
// mainViewModel.reloadServerList()
|
||||
// } else {
|
||||
// toast(getString(R.string.migration_fail))
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
fun startV2Ray() {
|
||||
if (mainStorage?.decodeString(MmkvManager.KEY_SELECTED_SERVER).isNullOrEmpty()) {
|
||||
|
||||
@@ -8,9 +8,9 @@ import android.view.MenuItem
|
||||
import android.view.View
|
||||
import androidx.appcompat.widget.SearchView
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.preference.PreferenceManager
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.tencent.mmkv.MMKV
|
||||
import com.v2ray.ang.AppConfig
|
||||
import com.v2ray.ang.AppConfig.ANG_PACKAGE
|
||||
import com.v2ray.ang.R
|
||||
@@ -19,20 +19,20 @@ import com.v2ray.ang.dto.AppInfo
|
||||
import com.v2ray.ang.extension.toast
|
||||
import com.v2ray.ang.extension.v2RayApplication
|
||||
import com.v2ray.ang.util.AppManagerUtil
|
||||
import com.v2ray.ang.util.MmkvManager
|
||||
import com.v2ray.ang.util.Utils
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import rx.android.schedulers.AndroidSchedulers
|
||||
import rx.schedulers.Schedulers
|
||||
import java.text.Collator
|
||||
import java.util.*
|
||||
|
||||
class PerAppProxyActivity : BaseActivity() {
|
||||
private lateinit var binding: ActivityBypassListBinding
|
||||
|
||||
private var adapter: PerAppProxyAdapter? = null
|
||||
private var appsAll: List<AppInfo>? = null
|
||||
private val defaultSharedPreferences by lazy { PreferenceManager.getDefaultSharedPreferences(this) }
|
||||
private val settingsStorage by lazy { MMKV.mmkvWithID(MmkvManager.ID_SETTING, MMKV.MULTI_PROCESS_MODE) }
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
@@ -43,7 +43,7 @@ class PerAppProxyActivity : BaseActivity() {
|
||||
val dividerItemDecoration = DividerItemDecoration(this, LinearLayoutManager.VERTICAL)
|
||||
binding.recyclerView.addItemDecoration(dividerItemDecoration)
|
||||
|
||||
val blacklist = defaultSharedPreferences.getStringSet(AppConfig.PREF_PER_APP_PROXY_SET, null)
|
||||
val blacklist = settingsStorage?.decodeStringSet(AppConfig.PREF_PER_APP_PROXY_SET)
|
||||
|
||||
AppManagerUtil.rxLoadNetworkAppList(this)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -134,14 +134,14 @@ class PerAppProxyActivity : BaseActivity() {
|
||||
***/
|
||||
|
||||
binding.switchPerAppProxy.setOnCheckedChangeListener { _, isChecked ->
|
||||
defaultSharedPreferences.edit().putBoolean(AppConfig.PREF_PER_APP_PROXY, isChecked).apply()
|
||||
settingsStorage.encode(AppConfig.PREF_PER_APP_PROXY, isChecked)
|
||||
}
|
||||
binding.switchPerAppProxy.isChecked = defaultSharedPreferences.getBoolean(AppConfig.PREF_PER_APP_PROXY, false)
|
||||
binding.switchPerAppProxy.isChecked = settingsStorage.getBoolean(AppConfig.PREF_PER_APP_PROXY, false)
|
||||
|
||||
binding.switchBypassApps.setOnCheckedChangeListener { _, isChecked ->
|
||||
defaultSharedPreferences.edit().putBoolean(AppConfig.PREF_BYPASS_APPS, isChecked).apply()
|
||||
settingsStorage.encode(AppConfig.PREF_BYPASS_APPS, isChecked)
|
||||
}
|
||||
binding.switchBypassApps.isChecked = defaultSharedPreferences.getBoolean(AppConfig.PREF_BYPASS_APPS, false)
|
||||
binding.switchBypassApps.isChecked = settingsStorage.getBoolean(AppConfig.PREF_BYPASS_APPS, false)
|
||||
|
||||
/***
|
||||
et_search.setOnEditorActionListener { v, actionId, event ->
|
||||
@@ -177,7 +177,7 @@ class PerAppProxyActivity : BaseActivity() {
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
adapter?.let {
|
||||
defaultSharedPreferences.edit().putStringSet(AppConfig.PREF_PER_APP_PROXY_SET, it.blacklist).apply()
|
||||
settingsStorage.encode(AppConfig.PREF_PER_APP_PROXY_SET, it.blacklist)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,11 +11,13 @@ import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.tbruyelle.rxpermissions.RxPermissions
|
||||
import com.tencent.mmkv.MMKV
|
||||
import com.v2ray.ang.AppConfig
|
||||
import com.v2ray.ang.R
|
||||
import com.v2ray.ang.databinding.FragmentRoutingSettingsBinding
|
||||
import com.v2ray.ang.extension.toast
|
||||
import com.v2ray.ang.extension.v2RayApplication
|
||||
import com.v2ray.ang.util.MmkvManager
|
||||
import com.v2ray.ang.util.Utils
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
@@ -26,7 +28,7 @@ class RoutingSettingsFragment : Fragment() {
|
||||
private const val routing_arg = "routing_arg"
|
||||
}
|
||||
|
||||
val defaultSharedPreferences by lazy { PreferenceManager.getDefaultSharedPreferences(requireContext()) }
|
||||
private val settingsStorage by lazy { MMKV.mmkvWithID(MmkvManager.ID_SETTING, MMKV.MULTI_PROCESS_MODE) }
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?): View? {
|
||||
@@ -46,7 +48,7 @@ class RoutingSettingsFragment : Fragment() {
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
val content = defaultSharedPreferences.getString(requireArguments().getString(routing_arg), "")
|
||||
val content = settingsStorage?.getString(requireArguments().getString(routing_arg), "")
|
||||
binding.etRoutingContent.text = Utils.getEditable(content!!)
|
||||
|
||||
setHasOptionsMenu(true)
|
||||
@@ -83,7 +85,7 @@ class RoutingSettingsFragment : Fragment() {
|
||||
|
||||
private fun saveRouting() {
|
||||
val content = binding.etRoutingContent.text.toString()
|
||||
defaultSharedPreferences.edit().putString(requireArguments().getString(routing_arg), content).apply()
|
||||
settingsStorage?.encode(requireArguments().getString(routing_arg), content)
|
||||
activity?.toast(R.string.toast_success)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,10 +9,12 @@ import androidx.preference.*
|
||||
import androidx.work.ExistingPeriodicWorkPolicy
|
||||
import androidx.work.PeriodicWorkRequest
|
||||
import androidx.work.multiprocess.RemoteWorkManager
|
||||
import com.tencent.mmkv.MMKV
|
||||
import com.v2ray.ang.AngApplication
|
||||
import com.v2ray.ang.AppConfig
|
||||
import com.v2ray.ang.R
|
||||
import com.v2ray.ang.service.SubscriptionUpdater
|
||||
import com.v2ray.ang.util.MmkvManager
|
||||
import com.v2ray.ang.util.Utils
|
||||
import com.v2ray.ang.viewmodel.SettingsViewModel
|
||||
import java.util.concurrent.TimeUnit
|
||||
@@ -30,12 +32,16 @@ class SettingsActivity : BaseActivity() {
|
||||
}
|
||||
|
||||
class SettingsFragment : PreferenceFragmentCompat() {
|
||||
private val settingsStorage by lazy { MMKV.mmkvWithID(MmkvManager.ID_SETTING, MMKV.MULTI_PROCESS_MODE) }
|
||||
|
||||
private val perAppProxy by lazy { findPreference<CheckBoxPreference>(AppConfig.PREF_PER_APP_PROXY) }
|
||||
private val localDns by lazy { findPreference<CheckBoxPreference>(AppConfig.PREF_LOCAL_DNS_ENABLED) }
|
||||
private val fakeDns by lazy { findPreference<CheckBoxPreference>(AppConfig.PREF_FAKE_DNS_ENABLED) }
|
||||
private val localDnsPort by lazy { findPreference<EditTextPreference>(AppConfig.PREF_LOCAL_DNS_PORT) }
|
||||
private val vpnDns by lazy { findPreference<EditTextPreference>(AppConfig.PREF_VPN_DNS) }
|
||||
|
||||
|
||||
private val routingCustom by lazy { findPreference<Preference>(AppConfig.PREF_ROUTING_CUSTOM) }
|
||||
|
||||
private val mux by lazy { findPreference<CheckBoxPreference>(AppConfig.PREF_MUX_ENABLED) }
|
||||
private val muxConcurrency by lazy { findPreference<EditTextPreference>(AppConfig.PREF_MUX_CONCURRENCY) }
|
||||
private val muxXudpConcurrency by lazy { findPreference<EditTextPreference>(AppConfig.PREF_MUX_XUDP_CONCURRENCY) }
|
||||
@@ -46,18 +52,13 @@ class SettingsActivity : BaseActivity() {
|
||||
private val fragmentLength by lazy { findPreference<EditTextPreference>(AppConfig.PREF_FRAGMENT_LENGTH) }
|
||||
private val fragmentInterval by lazy { findPreference<EditTextPreference>(AppConfig.PREF_FRAGMENT_INTERVAL) }
|
||||
|
||||
// val autoRestart by lazy { findPreference(PREF_AUTO_RESTART) as CheckBoxPreference }
|
||||
private val remoteDns by lazy { findPreference<EditTextPreference>(AppConfig.PREF_REMOTE_DNS) }
|
||||
private val domesticDns by lazy { findPreference<EditTextPreference>(AppConfig.PREF_DOMESTIC_DNS) }
|
||||
private val socksPort by lazy { findPreference<EditTextPreference>(AppConfig.PREF_SOCKS_PORT) }
|
||||
private val httpPort by lazy { findPreference<EditTextPreference>(AppConfig.PREF_HTTP_PORT) }
|
||||
private val routingCustom by lazy { findPreference<Preference>(AppConfig.PREF_ROUTING_CUSTOM) }
|
||||
private val autoUpdateCheck by lazy { findPreference<CheckBoxPreference>(AppConfig.SUBSCRIPTION_AUTO_UPDATE) }
|
||||
private val autoUpdateInterval by lazy { findPreference<EditTextPreference>(AppConfig.SUBSCRIPTION_AUTO_UPDATE_INTERVAL) }
|
||||
// val licenses: Preference by lazy { findPreference(PREF_LICENSES) }
|
||||
// val feedback: Preference by lazy { findPreference(PREF_FEEDBACK) }
|
||||
// val tgGroup: Preference by lazy { findPreference(PREF_TG_GROUP) }
|
||||
|
||||
private val socksPort by lazy { findPreference<EditTextPreference>(AppConfig.PREF_SOCKS_PORT) }
|
||||
private val httpPort by lazy { findPreference<EditTextPreference>(AppConfig.PREF_HTTP_PORT) }
|
||||
private val remoteDns by lazy { findPreference<EditTextPreference>(AppConfig.PREF_REMOTE_DNS) }
|
||||
private val domesticDns by lazy { findPreference<EditTextPreference>(AppConfig.PREF_DOMESTIC_DNS) }
|
||||
private val mode by lazy { findPreference<ListPreference>(AppConfig.PREF_MODE) }
|
||||
|
||||
override fun onCreatePreferences(bundle: Bundle?, s: String?) {
|
||||
@@ -89,27 +90,6 @@ class SettingsActivity : BaseActivity() {
|
||||
true
|
||||
}
|
||||
|
||||
// licenses.onClick {
|
||||
// val fragment = LicensesDialogFragment.Builder(act)
|
||||
// .setNotices(R.raw.licenses)
|
||||
// .setIncludeOwnLicense(false)
|
||||
// .build()
|
||||
// fragment.show((act as AppCompatActivity).supportFragmentManager, null)
|
||||
// }
|
||||
//
|
||||
// feedback.onClick {
|
||||
// Utils.openUri(activity, "https://github.com/2dust/v2rayNG/issues")
|
||||
// }
|
||||
// tgGroup.onClick {
|
||||
// // Utils.openUri(activity, "https://t.me/v2rayN")
|
||||
// val intent = Intent(Intent.ACTION_VIEW, Uri.parse("tg:resolve?domain=v2rayN"))
|
||||
// try {
|
||||
// startActivity(intent)
|
||||
// } catch (e: Exception) {
|
||||
// e.printStackTrace()
|
||||
// toast(R.string.toast_tg_app_not_found)
|
||||
// }
|
||||
// }
|
||||
|
||||
perAppProxy?.setOnPreferenceClickListener {
|
||||
startActivity(Intent(activity, PerAppProxyActivity::class.java))
|
||||
@@ -193,61 +173,76 @@ class SettingsActivity : BaseActivity() {
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
val defaultSharedPreferences =
|
||||
PreferenceManager.getDefaultSharedPreferences(requireActivity())
|
||||
updateMode(defaultSharedPreferences.getString(AppConfig.PREF_MODE, "VPN"))
|
||||
var remoteDnsString = defaultSharedPreferences.getString(AppConfig.PREF_REMOTE_DNS, "")
|
||||
initSharedPreference()
|
||||
|
||||
domesticDns?.summary = defaultSharedPreferences.getString(AppConfig.PREF_DOMESTIC_DNS, "")
|
||||
localDnsPort?.summary = defaultSharedPreferences.getString(AppConfig.PREF_LOCAL_DNS_PORT, AppConfig.PORT_LOCAL_DNS)
|
||||
socksPort?.summary = defaultSharedPreferences.getString(AppConfig.PREF_SOCKS_PORT, AppConfig.PORT_SOCKS)
|
||||
httpPort?.summary = defaultSharedPreferences.getString(AppConfig.PREF_HTTP_PORT, AppConfig.PORT_HTTP)
|
||||
updateMux(defaultSharedPreferences.getBoolean(AppConfig.PREF_MUX_ENABLED, false))
|
||||
muxConcurrency?.summary = defaultSharedPreferences.getString(AppConfig.PREF_MUX_CONCURRENCY, "8")
|
||||
muxXudpConcurrency?.summary = defaultSharedPreferences.getString(AppConfig.PREF_MUX_XUDP_CONCURRENCY, "8")
|
||||
updateFragment(defaultSharedPreferences.getBoolean(AppConfig.PREF_FRAGMENT_ENABLED, false))
|
||||
fragmentPackets?.summary = defaultSharedPreferences.getString(AppConfig.PREF_FRAGMENT_PACKETS, "tlshello")
|
||||
fragmentLength?.summary = defaultSharedPreferences.getString(AppConfig.PREF_FRAGMENT_LENGTH, "50-100")
|
||||
fragmentInterval?.summary = defaultSharedPreferences.getString(AppConfig.PREF_FRAGMENT_INTERVAL, "10-20")
|
||||
autoUpdateInterval?.summary = defaultSharedPreferences.getString(AppConfig.SUBSCRIPTION_AUTO_UPDATE_INTERVAL,AppConfig.SUBSCRIPTION_DEFAULT_UPDATE_INTERVAL)
|
||||
autoUpdateInterval?.isEnabled = defaultSharedPreferences.getBoolean(AppConfig.SUBSCRIPTION_AUTO_UPDATE, false)
|
||||
updateMode(settingsStorage.decodeString(AppConfig.PREF_MODE, "VPN"))
|
||||
localDns?.isChecked = settingsStorage.getBoolean(AppConfig.PREF_LOCAL_DNS_ENABLED, false)
|
||||
fakeDns?.isChecked = settingsStorage.getBoolean(AppConfig.PREF_FAKE_DNS_ENABLED, false)
|
||||
localDnsPort?.summary = settingsStorage.decodeString(AppConfig.PREF_LOCAL_DNS_PORT, AppConfig.PORT_LOCAL_DNS)
|
||||
vpnDns?.summary = settingsStorage.decodeString(AppConfig.PREF_VPN_DNS)?: settingsStorage.decodeString(AppConfig.PREF_REMOTE_DNS)?: AppConfig.DNS_VPN
|
||||
|
||||
if (TextUtils.isEmpty(remoteDnsString)) {
|
||||
remoteDnsString = AppConfig.DNS_PROXY
|
||||
}
|
||||
if (TextUtils.isEmpty(domesticDns?.summary)) {
|
||||
domesticDns?.summary = AppConfig.DNS_DIRECT
|
||||
}
|
||||
remoteDns?.summary = remoteDnsString
|
||||
vpnDns?.summary =
|
||||
defaultSharedPreferences.getString(AppConfig.PREF_VPN_DNS, remoteDnsString)
|
||||
updateMux(settingsStorage.getBoolean(AppConfig.PREF_MUX_ENABLED, false))
|
||||
mux?.isChecked = settingsStorage.getBoolean(AppConfig.PREF_MUX_ENABLED, false)
|
||||
muxConcurrency?.summary = settingsStorage.decodeString(AppConfig.PREF_MUX_CONCURRENCY, "8")
|
||||
muxXudpConcurrency?.summary = settingsStorage.decodeString(AppConfig.PREF_MUX_XUDP_CONCURRENCY, "8")
|
||||
|
||||
if (TextUtils.isEmpty(localDnsPort?.summary)) {
|
||||
localDnsPort?.summary = AppConfig.PORT_LOCAL_DNS
|
||||
updateFragment(settingsStorage.getBoolean(AppConfig.PREF_FRAGMENT_ENABLED, false))
|
||||
fragment?.isChecked = settingsStorage.getBoolean(AppConfig.PREF_FRAGMENT_ENABLED, false)
|
||||
fragmentPackets?.summary = settingsStorage.decodeString(AppConfig.PREF_FRAGMENT_PACKETS, "tlshello")
|
||||
fragmentLength?.summary = settingsStorage.decodeString(AppConfig.PREF_FRAGMENT_LENGTH, "50-100")
|
||||
fragmentInterval?.summary = settingsStorage.decodeString(AppConfig.PREF_FRAGMENT_INTERVAL, "10-20")
|
||||
|
||||
autoUpdateCheck?.isChecked = settingsStorage.getBoolean(AppConfig.SUBSCRIPTION_AUTO_UPDATE, false)
|
||||
autoUpdateInterval?.summary = settingsStorage.decodeString(AppConfig.SUBSCRIPTION_AUTO_UPDATE_INTERVAL,AppConfig.SUBSCRIPTION_DEFAULT_UPDATE_INTERVAL)
|
||||
autoUpdateInterval?.isEnabled = settingsStorage.getBoolean(AppConfig.SUBSCRIPTION_AUTO_UPDATE, false)
|
||||
|
||||
socksPort?.summary = settingsStorage.decodeString(AppConfig.PREF_SOCKS_PORT, AppConfig.PORT_SOCKS)
|
||||
httpPort?.summary = settingsStorage.decodeString(AppConfig.PREF_HTTP_PORT, AppConfig.PORT_HTTP)
|
||||
remoteDns?.summary = settingsStorage.decodeString(AppConfig.PREF_REMOTE_DNS, AppConfig.DNS_PROXY)
|
||||
domesticDns?.summary = settingsStorage.decodeString(AppConfig.PREF_DOMESTIC_DNS, AppConfig.DNS_DIRECT)
|
||||
}
|
||||
|
||||
private fun initSharedPreference() {
|
||||
listOf(
|
||||
AppConfig.PREF_SNIFFING_ENABLED,
|
||||
AppConfig.PREF_BYPASS_APPS,
|
||||
AppConfig.PREF_SPEED_ENABLED,
|
||||
AppConfig.PREF_CONFIRM_REMOVE,
|
||||
AppConfig.PREF_START_SCAN_IMMEDIATE,
|
||||
AppConfig.PREF_PREFER_IPV6,
|
||||
AppConfig.PREF_PROXY_SHARING,
|
||||
AppConfig.PREF_ALLOW_INSECURE
|
||||
).forEach { key ->
|
||||
findPreference<CheckBoxPreference>(key)?.isChecked =
|
||||
settingsStorage.decodeBool(key, false)
|
||||
}
|
||||
if (TextUtils.isEmpty(socksPort?.summary)) {
|
||||
socksPort?.summary = AppConfig.PORT_SOCKS
|
||||
}
|
||||
if (TextUtils.isEmpty(httpPort?.summary)) {
|
||||
httpPort?.summary = AppConfig.PORT_HTTP
|
||||
|
||||
listOf(
|
||||
AppConfig.PREF_ROUTING_DOMAIN_STRATEGY,
|
||||
AppConfig.PREF_ROUTING_MODE,
|
||||
AppConfig.PREF_MUX_XUDP_QUIC,
|
||||
AppConfig.PREF_FRAGMENT_PACKETS,
|
||||
AppConfig.PREF_LANGUAGE,
|
||||
AppConfig.PREF_LOGLEVEL,
|
||||
AppConfig.PREF_MODE
|
||||
).forEach { key ->
|
||||
if (settingsStorage.decodeString(key) != null) {
|
||||
findPreference<ListPreference>(key)?.value = settingsStorage.decodeString(key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateMode(mode: String?) {
|
||||
val defaultSharedPreferences =
|
||||
PreferenceManager.getDefaultSharedPreferences(requireActivity())
|
||||
val vpn = mode == "VPN"
|
||||
perAppProxy?.isEnabled = vpn
|
||||
perAppProxy?.isChecked =
|
||||
PreferenceManager.getDefaultSharedPreferences(requireActivity())
|
||||
.getBoolean(AppConfig.PREF_PER_APP_PROXY, false)
|
||||
perAppProxy?.isChecked = settingsStorage.getBoolean(AppConfig.PREF_PER_APP_PROXY, false)
|
||||
localDns?.isEnabled = vpn
|
||||
fakeDns?.isEnabled = vpn
|
||||
localDnsPort?.isEnabled = vpn
|
||||
vpnDns?.isEnabled = vpn
|
||||
if (vpn) {
|
||||
updateLocalDns(
|
||||
defaultSharedPreferences.getBoolean(
|
||||
settingsStorage.getBoolean(
|
||||
AppConfig.PREF_LOCAL_DNS_ENABLED,
|
||||
false
|
||||
)
|
||||
@@ -283,15 +278,14 @@ class SettingsActivity : BaseActivity() {
|
||||
val rw = RemoteWorkManager.getInstance(AngApplication.application)
|
||||
rw.cancelUniqueWork(AppConfig.SUBSCRIPTION_UPDATE_TASK_NAME)
|
||||
}
|
||||
|
||||
|
||||
private fun updateMux(enabled: Boolean) {
|
||||
val defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity())
|
||||
muxConcurrency?.isEnabled = enabled
|
||||
muxXudpConcurrency?.isEnabled = enabled
|
||||
muxXudpQuic?.isEnabled = enabled
|
||||
if (enabled) {
|
||||
updateMuxConcurrency(defaultSharedPreferences.getString(AppConfig.PREF_MUX_CONCURRENCY, "8"))
|
||||
updateMuxXudpConcurrency(defaultSharedPreferences.getString(AppConfig.PREF_MUX_XUDP_CONCURRENCY, "8"))
|
||||
updateMuxConcurrency(settingsStorage.decodeString(AppConfig.PREF_MUX_CONCURRENCY, "8"))
|
||||
updateMuxXudpConcurrency(settingsStorage.decodeString(AppConfig.PREF_MUX_XUDP_CONCURRENCY, "8"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,14 +308,13 @@ class SettingsActivity : BaseActivity() {
|
||||
}
|
||||
|
||||
private fun updateFragment(enabled: Boolean) {
|
||||
val defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity())
|
||||
fragmentPackets?.isEnabled = enabled
|
||||
fragmentLength?.isEnabled = enabled
|
||||
fragmentInterval?.isEnabled = enabled
|
||||
if (enabled) {
|
||||
updateFragmentPackets(defaultSharedPreferences.getString(AppConfig.PREF_FRAGMENT_PACKETS, "tlshello"))
|
||||
updateFragmentLength(defaultSharedPreferences.getString(AppConfig.PREF_FRAGMENT_LENGTH, "50-100"))
|
||||
updateFragmentInterval(defaultSharedPreferences.getString(AppConfig.PREF_FRAGMENT_INTERVAL, "10-20"))
|
||||
updateFragmentPackets(settingsStorage.decodeString(AppConfig.PREF_FRAGMENT_PACKETS, "tlshello"))
|
||||
updateFragmentLength(settingsStorage.decodeString(AppConfig.PREF_FRAGMENT_LENGTH, "50-100"))
|
||||
updateFragmentInterval(settingsStorage.decodeString(AppConfig.PREF_FRAGMENT_INTERVAL, "10-20"))
|
||||
}
|
||||
}
|
||||
private fun updateFragmentPackets(value: String?) {
|
||||
|
||||
@@ -1,35 +1,31 @@
|
||||
package com.v2ray.ang.util
|
||||
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import android.graphics.Bitmap
|
||||
import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.GsonBuilder
|
||||
import com.google.gson.JsonPrimitive
|
||||
import com.google.gson.JsonSerializationContext
|
||||
import com.google.gson.JsonSerializer
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.tencent.mmkv.MMKV
|
||||
import com.v2ray.ang.AppConfig
|
||||
import com.v2ray.ang.AppConfig.ANG_CONFIG
|
||||
import com.v2ray.ang.AppConfig.PROTOCOL_HTTPS
|
||||
import com.v2ray.ang.AppConfig.PROTOCOL_HTTP
|
||||
import com.v2ray.ang.AppConfig.PROTOCOL_HTTPS
|
||||
import com.v2ray.ang.AppConfig.WIREGUARD_LOCAL_ADDRESS_V4
|
||||
import com.v2ray.ang.AppConfig.WIREGUARD_LOCAL_MTU
|
||||
import com.v2ray.ang.R
|
||||
import com.v2ray.ang.dto.*
|
||||
import com.v2ray.ang.dto.V2rayConfig.Companion.DEFAULT_SECURITY
|
||||
import com.v2ray.ang.dto.V2rayConfig.Companion.TLS
|
||||
import com.v2ray.ang.util.MmkvManager.KEY_SELECTED_SERVER
|
||||
import java.net.URI
|
||||
import java.util.*
|
||||
import java.lang.reflect.Type
|
||||
import com.v2ray.ang.extension.idnHost
|
||||
import com.v2ray.ang.extension.removeWhiteSpace
|
||||
import com.v2ray.ang.util.MmkvManager.KEY_SELECTED_SERVER
|
||||
import java.lang.reflect.Type
|
||||
import java.net.URI
|
||||
import java.util.*
|
||||
|
||||
object AngConfigManager {
|
||||
private val mainStorage by lazy {
|
||||
@@ -55,158 +51,158 @@ object AngConfigManager {
|
||||
/**
|
||||
* Legacy loading config
|
||||
*/
|
||||
fun migrateLegacyConfig(c: Context): Boolean? {
|
||||
try {
|
||||
val defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(c)
|
||||
val context = defaultSharedPreferences.getString(ANG_CONFIG, "")
|
||||
if (context.isNullOrBlank()) {
|
||||
return null
|
||||
}
|
||||
val angConfig = Gson().fromJson(context, AngConfig::class.java)
|
||||
for (i in angConfig.vmess.indices) {
|
||||
upgradeServerVersion(angConfig.vmess[i])
|
||||
}
|
||||
|
||||
copyLegacySettings(defaultSharedPreferences)
|
||||
migrateVmessBean(angConfig, defaultSharedPreferences)
|
||||
migrateSubItemBean(angConfig)
|
||||
|
||||
defaultSharedPreferences.edit().remove(ANG_CONFIG).apply()
|
||||
return true
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
private fun copyLegacySettings(sharedPreferences: SharedPreferences) {
|
||||
listOf(
|
||||
AppConfig.PREF_MODE,
|
||||
AppConfig.PREF_REMOTE_DNS,
|
||||
AppConfig.PREF_DOMESTIC_DNS,
|
||||
AppConfig.PREF_LOCAL_DNS_PORT,
|
||||
AppConfig.PREF_SOCKS_PORT,
|
||||
AppConfig.PREF_HTTP_PORT,
|
||||
AppConfig.PREF_LOGLEVEL,
|
||||
AppConfig.PREF_ROUTING_DOMAIN_STRATEGY,
|
||||
AppConfig.PREF_ROUTING_MODE,
|
||||
AppConfig.PREF_V2RAY_ROUTING_AGENT,
|
||||
AppConfig.PREF_V2RAY_ROUTING_BLOCKED,
|
||||
AppConfig.PREF_V2RAY_ROUTING_DIRECT,
|
||||
).forEach { key ->
|
||||
settingsStorage?.encode(key, sharedPreferences.getString(key, null))
|
||||
}
|
||||
listOf(
|
||||
AppConfig.PREF_SPEED_ENABLED,
|
||||
AppConfig.PREF_PROXY_SHARING,
|
||||
AppConfig.PREF_LOCAL_DNS_ENABLED,
|
||||
AppConfig.PREF_ALLOW_INSECURE,
|
||||
AppConfig.PREF_PREFER_IPV6,
|
||||
AppConfig.PREF_PER_APP_PROXY,
|
||||
AppConfig.PREF_BYPASS_APPS,
|
||||
).forEach { key ->
|
||||
settingsStorage?.encode(key, sharedPreferences.getBoolean(key, false))
|
||||
}
|
||||
settingsStorage?.encode(
|
||||
AppConfig.PREF_SNIFFING_ENABLED,
|
||||
sharedPreferences.getBoolean(AppConfig.PREF_SNIFFING_ENABLED, true)
|
||||
)
|
||||
settingsStorage?.encode(
|
||||
AppConfig.PREF_PER_APP_PROXY_SET,
|
||||
sharedPreferences.getStringSet(AppConfig.PREF_PER_APP_PROXY_SET, setOf())
|
||||
)
|
||||
}
|
||||
|
||||
private fun migrateVmessBean(angConfig: AngConfig, sharedPreferences: SharedPreferences) {
|
||||
angConfig.vmess.forEachIndexed { index, vmessBean ->
|
||||
val type = EConfigType.fromInt(vmessBean.configType) ?: return@forEachIndexed
|
||||
val config = ServerConfig.create(type)
|
||||
config.remarks = vmessBean.remarks
|
||||
config.subscriptionId = vmessBean.subid
|
||||
if (type == EConfigType.CUSTOM) {
|
||||
val jsonConfig = sharedPreferences.getString(ANG_CONFIG + vmessBean.guid, "")
|
||||
val v2rayConfig = try {
|
||||
Gson().fromJson(jsonConfig, V2rayConfig::class.java)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
return@forEachIndexed
|
||||
}
|
||||
config.fullConfig = v2rayConfig
|
||||
serverRawStorage?.encode(vmessBean.guid, jsonConfig)
|
||||
} else {
|
||||
config.outboundBean?.settings?.vnext?.get(0)?.let { vnext ->
|
||||
vnext.address = vmessBean.address
|
||||
vnext.port = vmessBean.port
|
||||
vnext.users[0].id = vmessBean.id
|
||||
if (config.configType == EConfigType.VMESS) {
|
||||
vnext.users[0].alterId = vmessBean.alterId
|
||||
vnext.users[0].security = vmessBean.security
|
||||
} else if (config.configType == EConfigType.VLESS) {
|
||||
vnext.users[0].encryption = vmessBean.security
|
||||
vnext.users[0].flow = vmessBean.flow
|
||||
}
|
||||
}
|
||||
config.outboundBean?.settings?.servers?.get(0)?.let { server ->
|
||||
server.address = vmessBean.address
|
||||
server.port = vmessBean.port
|
||||
if (config.configType == EConfigType.SHADOWSOCKS) {
|
||||
server.password = vmessBean.id
|
||||
server.method = vmessBean.security
|
||||
} else if (config.configType == EConfigType.SOCKS) {
|
||||
if (TextUtils.isEmpty(vmessBean.security) && TextUtils.isEmpty(vmessBean.id)) {
|
||||
server.users = null
|
||||
} else {
|
||||
val socksUsersBean =
|
||||
V2rayConfig.OutboundBean.OutSettingsBean.ServersBean.SocksUsersBean()
|
||||
socksUsersBean.user = vmessBean.security
|
||||
socksUsersBean.pass = vmessBean.id
|
||||
server.users = listOf(socksUsersBean)
|
||||
}
|
||||
} else if (config.configType == EConfigType.TROJAN) {
|
||||
server.password = vmessBean.id
|
||||
}
|
||||
}
|
||||
config.outboundBean?.streamSettings?.let { streamSetting ->
|
||||
val sni = streamSetting.populateTransportSettings(
|
||||
vmessBean.network,
|
||||
vmessBean.headerType,
|
||||
vmessBean.requestHost,
|
||||
vmessBean.path,
|
||||
vmessBean.path,
|
||||
vmessBean.requestHost,
|
||||
vmessBean.path,
|
||||
vmessBean.headerType,
|
||||
vmessBean.path,
|
||||
vmessBean.requestHost,
|
||||
)
|
||||
val allowInsecure = if (vmessBean.allowInsecure.isBlank()) {
|
||||
settingsStorage?.decodeBool(AppConfig.PREF_ALLOW_INSECURE) ?: false
|
||||
} else {
|
||||
vmessBean.allowInsecure.toBoolean()
|
||||
}
|
||||
var fingerprint = streamSetting.tlsSettings?.fingerprint
|
||||
streamSetting.populateTlsSettings(
|
||||
vmessBean.streamSecurity, allowInsecure,
|
||||
vmessBean.sni.ifBlank { sni }, fingerprint, null, null, null, null
|
||||
)
|
||||
}
|
||||
}
|
||||
val key = MmkvManager.encodeServerConfig(vmessBean.guid, config)
|
||||
if (index == angConfig.index) {
|
||||
mainStorage?.encode(KEY_SELECTED_SERVER, key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun migrateSubItemBean(angConfig: AngConfig) {
|
||||
angConfig.subItem.forEach {
|
||||
val subItem = SubscriptionItem()
|
||||
subItem.remarks = it.remarks
|
||||
subItem.url = it.url
|
||||
subItem.enabled = it.enabled
|
||||
subStorage?.encode(it.id, Gson().toJson(subItem))
|
||||
}
|
||||
}
|
||||
// fun migrateLegacyConfig(c: Context): Boolean? {
|
||||
// try {
|
||||
// val defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(c)
|
||||
// val context = defaultSharedPreferences.getString(ANG_CONFIG, "")
|
||||
// if (context.isNullOrBlank()) {
|
||||
// return null
|
||||
// }
|
||||
// val angConfig = Gson().fromJson(context, AngConfig::class.java)
|
||||
// for (i in angConfig.vmess.indices) {
|
||||
// upgradeServerVersion(angConfig.vmess[i])
|
||||
// }
|
||||
//
|
||||
// copyLegacySettings(defaultSharedPreferences)
|
||||
// migrateVmessBean(angConfig, defaultSharedPreferences)
|
||||
// migrateSubItemBean(angConfig)
|
||||
//
|
||||
// defaultSharedPreferences.edit().remove(ANG_CONFIG).apply()
|
||||
// return true
|
||||
// } catch (e: Exception) {
|
||||
// e.printStackTrace()
|
||||
// }
|
||||
// return false
|
||||
// }
|
||||
//
|
||||
// private fun copyLegacySettings(sharedPreferences: SharedPreferences) {
|
||||
// listOf(
|
||||
// AppConfig.PREF_MODE,
|
||||
// AppConfig.PREF_REMOTE_DNS,
|
||||
// AppConfig.PREF_DOMESTIC_DNS,
|
||||
// AppConfig.PREF_LOCAL_DNS_PORT,
|
||||
// AppConfig.PREF_SOCKS_PORT,
|
||||
// AppConfig.PREF_HTTP_PORT,
|
||||
// AppConfig.PREF_LOGLEVEL,
|
||||
// AppConfig.PREF_ROUTING_DOMAIN_STRATEGY,
|
||||
// AppConfig.PREF_ROUTING_MODE,
|
||||
// AppConfig.PREF_V2RAY_ROUTING_AGENT,
|
||||
// AppConfig.PREF_V2RAY_ROUTING_BLOCKED,
|
||||
// AppConfig.PREF_V2RAY_ROUTING_DIRECT,
|
||||
// ).forEach { key ->
|
||||
// settingsStorage?.encode(key, sharedPreferences.getString(key, null))
|
||||
// }
|
||||
// listOf(
|
||||
// AppConfig.PREF_SPEED_ENABLED,
|
||||
// AppConfig.PREF_PROXY_SHARING,
|
||||
// AppConfig.PREF_LOCAL_DNS_ENABLED,
|
||||
// AppConfig.PREF_ALLOW_INSECURE,
|
||||
// AppConfig.PREF_PREFER_IPV6,
|
||||
// AppConfig.PREF_PER_APP_PROXY,
|
||||
// AppConfig.PREF_BYPASS_APPS,
|
||||
// ).forEach { key ->
|
||||
// settingsStorage?.encode(key, sharedPreferences.getBoolean(key, false))
|
||||
// }
|
||||
// settingsStorage?.encode(
|
||||
// AppConfig.PREF_SNIFFING_ENABLED,
|
||||
// sharedPreferences.getBoolean(AppConfig.PREF_SNIFFING_ENABLED, true)
|
||||
// )
|
||||
// settingsStorage?.encode(
|
||||
// AppConfig.PREF_PER_APP_PROXY_SET,
|
||||
// sharedPreferences.getStringSet(AppConfig.PREF_PER_APP_PROXY_SET, setOf())
|
||||
// )
|
||||
// }
|
||||
//
|
||||
// private fun migrateVmessBean(angConfig: AngConfig, sharedPreferences: SharedPreferences) {
|
||||
// angConfig.vmess.forEachIndexed { index, vmessBean ->
|
||||
// val type = EConfigType.fromInt(vmessBean.configType) ?: return@forEachIndexed
|
||||
// val config = ServerConfig.create(type)
|
||||
// config.remarks = vmessBean.remarks
|
||||
// config.subscriptionId = vmessBean.subid
|
||||
// if (type == EConfigType.CUSTOM) {
|
||||
// val jsonConfig = sharedPreferences.getString(ANG_CONFIG + vmessBean.guid, "")
|
||||
// val v2rayConfig = try {
|
||||
// Gson().fromJson(jsonConfig, V2rayConfig::class.java)
|
||||
// } catch (e: Exception) {
|
||||
// e.printStackTrace()
|
||||
// return@forEachIndexed
|
||||
// }
|
||||
// config.fullConfig = v2rayConfig
|
||||
// serverRawStorage?.encode(vmessBean.guid, jsonConfig)
|
||||
// } else {
|
||||
// config.outboundBean?.settings?.vnext?.get(0)?.let { vnext ->
|
||||
// vnext.address = vmessBean.address
|
||||
// vnext.port = vmessBean.port
|
||||
// vnext.users[0].id = vmessBean.id
|
||||
// if (config.configType == EConfigType.VMESS) {
|
||||
// vnext.users[0].alterId = vmessBean.alterId
|
||||
// vnext.users[0].security = vmessBean.security
|
||||
// } else if (config.configType == EConfigType.VLESS) {
|
||||
// vnext.users[0].encryption = vmessBean.security
|
||||
// vnext.users[0].flow = vmessBean.flow
|
||||
// }
|
||||
// }
|
||||
// config.outboundBean?.settings?.servers?.get(0)?.let { server ->
|
||||
// server.address = vmessBean.address
|
||||
// server.port = vmessBean.port
|
||||
// if (config.configType == EConfigType.SHADOWSOCKS) {
|
||||
// server.password = vmessBean.id
|
||||
// server.method = vmessBean.security
|
||||
// } else if (config.configType == EConfigType.SOCKS) {
|
||||
// if (TextUtils.isEmpty(vmessBean.security) && TextUtils.isEmpty(vmessBean.id)) {
|
||||
// server.users = null
|
||||
// } else {
|
||||
// val socksUsersBean =
|
||||
// V2rayConfig.OutboundBean.OutSettingsBean.ServersBean.SocksUsersBean()
|
||||
// socksUsersBean.user = vmessBean.security
|
||||
// socksUsersBean.pass = vmessBean.id
|
||||
// server.users = listOf(socksUsersBean)
|
||||
// }
|
||||
// } else if (config.configType == EConfigType.TROJAN) {
|
||||
// server.password = vmessBean.id
|
||||
// }
|
||||
// }
|
||||
// config.outboundBean?.streamSettings?.let { streamSetting ->
|
||||
// val sni = streamSetting.populateTransportSettings(
|
||||
// vmessBean.network,
|
||||
// vmessBean.headerType,
|
||||
// vmessBean.requestHost,
|
||||
// vmessBean.path,
|
||||
// vmessBean.path,
|
||||
// vmessBean.requestHost,
|
||||
// vmessBean.path,
|
||||
// vmessBean.headerType,
|
||||
// vmessBean.path,
|
||||
// vmessBean.requestHost,
|
||||
// )
|
||||
// val allowInsecure = if (vmessBean.allowInsecure.isBlank()) {
|
||||
// settingsStorage?.decodeBool(AppConfig.PREF_ALLOW_INSECURE) ?: false
|
||||
// } else {
|
||||
// vmessBean.allowInsecure.toBoolean()
|
||||
// }
|
||||
// var fingerprint = streamSetting.tlsSettings?.fingerprint
|
||||
// streamSetting.populateTlsSettings(
|
||||
// vmessBean.streamSecurity, allowInsecure,
|
||||
// vmessBean.sni.ifBlank { sni }, fingerprint, null, null, null, null
|
||||
// )
|
||||
// }
|
||||
// }
|
||||
// val key = MmkvManager.encodeServerConfig(vmessBean.guid, config)
|
||||
// if (index == angConfig.index) {
|
||||
// mainStorage?.encode(KEY_SELECTED_SERVER, key)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private fun migrateSubItemBean(angConfig: AngConfig) {
|
||||
// angConfig.subItem.forEach {
|
||||
// val subItem = SubscriptionItem()
|
||||
// subItem.remarks = it.remarks
|
||||
// subItem.url = it.url
|
||||
// subItem.enabled = it.enabled
|
||||
// subStorage?.encode(it.id, Gson().toJson(subItem))
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* import config form qrcode or...
|
||||
@@ -599,14 +595,24 @@ object AngConfigManager {
|
||||
if (idx == -1) {
|
||||
queryPairs[Utils.urlDecode(pair)] = "";
|
||||
} else {
|
||||
queryPairs[Utils.urlDecode(pair.substring(0, idx))] = Utils.urlDecode(pair.substring(idx + 1))
|
||||
queryPairs[Utils.urlDecode(pair.substring(0, idx))] =
|
||||
Utils.urlDecode(pair.substring(idx + 1))
|
||||
}
|
||||
}
|
||||
Log.d(AppConfig.ANG_PACKAGE, queryPairs.toString())
|
||||
var sni: String? = ""
|
||||
if (queryPairs["plugin"] == "obfs-local" && queryPairs["obfs"] == "http") {
|
||||
sni = config.outboundBean?.streamSettings?.populateTransportSettings(
|
||||
"tcp", "http", queryPairs["obfs-host"], queryPairs["path"], null, null, null, null, null, null
|
||||
"tcp",
|
||||
"http",
|
||||
queryPairs["obfs-host"],
|
||||
queryPairs["path"],
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
} else if (queryPairs["plugin"] == "v2ray-plugin") {
|
||||
var network = "ws";
|
||||
@@ -614,7 +620,16 @@ object AngConfigManager {
|
||||
network = "quic";
|
||||
}
|
||||
sni = config.outboundBean?.streamSettings?.populateTransportSettings(
|
||||
network, null, queryPairs["host"], queryPairs["path"], null, null, null, null, null, null
|
||||
network,
|
||||
null,
|
||||
queryPairs["host"],
|
||||
queryPairs["path"],
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
}
|
||||
if ("tls" in queryPairs) {
|
||||
@@ -622,9 +637,9 @@ object AngConfigManager {
|
||||
"tls", false, sni ?: "", null, null, null, null, null
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
config.outboundBean?.settings?.servers?.get(0)?.let { server ->
|
||||
server.address = uri.idnHost
|
||||
server.port = uri.port
|
||||
@@ -935,38 +950,38 @@ object AngConfigManager {
|
||||
return 0
|
||||
}
|
||||
|
||||
/**
|
||||
* upgrade
|
||||
*/
|
||||
private fun upgradeServerVersion(vmess: AngConfig.VmessBean): Int {
|
||||
try {
|
||||
if (vmess.configVersion == 2) {
|
||||
return 0
|
||||
}
|
||||
|
||||
when (vmess.network) {
|
||||
"ws", "h2" -> {
|
||||
var path = ""
|
||||
var host = ""
|
||||
val lstParameter = vmess.requestHost.split(";")
|
||||
if (lstParameter.isNotEmpty()) {
|
||||
path = lstParameter[0].trim()
|
||||
}
|
||||
if (lstParameter.size > 1) {
|
||||
path = lstParameter[0].trim()
|
||||
host = lstParameter[1].trim()
|
||||
}
|
||||
vmess.path = path
|
||||
vmess.requestHost = host
|
||||
}
|
||||
}
|
||||
vmess.configVersion = 2
|
||||
return 0
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
return -1
|
||||
}
|
||||
}
|
||||
// /**
|
||||
// * upgrade
|
||||
// */
|
||||
// private fun upgradeServerVersion(vmess: AngConfig.VmessBean): Int {
|
||||
// try {
|
||||
// if (vmess.configVersion == 2) {
|
||||
// return 0
|
||||
// }
|
||||
//
|
||||
// when (vmess.network) {
|
||||
// "ws", "h2" -> {
|
||||
// var path = ""
|
||||
// var host = ""
|
||||
// val lstParameter = vmess.requestHost.split(";")
|
||||
// if (lstParameter.isNotEmpty()) {
|
||||
// path = lstParameter[0].trim()
|
||||
// }
|
||||
// if (lstParameter.size > 1) {
|
||||
// path = lstParameter[0].trim()
|
||||
// host = lstParameter[1].trim()
|
||||
// }
|
||||
// vmess.path = path
|
||||
// vmess.requestHost = host
|
||||
// }
|
||||
// }
|
||||
// vmess.configVersion = 2
|
||||
// return 0
|
||||
// } catch (e: Exception) {
|
||||
// e.printStackTrace()
|
||||
// return -1
|
||||
// }
|
||||
// }
|
||||
|
||||
fun importBatchConfig(servers: String?, subid: String, append: Boolean): Int {
|
||||
try {
|
||||
@@ -1038,15 +1053,19 @@ object AngConfigManager {
|
||||
try {
|
||||
//val gson = GsonBuilder().setPrettyPrinting().create()
|
||||
val gson = GsonBuilder()
|
||||
.setPrettyPrinting()
|
||||
.disableHtmlEscaping()
|
||||
.registerTypeAdapter( // custom serialiser is needed here since JSON by default parse number as Double, core will fail to start
|
||||
object : TypeToken<Double>() {}.type,
|
||||
JsonSerializer { src: Double?, _: Type?, _: JsonSerializationContext? -> JsonPrimitive(src?.toInt()) }
|
||||
.setPrettyPrinting()
|
||||
.disableHtmlEscaping()
|
||||
.registerTypeAdapter( // custom serialiser is needed here since JSON by default parse number as Double, core will fail to start
|
||||
object : TypeToken<Double>() {}.type,
|
||||
JsonSerializer { src: Double?, _: Type?, _: JsonSerializationContext? ->
|
||||
JsonPrimitive(
|
||||
src?.toInt()
|
||||
)
|
||||
.create()
|
||||
}
|
||||
)
|
||||
.create()
|
||||
val serverList: Array<V2rayConfig> =
|
||||
Gson().fromJson(server, Array<V2rayConfig>::class.java)
|
||||
Gson().fromJson(server, Array<V2rayConfig>::class.java)
|
||||
|
||||
if (serverList.isNotEmpty()) {
|
||||
var count = 0
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:maxLines="4"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Tooltip" />
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/title_source_code"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Tooltip" />
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -136,7 +136,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/title_pref_feedback"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Tooltip" />
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/title_tg_channel"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Tooltip" />
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -189,7 +189,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/title_privacy_policy"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Tooltip" />
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -204,7 +204,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/title_about"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Tooltip" />
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
<string name="title_source_code">Source code</string>
|
||||
<string name="title_tg_channel">Telegram channel</string>
|
||||
<string name="title_configuration_backup">Backup configuration</string>
|
||||
<string name="summary_configuration_backup">Backup storage location: [%s], It will be cleared when the app is uninstalled</string>
|
||||
<string name="summary_configuration_backup">Storage location: [%s], The backup will be cleared after uninstalling the app or clearing the storage</string>
|
||||
<string name="title_configuration_restore">Restore configuration</string>
|
||||
<string name="title_pref_promotion">ترقية</string>
|
||||
<string name="summary_pref_promotion">ترقية، انقر للحصول على التفاصيل (يمكن إزالة التبرع)</string>
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
<string name="title_source_code">Source code</string>
|
||||
<string name="title_tg_channel">Telegram channel</string>
|
||||
<string name="title_configuration_backup">Backup configuration</string>
|
||||
<string name="summary_configuration_backup">Backup storage location: [%s], It will be cleared when the app is uninstalled</string>
|
||||
<string name="summary_configuration_backup">Storage location: [%s], The backup will be cleared after uninstalling the app or clearing the storage</string>
|
||||
<string name="title_configuration_restore">Restore configuration</string>
|
||||
<string name="title_pref_promotion">تبلیغات</string>
|
||||
<string name="summary_pref_promotion">تبلیغات، برای جزئیات بیشتر کلیک کنید (کمک مالی کنید تا حذف شود)</string>
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
<string name="title_source_code">Исходный код</string>
|
||||
<string name="title_tg_channel">Telegram-канал</string>
|
||||
<string name="title_configuration_backup">Backup configuration</string>
|
||||
<string name="summary_configuration_backup">Backup storage location: [%s], It will be cleared when the app is uninstalled</string>
|
||||
<string name="summary_configuration_backup">Storage location: [%s], The backup will be cleared after uninstalling the app or clearing the storage</string>
|
||||
<string name="title_configuration_restore">Restore configuration</string>
|
||||
|
||||
<string name="title_pref_promotion">Содействие</string>
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
<string name="title_source_code">Source code</string>
|
||||
<string name="title_tg_channel">Telegram channel</string>
|
||||
<string name="title_configuration_backup">Backup configuration</string>
|
||||
<string name="summary_configuration_backup">Backup storage location: [%s], It will be cleared when the app is uninstalled</string>
|
||||
<string name="summary_configuration_backup">Storage location: [%s], The backup will be cleared after uninstalling the app or clearing the storage</string>
|
||||
<string name="title_configuration_restore">Restore configuration</string>
|
||||
<string name="title_pref_promotion">Quảng bá server</string>
|
||||
<string name="summary_pref_promotion">Quảng cáo, nhấn để biết thêm (Ủng hộ có thể được gỡ bỏ)</string>
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
<string name="title_source_code">源代码</string>
|
||||
<string name="title_tg_channel">Telegram 频道</string>
|
||||
<string name="title_configuration_backup">备份配置</string>
|
||||
<string name="summary_configuration_backup">备份存储位置: [%s], 卸载App后会备份将被清除</string>
|
||||
<string name="summary_configuration_backup">存储位置: [%s], 卸载App或清除存储后备份将被清除</string>
|
||||
<string name="title_configuration_restore">还原配置</string>
|
||||
|
||||
<string name="title_pref_promotion">推广</string>
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
<string name="title_source_code">原始碼</string>
|
||||
<string name="title_tg_channel">Telegram 頻道</string>
|
||||
<string name="title_configuration_backup">備份配置</string>
|
||||
<string name="summary_configuration_backup">備份儲存位置: [%s], 卸載App後備份將會清除</string>
|
||||
<string name="summary_configuration_backup">儲存位置: [%s], 卸載App或清除儲存後備份將被清除</string>
|
||||
<string name="title_configuration_restore">還原配置</string>
|
||||
|
||||
<string name="title_pref_promotion">推廣</string>
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
<string name="title_source_code">Source code</string>
|
||||
<string name="title_tg_channel">Telegram channel</string>
|
||||
<string name="title_configuration_backup">Backup configuration</string>
|
||||
<string name="summary_configuration_backup">Backup storage location: [%s], It will be cleared when the app is uninstalled</string>
|
||||
<string name="summary_configuration_backup">Storage location: [%s], The backup will be cleared after uninstalling the app or clearing the storage</string>
|
||||
<string name="title_configuration_restore">Restore configuration</string>
|
||||
|
||||
<string name="title_pref_promotion">Promotion</string>
|
||||
|
||||
+10
-1
@@ -2,6 +2,15 @@ NAME = xray
|
||||
|
||||
VERSION=$(shell git describe --always --dirty)
|
||||
|
||||
export GOARCH ?=
|
||||
export GOOS ?=
|
||||
|
||||
ifdef GOARCH
|
||||
ifeq ($(GOOS),darwin)
|
||||
NAME:=$(NAME)-$(GOARCH)
|
||||
endif
|
||||
endif
|
||||
|
||||
LDFLAGS = -X github.com/xtls/xray-core/core.build=$(VERSION) -s -w -buildid=
|
||||
PARAMS = -trimpath -ldflags "$(LDFLAGS)" -v
|
||||
MAIN = ./main
|
||||
@@ -26,4 +35,4 @@ install:
|
||||
|
||||
clean:
|
||||
go clean -v -i $(PWD)
|
||||
rm -f xray xray.exe wxray.exe xray_softfloat
|
||||
rm -f xray xray.exe wxray.exe xray_softfloat
|
||||
|
||||
@@ -24,7 +24,7 @@ type ConfigLoader func(input interface{}) (*Config, error)
|
||||
// ConfigBuilder is a builder to build core.Config from filenames and formats
|
||||
type ConfigBuilder func(files []string, formats []string) (*Config, error)
|
||||
|
||||
// ConfigMerger merge multiple json configs into on config
|
||||
// ConfigsMerger merge multiple json configs into on config
|
||||
type ConfigsMerger func(files []string, formats []string) (string, error)
|
||||
|
||||
var (
|
||||
|
||||
@@ -30,6 +30,7 @@ require (
|
||||
gvisor.dev/gvisor v0.0.0-20231104011432-48a6d7d5bd0b
|
||||
h12.io/socks v1.0.3
|
||||
lukechampine.com/blake3 v1.2.2
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0
|
||||
)
|
||||
|
||||
require (
|
||||
|
||||
@@ -8,6 +8,8 @@ dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1
|
||||
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
|
||||
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0 h1:Wo41lDOevRJSGpevP+8Pk5bANX7fJacO2w04aqLiC5I=
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0/go.mod h1:FVGavL/QEBQDcBpr3fAojoK17xX5k9bicBphrOpP7uM=
|
||||
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
|
||||
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package tls
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/OmarTariq612/goech"
|
||||
"github.com/cloudflare/circl/hpke"
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/main/commands/base"
|
||||
)
|
||||
|
||||
var cmdECH = &base.Command{
|
||||
UsageLine: `{{.Exec}} tls ech [--serverName (string)] [--json]`,
|
||||
Short: `Generate TLS-ECH certificates`,
|
||||
Long: `
|
||||
Generate TLS-ECH certificates.
|
||||
|
||||
Set serverName to your custom string: {{.Exec}} tls ech --serverName (string)
|
||||
Generate into json format: {{.Exec}} tls ech --json
|
||||
`, // Enable PQ signature schemes: {{.Exec}} tls ech --pq-signature-schemes-enabled
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdECH.Run = executeECH
|
||||
}
|
||||
|
||||
var input_pqSignatureSchemesEnabled = cmdECH.Flag.Bool("pqSignatureSchemesEnabled", false, "")
|
||||
var input_serverName = cmdECH.Flag.String("serverName", "cloudflare-ech.com", "")
|
||||
var input_json = cmdECH.Flag.Bool("json", false, "True == turn on json output")
|
||||
|
||||
func executeECH(cmd *base.Command, args []string) {
|
||||
var kem hpke.KEM
|
||||
|
||||
if *input_pqSignatureSchemesEnabled {
|
||||
kem = hpke.KEM_X25519_KYBER768_DRAFT00
|
||||
} else {
|
||||
kem = hpke.KEM_X25519_HKDF_SHA256
|
||||
}
|
||||
|
||||
echKeySet, err := goech.GenerateECHKeySet(0, *input_serverName, kem)
|
||||
common.Must(err)
|
||||
|
||||
configBuffer, _ := echKeySet.ECHConfig.MarshalBinary()
|
||||
keyBuffer, _ := echKeySet.MarshalBinary()
|
||||
|
||||
configPEM := string(pem.EncodeToMemory(&pem.Block{Type: "ECH CONFIGS", Bytes: configBuffer}))
|
||||
keyPEM := string(pem.EncodeToMemory(&pem.Block{Type: "ECH KEYS", Bytes: keyBuffer}))
|
||||
if *input_json {
|
||||
jECHConfigs := map[string]interface{}{
|
||||
"configs": strings.Split(strings.TrimSpace(string(configPEM)), "\n"),
|
||||
}
|
||||
jECHKey := map[string]interface{}{
|
||||
"key": strings.Split(strings.TrimSpace(string(keyPEM)), "\n"),
|
||||
}
|
||||
|
||||
for _, i := range []map[string]interface{}{jECHConfigs, jECHKey} {
|
||||
content, err := json.MarshalIndent(i, "", " ")
|
||||
common.Must(err)
|
||||
os.Stdout.Write(content)
|
||||
os.Stdout.WriteString("\n")
|
||||
}
|
||||
} else {
|
||||
os.Stdout.WriteString(configPEM)
|
||||
os.Stdout.WriteString(keyPEM)
|
||||
}
|
||||
}
|
||||
@@ -14,5 +14,6 @@ var CmdTLS = &base.Command{
|
||||
cmdCert,
|
||||
cmdPing,
|
||||
cmdCertChainHash,
|
||||
cmdECH,
|
||||
},
|
||||
}
|
||||
|
||||
+25
-3
@@ -442,6 +442,7 @@ option(USE_LEVELDB "Build with leveldb" OFF)
|
||||
option(USE_SQLITE "Build with sqlite" OFF)
|
||||
option(USE_OLD_SYSTEMD_SERVICE "Install with old systemd service files" OFF)
|
||||
option(USE_QUICHE "Build with quiche support" ON)
|
||||
option(USE_IOURING "Build with io uring support" OFF)
|
||||
|
||||
option(ENABLE_FORTIFY "Enable build with Fortify Source" ON)
|
||||
option(ENABLE_LTO "Enable build with LTO" ON)
|
||||
@@ -2750,6 +2751,16 @@ target_link_libraries(asio_core PUBLIC
|
||||
url
|
||||
)
|
||||
|
||||
if (USE_IOURING)
|
||||
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
message(FATAL_ERROR "io uring is only supported with linux")
|
||||
endif()
|
||||
target_compile_definitions(asio_core PUBLIC ASIO_HAS_IO_URING)
|
||||
target_compile_definitions(asio_core PUBLIC ASIO_HAS_IO_URING_AS_DEFAULT)
|
||||
target_link_libraries(asio_core PUBLIC uring)
|
||||
list(APPEND YASS_APP_FEATURES "iouring")
|
||||
endif()
|
||||
|
||||
# *****************************************************************************************
|
||||
# asio Library
|
||||
# *****************************************************************************************
|
||||
@@ -3864,6 +3875,17 @@ if (ANDROID)
|
||||
target_link_libraries(yass_net PUBLIC log)
|
||||
endif()
|
||||
|
||||
add_library(yass_cli_nogui_lib OBJECT
|
||||
src/cli/cli_connection.cpp
|
||||
src/cli/cli_connection.hpp
|
||||
src/cli/cli_connection_stats.cpp
|
||||
src/cli/cli_connection_stats.hpp
|
||||
)
|
||||
target_include_directories(yass_cli_nogui_lib PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
|
||||
target_link_libraries(yass_cli_nogui_lib PUBLIC yass_net)
|
||||
|
||||
add_library(yass_cli_lib OBJECT
|
||||
src/cli/cli_worker.cpp
|
||||
src/cli/cli_connection.cpp
|
||||
@@ -3891,7 +3913,7 @@ if (CLI)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
|
||||
target_link_libraries(yass_cli PUBLIC
|
||||
yass_cli_lib
|
||||
yass_cli_nogui_lib
|
||||
yass_net
|
||||
)
|
||||
|
||||
@@ -4663,7 +4685,7 @@ if (BUILD_TESTS)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/server
|
||||
)
|
||||
target_link_libraries(yass_test PUBLIC
|
||||
yass_cli_lib
|
||||
yass_cli_nogui_lib
|
||||
yass_server_lib
|
||||
yass_gtest
|
||||
)
|
||||
@@ -4776,7 +4798,7 @@ if (BUILD_BENCHMARKS)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/server
|
||||
)
|
||||
target_link_libraries(yass_benchmark PUBLIC
|
||||
yass_cli_lib
|
||||
yass_cli_nogui_lib
|
||||
yass_server_lib
|
||||
benchmark::benchmark
|
||||
)
|
||||
|
||||
+6
-6
@@ -22,13 +22,13 @@ More Information refers to [wiki](https://github.com/Chilledheart/yass/wiki) and
|
||||
## Usages
|
||||
|
||||
### Prebuilt binaries
|
||||
- Android [download apk](https://github.com/Chilledheart/yass/releases/download/1.8.3/yass-android-release-arm64-1.8.3.apk) or [download 32-bit apk](https://github.com/Chilledheart/yass/releases/download/1.8.3/yass-android-release-arm-1.8.3.apk)
|
||||
- iOS [join via TestFlight](https://testflight.apple.com/join/6AkiEq09) or [download ipa](https://github.com/Chilledheart/yass/releases/download/1.8.3/yass-ios-release-arm64-1.8.3.ipa)
|
||||
- Windows [download installer](https://github.com/Chilledheart/yass/releases/download/1.8.3/yass-mingw-winxp-release-x86_64-1.8.3-system-installer.exe) or [download 32-bit installer](https://github.com/Chilledheart/yass/releases/download/1.8.3/yass-mingw-winxp-release-i686-1.8.3-system-installer.exe) [(require vc 2010 runtime)][vs2010_x86] or [download woa arm64 installer](https://github.com/Chilledheart/yass/releases/download/1.8.3/yass-mingw-release-aarch64-1.8.3-system-installer.exe)
|
||||
- macOS [download intel dmg](https://github.com/Chilledheart/yass/releases/download/1.8.3/yass-macos-release-x64-1.8.3.dmg) or [download apple silicon dmg](https://github.com/Chilledheart/yass/releases/download/1.8.3/yass-macos-release-arm64-1.8.3.dmg)
|
||||
- Linux [download rpm](https://github.com/Chilledheart/yass/releases/download/1.8.3/yass.el7.x86_64.1.8.3-0.rpm) or [download deb](https://github.com/Chilledheart/yass/releases/download/1.8.3/yass-client-ubuntu-16.04-xenial_amd64.1.8.3.deb)
|
||||
- Android [download apk](https://github.com/Chilledheart/yass/releases/download/1.9.0/yass-android-release-arm64-1.9.0.apk) or [download 32-bit apk](https://github.com/Chilledheart/yass/releases/download/1.9.0/yass-android-release-arm-1.9.0.apk)
|
||||
- iOS [join via TestFlight](https://testflight.apple.com/join/6AkiEq09) or [download ipa](https://github.com/Chilledheart/yass/releases/download/1.9.0/yass-ios-release-arm64-1.9.0.ipa)
|
||||
- Windows [download installer](https://github.com/Chilledheart/yass/releases/download/1.9.0/yass-mingw-winxp-release-x86_64-1.9.0-system-installer.exe) or [download 32-bit installer](https://github.com/Chilledheart/yass/releases/download/1.9.0/yass-mingw-winxp-release-i686-1.9.0-system-installer.exe) [(require vc 2010 runtime)][vs2010_x86] or [download woa arm64 installer](https://github.com/Chilledheart/yass/releases/download/1.9.0/yass-mingw-release-aarch64-1.9.0-system-installer.exe)
|
||||
- macOS [download intel dmg](https://github.com/Chilledheart/yass/releases/download/1.9.0/yass-macos-release-x64-1.9.0.dmg) or [download apple silicon dmg](https://github.com/Chilledheart/yass/releases/download/1.9.0/yass-macos-release-arm64-1.9.0.dmg)
|
||||
- Linux [download rpm](https://github.com/Chilledheart/yass/releases/download/1.9.0/yass.el7.x86_64.1.9.0-0.rpm) or [download deb](https://github.com/Chilledheart/yass/releases/download/1.9.0/yass-client-ubuntu-16.04-xenial_amd64.1.9.0.deb)
|
||||
|
||||
View more at [release page](https://github.com/Chilledheart/yass/releases/tag/1.8.3)
|
||||
View more at [release page](https://github.com/Chilledheart/yass/releases/tag/1.9.0)
|
||||
|
||||
### Status of Package Store
|
||||
Visit wiki's [Status of Package Store](https://github.com/Chilledheart/yass/wiki/Status-of-Package-Store)
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
yass (1.9.0-1) UNRELEASED; urgency=medium
|
||||
|
||||
* bump to chromium 125 dependents.
|
||||
|
||||
-- Chilledheart <keeyou-cn@outlook.com> Tue, 16 Apr 2024 10:40:00 +0800
|
||||
yass (1.8.3-1) UNRELEASED; urgency=medium
|
||||
|
||||
* net: add dot support
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "net/resolver.hpp"
|
||||
#include "version.h"
|
||||
|
||||
const ProgramType pType = YASS_CLIENT;
|
||||
|
||||
using namespace cli;
|
||||
|
||||
static asio::ip::tcp::resolver::results_type ResolveAddress(const std::string& domain_name, int port) {
|
||||
|
||||
@@ -482,11 +482,11 @@ class CliConnectionFactory : public net::ConnectionFactory {
|
||||
public:
|
||||
using ConnectionType = CliConnection;
|
||||
template <typename... Args>
|
||||
scoped_refptr<ConnectionType> Create(Args&&... args) {
|
||||
static scoped_refptr<ConnectionType> Create(Args&&... args) {
|
||||
return MakeRefCounted<ConnectionType>(std::forward<Args>(args)...);
|
||||
}
|
||||
const char* Name() override { return "client"; }
|
||||
const char* ShortName() override { return "client"; }
|
||||
static constexpr const ConnectionFactoryType Type = CONNECTION_FACTORY_CLIENT;
|
||||
static constexpr const char Name[] = "client";
|
||||
};
|
||||
|
||||
} // namespace cli
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
const ProgramType pType = YASS_CLIENT_SLAVE;
|
||||
|
||||
using namespace cli;
|
||||
|
||||
class WorkerPrivate {
|
||||
|
||||
@@ -205,7 +205,7 @@ bool ReadConfig() {
|
||||
client_required_fields_loaded &= config_impl->Read("local", &FLAGS_local_host);
|
||||
client_required_fields_loaded &= config_impl->Read("local_port", &FLAGS_local_port);
|
||||
|
||||
if (absl::flags_internal::ShortProgramInvocationName() != "yass_server") {
|
||||
if (pType == YASS_CLIENT || pType == YASS_CLIENT_SLAVE) {
|
||||
required_fields_loaded &= client_required_fields_loaded;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <absl/flags/usage.h>
|
||||
#include <stdlib.h>
|
||||
#include "core/logging.hpp"
|
||||
#include "core/utils.hpp"
|
||||
#include "feature.h"
|
||||
#include "version.h"
|
||||
|
||||
@@ -82,7 +83,7 @@ void ReadConfigFileAndArguments(int argc, const char** argv) {
|
||||
}
|
||||
|
||||
// first line of logging
|
||||
LOG(WARNING) << "Application starting: " << YASS_APP_TAG;
|
||||
LOG(WARNING) << "Application starting: " << YASS_APP_TAG << " type: " << ProgramTypeToStr(pType);
|
||||
LOG(WARNING) << "Last Change: " << YASS_APP_LAST_CHANGE;
|
||||
LOG(WARNING) << "Features: " << YASS_APP_FEATURES;
|
||||
#ifndef NDEBUG
|
||||
|
||||
@@ -424,3 +424,21 @@ void HumanReadableByteCountBin(std::wostream* ss, uint64_t bytes) {
|
||||
HumanReadableByteCountBinT(ss, bytes);
|
||||
}
|
||||
#endif
|
||||
|
||||
const char* ProgramTypeToStr(ProgramType type) {
|
||||
switch (type) {
|
||||
case YASS_CLIENT:
|
||||
return "client";
|
||||
case YASS_SERVER:
|
||||
return "server";
|
||||
case YASS_CLIENT_SLAVE:
|
||||
return "client (slave)";
|
||||
case YASS_UNITTEST:
|
||||
return "unittest";
|
||||
case YASS_BENCHMARK:
|
||||
return "benchmark";
|
||||
case YASS_UNSPEC:
|
||||
default:
|
||||
return "unspec";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,4 +231,16 @@ void HumanReadableByteCountBin(std::ostream* ss, uint64_t bytes);
|
||||
void HumanReadableByteCountBin(std::wostream* ss, uint64_t bytes);
|
||||
#endif
|
||||
|
||||
enum ProgramType {
|
||||
YASS_UNSPEC,
|
||||
YASS_CLIENT,
|
||||
YASS_SERVER,
|
||||
YASS_CLIENT_SLAVE,
|
||||
YASS_UNITTEST,
|
||||
YASS_BENCHMARK,
|
||||
};
|
||||
|
||||
extern const ProgramType pType;
|
||||
const char* ProgramTypeToStr(ProgramType type);
|
||||
|
||||
#endif // YASS_UTILS
|
||||
|
||||
@@ -300,8 +300,14 @@ class Connection {
|
||||
|
||||
class ConnectionFactory {
|
||||
public:
|
||||
virtual const char* Name() = 0;
|
||||
virtual const char* ShortName() = 0;
|
||||
enum ConnectionFactoryType {
|
||||
CONNECTION_FACTORY_UNSPEC,
|
||||
CONNECTION_FACTORY_CLIENT,
|
||||
CONNECTION_FACTORY_SERVER,
|
||||
CONNECTION_FACTORY_CONTENT_PROVIDER,
|
||||
};
|
||||
static constexpr const ConnectionFactoryType Type = CONNECTION_FACTORY_UNSPEC;
|
||||
static constexpr const char Name[] = "unspec";
|
||||
};
|
||||
|
||||
} // namespace net
|
||||
|
||||
@@ -64,10 +64,10 @@ class ContentServer {
|
||||
certificate_(certificate),
|
||||
private_key_(private_key),
|
||||
delegate_(delegate) {
|
||||
upstream_https_fallback_ &= std::string(factory_.Name()) == "client";
|
||||
https_fallback_ &= std::string(factory_.Name()) == "server";
|
||||
enable_upstream_tls_ &= std::string(factory_.Name()) == "client";
|
||||
enable_tls_ &= std::string(factory_.Name()) == "server";
|
||||
upstream_https_fallback_ &= T::Type == T::ConnectionFactoryType::CONNECTION_FACTORY_CLIENT;
|
||||
https_fallback_ &= T::Type == T::ConnectionFactoryType::CONNECTION_FACTORY_SERVER;
|
||||
enable_upstream_tls_ &= T::Type == T::ConnectionFactoryType::CONNECTION_FACTORY_CLIENT;
|
||||
enable_tls_ &= T::Type == T::ConnectionFactoryType::CONNECTION_FACTORY_SERVER;
|
||||
}
|
||||
|
||||
~ContentServer() {
|
||||
@@ -137,7 +137,7 @@ class ContentServer {
|
||||
return;
|
||||
}
|
||||
}
|
||||
LOG(INFO) << "Listening (" << factory_.Name() << ") on " << ctx.endpoint;
|
||||
LOG(INFO) << "Listening (" << T::Name << ") on " << ctx.endpoint;
|
||||
int listen_ctx_num = next_listen_ctx_++;
|
||||
asio::post(io_context_, [this, listen_ctx_num]() { accept(listen_ctx_num); });
|
||||
}
|
||||
@@ -152,7 +152,7 @@ class ContentServer {
|
||||
ctx.acceptor->close(ec);
|
||||
ctx.acceptor.reset();
|
||||
if (ec) {
|
||||
LOG(WARNING) << "Connections (" << factory_.Name() << ")"
|
||||
LOG(WARNING) << "Connections (" << T::Name << ")"
|
||||
<< " acceptor (" << ctx.endpoint << ") close failed: " << ec;
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ class ContentServer {
|
||||
ctx.acceptor->close(ec);
|
||||
ctx.acceptor.reset();
|
||||
if (ec) {
|
||||
LOG(WARNING) << "Connections (" << factory_.Name() << ")"
|
||||
LOG(WARNING) << "Connections (" << T::Name << ")"
|
||||
<< " acceptor (" << ctx.endpoint << ") close failed: " << ec;
|
||||
}
|
||||
}
|
||||
@@ -186,7 +186,7 @@ class ContentServer {
|
||||
auto connection_map = std::move(connection_map_);
|
||||
opened_connections_ = 0;
|
||||
for (auto [conn_id, conn] : connection_map) {
|
||||
VLOG(1) << "Connections (" << factory_.Name() << ")"
|
||||
VLOG(1) << "Connections (" << T::Name << ")"
|
||||
<< " closing Connection: " << conn_id;
|
||||
conn->close();
|
||||
}
|
||||
@@ -212,7 +212,7 @@ class ContentServer {
|
||||
return;
|
||||
}
|
||||
if (ec) {
|
||||
LOG(WARNING) << "Acceptor (" << factory_.Name() << ")"
|
||||
LOG(WARNING) << "Acceptor (" << T::Name << ")"
|
||||
<< " failed to accept more due to: " << ec;
|
||||
work_guard_.reset();
|
||||
return;
|
||||
@@ -223,9 +223,9 @@ class ContentServer {
|
||||
setup_ssl_ctx_alpn_cb(tlsext_ctx);
|
||||
setup_ssl_ctx_tlsext_cb(tlsext_ctx);
|
||||
}
|
||||
scoped_refptr<ConnectionType> conn = factory_.Create(
|
||||
io_context_, remote_host_ips_, remote_host_sni_, remote_port_, upstream_https_fallback_, https_fallback_,
|
||||
enable_upstream_tls_, enable_tls_, upstream_ssl_ctx_.get(), ssl_ctx_.get());
|
||||
scoped_refptr<ConnectionType> conn =
|
||||
T::Create(io_context_, remote_host_ips_, remote_host_sni_, remote_port_, upstream_https_fallback_,
|
||||
https_fallback_, enable_upstream_tls_, enable_tls_, upstream_ssl_ctx_.get(), ssl_ctx_.get());
|
||||
on_accept(conn, std::move(socket), listen_ctx_num, tlsext_ctx);
|
||||
if (in_shutdown_) {
|
||||
return;
|
||||
@@ -261,14 +261,13 @@ class ContentServer {
|
||||
if (delegate_) {
|
||||
delegate_->OnConnect(connection_id);
|
||||
}
|
||||
VLOG(1) << "Connection (" << factory_.Name() << ") " << connection_id << " with " << conn->peer_endpoint()
|
||||
<< " connected";
|
||||
VLOG(1) << "Connection (" << T::Name << ") " << connection_id << " with " << conn->peer_endpoint() << " connected";
|
||||
conn->start();
|
||||
}
|
||||
|
||||
void on_disconnect(scoped_refptr<ConnectionType> conn) {
|
||||
int connection_id = conn->connection_id();
|
||||
VLOG(1) << "Connection (" << factory_.Name() << ") " << connection_id << " disconnected (has ref " << std::boolalpha
|
||||
VLOG(1) << "Connection (" << T::Name << ") " << connection_id << " disconnected (has ref " << std::boolalpha
|
||||
<< conn->HasAtLeastOneRef() << std::noboolalpha << ")";
|
||||
auto iter = connection_map_.find(connection_id);
|
||||
if (iter != connection_map_.end()) {
|
||||
@@ -428,16 +427,14 @@ class ContentServer {
|
||||
}
|
||||
auto alpn = std::string(reinterpret_cast<const char*>(in + 1), in[0]);
|
||||
if (!server->https_fallback_ && alpn == "h2") {
|
||||
VLOG(1) << "Connection (" << server->factory_.Name() << ") " << connection_id
|
||||
<< " Alpn support (server) chosen: " << alpn;
|
||||
VLOG(1) << "Connection (" << T::Name << ") " << connection_id << " Alpn support (server) chosen: " << alpn;
|
||||
server->set_https_fallback(connection_id, false);
|
||||
*out = in + 1;
|
||||
*outlen = in[0];
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
if (alpn == "http/1.1") {
|
||||
VLOG(1) << "Connection (" << server->factory_.Name() << ") " << connection_id
|
||||
<< " Alpn support (server) chosen: " << alpn;
|
||||
VLOG(1) << "Connection (" << T::Name << ") " << connection_id << " Alpn support (server) chosen: " << alpn;
|
||||
server->set_https_fallback(connection_id, true);
|
||||
*out = in + 1;
|
||||
*outlen = in[0];
|
||||
@@ -449,8 +446,7 @@ class ContentServer {
|
||||
}
|
||||
|
||||
err:
|
||||
LOG(WARNING) << "Connection (" << server->factory_.Name() << ") " << connection_id
|
||||
<< " Alpn support (server) fatal error";
|
||||
LOG(WARNING) << "Connection (" << T::Name << ") " << connection_id << " Alpn support (server) fatal error";
|
||||
return SSL_TLSEXT_ERR_ALERT_FATAL;
|
||||
}
|
||||
|
||||
@@ -481,7 +477,7 @@ class ContentServer {
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
|
||||
VLOG(1) << "Connection (" << server->factory_.Name() << ") " << connection_id << " TLSEXT: Servername mismatch "
|
||||
VLOG(1) << "Connection (" << T::Name << ") " << connection_id << " TLSEXT: Servername mismatch "
|
||||
<< "(got " << server_name << "; want " << expected_server_name << ").";
|
||||
return SSL_TLSEXT_ERR_ALERT_FATAL;
|
||||
}
|
||||
@@ -491,7 +487,7 @@ class ContentServer {
|
||||
if (iter != connection_map_.end()) {
|
||||
iter->second->set_https_fallback(https_fallback);
|
||||
} else {
|
||||
VLOG(1) << "Connection (" << factory_.Name() << ") " << connection_id << " Set Https Fallback fatal error:"
|
||||
VLOG(1) << "Connection (" << T::Name << ") " << connection_id << " Set Https Fallback fatal error:"
|
||||
<< " invalid connection id";
|
||||
}
|
||||
}
|
||||
@@ -652,8 +648,6 @@ class ContentServer {
|
||||
|
||||
int next_connection_id_ = 1;
|
||||
std::atomic<size_t> opened_connections_ = 0;
|
||||
|
||||
T factory_;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
ABSL_FLAG(std::string, user, "", "set non-privileged user for worker");
|
||||
ABSL_FLAG(std::string, group, "", "set non-privileged group for worker");
|
||||
|
||||
const ProgramType pType = YASS_SERVER;
|
||||
|
||||
using namespace server;
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
|
||||
@@ -403,11 +403,11 @@ class ServerConnectionFactory : public net::ConnectionFactory {
|
||||
public:
|
||||
using ConnectionType = ServerConnection;
|
||||
template <typename... Args>
|
||||
scoped_refptr<ConnectionType> Create(Args&&... args) {
|
||||
static scoped_refptr<ConnectionType> Create(Args&&... args) {
|
||||
return MakeRefCounted<ConnectionType>(std::forward<Args>(args)...);
|
||||
}
|
||||
const char* Name() override { return "server"; }
|
||||
const char* ShortName() override { return "server"; }
|
||||
static constexpr const ConnectionFactoryType Type = CONNECTION_FACTORY_SERVER;
|
||||
static constexpr const char Name[] = "server";
|
||||
};
|
||||
|
||||
} // namespace server
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#include "net/iobuf.hpp"
|
||||
#include "server/server_server.hpp"
|
||||
|
||||
const ProgramType pType = YASS_BENCHMARK;
|
||||
|
||||
using namespace net;
|
||||
|
||||
namespace {
|
||||
@@ -209,11 +211,11 @@ class ContentProviderConnectionFactory : public ConnectionFactory {
|
||||
public:
|
||||
using ConnectionType = ContentProviderConnection;
|
||||
template <typename... Args>
|
||||
scoped_refptr<ConnectionType> Create(Args&&... args) {
|
||||
static scoped_refptr<ConnectionType> Create(Args&&... args) {
|
||||
return MakeRefCounted<ConnectionType>(std::forward<Args>(args)...);
|
||||
}
|
||||
const char* Name() override { return "content-provider"; }
|
||||
const char* ShortName() override { return "cp"; }
|
||||
static constexpr const ConnectionFactoryType Type = CONNECTION_FACTORY_CONTENT_PROVIDER;
|
||||
static constexpr const char Name[] = "content-provider";
|
||||
};
|
||||
|
||||
typedef ContentServer<ContentProviderConnectionFactory> ContentProviderServer;
|
||||
|
||||
@@ -38,6 +38,8 @@ ABSL_FLAG(std::string, proxy_type, "http", "proxy type, available: socks4, socks
|
||||
|
||||
#include "test_util.hpp"
|
||||
|
||||
const ProgramType pType = YASS_UNITTEST;
|
||||
|
||||
using namespace net;
|
||||
|
||||
namespace {
|
||||
@@ -275,11 +277,11 @@ class ContentProviderConnectionFactory : public ConnectionFactory {
|
||||
public:
|
||||
using ConnectionType = ContentProviderConnection;
|
||||
template <typename... Args>
|
||||
scoped_refptr<ConnectionType> Create(Args&&... args) {
|
||||
static scoped_refptr<ConnectionType> Create(Args&&... args) {
|
||||
return MakeRefCounted<ConnectionType>(std::forward<Args>(args)...);
|
||||
}
|
||||
const char* Name() override { return "content-provider"; }
|
||||
const char* ShortName() override { return "cp"; }
|
||||
static constexpr const ConnectionFactoryType Type = CONNECTION_FACTORY_CONTENT_PROVIDER;
|
||||
static constexpr const char Name[] = "content-provider";
|
||||
};
|
||||
|
||||
typedef ContentServer<ContentProviderConnectionFactory> ContentProviderServer;
|
||||
|
||||
@@ -195,8 +195,13 @@ static void invoke_destructor(FSMEntry* fsmEntry, void* addr) {
|
||||
_LIBCXXABI_TRACE_STATETAB0("returned from scalar destructor\n");
|
||||
} else {
|
||||
_LIBCXXABI_TRACE_STATETAB0("calling vector destructor\n");
|
||||
// TODO: in the legacy ABI, destructors had a second argument. We don't expect to encounter
|
||||
// destructors of this type in the itanium-based ABI, so this should be safe, but this could use some cleanup.
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-function-type"
|
||||
__cxa_vec_cleanup(addr, reinterpret_cast<size_t>(fsmEntry->elementCount), fsmEntry->elemSize,
|
||||
reinterpret_cast<destruct_f>(fsmEntry->destructor));
|
||||
#pragma GCC diagnostic pop
|
||||
_LIBCXXABI_TRACE_STATETAB0("returned from vector destructor\n");
|
||||
}
|
||||
} catch (...) {
|
||||
|
||||
@@ -248,6 +248,8 @@ for embedded devices and low end boxes.
|
||||
%systemd_postun_with_restart yass-redir.service
|
||||
|
||||
%changelog
|
||||
* Tue Apr 16 2024 Chilledheart <keeyou-cn@outlook.com> - 1.9.0-1
|
||||
- bump to chromium 125 dependents.
|
||||
* Mon Apr 8 2024 Chilledheart <keeyou-cn@outlook.com> - 1.8.3-1
|
||||
- net: add dot support
|
||||
* Fri Apr 5 2024 Chilledheart <keeyou-cn@outlook.com> - 1.8.2-1
|
||||
|
||||
Reference in New Issue
Block a user