mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-22 16:07:49 +08:00
Update On Wed Jan 1 19:33:26 CET 2025
This commit is contained in:
@@ -869,3 +869,4 @@ Update On Sat Dec 28 19:30:54 CET 2024
|
||||
Update On Sun Dec 29 19:30:34 CET 2024
|
||||
Update On Mon Dec 30 19:34:06 CET 2024
|
||||
Update On Tue Dec 31 19:31:50 CET 2024
|
||||
Update On Wed Jan 1 19:33:17 CET 2025
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"react-split-grid": "1.0.4",
|
||||
"react-use": "17.6.0",
|
||||
"swr": "2.3.0",
|
||||
"virtua": "0.39.2",
|
||||
"virtua": "0.39.3",
|
||||
"vite-bundle-visualizer": "1.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -76,7 +76,7 @@
|
||||
"clsx": "2.1.1",
|
||||
"core-js": "3.39.0",
|
||||
"filesize": "10.1.6",
|
||||
"meta-json-schema": "1.19.0",
|
||||
"meta-json-schema": "1.19.1",
|
||||
"monaco-yaml": "5.2.3",
|
||||
"nanoid": "5.0.9",
|
||||
"sass-embedded": "1.83.0",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"latest": {
|
||||
"mihomo": "v1.19.0",
|
||||
"mihomo_alpha": "alpha-368b1e1",
|
||||
"mihomo": "v1.19.1",
|
||||
"mihomo_alpha": "alpha-1c5f4a3",
|
||||
"clash_rs": "v0.7.3",
|
||||
"clash_premium": "2023-09-05-gdcc8d87",
|
||||
"clash_rs_alpha": "0.7.3-alpha+sha.b526c04"
|
||||
"clash_rs_alpha": "0.7.3-alpha+sha.54f66c1"
|
||||
},
|
||||
"arch_template": {
|
||||
"mihomo": {
|
||||
@@ -69,5 +69,5 @@
|
||||
"linux-armv7hf": "clash-armv7-unknown-linux-gnueabihf"
|
||||
}
|
||||
},
|
||||
"updated_at": "2024-12-30T22:20:36.259Z"
|
||||
"updated_at": "2024-12-31T22:20:35.162Z"
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
"@tauri-apps/cli": "2.1.0",
|
||||
"@types/fs-extra": "11.0.4",
|
||||
"@types/lodash-es": "4.17.12",
|
||||
"@types/node": "22.10.2",
|
||||
"@types/node": "22.10.3",
|
||||
"@typescript-eslint/eslint-plugin": "8.19.0",
|
||||
"@typescript-eslint/parser": "8.19.0",
|
||||
"autoprefixer": "10.4.20",
|
||||
|
||||
Generated
+80
-80
@@ -20,7 +20,7 @@ importers:
|
||||
devDependencies:
|
||||
'@commitlint/cli':
|
||||
specifier: 19.6.1
|
||||
version: 19.6.1(@types/node@22.10.2)(typescript@5.7.2)
|
||||
version: 19.6.1(@types/node@22.10.3)(typescript@5.7.2)
|
||||
'@commitlint/config-conventional':
|
||||
specifier: 19.6.0
|
||||
version: 19.6.0
|
||||
@@ -40,8 +40,8 @@ importers:
|
||||
specifier: 4.17.12
|
||||
version: 4.17.12
|
||||
'@types/node':
|
||||
specifier: 22.10.2
|
||||
version: 22.10.2
|
||||
specifier: 22.10.3
|
||||
version: 22.10.3
|
||||
'@typescript-eslint/eslint-plugin':
|
||||
specifier: 8.19.0
|
||||
version: 8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)
|
||||
@@ -101,7 +101,7 @@ importers:
|
||||
version: 15.14.0
|
||||
knip:
|
||||
specifier: 5.41.1
|
||||
version: 5.41.1(@types/node@22.10.2)(typescript@5.7.2)
|
||||
version: 5.41.1(@types/node@22.10.3)(typescript@5.7.2)
|
||||
lint-staged:
|
||||
specifier: 15.3.0
|
||||
version: 15.3.0
|
||||
@@ -299,8 +299,8 @@ importers:
|
||||
specifier: 2.3.0
|
||||
version: 2.3.0(react@19.0.0)
|
||||
virtua:
|
||||
specifier: 0.39.2
|
||||
version: 0.39.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||
specifier: 0.39.3
|
||||
version: 0.39.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||
vite-bundle-visualizer:
|
||||
specifier: 1.2.1
|
||||
version: 1.2.1(rollup@4.27.4)
|
||||
@@ -331,7 +331,7 @@ importers:
|
||||
version: 1.89.2(@tanstack/react-router@1.89.2(@tanstack/router-generator@1.87.7)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(csstype@3.1.3)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||
'@tanstack/router-plugin':
|
||||
specifier: 1.87.13
|
||||
version: 1.87.13(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 1.87.13(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
'@tauri-apps/plugin-clipboard-manager':
|
||||
specifier: 2.2.0
|
||||
version: 2.2.0
|
||||
@@ -367,13 +367,13 @@ importers:
|
||||
version: 13.12.2
|
||||
'@vitejs/plugin-legacy':
|
||||
specifier: 6.0.0
|
||||
version: 6.0.0(terser@5.36.0)(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 6.0.0(terser@5.36.0)(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
'@vitejs/plugin-react':
|
||||
specifier: 4.3.4
|
||||
version: 4.3.4(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 4.3.4(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
'@vitejs/plugin-react-swc':
|
||||
specifier: 3.7.2
|
||||
version: 3.7.2(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 3.7.2(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
change-case:
|
||||
specifier: 5.4.4
|
||||
version: 5.4.4
|
||||
@@ -387,8 +387,8 @@ importers:
|
||||
specifier: 10.1.6
|
||||
version: 10.1.6
|
||||
meta-json-schema:
|
||||
specifier: 1.19.0
|
||||
version: 1.19.0
|
||||
specifier: 1.19.1
|
||||
version: 1.19.1
|
||||
monaco-yaml:
|
||||
specifier: 5.2.3
|
||||
version: 5.2.3(monaco-editor@0.52.2)
|
||||
@@ -415,19 +415,19 @@ importers:
|
||||
version: 13.12.0
|
||||
vite:
|
||||
specifier: 6.0.6
|
||||
version: 6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
version: 6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite-plugin-html:
|
||||
specifier: 3.2.2
|
||||
version: 3.2.2(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 3.2.2(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
vite-plugin-sass-dts:
|
||||
specifier: 1.3.30
|
||||
version: 1.3.30(postcss@8.4.49)(prettier@3.4.2)(sass-embedded@1.83.0)(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 1.3.30(postcss@8.4.49)(prettier@3.4.2)(sass-embedded@1.83.0)(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
vite-plugin-svgr:
|
||||
specifier: 4.3.0
|
||||
version: 4.3.0(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 4.3.0(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
vite-tsconfig-paths:
|
||||
specifier: 5.1.4
|
||||
version: 5.1.4(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 5.1.4(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
zod:
|
||||
specifier: 3.24.1
|
||||
version: 3.24.1
|
||||
@@ -463,7 +463,7 @@ importers:
|
||||
version: 19.0.2
|
||||
'@vitejs/plugin-react':
|
||||
specifier: 4.3.4
|
||||
version: 4.3.4(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 4.3.4(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
ahooks:
|
||||
specifier: 3.8.4
|
||||
version: 3.8.4(react@19.0.0)
|
||||
@@ -490,10 +490,10 @@ importers:
|
||||
version: 17.6.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||
vite:
|
||||
specifier: 6.0.6
|
||||
version: 6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
version: 6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite-tsconfig-paths:
|
||||
specifier: 5.1.4
|
||||
version: 5.1.4(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 5.1.4(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
devDependencies:
|
||||
'@emotion/react':
|
||||
specifier: 11.14.0
|
||||
@@ -518,7 +518,7 @@ importers:
|
||||
version: 5.1.0(typescript@5.7.2)
|
||||
vite-plugin-dts:
|
||||
specifier: 4.4.0
|
||||
version: 4.4.0(@types/node@22.10.2)(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 4.4.0(@types/node@22.10.3)(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
|
||||
scripts:
|
||||
dependencies:
|
||||
@@ -3087,8 +3087,8 @@ packages:
|
||||
'@types/node@22.10.1':
|
||||
resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==}
|
||||
|
||||
'@types/node@22.10.2':
|
||||
resolution: {integrity: sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==}
|
||||
'@types/node@22.10.3':
|
||||
resolution: {integrity: sha512-DifAyw4BkrufCILvD3ucnuN8eydUfc/C1GlyrnI+LK6543w5/L3VeVgf05o3B4fqSXP1dKYLOZsKfutpxPzZrw==}
|
||||
|
||||
'@types/parse-json@4.0.2':
|
||||
resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==}
|
||||
@@ -5830,8 +5830,8 @@ packages:
|
||||
resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
|
||||
engines: {node: '>= 8'}
|
||||
|
||||
meta-json-schema@1.19.0:
|
||||
resolution: {integrity: sha512-sEnAFhgbEGRFJoUeCib0PvXSf+2bwbBxtdOjaUUtbxt75CoPQc3Mi8UTCRLa1sjJ8ZD1BrBH/wK6h337ydLWsw==}
|
||||
meta-json-schema@1.19.1:
|
||||
resolution: {integrity: sha512-v4fhAmMDLx2R1HLmRF5i2kVht+hS29Nr3ezhEaobkfKpy+5GqiLosc07JHLNgxLk1pgqNmvDWVfC30+Bm2A+zg==}
|
||||
engines: {node: '>=18', pnpm: '>=9'}
|
||||
|
||||
micromark-core-commonmark@2.0.1:
|
||||
@@ -7911,8 +7911,8 @@ packages:
|
||||
vfile@6.0.1:
|
||||
resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==}
|
||||
|
||||
virtua@0.39.2:
|
||||
resolution: {integrity: sha512-KhDYmfDe36L1W5ir1b5+jeV40+u4bb5bRiZggWwGinreGXKnxxcLGdk+yVZlO5dNdBq/nxj4v4w6yxuwgLXSBg==}
|
||||
virtua@0.39.3:
|
||||
resolution: {integrity: sha512-Ep3aiJXSGPm1UUniThr5mGDfG0upAleP7pqQs5mvvCgM1wPhII1ZKa7eNCWAJRLkC+InpXKokKozyaaj/aMYOQ==}
|
||||
peerDependencies:
|
||||
react: '>=16.14.0'
|
||||
react-dom: '>=16.14.0'
|
||||
@@ -9006,11 +9006,11 @@ snapshots:
|
||||
|
||||
'@bufbuild/protobuf@2.2.3': {}
|
||||
|
||||
'@commitlint/cli@19.6.1(@types/node@22.10.2)(typescript@5.7.2)':
|
||||
'@commitlint/cli@19.6.1(@types/node@22.10.3)(typescript@5.7.2)':
|
||||
dependencies:
|
||||
'@commitlint/format': 19.5.0
|
||||
'@commitlint/lint': 19.6.0
|
||||
'@commitlint/load': 19.6.1(@types/node@22.10.2)(typescript@5.7.2)
|
||||
'@commitlint/load': 19.6.1(@types/node@22.10.3)(typescript@5.7.2)
|
||||
'@commitlint/read': 19.5.0
|
||||
'@commitlint/types': 19.5.0
|
||||
tinyexec: 0.3.1
|
||||
@@ -9057,7 +9057,7 @@ snapshots:
|
||||
'@commitlint/rules': 19.6.0
|
||||
'@commitlint/types': 19.5.0
|
||||
|
||||
'@commitlint/load@19.6.1(@types/node@22.10.2)(typescript@5.7.2)':
|
||||
'@commitlint/load@19.6.1(@types/node@22.10.3)(typescript@5.7.2)':
|
||||
dependencies:
|
||||
'@commitlint/config-validator': 19.5.0
|
||||
'@commitlint/execute-rule': 19.5.0
|
||||
@@ -9065,7 +9065,7 @@ snapshots:
|
||||
'@commitlint/types': 19.5.0
|
||||
chalk: 5.3.0
|
||||
cosmiconfig: 9.0.0(typescript@5.7.2)
|
||||
cosmiconfig-typescript-loader: 6.1.0(@types/node@22.10.2)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2)
|
||||
cosmiconfig-typescript-loader: 6.1.0(@types/node@22.10.3)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2)
|
||||
lodash.isplainobject: 4.0.6
|
||||
lodash.merge: 4.6.2
|
||||
lodash.uniq: 4.5.0
|
||||
@@ -9562,23 +9562,23 @@ snapshots:
|
||||
|
||||
'@material/material-color-utilities@0.3.0': {}
|
||||
|
||||
'@microsoft/api-extractor-model@7.30.1(@types/node@22.10.2)':
|
||||
'@microsoft/api-extractor-model@7.30.1(@types/node@22.10.3)':
|
||||
dependencies:
|
||||
'@microsoft/tsdoc': 0.15.1
|
||||
'@microsoft/tsdoc-config': 0.17.1
|
||||
'@rushstack/node-core-library': 5.10.1(@types/node@22.10.2)
|
||||
'@rushstack/node-core-library': 5.10.1(@types/node@22.10.3)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
|
||||
'@microsoft/api-extractor@7.48.1(@types/node@22.10.2)':
|
||||
'@microsoft/api-extractor@7.48.1(@types/node@22.10.3)':
|
||||
dependencies:
|
||||
'@microsoft/api-extractor-model': 7.30.1(@types/node@22.10.2)
|
||||
'@microsoft/api-extractor-model': 7.30.1(@types/node@22.10.3)
|
||||
'@microsoft/tsdoc': 0.15.1
|
||||
'@microsoft/tsdoc-config': 0.17.1
|
||||
'@rushstack/node-core-library': 5.10.1(@types/node@22.10.2)
|
||||
'@rushstack/node-core-library': 5.10.1(@types/node@22.10.3)
|
||||
'@rushstack/rig-package': 0.5.3
|
||||
'@rushstack/terminal': 0.14.4(@types/node@22.10.2)
|
||||
'@rushstack/ts-command-line': 4.23.2(@types/node@22.10.2)
|
||||
'@rushstack/terminal': 0.14.4(@types/node@22.10.3)
|
||||
'@rushstack/ts-command-line': 4.23.2(@types/node@22.10.3)
|
||||
lodash: 4.17.21
|
||||
minimatch: 3.0.8
|
||||
resolve: 1.22.8
|
||||
@@ -10234,7 +10234,7 @@ snapshots:
|
||||
|
||||
'@rtsao/scc@1.1.0': {}
|
||||
|
||||
'@rushstack/node-core-library@5.10.1(@types/node@22.10.2)':
|
||||
'@rushstack/node-core-library@5.10.1(@types/node@22.10.3)':
|
||||
dependencies:
|
||||
ajv: 8.13.0
|
||||
ajv-draft-04: 1.0.0(ajv@8.13.0)
|
||||
@@ -10245,23 +10245,23 @@ snapshots:
|
||||
resolve: 1.22.8
|
||||
semver: 7.5.4
|
||||
optionalDependencies:
|
||||
'@types/node': 22.10.2
|
||||
'@types/node': 22.10.3
|
||||
|
||||
'@rushstack/rig-package@0.5.3':
|
||||
dependencies:
|
||||
resolve: 1.22.8
|
||||
strip-json-comments: 3.1.1
|
||||
|
||||
'@rushstack/terminal@0.14.4(@types/node@22.10.2)':
|
||||
'@rushstack/terminal@0.14.4(@types/node@22.10.3)':
|
||||
dependencies:
|
||||
'@rushstack/node-core-library': 5.10.1(@types/node@22.10.2)
|
||||
'@rushstack/node-core-library': 5.10.1(@types/node@22.10.3)
|
||||
supports-color: 8.1.1
|
||||
optionalDependencies:
|
||||
'@types/node': 22.10.2
|
||||
'@types/node': 22.10.3
|
||||
|
||||
'@rushstack/ts-command-line@4.23.2(@types/node@22.10.2)':
|
||||
'@rushstack/ts-command-line@4.23.2(@types/node@22.10.3)':
|
||||
dependencies:
|
||||
'@rushstack/terminal': 0.14.4(@types/node@22.10.2)
|
||||
'@rushstack/terminal': 0.14.4(@types/node@22.10.3)
|
||||
'@types/argparse': 1.0.38
|
||||
argparse: 1.0.10
|
||||
string-argv: 0.3.2
|
||||
@@ -10502,7 +10502,7 @@ snapshots:
|
||||
tsx: 4.19.2
|
||||
zod: 3.24.1
|
||||
|
||||
'@tanstack/router-plugin@1.87.13(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
'@tanstack/router-plugin@1.87.13(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
dependencies:
|
||||
'@babel/core': 7.26.0
|
||||
'@babel/generator': 7.26.3
|
||||
@@ -10523,7 +10523,7 @@ snapshots:
|
||||
unplugin: 1.16.0
|
||||
zod: 3.24.1
|
||||
optionalDependencies:
|
||||
vite: 6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -10669,12 +10669,12 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/http-cache-semantics': 4.0.4
|
||||
'@types/keyv': 3.1.4
|
||||
'@types/node': 22.10.2
|
||||
'@types/node': 22.10.3
|
||||
'@types/responselike': 1.0.3
|
||||
|
||||
'@types/conventional-commits-parser@5.0.0':
|
||||
dependencies:
|
||||
'@types/node': 22.10.2
|
||||
'@types/node': 22.10.3
|
||||
|
||||
'@types/d3-array@3.2.1': {}
|
||||
|
||||
@@ -10810,7 +10810,7 @@ snapshots:
|
||||
'@types/fs-extra@11.0.4':
|
||||
dependencies:
|
||||
'@types/jsonfile': 6.1.4
|
||||
'@types/node': 22.10.2
|
||||
'@types/node': 22.10.3
|
||||
|
||||
'@types/geojson@7946.0.14': {}
|
||||
|
||||
@@ -10828,11 +10828,11 @@ snapshots:
|
||||
|
||||
'@types/jsonfile@6.1.4':
|
||||
dependencies:
|
||||
'@types/node': 22.10.2
|
||||
'@types/node': 22.10.3
|
||||
|
||||
'@types/keyv@3.1.4':
|
||||
dependencies:
|
||||
'@types/node': 22.10.2
|
||||
'@types/node': 22.10.3
|
||||
|
||||
'@types/lodash-es@4.17.12':
|
||||
dependencies:
|
||||
@@ -10852,7 +10852,7 @@ snapshots:
|
||||
dependencies:
|
||||
undici-types: 6.20.0
|
||||
|
||||
'@types/node@22.10.2':
|
||||
'@types/node@22.10.3':
|
||||
dependencies:
|
||||
undici-types: 6.20.0
|
||||
|
||||
@@ -10882,7 +10882,7 @@ snapshots:
|
||||
|
||||
'@types/responselike@1.0.3':
|
||||
dependencies:
|
||||
'@types/node': 22.10.2
|
||||
'@types/node': 22.10.3
|
||||
|
||||
'@types/retry@0.12.2': {}
|
||||
|
||||
@@ -10894,7 +10894,7 @@ snapshots:
|
||||
|
||||
'@types/yauzl@2.10.3':
|
||||
dependencies:
|
||||
'@types/node': 22.10.2
|
||||
'@types/node': 22.10.3
|
||||
optional: true
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)':
|
||||
@@ -11013,7 +11013,7 @@ snapshots:
|
||||
|
||||
'@ungap/structured-clone@1.2.0': {}
|
||||
|
||||
'@vitejs/plugin-legacy@6.0.0(terser@5.36.0)(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
'@vitejs/plugin-legacy@6.0.0(terser@5.36.0)(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
dependencies:
|
||||
'@babel/core': 7.26.0
|
||||
'@babel/preset-env': 7.26.0(@babel/core@7.26.0)
|
||||
@@ -11024,25 +11024,25 @@ snapshots:
|
||||
regenerator-runtime: 0.14.1
|
||||
systemjs: 6.15.1
|
||||
terser: 5.36.0
|
||||
vite: 6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@vitejs/plugin-react-swc@3.7.2(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
'@vitejs/plugin-react-swc@3.7.2(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
dependencies:
|
||||
'@swc/core': 1.7.26
|
||||
vite: 6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- '@swc/helpers'
|
||||
|
||||
'@vitejs/plugin-react@4.3.4(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
'@vitejs/plugin-react@4.3.4(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
dependencies:
|
||||
'@babel/core': 7.26.0
|
||||
'@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0)
|
||||
'@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0)
|
||||
'@types/babel__core': 7.20.5
|
||||
react-refresh: 0.14.2
|
||||
vite: 6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -11734,9 +11734,9 @@ snapshots:
|
||||
|
||||
core-js@3.39.0: {}
|
||||
|
||||
cosmiconfig-typescript-loader@6.1.0(@types/node@22.10.2)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2):
|
||||
cosmiconfig-typescript-loader@6.1.0(@types/node@22.10.3)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2):
|
||||
dependencies:
|
||||
'@types/node': 22.10.2
|
||||
'@types/node': 22.10.3
|
||||
cosmiconfig: 9.0.0(typescript@5.7.2)
|
||||
jiti: 2.4.1
|
||||
typescript: 5.7.2
|
||||
@@ -13748,11 +13748,11 @@ snapshots:
|
||||
|
||||
kind-of@6.0.3: {}
|
||||
|
||||
knip@5.41.1(@types/node@22.10.2)(typescript@5.7.2):
|
||||
knip@5.41.1(@types/node@22.10.3)(typescript@5.7.2):
|
||||
dependencies:
|
||||
'@nodelib/fs.walk': 1.2.8
|
||||
'@snyk/github-codeowners': 1.1.0
|
||||
'@types/node': 22.10.2
|
||||
'@types/node': 22.10.3
|
||||
easy-table: 1.2.0
|
||||
enhanced-resolve: 5.17.1
|
||||
fast-glob: 3.3.2
|
||||
@@ -14056,7 +14056,7 @@ snapshots:
|
||||
|
||||
merge2@1.4.1: {}
|
||||
|
||||
meta-json-schema@1.19.0: {}
|
||||
meta-json-schema@1.19.1: {}
|
||||
|
||||
micromark-core-commonmark@2.0.1:
|
||||
dependencies:
|
||||
@@ -16384,7 +16384,7 @@ snapshots:
|
||||
unist-util-stringify-position: 4.0.0
|
||||
vfile-message: 4.0.2
|
||||
|
||||
virtua@0.39.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
|
||||
virtua@0.39.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
|
||||
optionalDependencies:
|
||||
react: 19.0.0
|
||||
react-dom: 19.0.0(react@19.0.0)
|
||||
@@ -16399,9 +16399,9 @@ snapshots:
|
||||
- rollup
|
||||
- supports-color
|
||||
|
||||
vite-plugin-dts@4.4.0(@types/node@22.10.2)(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
vite-plugin-dts@4.4.0(@types/node@22.10.3)(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
dependencies:
|
||||
'@microsoft/api-extractor': 7.48.1(@types/node@22.10.2)
|
||||
'@microsoft/api-extractor': 7.48.1(@types/node@22.10.3)
|
||||
'@rollup/pluginutils': 5.1.4(rollup@4.27.4)
|
||||
'@volar/typescript': 2.4.11
|
||||
'@vue/language-core': 2.1.10(typescript@5.7.2)
|
||||
@@ -16412,13 +16412,13 @@ snapshots:
|
||||
magic-string: 0.30.17
|
||||
typescript: 5.7.2
|
||||
optionalDependencies:
|
||||
vite: 6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- rollup
|
||||
- supports-color
|
||||
|
||||
vite-plugin-html@3.2.2(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
vite-plugin-html@3.2.2(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 4.2.1
|
||||
colorette: 2.0.20
|
||||
@@ -16432,45 +16432,45 @@ snapshots:
|
||||
html-minifier-terser: 6.1.0
|
||||
node-html-parser: 5.4.2
|
||||
pathe: 0.2.0
|
||||
vite: 6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
|
||||
vite-plugin-sass-dts@1.3.30(postcss@8.4.49)(prettier@3.4.2)(sass-embedded@1.83.0)(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
vite-plugin-sass-dts@1.3.30(postcss@8.4.49)(prettier@3.4.2)(sass-embedded@1.83.0)(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
dependencies:
|
||||
postcss: 8.4.49
|
||||
postcss-js: 4.0.1(postcss@8.4.49)
|
||||
prettier: 3.4.2
|
||||
sass-embedded: 1.83.0
|
||||
vite: 6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
|
||||
vite-plugin-svgr@4.3.0(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
vite-plugin-svgr@4.3.0(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.1.3(rollup@4.27.4)
|
||||
'@svgr/core': 8.1.0(typescript@5.7.2)
|
||||
'@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.7.2))
|
||||
vite: 6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- rollup
|
||||
- supports-color
|
||||
- typescript
|
||||
|
||||
vite-tsconfig-paths@5.1.4(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
vite-tsconfig-paths@5.1.4(typescript@5.7.2)(vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
dependencies:
|
||||
debug: 4.3.7
|
||||
globrex: 0.1.2
|
||||
tsconfck: 3.0.3(typescript@5.7.2)
|
||||
optionalDependencies:
|
||||
vite: 6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- typescript
|
||||
|
||||
vite@6.0.6(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1):
|
||||
vite@6.0.6(@types/node@22.10.3)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1):
|
||||
dependencies:
|
||||
esbuild: 0.24.2
|
||||
postcss: 8.4.49
|
||||
rollup: 4.27.4
|
||||
optionalDependencies:
|
||||
'@types/node': 22.10.2
|
||||
'@types/node': 22.10.3
|
||||
fsevents: 2.3.3
|
||||
jiti: 2.4.1
|
||||
less: 4.2.0
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=24.12.26
|
||||
PKG_VERSION:=25.1.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -66,6 +66,7 @@ function index()
|
||||
entry({"admin", "services", appname, "get_now_use_node"}, call("get_now_use_node")).leaf = true
|
||||
entry({"admin", "services", appname, "get_redir_log"}, call("get_redir_log")).leaf = true
|
||||
entry({"admin", "services", appname, "get_socks_log"}, call("get_socks_log")).leaf = true
|
||||
entry({"admin", "services", appname, "get_chinadns_log"}, call("get_chinadns_log")).leaf = true
|
||||
entry({"admin", "services", appname, "get_log"}, call("get_log")).leaf = true
|
||||
entry({"admin", "services", appname, "clear_log"}, call("clear_log")).leaf = true
|
||||
entry({"admin", "services", appname, "index_status"}, call("index_status")).leaf = true
|
||||
@@ -211,6 +212,18 @@ function get_socks_log()
|
||||
end
|
||||
end
|
||||
|
||||
function get_chinadns_log()
|
||||
local flag = luci.http.formvalue("flag")
|
||||
local path = "/tmp/etc/passwall/acl/" .. flag .. "/chinadns_ng.log"
|
||||
if fs.access(path) then
|
||||
local content = luci.sys.exec("cat ".. path)
|
||||
content = content:gsub("\n", "<br />")
|
||||
luci.http.write(content)
|
||||
else
|
||||
luci.http.write(string.format("<script>alert('%s');window.close();</script>", i18n.translate("Not enabled log")))
|
||||
end
|
||||
end
|
||||
|
||||
function get_log()
|
||||
-- luci.sys.exec("[ -f /tmp/log/passwall.log ] && sed '1!G;h;$!d' /tmp/log/passwall.log > /tmp/log/passwall_show.log")
|
||||
luci.http.write(luci.sys.exec("[ -f '/tmp/log/passwall.log' ] && cat /tmp/log/passwall.log"))
|
||||
|
||||
@@ -418,4 +418,6 @@ o:value("direct", translate("Direct DNS"))
|
||||
o.description = desc .. "</ul>"
|
||||
o:depends({dns_shunt = "dnsmasq", tcp_proxy_mode = "proxy", chn_list = "direct"})
|
||||
|
||||
m:append(Template(appname .. "/acl/footer"))
|
||||
|
||||
return m
|
||||
|
||||
@@ -660,11 +660,11 @@ end
|
||||
|
||||
s:tab("log", translate("Log"))
|
||||
o = s:taboption("log", Flag, "log_tcp", translate("Enable") .. " " .. translatef("%s Node Log", "TCP"))
|
||||
o.default = "1"
|
||||
o.default = "0"
|
||||
o.rmempty = false
|
||||
|
||||
o = s:taboption("log", Flag, "log_udp", translate("Enable") .. " " .. translatef("%s Node Log", "UDP"))
|
||||
o.default = "1"
|
||||
o.default = "0"
|
||||
o.rmempty = false
|
||||
|
||||
o = s:taboption("log", ListValue, "loglevel", "Sing-Box/Xray " .. translate("Log Level"))
|
||||
@@ -694,8 +694,17 @@ o:depends("advanced_log_feature", "1")
|
||||
o = s:taboption("log", Value, "log_event_cmd", translate("Shell Command"), translate("Shell command to execute, replace log content with %s."))
|
||||
o:depends("advanced_log_feature", "1")
|
||||
|
||||
s:tab("faq", "FAQ")
|
||||
o = s:taboption("log", Flag, "log_chinadns_ng", translate("Enable") .. " ChinaDNS-NG " .. translate("Log"))
|
||||
o.default = "0"
|
||||
o.rmempty = false
|
||||
|
||||
o = s:taboption("log", DummyValue, "_log_tips", " ")
|
||||
o.rawhtml = true
|
||||
o.cfgvalue = function(t, n)
|
||||
return string.format('<font color="red">%s</font>', translate("It is recommended to disable logging during regular use to reduce system overhead."))
|
||||
end
|
||||
|
||||
s:tab("faq", "FAQ")
|
||||
o = s:taboption("faq", DummyValue, "")
|
||||
o.template = appname .. "/global/faq"
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<%
|
||||
local api = require "luci.passwall.api"
|
||||
-%>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
setTimeout(function () {
|
||||
var url = window.location.href;
|
||||
var sid_match = url.match(/\/acl_config\/(cfg[0-9a-f]+)/);
|
||||
var sid = sid_match ? sid_match[1] : null;
|
||||
if (!sid) {
|
||||
return;
|
||||
}
|
||||
var selects = document.querySelectorAll("select[id*='dns_shunt']");
|
||||
selects.forEach(function (select) {
|
||||
if (select.value === "chinadns-ng") {
|
||||
addLogLink(select);
|
||||
}
|
||||
select.addEventListener("change", function () {
|
||||
var existingLogLink = select.parentElement.querySelector("a.log-link");
|
||||
if (existingLogLink) {
|
||||
existingLogLink.remove();
|
||||
}
|
||||
if (select.value === "chinadns-ng") {
|
||||
addLogLink(select);
|
||||
}
|
||||
});
|
||||
});
|
||||
function addLogLink(select) {
|
||||
var logLink = document.createElement("a");
|
||||
logLink.innerHTML = "<%:Log%>";
|
||||
logLink.href = "#";
|
||||
logLink.className = "log-link";
|
||||
logLink.style.marginLeft = "10px";
|
||||
logLink.setAttribute("onclick", "window.open('" + '<%=api.url("get_chinadns_log")%>' + "?flag=" + sid + "', '_blank')");
|
||||
select.insertAdjacentElement("afterend", logLink);
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
@@ -148,5 +148,33 @@ local api = require "luci.passwall.api"
|
||||
}
|
||||
setTimeout("go()", 1000);
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
setTimeout(function () {
|
||||
var selects = document.querySelectorAll("select[id*='dns_shunt']");
|
||||
selects.forEach(function (select, index) {
|
||||
if (select.value === "chinadns-ng") {
|
||||
addLogLink(select);
|
||||
}
|
||||
select.addEventListener("change", function () {
|
||||
var existingLogLink = select.parentElement.querySelector("a.log-link");
|
||||
if (existingLogLink) {
|
||||
existingLogLink.remove();
|
||||
}
|
||||
if (select.value === "chinadns-ng") {
|
||||
addLogLink(select);
|
||||
}
|
||||
});
|
||||
});
|
||||
function addLogLink(select) {
|
||||
var logLink = document.createElement("a");
|
||||
logLink.innerHTML = "<%:Log%>";
|
||||
logLink.href = "#";
|
||||
logLink.className = "log-link";
|
||||
logLink.style.marginLeft = "10px";
|
||||
logLink.setAttribute("onclick", "window.open('" + '<%=api.url("get_chinadns_log")%>' + "?flag=default', '_blank')");
|
||||
select.insertAdjacentElement("afterend", logLink);
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
+14
-11
@@ -829,10 +829,10 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
}
|
||||
|
||||
queryParam.type = queryParam.type.toLowerCase();
|
||||
if (queryParam.type === "kcp" || queryParam.type === "mkcp") {
|
||||
if (queryParam.type === "kcp") {
|
||||
queryParam.type = "mkcp";
|
||||
}
|
||||
if (queryParam.type === "h2" || queryParam.type === "http") {
|
||||
if (queryParam.type === "h2") {
|
||||
queryParam.type = "http";
|
||||
}
|
||||
if (dom_prefix == "singbox_" && queryParam.type === "raw") {
|
||||
@@ -872,7 +872,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
opt.set(dom_prefix + 'ws_earlyDataHeaderName', 'Sec-WebSocket-Protocol');
|
||||
}
|
||||
}
|
||||
} else if (queryParam.type === "h2" || queryParam.type === "http") {
|
||||
} else if (queryParam.type === "http") {
|
||||
if (dom_prefix == "xray_") {
|
||||
opt.set(dom_prefix + 'xhttp_mode', "stream-one");
|
||||
opt.set(dom_prefix + 'xhttp_host', queryParam.host || "");
|
||||
@@ -885,7 +885,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
opt.set(dom_prefix + 'quic_guise', queryParam.headerType || "none");
|
||||
opt.set(dom_prefix + 'quic_security', queryParam.quicSecurity);
|
||||
opt.set(dom_prefix + 'quic_key', queryParam.key);
|
||||
} else if (queryParam.type === "kcp" || queryParam.type === "mkcp") {
|
||||
} else if (queryParam.type === "mkcp") {
|
||||
opt.set(dom_prefix + 'mkcp_guise', queryParam.headerType || "none");
|
||||
} else if (queryParam.type === "grpc") {
|
||||
opt.set(dom_prefix + 'grpc_serviceName', (queryParam.serviceName || queryParam.path) || "");
|
||||
@@ -961,10 +961,10 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
opt.set(dom_prefix + 'password', decodeURIComponent(password));
|
||||
|
||||
queryParam.type = queryParam.type ? queryParam.type.toLowerCase() : "tcp";
|
||||
if (queryParam.type === "kcp" || queryParam.type === "mkcp") {
|
||||
if (queryParam.type === "kcp") {
|
||||
queryParam.type = "mkcp";
|
||||
}
|
||||
if (queryParam.type === "h2" || queryParam.type === "http") {
|
||||
if (queryParam.type === "h2") {
|
||||
queryParam.type = "http";
|
||||
}
|
||||
if (dom_prefix == "singbox_" && queryParam.type === "raw") {
|
||||
@@ -1004,7 +1004,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
opt.set(dom_prefix + 'ws_earlyDataHeaderName', 'Sec-WebSocket-Protocol');
|
||||
}
|
||||
}
|
||||
} else if (queryParam.type === "h2" || queryParam.type === "http") {
|
||||
} else if (queryParam.type === "http") {
|
||||
if (dom_prefix == "xray_") {
|
||||
opt.set(dom_prefix + 'xhttp_mode', "stream-one");
|
||||
opt.set(dom_prefix + 'xhttp_host', queryParam.host || "");
|
||||
@@ -1017,7 +1017,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
opt.set(dom_prefix + 'quic_guise', queryParam.headerType || "none");
|
||||
opt.set(dom_prefix + 'quic_security', queryParam.quicSecurity);
|
||||
opt.set(dom_prefix + 'quic_key', queryParam.key);
|
||||
} else if (queryParam.type === "kcp" || queryParam.type === "mkcp") {
|
||||
} else if (queryParam.type === "mkcp") {
|
||||
opt.set(dom_prefix + 'mkcp_guise', queryParam.headerType || "none");
|
||||
} else if (queryParam.type === "grpc") {
|
||||
opt.set(dom_prefix + 'grpc_serviceName', (queryParam.serviceName || queryParam.path) || "");
|
||||
@@ -1198,12 +1198,15 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
}
|
||||
|
||||
queryParam.type = queryParam.type.toLowerCase();
|
||||
if (queryParam.type === "kcp" || queryParam.type === "mkcp") {
|
||||
if (queryParam.type === "kcp") {
|
||||
queryParam.type = "mkcp";
|
||||
}
|
||||
if (queryParam.type === "h2" || queryParam.type === "http") {
|
||||
if (queryParam.type === "h2") {
|
||||
queryParam.type = "http";
|
||||
}
|
||||
if (queryParam.type === "splithttp") {
|
||||
queryParam.type = "xhttp";
|
||||
}
|
||||
if (dom_prefix == "singbox_" && queryParam.type === "raw") {
|
||||
queryParam.type = "tcp";
|
||||
} else if (dom_prefix == "xray_" && queryParam.type === "tcp") {
|
||||
@@ -1259,7 +1262,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
} else if (queryParam.type === "grpc") {
|
||||
opt.set(dom_prefix + 'grpc_serviceName', (queryParam.serviceName || queryParam.path) || "");
|
||||
opt.set(dom_prefix + 'grpc_mode', queryParam.mode || "gun");
|
||||
} else if (queryParam.type === "xhttp" || queryParam.type === "splithttp") {
|
||||
} else if (queryParam.type === "xhttp") {
|
||||
opt.set(dom_prefix + 'xhttp_host', queryParam.host || "");
|
||||
opt.set(dom_prefix + 'xhttp_path', queryParam.path || "");
|
||||
opt.set(dom_prefix + 'xhttp_mode', queryParam.mode || "auto");
|
||||
|
||||
@@ -1510,6 +1510,9 @@ msgstr "要执行的 Shell 命令,用 %s 代替日志内容。"
|
||||
msgid "Not enabled log"
|
||||
msgstr "未启用日志"
|
||||
|
||||
msgid "It is recommended to disable logging during regular use to reduce system overhead."
|
||||
msgstr "正常使用时建议关闭日志,以减少系统开销。"
|
||||
|
||||
msgid "UDP Forward"
|
||||
msgstr "UDP 转发"
|
||||
|
||||
|
||||
@@ -21,10 +21,11 @@ config global
|
||||
option localhost_proxy '1'
|
||||
option client_proxy '1'
|
||||
option acl_enable '0'
|
||||
option log_tcp '1'
|
||||
option log_udp '1'
|
||||
option log_tcp '0'
|
||||
option log_udp '0'
|
||||
option loglevel 'error'
|
||||
option trojan_loglevel '4'
|
||||
option log_chinadns_ng '0'
|
||||
|
||||
config global_haproxy
|
||||
option balancing_enable '0'
|
||||
|
||||
@@ -17,17 +17,6 @@ GLOBAL_ACL_PATH=${TMP_ACL_PATH}/default
|
||||
LOG_FILE=/tmp/log/$CONFIG.log
|
||||
APP_PATH=/usr/share/$CONFIG
|
||||
RULES_PATH=/usr/share/${CONFIG}/rules
|
||||
DNS_PORT=15353
|
||||
TUN_DNS="127.0.0.1#${DNS_PORT}"
|
||||
LOCAL_DNS=119.29.29.29,223.5.5.5
|
||||
DEFAULT_DNS=
|
||||
IPT_APPEND_DNS=
|
||||
ENABLED_DEFAULT_ACL=0
|
||||
PROXY_IPV6=0
|
||||
PROXY_IPV6_UDP=0
|
||||
resolve_dns=0
|
||||
use_tcp_node_resolve_dns=0
|
||||
use_udp_node_resolve_dns=0
|
||||
LUA_UTIL_PATH=/usr/lib/lua/luci/passwall
|
||||
UTIL_SINGBOX=$LUA_UTIL_PATH/util_sing-box.lua
|
||||
UTIL_SS=$LUA_UTIL_PATH/util_shadowsocks.lua
|
||||
@@ -244,7 +233,11 @@ check_ver() {
|
||||
|
||||
get_new_port() {
|
||||
port=$1
|
||||
[ "$port" == "auto" ] && port=2082
|
||||
[ "$port" == "auto" ] && {
|
||||
port=2082
|
||||
local GET_NEW_PORT=$(get_cache_var "get_new_port")
|
||||
[ -n "${GET_NEW_PORT}" ] && port=${GET_NEW_PORT}
|
||||
}
|
||||
protocol=$(echo $2 | tr 'A-Z' 'a-z')
|
||||
result=$(check_port_exists $port $protocol)
|
||||
if [ "$result" != 0 ]; then
|
||||
@@ -256,6 +249,7 @@ get_new_port() {
|
||||
fi
|
||||
get_new_port $temp $protocol
|
||||
else
|
||||
set_cache_var "get_new_port" "$port"
|
||||
echo $port
|
||||
fi
|
||||
}
|
||||
@@ -296,7 +290,10 @@ ln_run() {
|
||||
fi
|
||||
#echo "${file_func} $*" >&2
|
||||
[ -n "${file_func}" ] || echolog " - 找不到 ${ln_name},无法启动..."
|
||||
[ "${output}" != "/dev/null" ] && local persist_log_path=$(config_t_get global persist_log_path) && local sys_log=$(config_t_get global sys_log "0")
|
||||
[ "${output}" != "/dev/null" ] && [ "${ln_name}" != "chinadns-ng" ] && {
|
||||
local persist_log_path=$(config_t_get global persist_log_path)
|
||||
local sys_log=$(config_t_get global sys_log "0")
|
||||
}
|
||||
if [ -z "$persist_log_path" ] && [ "$sys_log" != "1" ]; then
|
||||
${file_func:-echolog " - ${ln_name}"} "$@" >${output} 2>&1 &
|
||||
else
|
||||
@@ -376,7 +373,11 @@ set_cache_var() {
|
||||
local key="${1}"
|
||||
shift 1
|
||||
local val="$@"
|
||||
[ -n "${key}" ] && [ -n "${val}" ] && echo "${key}=\"${val}\"" >> $TMP_PATH/var
|
||||
[ -n "${key}" ] && [ -n "${val}" ] && {
|
||||
sed -i "/${key}=/d" $TMP_PATH/var >/dev/null 2>&1
|
||||
echo "${key}=\"${val}\"" >> $TMP_PATH/var
|
||||
eval ${key}=\"${val}\"
|
||||
}
|
||||
}
|
||||
|
||||
get_cache_var() {
|
||||
@@ -386,6 +387,10 @@ get_cache_var() {
|
||||
}
|
||||
}
|
||||
|
||||
eval_cache_var() {
|
||||
[ -s "$TMP_PATH/var" ] && eval $(cat "$TMP_PATH/var")
|
||||
}
|
||||
|
||||
run_ipt2socks() {
|
||||
local flag proto tcp_tproxy local_port socks_address socks_port socks_username socks_password log_file
|
||||
local _extra_param=""
|
||||
@@ -488,7 +493,7 @@ run_singbox() {
|
||||
esac
|
||||
[ -n "$remote_dns_client_ip" ] && _extra_param="${_extra_param} -remote_dns_client_ip ${remote_dns_client_ip}"
|
||||
[ "$remote_fakedns" = "1" ] && _extra_param="${_extra_param} -remote_dns_fake 1"
|
||||
_extra_param="${_extra_param} -tcp_proxy_way $tcp_proxy_way"
|
||||
_extra_param="${_extra_param} -tcp_proxy_way ${TCP_PROXY_WAY}"
|
||||
lua $UTIL_SINGBOX gen_config ${_extra_param} > $config_file
|
||||
ln_run "$(first_type $(config_t_get global_app singbox_file) sing-box)" "sing-box" $log_file run -c "$config_file"
|
||||
}
|
||||
@@ -540,7 +545,7 @@ run_xray() {
|
||||
[ -n "$_doh_bootstrap" ] && _extra_param="${_extra_param} -remote_dns_doh_ip ${_doh_bootstrap}"
|
||||
_extra_param="${_extra_param} -remote_dns_doh_port ${_doh_port} -remote_dns_doh_url ${_doh_url} -remote_dns_doh_host ${_doh_host}"
|
||||
}
|
||||
_extra_param="${_extra_param} -tcp_proxy_way $tcp_proxy_way"
|
||||
_extra_param="${_extra_param} -tcp_proxy_way ${TCP_PROXY_WAY}"
|
||||
_extra_param="${_extra_param} -loglevel $loglevel"
|
||||
lua $UTIL_XRAY gen_config ${_extra_param} > $config_file
|
||||
ln_run "$(first_type $(config_t_get global_app ${type}_file) ${type})" ${type} $log_file run -c "$config_file"
|
||||
@@ -570,13 +575,14 @@ run_chinadns_ng() {
|
||||
eval_set_val $@
|
||||
|
||||
local _CONF_FILE=$TMP_ACL_PATH/$_flag/chinadns_ng.conf
|
||||
local _LOG_FILE=$TMP_ACL_PATH/$_flag/chinadns_ng.log
|
||||
_LOG_FILE="/dev/null"
|
||||
local _LOG_FILE="/dev/null"
|
||||
[ "$(config_t_get global log_chinadns_ng "0")" == "1" ] && _LOG_FILE=$TMP_ACL_PATH/$_flag/chinadns_ng.log
|
||||
|
||||
_extra_param="-FLAG ${_flag} -TCP_NODE ${_tcp_node} -LISTEN_PORT ${_listen_port} -DNS_LOCAL ${_dns_local} -DNS_TRUST ${_dns_trust}"
|
||||
_extra_param="${_extra_param} -USE_DIRECT_LIST ${_use_direct_list} -USE_PROXY_LIST ${_use_proxy_list} -USE_BLOCK_LIST ${_use_block_list}"
|
||||
_extra_param="${_extra_param} -GFWLIST ${_gfwlist} -CHNLIST ${_chnlist} -NO_IPV6_TRUST ${_no_ipv6_trust} -DEFAULT_MODE ${_default_mode}"
|
||||
_extra_param="${_extra_param} -DEFAULT_TAG ${_default_tag} -NFTFLAG ${nftflag} -NO_LOGIC_LOG ${_no_logic_log} -REMOTE_FAKEDNS ${_remote_fakedns}"
|
||||
_extra_param="${_extra_param} -LOG_FILE ${_LOG_FILE}"
|
||||
|
||||
lua $APP_PATH/helper_chinadns_add.lua ${_extra_param} > ${_CONF_FILE}
|
||||
ln_run "$(first_type chinadns-ng)" chinadns-ng "${_LOG_FILE}" -C ${_CONF_FILE}
|
||||
@@ -758,7 +764,6 @@ run_redir() {
|
||||
}
|
||||
}
|
||||
[ "$bind" != "127.0.0.1" ] && echolog "${PROTO}节点:[$remarks],监听端口:$local_port"
|
||||
set_cache_var "${PROTO}_NODE_PORT" "${port}"
|
||||
|
||||
case "$PROTO" in
|
||||
UDP)
|
||||
@@ -816,12 +821,11 @@ run_redir() {
|
||||
[ "$tcp_node_http_port" != "0" ] && tcp_node_http=1
|
||||
if [ $PROXY_IPV6 == "1" ]; then
|
||||
echolog "开启实验性IPv6透明代理(TProxy),请确认您的节点及类型支持IPv6!"
|
||||
PROXY_IPV6_UDP=1
|
||||
fi
|
||||
|
||||
if [ "$tcp_proxy_way" = "redirect" ]; then
|
||||
if [ "${TCP_PROXY_WAY}" = "redirect" ]; then
|
||||
can_ipt=$(echo "$REDIRECT_LIST" | grep "$type")
|
||||
elif [ "$tcp_proxy_way" = "tproxy" ]; then
|
||||
elif [ "${TCP_PROXY_WAY}" = "tproxy" ]; then
|
||||
can_ipt=$(echo "$TPROXY_LIST" | grep "$type")
|
||||
fi
|
||||
[ -z "$can_ipt" ] && type="socks"
|
||||
@@ -875,14 +879,14 @@ run_redir() {
|
||||
}
|
||||
|
||||
[ "${DNS_MODE}" = "sing-box" ] && {
|
||||
resolve_dns=1
|
||||
NO_PLUGIN_DNS=1
|
||||
config_file=$(echo $config_file | sed "s/.json/_DNS.json/g")
|
||||
_args="${_args} remote_dns_query_strategy=${REMOTE_DNS_QUERY_STRATEGY}"
|
||||
DNSMASQ_FILTER_PROXY_IPV6=0
|
||||
local _remote_dns_client_ip=$(config_t_get global remote_dns_client_ip)
|
||||
[ -n "${_remote_dns_client_ip}" ] && _args="${_args} remote_dns_client_ip=${_remote_dns_client_ip}"
|
||||
[ "${DNS_CACHE}" == "0" ] && _args="${_args} dns_cache=0"
|
||||
resolve_dns_port=${dns_listen_port}
|
||||
resolve_dns_port=${NEXT_DNS_LISTEN_PORT}
|
||||
_args="${_args} dns_listen_port=${resolve_dns_port}"
|
||||
|
||||
case "$(config_t_get global direct_dns_mode "auto")" in
|
||||
@@ -918,7 +922,7 @@ run_redir() {
|
||||
_args="${_args} remote_fakedns=1"
|
||||
resolve_dns_log="${resolve_dns_log} + FakeDNS"
|
||||
}
|
||||
dns_listen_port=$(expr $dns_listen_port + 1)
|
||||
NEXT_DNS_LISTEN_PORT=$(expr $NEXT_DNS_LISTEN_PORT + 1)
|
||||
}
|
||||
run_singbox flag=$_flag node=$node tcp_redir_port=$local_port config_file=$config_file log_file=$log_file ${_args}
|
||||
;;
|
||||
@@ -953,14 +957,14 @@ run_redir() {
|
||||
}
|
||||
|
||||
[ "${DNS_MODE}" = "xray" ] && {
|
||||
resolve_dns=1
|
||||
NO_PLUGIN_DNS=1
|
||||
config_file=$(echo $config_file | sed "s/.json/_DNS.json/g")
|
||||
_args="${_args} remote_dns_query_strategy=${REMOTE_DNS_QUERY_STRATEGY}"
|
||||
DNSMASQ_FILTER_PROXY_IPV6=0
|
||||
local _remote_dns_client_ip=$(config_t_get global remote_dns_client_ip)
|
||||
[ -n "${_remote_dns_client_ip}" ] && _args="${_args} remote_dns_client_ip=${_remote_dns_client_ip}"
|
||||
[ "${DNS_CACHE}" == "0" ] && _args="${_args} dns_cache=0"
|
||||
resolve_dns_port=${dns_listen_port}
|
||||
resolve_dns_port=${NEXT_DNS_LISTEN_PORT}
|
||||
_args="${_args} dns_listen_port=${resolve_dns_port}"
|
||||
_args="${_args} remote_dns_tcp_server=${REMOTE_DNS}"
|
||||
if [ "$v2ray_dns_mode" = "tcp+doh" ]; then
|
||||
@@ -976,12 +980,12 @@ run_redir() {
|
||||
_args="${_args} remote_fakedns=1"
|
||||
resolve_dns_log="${resolve_dns_log} + FakeDNS"
|
||||
}
|
||||
dns_listen_port=$(expr $dns_listen_port + 1)
|
||||
NEXT_DNS_LISTEN_PORT=$(expr $NEXT_DNS_LISTEN_PORT + 1)
|
||||
}
|
||||
run_xray flag=$_flag node=$node tcp_redir_port=$local_port config_file=$config_file log_file=$log_file ${_args}
|
||||
;;
|
||||
trojan*)
|
||||
[ "$tcp_proxy_way" = "tproxy" ] && lua_tproxy_arg="-use_tproxy true"
|
||||
[ "${TCP_PROXY_WAY}" = "tproxy" ] && lua_tproxy_arg="-use_tproxy true"
|
||||
[ "$TCP_UDP" = "1" ] && {
|
||||
config_file=$(echo $config_file | sed "s/TCP/TCP_UDP/g")
|
||||
UDP_REDIR_PORT=$TCP_REDIR_PORT
|
||||
@@ -996,7 +1000,7 @@ run_redir() {
|
||||
ln_run "$(first_type naive)" naive $log_file "$config_file"
|
||||
;;
|
||||
ssr)
|
||||
[ "$tcp_proxy_way" = "tproxy" ] && lua_tproxy_arg="-tcp_tproxy true"
|
||||
[ "${TCP_PROXY_WAY}" = "tproxy" ] && lua_tproxy_arg="-tcp_tproxy true"
|
||||
[ "$TCP_UDP" = "1" ] && {
|
||||
config_file=$(echo $config_file | sed "s/TCP/TCP_UDP/g")
|
||||
UDP_REDIR_PORT=$TCP_REDIR_PORT
|
||||
@@ -1007,7 +1011,7 @@ run_redir() {
|
||||
ln_run "$(first_type ssr-redir)" "ssr-redir" $log_file -c "$config_file" -v ${_extra_param}
|
||||
;;
|
||||
ss)
|
||||
[ "$tcp_proxy_way" = "tproxy" ] && lua_tproxy_arg="-tcp_tproxy true"
|
||||
[ "${TCP_PROXY_WAY}" = "tproxy" ] && lua_tproxy_arg="-tcp_tproxy true"
|
||||
lua_mode_arg="-mode tcp_only"
|
||||
[ "$TCP_UDP" = "1" ] && {
|
||||
config_file=$(echo $config_file | sed "s/TCP/TCP_UDP/g")
|
||||
@@ -1020,7 +1024,7 @@ run_redir() {
|
||||
;;
|
||||
ss-rust)
|
||||
local _extra_param="-local_tcp_redir_port $local_port"
|
||||
[ "$tcp_proxy_way" = "tproxy" ] && _extra_param="${_extra_param} -tcp_tproxy true"
|
||||
[ "${TCP_PROXY_WAY}" = "tproxy" ] && _extra_param="${_extra_param} -tcp_tproxy true"
|
||||
[ "$tcp_node_socks" = "1" ] && {
|
||||
tcp_node_socks_flag=1
|
||||
config_file=$(echo $config_file | sed "s/TCP/TCP_SOCKS/g")
|
||||
@@ -1058,7 +1062,7 @@ run_redir() {
|
||||
unset UDP_NODE
|
||||
_extra_param="${_extra_param} -local_udp_redir_port $local_port"
|
||||
}
|
||||
_extra_param="${_extra_param} -tcp_proxy_way $tcp_proxy_way"
|
||||
_extra_param="${_extra_param} -tcp_proxy_way ${TCP_PROXY_WAY}"
|
||||
lua $UTIL_HYSTERIA2 gen_config -node $node ${_extra_param} > $config_file
|
||||
ln_run "$(first_type $(config_t_get global_app hysteria_file))" "hysteria" $log_file -c "$config_file" client
|
||||
;;
|
||||
@@ -1071,7 +1075,7 @@ run_redir() {
|
||||
unset UDP_NODE
|
||||
}
|
||||
local _socks_tproxy=""
|
||||
[ "$tcp_proxy_way" = "tproxy" ] && _socks_tproxy="1"
|
||||
[ "${TCP_PROXY_WAY}" = "tproxy" ] && _socks_tproxy="1"
|
||||
run_ipt2socks flag=default proto=${_flag} tcp_tproxy=${_socks_tproxy} local_port=${local_port} socks_address=${_socks_address} socks_port=${_socks_port} socks_username=${_socks_username} socks_password=${_socks_password} log_file=${log_file}
|
||||
fi
|
||||
|
||||
@@ -1352,12 +1356,12 @@ start_dns() {
|
||||
|
||||
#当全局(包括访问控制节点)开启chinadns-ng时,不启动新进程。
|
||||
[ "$DNS_SHUNT" != "chinadns-ng" ] || [ "$ACL_RULE_DNSMASQ" = "1" ] && {
|
||||
LOCAL_DNS="127.0.0.1#${dns_listen_port}"
|
||||
LOCAL_DNS="127.0.0.1#${NEXT_DNS_LISTEN_PORT}"
|
||||
local china_ng_c_dns="tcp://$(get_first_dns DIRECT_DNS 53 | sed 's/:/#/g')"
|
||||
ln_run "$(first_type chinadns-ng)" chinadns-ng "/dev/null" -b 127.0.0.1 -l ${dns_listen_port} -c ${china_ng_c_dns} -d chn
|
||||
ln_run "$(first_type chinadns-ng)" chinadns-ng "/dev/null" -b 127.0.0.1 -l ${NEXT_DNS_LISTEN_PORT} -c ${china_ng_c_dns} -d chn
|
||||
echolog " - ChinaDNS-NG(${LOCAL_DNS}) -> ${china_ng_c_dns}"
|
||||
echolog " * 请确保上游直连 DNS 支持 TCP 查询。"
|
||||
dns_listen_port=$(expr $dns_listen_port + 1)
|
||||
NEXT_DNS_LISTEN_PORT=$(expr $NEXT_DNS_LISTEN_PORT + 1)
|
||||
}
|
||||
;;
|
||||
dot)
|
||||
@@ -1367,11 +1371,11 @@ start_dns() {
|
||||
|
||||
#当全局(包括访问控制节点)开启chinadns-ng时,不启动新进程。
|
||||
[ "$DNS_SHUNT" != "chinadns-ng" ] || [ "$ACL_RULE_DNSMASQ" = "1" ] && {
|
||||
LOCAL_DNS="127.0.0.1#${dns_listen_port}"
|
||||
ln_run "$(first_type chinadns-ng)" chinadns-ng "/dev/null" -b 127.0.0.1 -l ${dns_listen_port} -c ${DIRECT_DNS} -d chn
|
||||
LOCAL_DNS="127.0.0.1#${NEXT_DNS_LISTEN_PORT}"
|
||||
ln_run "$(first_type chinadns-ng)" chinadns-ng "/dev/null" -b 127.0.0.1 -l ${NEXT_DNS_LISTEN_PORT} -c ${DIRECT_DNS} -d chn
|
||||
echolog " - ChinaDNS-NG(${LOCAL_DNS}) -> ${DIRECT_DNS}"
|
||||
echolog " * 请确保上游直连 DNS 支持 DoT 查询。"
|
||||
dns_listen_port=$(expr $dns_listen_port + 1)
|
||||
NEXT_DNS_LISTEN_PORT=$(expr $NEXT_DNS_LISTEN_PORT + 1)
|
||||
}
|
||||
|
||||
local tmp_dot_ip=$(echo "$DIRECT_DNS" | sed -n 's/.*:\/\/\([^@#]*@\)*\([^@#]*\).*/\2/p')
|
||||
@@ -1403,18 +1407,18 @@ start_dns() {
|
||||
# 排除127.0.0.1的条目
|
||||
IPT_APPEND_DNS=$(echo "$IPT_APPEND_DNS" | awk -F',' '{for(i=1;i<=NF;i++) if($i !~ /^127\.0\.0\.1/) printf (i>1?",":"") $i; print ""}' | sed 's/^,\|,$//g')
|
||||
|
||||
TUN_DNS="127.0.0.1#${dns_listen_port}"
|
||||
[ "${resolve_dns}" == "1" ] && TUN_DNS="127.0.0.1#${resolve_dns_port}"
|
||||
TUN_DNS="127.0.0.1#${NEXT_DNS_LISTEN_PORT}"
|
||||
[ -n "${NO_PLUGIN_DNS}" ] && TUN_DNS="127.0.0.1#${resolve_dns_port}"
|
||||
|
||||
case "$DNS_MODE" in
|
||||
dns2socks)
|
||||
local dns2socks_socks_server=$(echo $(config_t_get global socks_server 127.0.0.1:1080) | sed "s/#/:/g")
|
||||
local dns2socks_forward=$(get_first_dns REMOTE_DNS 53 | sed 's/#/:/g')
|
||||
run_dns2socks socks=$dns2socks_socks_server listen_address=127.0.0.1 listen_port=${dns_listen_port} dns=$dns2socks_forward cache=$DNS_CACHE
|
||||
run_dns2socks socks=$dns2socks_socks_server listen_address=127.0.0.1 listen_port=${NEXT_DNS_LISTEN_PORT} dns=$dns2socks_forward cache=$DNS_CACHE
|
||||
echolog " - dns2socks(${TUN_DNS}),${dns2socks_socks_server} -> tcp://${dns2socks_forward}"
|
||||
;;
|
||||
sing-box)
|
||||
[ "${resolve_dns}" == "0" ] && {
|
||||
[ -z "${NO_PLUGIN_DNS}" ] && {
|
||||
local config_file=$TMP_PATH/DNS.json
|
||||
local log_file=$TMP_PATH/DNS.log
|
||||
local log_file=/dev/null
|
||||
@@ -1424,9 +1428,9 @@ start_dns() {
|
||||
DNSMASQ_FILTER_PROXY_IPV6=0
|
||||
local _remote_dns_client_ip=$(config_t_get global remote_dns_client_ip)
|
||||
[ -n "${_remote_dns_client_ip}" ] && _args="${_args} remote_dns_client_ip=${_remote_dns_client_ip}"
|
||||
use_tcp_node_resolve_dns=1
|
||||
TCP_PROXY_DNS=1
|
||||
local v2ray_dns_mode=$(config_t_get global v2ray_dns_mode tcp)
|
||||
_args="${_args} dns_listen_port=${dns_listen_port}"
|
||||
_args="${_args} dns_listen_port=${NEXT_DNS_LISTEN_PORT}"
|
||||
_args="${_args} remote_dns_protocol=${v2ray_dns_mode}"
|
||||
case "$v2ray_dns_mode" in
|
||||
tcp)
|
||||
@@ -1449,7 +1453,7 @@ start_dns() {
|
||||
}
|
||||
;;
|
||||
xray)
|
||||
[ "${resolve_dns}" == "0" ] && {
|
||||
[ -z "${NO_PLUGIN_DNS}" ] && {
|
||||
local config_file=$TMP_PATH/DNS.json
|
||||
local log_file=$TMP_PATH/DNS.log
|
||||
local log_file=/dev/null
|
||||
@@ -1459,8 +1463,8 @@ start_dns() {
|
||||
DNSMASQ_FILTER_PROXY_IPV6=0
|
||||
local _remote_dns_client_ip=$(config_t_get global remote_dns_client_ip)
|
||||
[ -n "${_remote_dns_client_ip}" ] && _args="${_args} remote_dns_client_ip=${_remote_dns_client_ip}"
|
||||
use_tcp_node_resolve_dns=1
|
||||
_args="${_args} dns_listen_port=${dns_listen_port}"
|
||||
TCP_PROXY_DNS=1
|
||||
_args="${_args} dns_listen_port=${NEXT_DNS_LISTEN_PORT}"
|
||||
_args="${_args} remote_dns_tcp_server=${REMOTE_DNS}"
|
||||
local v2ray_dns_mode=$(config_t_get global v2ray_dns_mode tcp)
|
||||
if [ "$v2ray_dns_mode" = "tcp+doh" ]; then
|
||||
@@ -1479,9 +1483,9 @@ start_dns() {
|
||||
}
|
||||
;;
|
||||
dot)
|
||||
use_tcp_node_resolve_dns=1
|
||||
TCP_PROXY_DNS=1
|
||||
if [ "$chinadns_tls" != "nil" ]; then
|
||||
local china_ng_listen_port=${dns_listen_port}
|
||||
local china_ng_listen_port=${NEXT_DNS_LISTEN_PORT}
|
||||
local china_ng_trust_dns=$(config_t_get global remote_dns_dot "tls://dns.google@8.8.4.4")
|
||||
local tmp_dot_ip=$(echo "$china_ng_trust_dns" | sed -n 's/.*:\/\/\([^@#]*@\)*\([^@#]*\).*/\2/p')
|
||||
local tmp_dot_port=$(echo "$china_ng_trust_dns" | sed -n 's/.*#\([0-9]\+\).*/\1/p')
|
||||
@@ -1494,7 +1498,7 @@ start_dns() {
|
||||
else
|
||||
echolog " - 你的ChinaDNS-NG版本不支持DoT,远程DNS将默认使用tcp://1.1.1.1"
|
||||
REMOTE_DNS="1.1.1.1"
|
||||
local china_ng_listen_port=${dns_listen_port}
|
||||
local china_ng_listen_port=${NEXT_DNS_LISTEN_PORT}
|
||||
local china_ng_trust_dns="tcp://${REMOTE_DNS}"
|
||||
[ "$DNS_SHUNT" != "chinadns-ng" ] && {
|
||||
[ "$FILTER_PROXY_IPV6" = "1" ] && DNSMASQ_FILTER_PROXY_IPV6=0 && local no_ipv6_trust="-N"
|
||||
@@ -1504,8 +1508,8 @@ start_dns() {
|
||||
fi
|
||||
;;
|
||||
udp)
|
||||
use_udp_node_resolve_dns=1
|
||||
local china_ng_listen_port=${dns_listen_port}
|
||||
UDP_PROXY_DNS=1
|
||||
local china_ng_listen_port=${NEXT_DNS_LISTEN_PORT}
|
||||
local china_ng_trust_dns="udp://$(get_first_dns REMOTE_DNS 53 | sed 's/:/#/g')"
|
||||
if [ "$DNS_SHUNT" != "chinadns-ng" ] && [ "$FILTER_PROXY_IPV6" = "1" ]; then
|
||||
DNSMASQ_FILTER_PROXY_IPV6=0
|
||||
@@ -1518,8 +1522,8 @@ start_dns() {
|
||||
fi
|
||||
;;
|
||||
tcp)
|
||||
use_tcp_node_resolve_dns=1
|
||||
local china_ng_listen_port=${dns_listen_port}
|
||||
TCP_PROXY_DNS=1
|
||||
local china_ng_listen_port=${NEXT_DNS_LISTEN_PORT}
|
||||
local china_ng_trust_dns="tcp://$(get_first_dns REMOTE_DNS 53 | sed 's/:/#/g')"
|
||||
[ "$DNS_SHUNT" != "chinadns-ng" ] && {
|
||||
[ "$FILTER_PROXY_IPV6" = "1" ] && DNSMASQ_FILTER_PROXY_IPV6=0 && local no_ipv6_trust="-N"
|
||||
@@ -1531,8 +1535,8 @@ start_dns() {
|
||||
|
||||
[ -n "${resolve_dns_log}" ] && echolog " - ${resolve_dns_log}"
|
||||
|
||||
[ "${use_tcp_node_resolve_dns}" = "1" ] && echolog " * 请确认上游 DNS 支持 TCP/DoT/DoH 查询,如非直连地址,确保 TCP 代理打开,并且已经正确转发!"
|
||||
[ "${use_udp_node_resolve_dns}" = "1" ] && echolog " * 请确认上游 DNS 支持 UDP 查询并已使用 UDP 节点,如上游 DNS 非直连地址,确保 UDP 代理打开,并且已经正确转发!"
|
||||
[ -n "${TCP_PROXY_DNS}" ] && echolog " * 请确认上游 DNS 支持 TCP/DoT/DoH 查询,如非直连地址,确保 TCP 代理打开,并且已经正确转发!"
|
||||
[ -n "${UDP_PROXY_DNS}" ] && echolog " * 请确认上游 DNS 支持 UDP 查询并已使用 UDP 节点,如上游 DNS 非直连地址,确保 UDP 代理打开,并且已经正确转发!"
|
||||
|
||||
[ "${DNS_SHUNT}" = "smartdns" ] && {
|
||||
if command -v smartdns > /dev/null 2>&1; then
|
||||
@@ -1568,7 +1572,7 @@ start_dns() {
|
||||
fi
|
||||
|
||||
[ "$FILTER_PROXY_IPV6" = "1" ] && DNSMASQ_FILTER_PROXY_IPV6=0
|
||||
[ -z "${china_ng_listen_port}" ] && local china_ng_listen_port=$(expr $dns_listen_port + 1)
|
||||
[ -z "${china_ng_listen_port}" ] && local china_ng_listen_port=$(expr $NEXT_DNS_LISTEN_PORT + 1)
|
||||
local china_ng_listen="127.0.0.1#${china_ng_listen_port}"
|
||||
[ -z "${china_ng_trust_dns}" ] && local china_ng_trust_dns=${TUN_DNS}
|
||||
|
||||
@@ -1857,7 +1861,7 @@ acl_app() {
|
||||
local dnsmasq_conf=${acl_path}/dnsmasq.conf
|
||||
local dnsmasq_conf_path=${acl_path}/dnsmasq.d
|
||||
lua $APP_PATH/helper_dnsmasq.lua add_rule -FLAG ${sid} -TMP_DNSMASQ_PATH ${dnsmasq_conf_path} -DNSMASQ_CONF_FILE ${dnsmasq_conf} \
|
||||
-LISTEN_PORT ${dnsmasq_port} -DEFAULT_DNS $DEFAULT_DNS -LOCAL_DNS $LOCAL_DNS \
|
||||
-LISTEN_PORT ${dnsmasq_port} -DEFAULT_DNS ${DEFAULT_DNS} -LOCAL_DNS $LOCAL_DNS \
|
||||
-USE_DIRECT_LIST "${use_direct_list}" -USE_PROXY_LIST "${use_proxy_list}" -USE_BLOCK_LIST "${use_block_list}" -USE_GFW_LIST "${use_gfw_list}" -CHN_LIST "${chn_list}" \
|
||||
-TUN_DNS "127.0.0.1#${_dns_port}" -REMOTE_FAKEDNS 0 -USE_DEFAULT_DNS "${use_default_dns:-direct}" -CHINADNS_DNS ${_china_ng_listen:-0} \
|
||||
-TCP_NODE $tcp_node -DEFAULT_PROXY_MODE ${tcp_proxy_mode} -NO_PROXY_IPV6 ${dnsmasq_filter_proxy_ipv6:-0} -NFTFLAG ${nftflag:-0} \
|
||||
@@ -1986,6 +1990,10 @@ acl_app() {
|
||||
}
|
||||
|
||||
start() {
|
||||
mkdir -p /tmp/etc $TMP_PATH $TMP_BIN_PATH $TMP_SCRIPT_FUNC_PATH $TMP_ROUTE_PATH $TMP_ACL_PATH $TMP_PATH2
|
||||
get_config
|
||||
export V2RAY_LOCATION_ASSET=$(config_t_get global_rules v2ray_location_asset "/usr/share/v2ray/")
|
||||
export XRAY_LOCATION_ASSET=$V2RAY_LOCATION_ASSET
|
||||
ulimit -n 65535
|
||||
start_haproxy
|
||||
start_socks
|
||||
@@ -2056,14 +2064,12 @@ start() {
|
||||
|
||||
stop() {
|
||||
clean_log
|
||||
[ -n "$($(source $APP_PATH/iptables.sh get_ipt_bin) -t mangle -t nat -L -nv 2>/dev/null | grep "PSW")" ] && source $APP_PATH/iptables.sh stop
|
||||
[ -n "$(nft list chains 2>/dev/null | grep "PSW")" ] && source $APP_PATH/nftables.sh stop
|
||||
eval_cache_var
|
||||
[ -n "$USE_TABLES" ] && source $APP_PATH/${USE_TABLES}.sh stop
|
||||
delete_ip2route
|
||||
kill_all v2ray-plugin obfs-local
|
||||
pgrep -f "sleep.*(6s|9s|58s)" | xargs kill -9 >/dev/null 2>&1
|
||||
pgrep -af "${CONFIG}/" | awk '! /app\.sh|subscribe\.lua|rule_update\.lua|tasks\.sh|ujail/{print $1}' | xargs kill -9 >/dev/null 2>&1
|
||||
unset V2RAY_LOCATION_ASSET
|
||||
unset XRAY_LOCATION_ASSET
|
||||
stop_crontab
|
||||
source $APP_PATH/helper_smartdns.sh del
|
||||
rm -rf $GLOBAL_DNSMASQ_CONF
|
||||
@@ -2077,14 +2083,12 @@ stop() {
|
||||
uci -q delete ${CONFIG}.@global[0].dnsmasq_dns_redirect
|
||||
uci -q commit ${CONFIG}
|
||||
}
|
||||
if [ -z "$(get_cache_var "ACL_default_dns_port")" ] || [ -n "${bak_dnsmasq_dns_redirect}" ]; then
|
||||
if [ -z "${ACL_default_dns_port}" ] || [ -n "${bak_dnsmasq_dns_redirect}" ]; then
|
||||
uci -q del_list dhcp.@dnsmasq[0].addnmount="${GLOBAL_DNSMASQ_CONF_PATH}"
|
||||
uci -q commit dhcp
|
||||
lua $APP_PATH/helper_dnsmasq.lua restart -LOG 0
|
||||
fi
|
||||
bak_bridge_nf_ipt=$(get_cache_var "bak_bridge_nf_ipt")
|
||||
[ -n "${bak_bridge_nf_ipt}" ] && sysctl -w net.bridge.bridge-nf-call-iptables=${bak_bridge_nf_ipt} >/dev/null 2>&1
|
||||
bak_bridge_nf_ip6t=$(get_cache_var "bak_bridge_nf_ip6t")
|
||||
[ -n "${bak_bridge_nf_ip6t}" ] && sysctl -w net.bridge.bridge-nf-call-ip6tables=${bak_bridge_nf_ip6t} >/dev/null 2>&1
|
||||
}
|
||||
rm -rf $TMP_PATH
|
||||
@@ -2093,11 +2097,13 @@ stop() {
|
||||
exit 0
|
||||
}
|
||||
|
||||
get_config() {
|
||||
ENABLED_DEFAULT_ACL=0
|
||||
TCP_REDIR_PORT=1041
|
||||
UDP_REDIR_PORT=1051
|
||||
ENABLED=$(config_t_get global enabled 0)
|
||||
SOCKS_ENABLED=$(config_t_get global socks_enabled 0)
|
||||
TCP_REDIR_PORT=1041
|
||||
TCP_NODE=$(config_t_get global tcp_node)
|
||||
UDP_REDIR_PORT=1051
|
||||
UDP_NODE=$(config_t_get global udp_node)
|
||||
TCP_UDP=0
|
||||
if [ "$UDP_NODE" == "tcp" ]; then
|
||||
@@ -2115,7 +2121,7 @@ ENABLED_ACLS=$(config_t_get global acl_enable 0)
|
||||
[ "$(uci show ${CONFIG} | grep "@acl_rule" | grep "enabled='1'" | wc -l)" == 0 ] && ENABLED_ACLS=0
|
||||
}
|
||||
|
||||
tcp_proxy_way=$(config_t_get global_forwarding tcp_proxy_way redirect)
|
||||
TCP_PROXY_WAY=$(config_t_get global_forwarding tcp_proxy_way redirect)
|
||||
PROXY_IPV6=$(config_t_get global_forwarding ipv6_tproxy 0)
|
||||
TCP_REDIR_PORTS=$(config_t_get global_forwarding tcp_redir_ports '80,443')
|
||||
UDP_REDIR_PORTS=$(config_t_get global_forwarding udp_redir_ports '1:65535')
|
||||
@@ -2141,17 +2147,23 @@ CLIENT_PROXY=$(config_t_get global client_proxy 1)
|
||||
DNS_SHUNT=$(config_t_get global dns_shunt dnsmasq)
|
||||
[ -z "$(first_type $DNS_SHUNT)" ] && DNS_SHUNT="dnsmasq"
|
||||
DNS_MODE=$(config_t_get global dns_mode tcp)
|
||||
SMARTDNS_DNS_MODE=$(config_t_get global smartdns_dns_mode socks)
|
||||
[ "$DNS_SHUNT" = "smartdns" ] && DNS_MODE=$SMARTDNS_DNS_MODE
|
||||
DNS_CACHE=0
|
||||
[ "$DNS_SHUNT" = "smartdns" ] && DNS_MODE=$(config_t_get global smartdns_dns_mode socks)
|
||||
REMOTE_DNS=$(config_t_get global remote_dns 1.1.1.1:53 | sed 's/#/:/g' | sed -E 's/\:([^:]+)$/#\1/g')
|
||||
USE_DEFAULT_DNS=$(config_t_get global use_default_dns direct)
|
||||
FILTER_PROXY_IPV6=$(config_t_get global filter_proxy_ipv6 0)
|
||||
DNS_REDIRECT=$(config_t_get global dns_redirect 1)
|
||||
dns_listen_port=${DNS_PORT}
|
||||
|
||||
REDIRECT_LIST="socks ss ss-rust ssr sing-box xray trojan-plus naiveproxy hysteria2"
|
||||
TPROXY_LIST="socks ss ss-rust ssr sing-box xray trojan-plus hysteria2"
|
||||
|
||||
NEXT_DNS_LISTEN_PORT=15353
|
||||
TUN_DNS="127.0.0.1#${NEXT_DNS_LISTEN_PORT}"
|
||||
DNS_CACHE=0
|
||||
DIRECT_DNS_QUERY_STRATEGY="UseIP"
|
||||
REMOTE_DNS_QUERY_STRATEGY="UseIP"
|
||||
[ "$FILTER_PROXY_IPV6" = "1" ] && REMOTE_DNS_QUERY_STRATEGY="UseIPv4"
|
||||
DNSMASQ_FILTER_PROXY_IPV6=${FILTER_PROXY_IPV6}
|
||||
|
||||
RESOLVFILE=/tmp/resolv.conf.d/resolv.conf.auto
|
||||
[ -f "${RESOLVFILE}" ] && [ -s "${RESOLVFILE}" ] || RESOLVFILE=/tmp/resolv.conf.auto
|
||||
|
||||
@@ -2173,17 +2185,9 @@ if [ -f "/tmp/etc/dnsmasq.conf.$DEFAULT_DNSMASQ_CFGID" ]; then
|
||||
DNSMASQ_CONF_DIR="/tmp/dnsmasq.d"
|
||||
fi
|
||||
fi
|
||||
GLOBAL_DNSMASQ_CONF=${DNSMASQ_CONF_DIR}/dnsmasq-${CONFIG}.conf
|
||||
GLOBAL_DNSMASQ_CONF_PATH=${GLOBAL_ACL_PATH}/dnsmasq.d
|
||||
|
||||
DIRECT_DNS_QUERY_STRATEGY="UseIP"
|
||||
REMOTE_DNS_QUERY_STRATEGY="UseIP"
|
||||
[ "$FILTER_PROXY_IPV6" = "1" ] && REMOTE_DNS_QUERY_STRATEGY="UseIPv4"
|
||||
DNSMASQ_FILTER_PROXY_IPV6=${FILTER_PROXY_IPV6}
|
||||
|
||||
export V2RAY_LOCATION_ASSET=$(config_t_get global_rules v2ray_location_asset "/usr/share/v2ray/")
|
||||
export XRAY_LOCATION_ASSET=$V2RAY_LOCATION_ASSET
|
||||
mkdir -p /tmp/etc $TMP_PATH $TMP_BIN_PATH $TMP_SCRIPT_FUNC_PATH $TMP_ROUTE_PATH $TMP_ACL_PATH $TMP_PATH2
|
||||
set_cache_var GLOBAL_DNSMASQ_CONF ${DNSMASQ_CONF_DIR}/dnsmasq-${CONFIG}.conf
|
||||
set_cache_var GLOBAL_DNSMASQ_CONF_PATH ${GLOBAL_ACL_PATH}/dnsmasq.d
|
||||
}
|
||||
|
||||
arg1=$1
|
||||
shift
|
||||
@@ -2191,31 +2195,28 @@ case $arg1 in
|
||||
add_ip2route)
|
||||
add_ip2route $@
|
||||
;;
|
||||
get_new_port)
|
||||
get_new_port $@
|
||||
;;
|
||||
run_socks)
|
||||
run_socks $@
|
||||
;;
|
||||
run_redir)
|
||||
run_redir $@
|
||||
;;
|
||||
socks_node_switch)
|
||||
socks_node_switch $@
|
||||
;;
|
||||
echolog)
|
||||
echolog $@
|
||||
;;
|
||||
get_new_port)
|
||||
get_new_port $@
|
||||
;;
|
||||
get_cache_var)
|
||||
get_cache_var $@
|
||||
;;
|
||||
set_cache_var)
|
||||
set_cache_var $@
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
run_socks)
|
||||
run_socks $@
|
||||
;;
|
||||
socks_node_switch)
|
||||
socks_node_switch $@
|
||||
;;
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -19,6 +19,7 @@ local NO_LOGIC_LOG = var["-NO_LOGIC_LOG"]
|
||||
local TCP_NODE = var["-TCP_NODE"]
|
||||
local NFTFLAG = var["-NFTFLAG"]
|
||||
local REMOTE_FAKEDNS = var["-REMOTE_FAKEDNS"]
|
||||
local LOG_FILE = var["-LOG_FILE"]
|
||||
|
||||
local uci = api.libuci
|
||||
local sys = api.sys
|
||||
@@ -104,7 +105,7 @@ local setflag = (NFTFLAG == "1") and "inet@passwall@" or ""
|
||||
local only_global = (DEFAULT_MODE == "proxy" and CHNLIST == "0" and GFWLIST == "0") and 1
|
||||
|
||||
config_lines = {
|
||||
--"verbose",
|
||||
LOG_FILE ~= "/dev/null" and "verbose" or "",
|
||||
"bind-addr 127.0.0.1",
|
||||
"bind-port " .. LISTEN_PORT,
|
||||
"china-dns " .. DNS_LOCAL,
|
||||
@@ -270,7 +271,7 @@ if USE_PROXY_LIST == "1" and is_file_nonzero(file_proxy_host) then
|
||||
"group proxylist",
|
||||
"group-dnl " .. file_proxy_host,
|
||||
"group-upstream " .. DNS_TRUST,
|
||||
REMOTE_FAKEDNS ~= "1" and "group-ipset " .. table.concat(sets, ",") or nil
|
||||
REMOTE_FAKEDNS ~= "1" and "group-ipset " .. table.concat(sets, ",") or ""
|
||||
}
|
||||
if NO_IPV6_TRUST == "1" then table.insert(tmp_lines, "no-ipv6 tag:proxylist") end
|
||||
insert_array_after(config_lines, tmp_lines, "#--3")
|
||||
@@ -292,7 +293,7 @@ if GFWLIST == "1" and is_file_nonzero(RULES_PATH .. "/gfwlist") then
|
||||
end
|
||||
tmp_lines = {
|
||||
"gfwlist-file " .. RULES_PATH .. "/gfwlist",
|
||||
REMOTE_FAKEDNS ~= "1" and "add-taggfw-ip " .. table.concat(sets, ",") or nil
|
||||
REMOTE_FAKEDNS ~= "1" and "add-taggfw-ip " .. table.concat(sets, ",") or ""
|
||||
}
|
||||
if NO_IPV6_TRUST == "1" then table.insert(tmp_lines, "no-ipv6 tag:gfw") end
|
||||
merge_array(config_lines, tmp_lines)
|
||||
@@ -323,7 +324,7 @@ if CHNLIST ~= "0" and is_file_nonzero(RULES_PATH .. "/chnlist") then
|
||||
"group chn_proxy",
|
||||
"group-dnl " .. RULES_PATH .. "/chnlist",
|
||||
"group-upstream " .. DNS_TRUST,
|
||||
REMOTE_FAKEDNS ~= "1" and "group-ipset " .. table.concat(sets, ",") or nil
|
||||
REMOTE_FAKEDNS ~= "1" and "group-ipset " .. table.concat(sets, ",") or ""
|
||||
}
|
||||
if NO_IPV6_TRUST == "1" then table.insert(tmp_lines, "no-ipv6 tag:chn_proxy") end
|
||||
insert_array_after(config_lines, tmp_lines, "#--1")
|
||||
@@ -448,7 +449,7 @@ if uci:get(appname, TCP_NODE, "protocol") == "_shunt" then
|
||||
"group shuntlist",
|
||||
"group-dnl " .. file_shunt_host,
|
||||
"group-upstream " .. DNS_TRUST,
|
||||
(not only_global and REMOTE_FAKEDNS == "1") and nil or ("group-ipset " .. table.concat(sets, ","))
|
||||
(not only_global and REMOTE_FAKEDNS == "1") and "" or ("group-ipset " .. table.concat(sets, ","))
|
||||
}
|
||||
if NO_IPV6_TRUST == "1" then table.insert(tmp_lines, "no-ipv6 tag:shuntlist") end
|
||||
insert_array_after(config_lines, tmp_lines, "#--2")
|
||||
|
||||
@@ -476,7 +476,7 @@ load_acl() {
|
||||
[ "${udp_proxy_mode}" != "disable" ] && $ipt_m -A PSW $(comment "$remarks") -p udp ${_ipt_source} $(factor $udp_redir_ports "-m multiport --dport") -j PSW_RULE
|
||||
$ipt_m -A PSW $(comment "$remarks") -p udp ${_ipt_source} $(REDIRECT $udp_port TPROXY)
|
||||
|
||||
[ "$PROXY_IPV6" == "1" ] && [ "$PROXY_IPV6_UDP" == "1" ] && {
|
||||
[ "$PROXY_IPV6" == "1" ] && {
|
||||
[ "${use_proxy_list}" = "1" ] && $ip6t_m -A PSW $(comment "$remarks") -p udp ${_ipt_source} $(factor $udp_redir_ports "-m multiport --dport") $(dst $black6_set_name) -j PSW_RULE 2>/dev/null
|
||||
[ "${use_gfw_list}" = "1" ] && $ip6t_m -A PSW $(comment "$remarks") -p udp ${_ipt_source} $(factor $udp_redir_ports "-m multiport --dport") $(dst $gfw6_set_name) -j PSW_RULE 2>/dev/null
|
||||
[ "${chn_list}" != "0" ] && $ip6t_m -A PSW $(comment "$remarks") -p udp ${_ipt_source} $(factor $udp_redir_ports "-m multiport --dport") $(dst $IPSET_CHN6) $(get_jump_ipt ${chn_list} "-j PSW_RULE") 2>/dev/null
|
||||
@@ -653,7 +653,7 @@ load_acl() {
|
||||
[ "${UDP_PROXY_MODE}" != "disable" ] && $ipt_m -A PSW $(comment "默认") -p udp $(factor $UDP_REDIR_PORTS "-m multiport --dport") -j PSW_RULE
|
||||
$ipt_m -A PSW $(comment "默认") -p udp $(REDIRECT $UDP_REDIR_PORT TPROXY)
|
||||
|
||||
[ "$PROXY_IPV6" == "1" ] && [ "$PROXY_IPV6_UDP" == "1" ] && {
|
||||
[ "$PROXY_IPV6" == "1" ] && {
|
||||
[ "${USE_PROXY_LIST}" = "1" ] && $ip6t_m -A PSW $(comment "默认") -p udp $(factor $UDP_REDIR_PORTS "-m multiport --dport") $(dst $IPSET_BLACK6) -j PSW_RULE
|
||||
[ "${USE_GFW_LIST}" = "1" ] && $ip6t_m -A PSW $(comment "默认") -p udp $(factor $UDP_REDIR_PORTS "-m multiport --dport") $(dst $IPSET_GFW6) -j PSW_RULE
|
||||
[ "${CHN_LIST}" != "0" ] && $ip6t_m -A PSW $(comment "默认") -p udp $(factor $UDP_REDIR_PORTS "-m multiport --dport") $(dst $IPSET_CHN6) $(get_jump_ipt ${CHN_LIST} "-j PSW_RULE")
|
||||
@@ -899,10 +899,9 @@ add_firewall_rule() {
|
||||
accept_icmp=$(config_t_get global_forwarding accept_icmp 0)
|
||||
accept_icmpv6=$(config_t_get global_forwarding accept_icmpv6 0)
|
||||
|
||||
local tcp_proxy_way=$(config_t_get global_forwarding tcp_proxy_way redirect)
|
||||
if [ "$tcp_proxy_way" = "redirect" ]; then
|
||||
if [ "${TCP_PROXY_WAY}" = "redirect" ]; then
|
||||
unset is_tproxy
|
||||
elif [ "$tcp_proxy_way" = "tproxy" ]; then
|
||||
elif [ "${TCP_PROXY_WAY}" = "tproxy" ]; then
|
||||
is_tproxy="TPROXY"
|
||||
fi
|
||||
|
||||
@@ -1128,7 +1127,7 @@ add_firewall_rule() {
|
||||
echolog " - [$?]将上游 DNS 服务器 [${2}]:${3} 加入到路由器自身代理的 TCP 转发链,请确保您的节点支持IPv6,并开启IPv6透明代理!"
|
||||
fi
|
||||
}
|
||||
[ "$use_tcp_node_resolve_dns" == 1 ] && hosts_foreach REMOTE_DNS _proxy_tcp_access 53
|
||||
[ -n "${TCP_PROXY_DNS}" ] && hosts_foreach REMOTE_DNS _proxy_tcp_access 53
|
||||
|
||||
[ "$accept_icmp" = "1" ] && {
|
||||
$ipt_n -A OUTPUT -p icmp -j PSW_OUTPUT
|
||||
@@ -1202,8 +1201,7 @@ add_firewall_rule() {
|
||||
echolog " - [$?]将上游 DNS 服务器 [${2}]:${3} 加入到路由器自身代理的 UDP 转发链,请确保您的节点支持IPv6,并开启IPv6透明代理!"
|
||||
fi
|
||||
}
|
||||
[ "$use_udp_node_resolve_dns" == 1 ] && hosts_foreach REMOTE_DNS _proxy_udp_access 53
|
||||
|
||||
[ -n "${UDP_PROXY_DNS}" ] && hosts_foreach REMOTE_DNS _proxy_udp_access 53
|
||||
[ -n "${LOCALHOST_UDP_PROXY_MODE}" ] && {
|
||||
$ipt_m -A PSW_OUTPUT -p udp -d $FAKE_IP -j PSW_RULE
|
||||
[ "${USE_PROXY_LIST}" = "1" ] && $ipt_m -A PSW_OUTPUT -p udp $(factor $UDP_REDIR_PORTS "-m multiport --dport") $(dst $IPSET_BLACK) -j PSW_RULE
|
||||
@@ -1216,7 +1214,7 @@ add_firewall_rule() {
|
||||
$ipt_m -A PSW $(comment "本机") -p udp -i lo -j RETURN
|
||||
insert_rule_before "$ipt_m" "OUTPUT" "mwan3" "$(comment mangle-OUTPUT-PSW) -p udp -j PSW_OUTPUT"
|
||||
|
||||
[ "$PROXY_IPV6" == "1" ] && [ "$PROXY_IPV6_UDP" == "1" ] && {
|
||||
[ "$PROXY_IPV6" == "1" ] && {
|
||||
[ -n "$LOCALHOST_UDP_PROXY_MODE" ] && {
|
||||
[ "${USE_PROXY_LIST}" = "1" ] && $ip6t_m -A PSW_OUTPUT -p udp $(factor $UDP_REDIR_PORTS "-m multiport --dport") $(dst $IPSET_BLACK6) -j PSW_RULE
|
||||
[ "${USE_GFW_LIST}" = "1" ] && $ip6t_m -A PSW_OUTPUT -p udp $(factor $UDP_REDIR_PORTS "-m multiport --dport") $(dst $IPSET_GFW6) -j PSW_RULE
|
||||
|
||||
@@ -521,7 +521,7 @@ load_acl() {
|
||||
[ "${udp_proxy_mode}" != "disable" ] && nft "add rule $NFTABLE_NAME PSW_MANGLE ip protocol udp ${_ipt_source} $(factor $udp_redir_ports "udp dport") counter jump PSW_RULE comment \"$remarks\""
|
||||
nft "add rule $NFTABLE_NAME PSW_MANGLE ip protocol udp ${_ipt_source} $(REDIRECT $udp_port TPROXY4) comment \"$remarks\""
|
||||
|
||||
[ "$PROXY_IPV6" == "1" ] && [ "$PROXY_IPV6_UDP" == "1" ] && {
|
||||
[ "$PROXY_IPV6" == "1" ] && {
|
||||
[ "${use_proxy_list}" = "1" ] && nft "add rule $NFTABLE_NAME PSW_MANGLE_V6 meta l4proto udp ${_ipt_source} $(factor $udp_redir_ports "udp dport") ip6 daddr @$black6_set_name counter jump PSW_RULE comment \"$remarks\"" 2>/dev/null
|
||||
[ "${use_gfw_list}" = "1" ] && nft "add rule $NFTABLE_NAME PSW_MANGLE_V6 meta l4proto udp ${_ipt_source} $(factor $udp_redir_ports "udp dport") ip6 daddr @$gfw6_set_name counter jump PSW_RULE comment \"$remarks\"" 2>/dev/null
|
||||
[ "${chn_list}" != "0" ] && nft "add rule $NFTABLE_NAME PSW_MANGLE_V6 meta l4proto udp ${_ipt_source} $(factor $udp_redir_ports "udp dport") ip6 daddr @$NFTSET_CHN6 $(get_jump_ipt ${chn_list} "counter jump PSW_RULE") comment \"$remarks\"" 2>/dev/null
|
||||
@@ -704,7 +704,7 @@ load_acl() {
|
||||
nft "add rule $NFTABLE_NAME PSW_MANGLE ip protocol udp $(REDIRECT $UDP_REDIR_PORT TPROXY4) comment \"默认\""
|
||||
nft "add rule $NFTABLE_NAME PSW_MANGLE ip protocol udp counter return comment \"默认\""
|
||||
|
||||
[ "$PROXY_IPV6" == "1" ] && [ "$PROXY_IPV6_UDP" == "1" ] && {
|
||||
[ "$PROXY_IPV6" == "1" ] && {
|
||||
[ "${USE_PROXY_LIST}" = "1" ] && nft "add rule $NFTABLE_NAME PSW_MANGLE_V6 meta l4proto udp $(factor $UDP_REDIR_PORTS "udp dport") ip6 daddr @$NFTSET_BLACK6 counter jump PSW_RULE comment \"默认\""
|
||||
[ "${USE_GFW_LIST}" = "1" ] && nft "add rule $NFTABLE_NAME PSW_MANGLE_V6 meta l4proto udp $(factor $UDP_REDIR_PORTS "udp dport") ip6 daddr @$NFTSET_GFW6 counter jump PSW_RULE comment \"默认\""
|
||||
[ "${CHN_LIST}" != "0" ] && nft "add rule $NFTABLE_NAME PSW_MANGLE_V6 meta l4proto udp $(factor $UDP_REDIR_PORTS "udp dport") ip6 daddr @$NFTSET_CHN6 $(get_jump_ipt ${CHN_LIST} "counter jump PSW_RULE") comment \"默认\""
|
||||
@@ -948,12 +948,11 @@ add_firewall_rule() {
|
||||
accept_icmp=$(config_t_get global_forwarding accept_icmp 0)
|
||||
accept_icmpv6=$(config_t_get global_forwarding accept_icmpv6 0)
|
||||
|
||||
local tcp_proxy_way=$(config_t_get global_forwarding tcp_proxy_way redirect)
|
||||
if [ "$tcp_proxy_way" = "redirect" ]; then
|
||||
if [ "${TCP_PROXY_WAY}" = "redirect" ]; then
|
||||
unset is_tproxy
|
||||
nft_prerouting_chain="PSW_NAT"
|
||||
nft_output_chain="PSW_OUTPUT_NAT"
|
||||
elif [ "$tcp_proxy_way" = "tproxy" ]; then
|
||||
elif [ "${TCP_PROXY_WAY}" = "tproxy" ]; then
|
||||
is_tproxy="TPROXY"
|
||||
nft_prerouting_chain="PSW_MANGLE"
|
||||
nft_output_chain="PSW_OUTPUT_MANGLE"
|
||||
@@ -1176,7 +1175,7 @@ add_firewall_rule() {
|
||||
echolog " - [$?]将上游 DNS 服务器 [${2}]:${3} 加入到路由器自身代理的 TCP 转发链,请确保您的节点支持IPv6,并开启IPv6透明代理!"
|
||||
fi
|
||||
}
|
||||
[ "$use_tcp_node_resolve_dns" == 1 ] && hosts_foreach REMOTE_DNS _proxy_tcp_access 53
|
||||
[ "$TCP_PROXY_DNS" == 1 ] && hosts_foreach REMOTE_DNS _proxy_tcp_access 53
|
||||
|
||||
[ "$accept_icmp" = "1" ] && {
|
||||
nft "add rule $NFTABLE_NAME PSW_ICMP_REDIRECT oif lo ip protocol icmp ip daddr $FAKE_IP counter redirect"
|
||||
@@ -1255,7 +1254,7 @@ add_firewall_rule() {
|
||||
echolog " - [$?]将上游 DNS 服务器 [${2}]:${3} 加入到路由器自身代理的 UDP 转发链,请确保您的节点支持IPv6,并开启IPv6透明代理!"
|
||||
fi
|
||||
}
|
||||
[ "$use_udp_node_resolve_dns" == 1 ] && hosts_foreach REMOTE_DNS _proxy_udp_access 53
|
||||
[ -n "${UDP_PROXY_DNS}" ] && hosts_foreach REMOTE_DNS _proxy_udp_access 53
|
||||
[ -n "${LOCALHOST_UDP_PROXY_MODE}" ] && {
|
||||
nft "add rule $NFTABLE_NAME PSW_OUTPUT_MANGLE ip protocol udp ip daddr $FAKE_IP counter jump PSW_RULE"
|
||||
[ "${USE_PROXY_LIST}" = "1" ] && nft "add rule $NFTABLE_NAME PSW_OUTPUT_MANGLE ip protocol udp ip daddr @$NFTSET_BLACK $(factor $UDP_REDIR_PORTS "udp dport") counter jump PSW_RULE"
|
||||
@@ -1268,7 +1267,7 @@ add_firewall_rule() {
|
||||
nft "add rule $NFTABLE_NAME PSW_MANGLE ip protocol udp iif lo counter return comment \"本机\""
|
||||
nft "add rule $NFTABLE_NAME mangle_output ip protocol udp counter jump PSW_OUTPUT_MANGLE comment \"PSW_OUTPUT_MANGLE\""
|
||||
|
||||
[ "$PROXY_IPV6" == "1" ] && [ "$PROXY_IPV6_UDP" == "1" ] && {
|
||||
[ "$PROXY_IPV6" == "1" ] && {
|
||||
[ -n "${LOCALHOST_UDP_PROXY_MODE}" ] && {
|
||||
[ "${USE_PROXY_LIST}" = "1" ] && nft "add rule $NFTABLE_NAME PSW_OUTPUT_MANGLE_V6 meta l4proto udp ip6 daddr @$NFTSET_BLACK6 $(factor $UDP_REDIR_PORTS "udp dport") counter jump PSW_RULE"
|
||||
[ "${USE_GFW_LIST}" = "1" ] && nft "add rule $NFTABLE_NAME PSW_OUTPUT_MANGLE_V6 meta l4proto udp ip6 daddr @$NFTSET_GFW6 $(factor $UDP_REDIR_PORTS "udp dport") counter jump PSW_RULE"
|
||||
|
||||
@@ -465,6 +465,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
elseif result.type == "Xray" and info.net == "tcp" then
|
||||
info.net = "raw"
|
||||
end
|
||||
if info.net == "splithttp" then info.net = "xhttp" end
|
||||
if info.net == 'h2' or info.net == 'http' then
|
||||
info.net = "http"
|
||||
result.transport = (result.type == "Xray") and "xhttp" or "http"
|
||||
@@ -527,7 +528,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
if info.net == 'grpc' then
|
||||
result.grpc_serviceName = info.path
|
||||
end
|
||||
if info.net == 'xhttp' or info.net == 'splithttp' then
|
||||
if info.net == 'xhttp' then
|
||||
result.xhttp_host = info.host
|
||||
result.xhttp_path = info.path
|
||||
end
|
||||
@@ -974,6 +975,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
elseif result.type == "Xray" and params.type == "tcp" then
|
||||
params.type = "raw"
|
||||
end
|
||||
if params.type == "splithttp" then params.type = "xhttp" end
|
||||
if params.type == "h2" or params.type == "http" then
|
||||
params.type = "http"
|
||||
result.transport = (result.type == "Xray") and "xhttp" or "http"
|
||||
@@ -1037,7 +1039,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
if params.serviceName then result.grpc_serviceName = params.serviceName end
|
||||
result.grpc_mode = params.mode or "gun"
|
||||
end
|
||||
if params.type == 'xhttp' or params.type == 'splithttp' then
|
||||
if params.type == 'xhttp' then
|
||||
result.xhttp_host = params.host
|
||||
result.xhttp_path = params.path
|
||||
result.xhttp_mode = params.mode or "auto"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall2
|
||||
PKG_VERSION:=24.12.26
|
||||
PKG_VERSION:=25.1.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -670,19 +670,44 @@ namespace Shadowsocks.View
|
||||
// user wants a seperator item between strategy and servers menugroup
|
||||
items.Add(strategyCount++, new MenuItem("-"));
|
||||
|
||||
int maxCount = 20;
|
||||
int serverCount = 0;
|
||||
bool overflow = false;
|
||||
bool needAdd = true;
|
||||
|
||||
Configuration configuration = controller.GetCurrentConfiguration();
|
||||
foreach (var server in configuration.configs)
|
||||
for (int i = 0; i < configuration.configs.Count; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (overflow)
|
||||
{
|
||||
needAdd = configuration.index >= i;
|
||||
if (needAdd)
|
||||
{
|
||||
i = configuration.index;
|
||||
}
|
||||
}
|
||||
|
||||
if (needAdd)
|
||||
{
|
||||
var server = configuration.configs[i];
|
||||
Configuration.CheckServer(server);
|
||||
MenuItem item = new MenuItem(server.ToString());
|
||||
item.Tag = configuration.configs.FindIndex(s => s == server);
|
||||
var item = new MenuItem(server.ToString());
|
||||
item.Tag = i;
|
||||
item.Click += AServerItem_Click;
|
||||
items.Add(strategyCount + serverCount, item);
|
||||
serverCount++;
|
||||
}
|
||||
|
||||
if (overflow)
|
||||
{
|
||||
items.Add(strategyCount + serverCount, new MenuItem($"... more than {maxCount} (total {configuration.configs.Count})", Config_Click));
|
||||
break;
|
||||
}
|
||||
|
||||
overflow = serverCount > maxCount;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<package id="DynamicData" version="7.1.1" targetFramework="net48" />
|
||||
<package id="Fody" version="6.3.0" targetFramework="net472" developmentDependency="true" />
|
||||
<package id="GlobalHotKey" version="1.1.0" targetFramework="net472" />
|
||||
<package id="Google.Protobuf" version="3.14.0" targetFramework="net48" />
|
||||
<package id="Google.Protobuf" version="3.27.2" targetFramework="net48" />
|
||||
<package id="MdXaml" version="1.6.0" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
<package id="NLog" version="4.7.6" targetFramework="net48" />
|
||||
<package id="Pharmacist.Common" version="2.0.5" targetFramework="net48" />
|
||||
<package id="ReactiveUI" version="12.1.5" targetFramework="net48" />
|
||||
|
||||
@@ -85,8 +85,8 @@
|
||||
<Reference Include="GlobalHotKey, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GlobalHotKey.1.1.0\lib\GlobalHotKey.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Protobuf, Version=3.14.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Google.Protobuf.3.14.0\lib\net45\Google.Protobuf.dll</HintPath>
|
||||
<Reference Include="Google.Protobuf, Version=3.27.2.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Google.Protobuf.3.27.2\lib\net45\Google.Protobuf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.AvalonEdit, Version=6.0.1.278, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AvalonEdit.6.0.1\lib\net45\ICSharpCode.AvalonEdit.dll</HintPath>
|
||||
@@ -96,8 +96,8 @@
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.7.6\lib\net45\NLog.dll</HintPath>
|
||||
|
||||
@@ -22,6 +22,16 @@ linters-settings:
|
||||
|
||||
run:
|
||||
go: "1.23"
|
||||
build-tags:
|
||||
- with_gvisor
|
||||
- with_quic
|
||||
- with_dhcp
|
||||
- with_wireguard
|
||||
- with_ech
|
||||
- with_utls
|
||||
- with_reality_server
|
||||
- with_acme
|
||||
- with_clash_api
|
||||
|
||||
issues:
|
||||
exclude-dirs:
|
||||
|
||||
@@ -14,6 +14,11 @@ android {
|
||||
|
||||
ndkVersion "28.0.12674087"
|
||||
|
||||
def ndkPathFromEnv = System.getenv("ANDROID_NDK_HOME")
|
||||
if (ndkPathFromEnv != null) {
|
||||
ndkPath ndkPathFromEnv
|
||||
}
|
||||
|
||||
ksp {
|
||||
arg("room.incremental", "true")
|
||||
arg("room.schemaLocation", "$projectDir/schemas")
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
VERSION_CODE=452
|
||||
VERSION_CODE=456
|
||||
VERSION_NAME=1.10.6
|
||||
GO_VERSION=go1.23.4
|
||||
|
||||
@@ -21,7 +21,7 @@ func initializeHTTP3Client(instance *box.Box) error {
|
||||
return err
|
||||
}
|
||||
http3Client = &http.Client{
|
||||
Transport: &http3.RoundTripper{
|
||||
Transport: &http3.Transport{
|
||||
Dial: func(ctx context.Context, addr string, tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlyConnection, error) {
|
||||
destination := M.ParseSocksaddr(addr)
|
||||
udpConn, dErr := dialer.DialContext(ctx, N.NetworkUDP, destination)
|
||||
|
||||
@@ -64,6 +64,7 @@ type echConnWrapper struct {
|
||||
|
||||
func (c *echConnWrapper) ConnectionState() tls.ConnectionState {
|
||||
state := c.Conn.ConnectionState()
|
||||
//nolint:staticcheck
|
||||
return tls.ConnectionState{
|
||||
Version: state.Version,
|
||||
HandshakeComplete: state.HandshakeComplete,
|
||||
|
||||
@@ -147,6 +147,9 @@ func echKeygen(version uint16, serverName string, conf []myECHKeyConfig, suite [
|
||||
pair.rawConf = b
|
||||
|
||||
secBuf, err := sec.MarshalBinary()
|
||||
if err != nil {
|
||||
return nil, E.Cause(err, "serialize ECH private key")
|
||||
}
|
||||
sk := []byte{}
|
||||
sk = be.AppendUint16(sk, uint16(len(secBuf)))
|
||||
sk = append(sk, secBuf...)
|
||||
|
||||
@@ -28,7 +28,7 @@ func (c *echClientConfig) DialEarly(ctx context.Context, conn net.PacketConn, ad
|
||||
}
|
||||
|
||||
func (c *echClientConfig) CreateTransport(conn net.PacketConn, quicConnPtr *quic.EarlyConnection, serverAddr M.Socksaddr, quicConfig *quic.Config) http.RoundTripper {
|
||||
return &http3.RoundTripper{
|
||||
return &http3.Transport{
|
||||
TLSClientConfig: c.config,
|
||||
QUICConfig: quicConfig,
|
||||
Dial: func(ctx context.Context, addr string, tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlyConnection, error) {
|
||||
|
||||
@@ -174,6 +174,7 @@ type realityConnWrapper struct {
|
||||
|
||||
func (c *realityConnWrapper) ConnectionState() ConnectionState {
|
||||
state := c.Conn.ConnectionState()
|
||||
//nolint:staticcheck
|
||||
return tls.ConnectionState{
|
||||
Version: state.Version,
|
||||
HandshakeComplete: state.HandshakeComplete,
|
||||
|
||||
@@ -69,6 +69,7 @@ type utlsConnWrapper struct {
|
||||
|
||||
func (c *utlsConnWrapper) ConnectionState() tls.ConnectionState {
|
||||
state := c.Conn.ConnectionState()
|
||||
//nolint:staticcheck
|
||||
return tls.ConnectionState{
|
||||
Version: state.Version,
|
||||
HandshakeComplete: state.HandshakeComplete,
|
||||
|
||||
@@ -2,10 +2,17 @@
|
||||
icon: material/alert-decagram
|
||||
---
|
||||
|
||||
#### 1.11.0-beta.19
|
||||
#### 1.11.0-beta.20
|
||||
|
||||
* Hysteria2 `ignore_client_bandwidth` behavior update **1**
|
||||
* Fixes and improvements
|
||||
|
||||
**1**:
|
||||
|
||||
When `up_mbps` and `down_mbps` are set, `ignore_client_bandwidth` instead denies clients from using BBR CC.
|
||||
|
||||
See [Hysteria2](/configuration/inbound/hysteria2/#ignore_client_bandwidth).
|
||||
|
||||
#### 1.11.0-beta.17
|
||||
|
||||
* Add port hopping support for Hysteria2 **1**
|
||||
|
||||
@@ -5,6 +5,7 @@ icon: material/alert-decagram
|
||||
!!! quote "Changes in sing-box 1.11.0"
|
||||
|
||||
:material-alert: [masquerade](#masquerade)
|
||||
:material-alert: [ignore_client_bandwidth](#ignore_client_bandwidth)
|
||||
|
||||
### Structure
|
||||
|
||||
@@ -75,9 +76,13 @@ Authentication password
|
||||
|
||||
#### ignore_client_bandwidth
|
||||
|
||||
Commands the client to use the BBR flow control algorithm instead of Hysteria CC.
|
||||
*When `up_mbps` and `down_mbps` are not set*:
|
||||
|
||||
Conflict with `up_mbps` and `down_mbps`.
|
||||
Commands clients to use the BBR CC instead of Hysteria CC.
|
||||
|
||||
*When `up_mbps` and `down_mbps` are set*:
|
||||
|
||||
Deny clients to use the BBR CC.
|
||||
|
||||
#### tls
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ icon: material/alert-decagram
|
||||
!!! quote "sing-box 1.11.0 中的更改"
|
||||
|
||||
:material-alert: [masquerade](#masquerade)
|
||||
:material-alert: [ignore_client_bandwidth](#ignore_client_bandwidth)
|
||||
|
||||
### 结构
|
||||
|
||||
@@ -72,9 +73,13 @@ Hysteria 用户
|
||||
|
||||
#### ignore_client_bandwidth
|
||||
|
||||
*当 `up_mbps` 和 `down_mbps` 未设定时*:
|
||||
|
||||
命令客户端使用 BBR 拥塞控制算法而不是 Hysteria CC。
|
||||
|
||||
与 `up_mbps` 和 `down_mbps` 冲突。
|
||||
*当 `up_mbps` 和 `down_mbps` 已设定时*:
|
||||
|
||||
禁止客户端使用 BBR 拥塞控制算法。
|
||||
|
||||
#### tls
|
||||
|
||||
|
||||
+3
-3
@@ -29,12 +29,12 @@ require (
|
||||
github.com/sagernet/sing v0.6.0-beta.9
|
||||
github.com/sagernet/sing-dns v0.4.0-beta.1
|
||||
github.com/sagernet/sing-mux v0.3.0-alpha.1
|
||||
github.com/sagernet/sing-quic v0.4.0-beta.2
|
||||
github.com/sagernet/sing-quic v0.4.0-beta.3
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.2
|
||||
github.com/sagernet/sing-tun v0.6.0-beta.7.0.20241229131914-aa9d9c62966f
|
||||
github.com/sagernet/sing-vmess v0.2.0-beta.1
|
||||
github.com/sagernet/sing-tun v0.6.0-beta.7
|
||||
github.com/sagernet/sing-vmess v0.2.0-beta.2
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7
|
||||
github.com/sagernet/utls v1.6.7
|
||||
github.com/sagernet/wireguard-go v0.0.1-beta.5
|
||||
|
||||
+6
-6
@@ -125,18 +125,18 @@ github.com/sagernet/sing-dns v0.4.0-beta.1 h1:W1XkdhigwxDOMgMDVB+9kdomCpb7ExsZfB
|
||||
github.com/sagernet/sing-dns v0.4.0-beta.1/go.mod h1:8wuFcoFkWM4vJuQyg8e97LyvDwe0/Vl7G839WLcKDs8=
|
||||
github.com/sagernet/sing-mux v0.3.0-alpha.1 h1:IgNX5bJBpL41gGbp05pdDOvh/b5eUQ6cv9240+Ngipg=
|
||||
github.com/sagernet/sing-mux v0.3.0-alpha.1/go.mod h1:FTcImmdfW38Lz7b+HQ+mxxOth1lz4ao8uEnz+MwIJQE=
|
||||
github.com/sagernet/sing-quic v0.4.0-beta.2 h1:ikoQ7zTR0o/2rlI5H5FeNC0j5bQJJHb1uoyXFRu3yGk=
|
||||
github.com/sagernet/sing-quic v0.4.0-beta.2/go.mod h1:1UNObFodd8CnS3aCT53x9cigjPSCl3P//8dfBMCwBDM=
|
||||
github.com/sagernet/sing-quic v0.4.0-beta.3 h1:cOBjlhVdRZmBm6hIw1GleERpnTSFdBB2htgx5kQ5uqg=
|
||||
github.com/sagernet/sing-quic v0.4.0-beta.3/go.mod h1:1UNObFodd8CnS3aCT53x9cigjPSCl3P//8dfBMCwBDM=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7/go.mod h1:0rIKJZBR65Qi0zwdKezt4s57y/Tl1ofkaq6NlkzVuyE=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0 h1:wpZNs6wKnR7mh1wV9OHwOyUr21VkS3wKFHi+8XwgADg=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0/go.mod h1:RnXS0lExcDAovvDeniJ4IKa2IuChrdipolPYWBv9hWQ=
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.2 h1:RPrpgAdkP5td0vLfS5ldvYosFjSsZtRPxiyLV6jyKg0=
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.2/go.mod h1:0j5XlzKxaWRIEjc1uiSKmVoWb0k+L9QgZVb876+thZA=
|
||||
github.com/sagernet/sing-tun v0.6.0-beta.7.0.20241229131914-aa9d9c62966f h1:dTnXP0e3LbSa4EpUmuOGhllanKPei4vPKfzlLvk76Pc=
|
||||
github.com/sagernet/sing-tun v0.6.0-beta.7.0.20241229131914-aa9d9c62966f/go.mod h1:fisFCbC4Vfb6HqQNcwPJi2CDK2bf0Xapyz3j3t4cnHE=
|
||||
github.com/sagernet/sing-vmess v0.2.0-beta.1 h1:5sXQ23uwNlZuDvygzi0dFtnG0Csm/SNqTjAHXJkpuj4=
|
||||
github.com/sagernet/sing-vmess v0.2.0-beta.1/go.mod h1:fLyE1emIcvQ5DV8reFWnufquZ7MkCSYM5ThodsR9NrQ=
|
||||
github.com/sagernet/sing-tun v0.6.0-beta.7 h1:FCSX8oGBqb0H57AAvfGeeH/jMGYWCOg6XWkN/oeES+0=
|
||||
github.com/sagernet/sing-tun v0.6.0-beta.7/go.mod h1:fisFCbC4Vfb6HqQNcwPJi2CDK2bf0Xapyz3j3t4cnHE=
|
||||
github.com/sagernet/sing-vmess v0.2.0-beta.2 h1:obAkAL35X7ql4RnGzDg4dBYIRpGXRKqcN4LyLZpZGSs=
|
||||
github.com/sagernet/sing-vmess v0.2.0-beta.2/go.mod h1:HGhf9XUdeE2iOWrX0hQNFgXPbKyGlzpeYFyX0c/pykk=
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7 h1:DImB4lELfQhplLTxeq2z31Fpv8CQqqrUwTbrIRumZqQ=
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7/go.mod h1:FP9X2xjT/Az1EsG/orYYoC+5MojWnuI7hrffz8fGwwo=
|
||||
github.com/sagernet/utls v1.6.7 h1:Ep3+aJ8FUGGta+II2IEVNUc3EDhaRCZINWkj/LloIA8=
|
||||
|
||||
@@ -67,7 +67,7 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo
|
||||
if len(options.Down) > 0 {
|
||||
receiveBps, err = humanize.ParseBytes(options.Down)
|
||||
if err != nil {
|
||||
return nil, E.New("invalid down speed format: ", options.Down)
|
||||
return nil, E.Cause(err, "invalid down speed format: ", options.Down)
|
||||
}
|
||||
} else {
|
||||
receiveBps = uint64(options.DownMbps) * hysteria.MbpsToBps
|
||||
|
||||
@@ -15,7 +15,7 @@ require (
|
||||
github.com/sagernet/quic-go v0.48.2-beta.1
|
||||
github.com/sagernet/sing v0.6.0-beta.9
|
||||
github.com/sagernet/sing-dns v0.4.0-beta.1
|
||||
github.com/sagernet/sing-quic v0.4.0-beta.1
|
||||
github.com/sagernet/sing-quic v0.4.0-beta.3
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0
|
||||
github.com/spyzhov/ajson v0.9.4
|
||||
@@ -86,7 +86,7 @@ require (
|
||||
github.com/sagernet/sing-mux v0.3.0-alpha.1 // indirect
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.2 // indirect
|
||||
github.com/sagernet/sing-tun v0.6.0-beta.7 // indirect
|
||||
github.com/sagernet/sing-vmess v0.2.0-beta.1 // indirect
|
||||
github.com/sagernet/sing-vmess v0.2.0-beta.2 // indirect
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7 // indirect
|
||||
github.com/sagernet/utls v1.6.7 // indirect
|
||||
github.com/sagernet/wireguard-go v0.0.1-beta.5 // indirect
|
||||
|
||||
@@ -152,8 +152,8 @@ github.com/sagernet/sing-dns v0.4.0-beta.1 h1:W1XkdhigwxDOMgMDVB+9kdomCpb7ExsZfB
|
||||
github.com/sagernet/sing-dns v0.4.0-beta.1/go.mod h1:8wuFcoFkWM4vJuQyg8e97LyvDwe0/Vl7G839WLcKDs8=
|
||||
github.com/sagernet/sing-mux v0.3.0-alpha.1 h1:IgNX5bJBpL41gGbp05pdDOvh/b5eUQ6cv9240+Ngipg=
|
||||
github.com/sagernet/sing-mux v0.3.0-alpha.1/go.mod h1:FTcImmdfW38Lz7b+HQ+mxxOth1lz4ao8uEnz+MwIJQE=
|
||||
github.com/sagernet/sing-quic v0.4.0-beta.1 h1:n4/ZJWufF7TGV5VrCZ3K3HUIHYvYSzc1BGXQUFEQ/hk=
|
||||
github.com/sagernet/sing-quic v0.4.0-beta.1/go.mod h1:1UNObFodd8CnS3aCT53x9cigjPSCl3P//8dfBMCwBDM=
|
||||
github.com/sagernet/sing-quic v0.4.0-beta.3 h1:cOBjlhVdRZmBm6hIw1GleERpnTSFdBB2htgx5kQ5uqg=
|
||||
github.com/sagernet/sing-quic v0.4.0-beta.3/go.mod h1:1UNObFodd8CnS3aCT53x9cigjPSCl3P//8dfBMCwBDM=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7/go.mod h1:0rIKJZBR65Qi0zwdKezt4s57y/Tl1ofkaq6NlkzVuyE=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0 h1:wpZNs6wKnR7mh1wV9OHwOyUr21VkS3wKFHi+8XwgADg=
|
||||
@@ -162,8 +162,8 @@ github.com/sagernet/sing-shadowtls v0.2.0-alpha.2 h1:RPrpgAdkP5td0vLfS5ldvYosFjS
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.2/go.mod h1:0j5XlzKxaWRIEjc1uiSKmVoWb0k+L9QgZVb876+thZA=
|
||||
github.com/sagernet/sing-tun v0.6.0-beta.7 h1:FCSX8oGBqb0H57AAvfGeeH/jMGYWCOg6XWkN/oeES+0=
|
||||
github.com/sagernet/sing-tun v0.6.0-beta.7/go.mod h1:fisFCbC4Vfb6HqQNcwPJi2CDK2bf0Xapyz3j3t4cnHE=
|
||||
github.com/sagernet/sing-vmess v0.2.0-beta.1 h1:5sXQ23uwNlZuDvygzi0dFtnG0Csm/SNqTjAHXJkpuj4=
|
||||
github.com/sagernet/sing-vmess v0.2.0-beta.1/go.mod h1:fLyE1emIcvQ5DV8reFWnufquZ7MkCSYM5ThodsR9NrQ=
|
||||
github.com/sagernet/sing-vmess v0.2.0-beta.2 h1:obAkAL35X7ql4RnGzDg4dBYIRpGXRKqcN4LyLZpZGSs=
|
||||
github.com/sagernet/sing-vmess v0.2.0-beta.2/go.mod h1:HGhf9XUdeE2iOWrX0hQNFgXPbKyGlzpeYFyX0c/pykk=
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7 h1:DImB4lELfQhplLTxeq2z31Fpv8CQqqrUwTbrIRumZqQ=
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7/go.mod h1:FP9X2xjT/Az1EsG/orYYoC+5MojWnuI7hrffz8fGwwo=
|
||||
github.com/sagernet/utls v1.6.7 h1:Ep3+aJ8FUGGta+II2IEVNUc3EDhaRCZINWkj/LloIA8=
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_VERSION:=1.15.0
|
||||
PKG_VERSION:=1.16.0
|
||||
|
||||
LUCI_TITLE:=LuCI Support for mihomo
|
||||
LUCI_DEPENDS:=+luci-base +mihomo
|
||||
|
||||
@@ -34,12 +34,12 @@ return view.extend({
|
||||
o.value('info');
|
||||
o.value('debug');
|
||||
|
||||
o = s.taboption('general', form.ListValue, 'mode', _('Mode'));
|
||||
o = s.taboption('general', form.ListValue, 'mode', '*' + ' ' + _('Mode'));
|
||||
o.value('global', _('Global Mode'));
|
||||
o.value('rule', _('Rule Mode'));
|
||||
o.value('direct', _('Direct Mode'));
|
||||
|
||||
o = s.taboption('general', form.ListValue, 'match_process', _('Match Process'));
|
||||
o = s.taboption('general', form.ListValue, 'match_process', '*' + ' ' + _('Match Process'));
|
||||
o.value('strict', _('Auto'));
|
||||
o.value('always', _('Enable'));
|
||||
o.value('off', _('Disable'));
|
||||
@@ -50,6 +50,12 @@ return view.extend({
|
||||
o = s.taboption('general', form.Flag, 'ipv6', '*' + ' ' + _('IPv6'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('general', form.Flag, 'unify_delay', _('Unify Delay'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('general', form.Flag, 'tcp_concurrent', _('TCP Concurrent'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('general', form.Value, 'tcp_keep_alive_idle', _('TCP Keep Alive Idle'));
|
||||
o.datatype = 'uinteger';
|
||||
o.placeholder = '600';
|
||||
@@ -207,7 +213,7 @@ return view.extend({
|
||||
o = s.taboption('dns', form.Flag, 'hosts', _('Overwrite Hosts'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('dns', form.SectionValue, '_hosts', form.TableSection, 'host', _('Edit Hosts'));
|
||||
o = s.taboption('dns', form.SectionValue, '_hosts', form.TableSection, 'hosts', _('Edit Hosts'));
|
||||
o.retain = true;
|
||||
o.depends('hosts', '1');
|
||||
|
||||
@@ -226,7 +232,7 @@ return view.extend({
|
||||
o = s.taboption('dns', form.Flag, 'dns_nameserver', _('Overwrite Nameserver'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('dns', form.SectionValue, '_dns_nameserver', form.TableSection, 'nameserver', _('Edit Nameservers'));
|
||||
o = s.taboption('dns', form.SectionValue, '_dns_nameservers', form.TableSection, 'nameserver', _('Edit Nameservers'));
|
||||
o.retain = true;
|
||||
o.depends('dns_nameserver', '1');
|
||||
|
||||
@@ -265,6 +271,55 @@ return view.extend({
|
||||
|
||||
so = o.subsection.option(form.DynamicList, 'nameserver', _('Nameserver'));
|
||||
|
||||
s.tab('sniffer', _('Sniffer Config'));
|
||||
|
||||
o = s.taboption('sniffer', form.Flag, 'sniffer', _('Enable'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('sniffer', form.Flag, 'sniffer_sniff_dns_mapping', _('Sniff Redir-Host'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('sniffer', form.Flag, 'sniffer_sniff_pure_ip', _('Sniff Pure IP'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('sniffer', form.Flag, 'sniffer_overwrite_destination', _('Overwrite Destination'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('sniffer', form.Flag, 'sniffer_force_domain_name', _('Overwrite Force Sniff Domain Name'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('sniffer', form.DynamicList, 'sniffer_force_domain_names', _('Force Sniff Domain Name'));
|
||||
o.depends('sniffer_force_domain_name', '1');
|
||||
|
||||
o = s.taboption('sniffer', form.Flag, 'sniffer_ignore_domain_name', _('Overwrite Ignore Sniff Domain Name'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('sniffer', form.DynamicList, 'sniffer_ignore_domain_names', _('Ignore Sniff Domain Name'));
|
||||
o.depends('sniffer_ignore_domain_name', '1');
|
||||
|
||||
o = s.taboption('sniffer', form.Flag, 'sniffer_sniff', _('Overwrite Sniff By Protocol'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('sniffer', form.SectionValue, '_sniffer_sniffs', form.TableSection, 'sniff', _('Sniff By Protocol'));
|
||||
o.subsection.anonymous = true;
|
||||
o.subsection.addremove = false;
|
||||
o.depends('sniffer_sniff', '1');
|
||||
|
||||
so = o.subsection.option(form.Flag, 'enabled', _('Enable'));
|
||||
so.rmempty = false;
|
||||
|
||||
so = o.subsection.option(form.ListValue, 'protocol', _('Protocol'));
|
||||
so.value('HTTP');
|
||||
so.value('TLS');
|
||||
so.value('QUIC');
|
||||
so.readonly = true;
|
||||
|
||||
so = o.subsection.option(form.DynamicList, 'port', _('Port'));
|
||||
so.datatype = 'portrange';
|
||||
|
||||
so = o.subsection.option(form.Flag, 'overwrite_destination', _('Overwrite Destination'));
|
||||
so.rmempty = false;
|
||||
|
||||
s.tab('geox', _('GeoX Config'));
|
||||
|
||||
o = s.taboption('geox', form.ListValue, 'geoip_format', _('GeoIP Format'));
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:72
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:78
|
||||
msgid "API Port"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:76
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:82
|
||||
msgid "API Secret"
|
||||
msgstr ""
|
||||
|
||||
@@ -22,11 +22,11 @@ msgstr ""
|
||||
msgid "All Port"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:85
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:91
|
||||
msgid "Allow Lan"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:184
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:190
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/proxy.js:65
|
||||
msgid "Allow Mode"
|
||||
msgstr ""
|
||||
@@ -48,7 +48,7 @@ msgstr ""
|
||||
msgid "Auto"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:183
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:189
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/proxy.js:66
|
||||
msgid "Block Mode"
|
||||
msgstr ""
|
||||
@@ -107,15 +107,15 @@ msgstr ""
|
||||
msgid "Cron Expression"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:155
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:161
|
||||
msgid "DNS Config"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:161
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:167
|
||||
msgid "DNS Mode"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:157
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:163
|
||||
msgid "DNS Port"
|
||||
msgstr ""
|
||||
|
||||
@@ -127,7 +127,7 @@ msgstr ""
|
||||
msgid "Destination UDP Port to Proxy"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:131
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:137
|
||||
msgid "Device"
|
||||
msgstr ""
|
||||
|
||||
@@ -155,31 +155,31 @@ msgstr ""
|
||||
msgid "Disable Safe Path Check"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:195
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:201
|
||||
msgid "DoH Prefer HTTP/3"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:221
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:227
|
||||
msgid "Domain Name"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:111
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:117
|
||||
msgid "Edit Authentications"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:177
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:183
|
||||
msgid "Edit Fake-IP Filters"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:210
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:216
|
||||
msgid "Edit Hosts"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:252
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:258
|
||||
msgid "Edit Nameserver Policies"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:229
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:235
|
||||
msgid "Edit Nameservers"
|
||||
msgstr ""
|
||||
|
||||
@@ -195,16 +195,18 @@ msgstr ""
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/app.js:96
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:23
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:44
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:119
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:218
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:237
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:260
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:301
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:125
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:224
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:243
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:266
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:276
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:308
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:356
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/proxy.js:31
|
||||
msgid "Enable"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:152
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:158
|
||||
msgid "Endpoint Independent NAT"
|
||||
msgstr ""
|
||||
|
||||
@@ -212,19 +214,19 @@ msgstr ""
|
||||
msgid "Expire At"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:61
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:67
|
||||
msgid "External Control Config"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:187
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:193
|
||||
msgid "Fake-IP Cache"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:181
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:187
|
||||
msgid "Fake-IP Filter Mode"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:166
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:172
|
||||
msgid "Fake-IP Range"
|
||||
msgstr ""
|
||||
|
||||
@@ -249,11 +251,15 @@ msgstr ""
|
||||
msgid "File:"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:143
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:291
|
||||
msgid "Force Sniff Domain Name"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:149
|
||||
msgid "GSO"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:146
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:152
|
||||
msgid "GSO Max Size"
|
||||
msgstr ""
|
||||
|
||||
@@ -261,39 +267,39 @@ msgstr ""
|
||||
msgid "General Config"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:274
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:329
|
||||
msgid "GeoData Loader"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:270
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:325
|
||||
msgid "GeoIP Format"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:287
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:342
|
||||
msgid "GeoIP(ASN) Url"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:284
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:339
|
||||
msgid "GeoIP(DAT) Url"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:281
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:336
|
||||
msgid "GeoIP(MMDB) Url"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:278
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:333
|
||||
msgid "GeoSite Url"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:290
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:345
|
||||
msgid "GeoX Auto Update"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:268
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:323
|
||||
msgid "GeoX Config"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:293
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:348
|
||||
msgid "GeoX Update Interval"
|
||||
msgstr ""
|
||||
|
||||
@@ -305,7 +311,7 @@ msgstr ""
|
||||
msgid "Grant access to mihomo procedures"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:88
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:94
|
||||
msgid "HTTP Port"
|
||||
msgstr ""
|
||||
|
||||
@@ -313,7 +319,7 @@ msgstr ""
|
||||
msgid "How To Use"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:224
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:230
|
||||
msgid "IP"
|
||||
msgstr ""
|
||||
|
||||
@@ -326,7 +332,7 @@ msgid "IPv4 Proxy"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:50
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:198
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:204
|
||||
msgid "IPv6"
|
||||
msgstr ""
|
||||
|
||||
@@ -338,7 +344,11 @@ msgstr ""
|
||||
msgid "IPv6 Proxy"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:83
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:297
|
||||
msgid "Ignore Sniff Domain Name"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:89
|
||||
msgid "Inbound Config"
|
||||
msgstr ""
|
||||
|
||||
@@ -363,7 +373,7 @@ msgstr ""
|
||||
msgid "Log Level"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:139
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:145
|
||||
msgid "MTU"
|
||||
msgstr ""
|
||||
|
||||
@@ -371,11 +381,11 @@ msgstr ""
|
||||
msgid "Match Process"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:263
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:269
|
||||
msgid "Matcher"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:276
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:331
|
||||
msgid "Memory Conservative Loader"
|
||||
msgstr ""
|
||||
|
||||
@@ -384,7 +394,7 @@ msgstr ""
|
||||
msgid "MihomoTProxy"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:96
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:102
|
||||
msgid "Mixed Port"
|
||||
msgstr ""
|
||||
|
||||
@@ -393,7 +403,7 @@ msgstr ""
|
||||
msgid "Mixin Config"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:299
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:354
|
||||
msgid "Mixin File Content"
|
||||
msgstr ""
|
||||
|
||||
@@ -406,8 +416,8 @@ msgstr ""
|
||||
msgid "Mode"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:247
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:266
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:253
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:272
|
||||
msgid "Nameserver"
|
||||
msgstr ""
|
||||
|
||||
@@ -423,34 +433,55 @@ msgstr ""
|
||||
msgid "Outbound Interface"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:108
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:114
|
||||
msgid "Overwrite Authentication"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:172
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:285
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:320
|
||||
msgid "Overwrite Destination"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:178
|
||||
msgid "Overwrite Fake-IP Filter"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:207
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:288
|
||||
msgid "Overwrite Force Sniff Domain Name"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:213
|
||||
msgid "Overwrite Hosts"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:226
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:294
|
||||
msgid "Overwrite Ignore Sniff Domain Name"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:232
|
||||
msgid "Overwrite Nameserver"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:249
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:255
|
||||
msgid "Overwrite Nameserver Policy"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:125
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:300
|
||||
msgid "Overwrite Sniff By Protocol"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:131
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:301
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:356
|
||||
msgid "Please go to the editor tab to edit the file for mixin"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:317
|
||||
msgid "Port"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/profile.js:78
|
||||
msgid "Prefer"
|
||||
msgstr ""
|
||||
@@ -464,6 +495,10 @@ msgstr ""
|
||||
msgid "Profile for Startup"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:311
|
||||
msgid "Protocol"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/proxy.js:27
|
||||
#: applications/luci-app-mihomo/root/usr/share/luci/menu.d/luci-app-mihomo.json:37
|
||||
msgid "Proxy Config"
|
||||
@@ -473,7 +508,7 @@ msgstr ""
|
||||
msgid "Redirect Mode"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:100
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:106
|
||||
msgid "Redirect Port"
|
||||
msgstr ""
|
||||
|
||||
@@ -485,7 +520,7 @@ msgstr ""
|
||||
msgid "Remote"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:192
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:198
|
||||
msgid "Respect Rules"
|
||||
msgstr ""
|
||||
|
||||
@@ -505,11 +540,11 @@ msgstr ""
|
||||
msgid "Running"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:92
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:98
|
||||
msgid "SOCKS Port"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:80
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:86
|
||||
msgid "Save Proxy Selection"
|
||||
msgstr ""
|
||||
|
||||
@@ -527,11 +562,27 @@ msgstr ""
|
||||
msgid "Service is not running."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:134
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:303
|
||||
msgid "Sniff By Protocol"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:282
|
||||
msgid "Sniff Pure IP"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:279
|
||||
msgid "Sniff Redir-Host"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:274
|
||||
msgid "Sniffer Config"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:140
|
||||
msgid "Stack"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:275
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:330
|
||||
msgid "Standard Loader"
|
||||
msgstr ""
|
||||
|
||||
@@ -560,11 +611,15 @@ msgstr ""
|
||||
msgid "Subscription:"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:53
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:56
|
||||
msgid "TCP Concurrent"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:59
|
||||
msgid "TCP Keep Alive Idle"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:57
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:63
|
||||
msgid "TCP Keep Alive Interval"
|
||||
msgstr ""
|
||||
|
||||
@@ -577,11 +632,11 @@ msgstr ""
|
||||
msgid "TPROXY Mode"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:104
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:110
|
||||
msgid "TPROXY Port"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:129
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:135
|
||||
msgid "TUN Config"
|
||||
msgstr ""
|
||||
|
||||
@@ -606,7 +661,7 @@ msgstr ""
|
||||
msgid "Transparent Proxy with Mihomo on OpenWrt."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:240
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:246
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
@@ -614,14 +669,18 @@ msgstr ""
|
||||
msgid "UDP Proxy Mode"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:63
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:69
|
||||
msgid "UI Name"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:65
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:71
|
||||
msgid "UI Url"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:53
|
||||
msgid "Unify Delay"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/tools/mihomo.js:80
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/tools/mihomo.js:84
|
||||
msgid "Unknown"
|
||||
@@ -643,11 +702,11 @@ msgstr ""
|
||||
msgid "Upload Profile"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:204
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:210
|
||||
msgid "Use Hosts"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:201
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:207
|
||||
msgid "Use System Hosts"
|
||||
msgstr ""
|
||||
|
||||
@@ -659,6 +718,6 @@ msgstr ""
|
||||
msgid "User Agent"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:122
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:128
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
@@ -8,11 +8,11 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:72
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:78
|
||||
msgid "API Port"
|
||||
msgstr "API 端口"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:76
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:82
|
||||
msgid "API Secret"
|
||||
msgstr "API 密钥"
|
||||
|
||||
@@ -29,11 +29,11 @@ msgstr "全部模式"
|
||||
msgid "All Port"
|
||||
msgstr "全部端口"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:85
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:91
|
||||
msgid "Allow Lan"
|
||||
msgstr "允许局域网访问"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:184
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:190
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/proxy.js:65
|
||||
msgid "Allow Mode"
|
||||
msgstr "白名单模式"
|
||||
@@ -55,7 +55,7 @@ msgstr "插件版本"
|
||||
msgid "Auto"
|
||||
msgstr "自动"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:183
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:189
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/proxy.js:66
|
||||
msgid "Block Mode"
|
||||
msgstr "黑名单模式"
|
||||
@@ -114,15 +114,15 @@ msgstr "核心版本"
|
||||
msgid "Cron Expression"
|
||||
msgstr "Cron 表达式"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:155
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:161
|
||||
msgid "DNS Config"
|
||||
msgstr "DNS 配置"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:161
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:167
|
||||
msgid "DNS Mode"
|
||||
msgstr "DNS 模式"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:157
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:163
|
||||
msgid "DNS Port"
|
||||
msgstr "DNS 端口"
|
||||
|
||||
@@ -134,7 +134,7 @@ msgstr "要代理的 TCP 目标端口"
|
||||
msgid "Destination UDP Port to Proxy"
|
||||
msgstr "要代理的 UDP 目标端口"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:131
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:137
|
||||
msgid "Device"
|
||||
msgstr "设备名称"
|
||||
|
||||
@@ -162,31 +162,31 @@ msgstr "禁用回环检测"
|
||||
msgid "Disable Safe Path Check"
|
||||
msgstr "禁用安全路径检查"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:195
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:201
|
||||
msgid "DoH Prefer HTTP/3"
|
||||
msgstr "DoH 优先 HTTP/3"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:221
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:227
|
||||
msgid "Domain Name"
|
||||
msgstr "域名"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:111
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:117
|
||||
msgid "Edit Authentications"
|
||||
msgstr "编辑身份验证"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:177
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:183
|
||||
msgid "Edit Fake-IP Filters"
|
||||
msgstr "编辑 Fake-IP 过滤列表"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:210
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:216
|
||||
msgid "Edit Hosts"
|
||||
msgstr "编辑 Hosts"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:252
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:258
|
||||
msgid "Edit Nameserver Policies"
|
||||
msgstr "编辑 DNS 服务器查询策略"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:229
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:235
|
||||
msgid "Edit Nameservers"
|
||||
msgstr "编辑 DNS 服务器"
|
||||
|
||||
@@ -202,16 +202,18 @@ msgstr "编辑器"
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/app.js:96
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:23
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:44
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:119
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:218
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:237
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:260
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:301
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:125
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:224
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:243
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:266
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:276
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:308
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:356
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/proxy.js:31
|
||||
msgid "Enable"
|
||||
msgstr "启用"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:152
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:158
|
||||
msgid "Endpoint Independent NAT"
|
||||
msgstr "独立于端点的 NAT"
|
||||
|
||||
@@ -219,19 +221,19 @@ msgstr "独立于端点的 NAT"
|
||||
msgid "Expire At"
|
||||
msgstr "到期时间"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:61
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:67
|
||||
msgid "External Control Config"
|
||||
msgstr "外部控制配置"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:187
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:193
|
||||
msgid "Fake-IP Cache"
|
||||
msgstr "Fake-IP 缓存"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:181
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:187
|
||||
msgid "Fake-IP Filter Mode"
|
||||
msgstr "Fake-IP 过滤模式"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:166
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:172
|
||||
msgid "Fake-IP Range"
|
||||
msgstr "Fake-IP 范围"
|
||||
|
||||
@@ -256,11 +258,15 @@ msgstr "IPv6 保留地址"
|
||||
msgid "File:"
|
||||
msgstr "文件:"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:143
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:291
|
||||
msgid "Force Sniff Domain Name"
|
||||
msgstr "强制嗅探的域名"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:149
|
||||
msgid "GSO"
|
||||
msgstr "通用分段卸载"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:146
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:152
|
||||
msgid "GSO Max Size"
|
||||
msgstr "分段最大长度"
|
||||
|
||||
@@ -268,39 +274,39 @@ msgstr "分段最大长度"
|
||||
msgid "General Config"
|
||||
msgstr "全局配置"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:274
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:329
|
||||
msgid "GeoData Loader"
|
||||
msgstr "GeoData 加载器"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:270
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:325
|
||||
msgid "GeoIP Format"
|
||||
msgstr "GeoIP 格式"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:287
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:342
|
||||
msgid "GeoIP(ASN) Url"
|
||||
msgstr "GeoIP(ASN) 下载地址"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:284
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:339
|
||||
msgid "GeoIP(DAT) Url"
|
||||
msgstr "GeoIP(DAT) 下载地址"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:281
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:336
|
||||
msgid "GeoIP(MMDB) Url"
|
||||
msgstr "GeoIP(MMDB) 下载地址"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:278
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:333
|
||||
msgid "GeoSite Url"
|
||||
msgstr "GeoSite 下载地址"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:290
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:345
|
||||
msgid "GeoX Auto Update"
|
||||
msgstr "定时更新GeoX文件"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:268
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:323
|
||||
msgid "GeoX Config"
|
||||
msgstr "GeoX 配置"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:293
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:348
|
||||
msgid "GeoX Update Interval"
|
||||
msgstr "GeoX 文件更新间隔"
|
||||
|
||||
@@ -312,7 +318,7 @@ msgstr "全局模式"
|
||||
msgid "Grant access to mihomo procedures"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:88
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:94
|
||||
msgid "HTTP Port"
|
||||
msgstr "HTTP 端口"
|
||||
|
||||
@@ -320,7 +326,7 @@ msgstr "HTTP 端口"
|
||||
msgid "How To Use"
|
||||
msgstr "使用说明"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:224
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:230
|
||||
msgid "IP"
|
||||
msgstr ""
|
||||
|
||||
@@ -333,7 +339,7 @@ msgid "IPv4 Proxy"
|
||||
msgstr "IPv4 代理"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:50
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:198
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:204
|
||||
msgid "IPv6"
|
||||
msgstr ""
|
||||
|
||||
@@ -345,7 +351,11 @@ msgstr "IPv6 DNS 劫持"
|
||||
msgid "IPv6 Proxy"
|
||||
msgstr "IPv6 代理"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:83
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:297
|
||||
msgid "Ignore Sniff Domain Name"
|
||||
msgstr "忽略嗅探的域名"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:89
|
||||
msgid "Inbound Config"
|
||||
msgstr "入站配置"
|
||||
|
||||
@@ -370,7 +380,7 @@ msgstr "日志"
|
||||
msgid "Log Level"
|
||||
msgstr "日志级别"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:139
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:145
|
||||
msgid "MTU"
|
||||
msgstr "最大传输单元"
|
||||
|
||||
@@ -378,11 +388,11 @@ msgstr "最大传输单元"
|
||||
msgid "Match Process"
|
||||
msgstr "匹配进程"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:263
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:269
|
||||
msgid "Matcher"
|
||||
msgstr "匹配"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:276
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:331
|
||||
msgid "Memory Conservative Loader"
|
||||
msgstr "为内存受限设备优化的加载器"
|
||||
|
||||
@@ -391,7 +401,7 @@ msgstr "为内存受限设备优化的加载器"
|
||||
msgid "MihomoTProxy"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:96
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:102
|
||||
msgid "Mixed Port"
|
||||
msgstr "混合端口"
|
||||
|
||||
@@ -400,7 +410,7 @@ msgstr "混合端口"
|
||||
msgid "Mixin Config"
|
||||
msgstr "混入配置"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:299
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:354
|
||||
msgid "Mixin File Content"
|
||||
msgstr "混入文件内容"
|
||||
|
||||
@@ -413,8 +423,8 @@ msgstr "混入选项"
|
||||
msgid "Mode"
|
||||
msgstr "模式"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:247
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:266
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:253
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:272
|
||||
msgid "Nameserver"
|
||||
msgstr "DNS 服务器"
|
||||
|
||||
@@ -430,34 +440,55 @@ msgstr "打开面板"
|
||||
msgid "Outbound Interface"
|
||||
msgstr "出站接口"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:108
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:114
|
||||
msgid "Overwrite Authentication"
|
||||
msgstr "覆盖身份验证"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:172
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:285
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:320
|
||||
msgid "Overwrite Destination"
|
||||
msgstr "将嗅探结果作为连接目标"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:178
|
||||
msgid "Overwrite Fake-IP Filter"
|
||||
msgstr "覆盖 Fake-IP 过滤列表"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:207
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:288
|
||||
msgid "Overwrite Force Sniff Domain Name"
|
||||
msgstr "覆盖强制嗅探的域名"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:213
|
||||
msgid "Overwrite Hosts"
|
||||
msgstr "覆盖 Hosts"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:226
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:294
|
||||
msgid "Overwrite Ignore Sniff Domain Name"
|
||||
msgstr "覆盖忽略嗅探的域名"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:232
|
||||
msgid "Overwrite Nameserver"
|
||||
msgstr "覆盖 DNS 服务器"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:249
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:255
|
||||
msgid "Overwrite Nameserver Policy"
|
||||
msgstr "覆盖 DNS 服务器查询策略"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:125
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:300
|
||||
msgid "Overwrite Sniff By Protocol"
|
||||
msgstr "覆盖按协议嗅探"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:131
|
||||
msgid "Password"
|
||||
msgstr "密码"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:301
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:356
|
||||
msgid "Please go to the editor tab to edit the file for mixin"
|
||||
msgstr "请前往编辑器标签编辑用于混入的文件"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:317
|
||||
msgid "Port"
|
||||
msgstr "端口"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/profile.js:78
|
||||
msgid "Prefer"
|
||||
msgstr "优先"
|
||||
@@ -471,6 +502,10 @@ msgstr "配置文件"
|
||||
msgid "Profile for Startup"
|
||||
msgstr "用于启动的配置文件"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:311
|
||||
msgid "Protocol"
|
||||
msgstr "协议"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/proxy.js:27
|
||||
#: applications/luci-app-mihomo/root/usr/share/luci/menu.d/luci-app-mihomo.json:37
|
||||
msgid "Proxy Config"
|
||||
@@ -480,7 +515,7 @@ msgstr "代理配置"
|
||||
msgid "Redirect Mode"
|
||||
msgstr "Redirect 模式"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:100
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:106
|
||||
msgid "Redirect Port"
|
||||
msgstr "Redirect 端口"
|
||||
|
||||
@@ -492,7 +527,7 @@ msgstr "重载服务"
|
||||
msgid "Remote"
|
||||
msgstr "远程"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:192
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:198
|
||||
msgid "Respect Rules"
|
||||
msgstr "遵循分流规则"
|
||||
|
||||
@@ -512,11 +547,11 @@ msgstr "规则模式"
|
||||
msgid "Running"
|
||||
msgstr "运行中"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:92
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:98
|
||||
msgid "SOCKS Port"
|
||||
msgstr "SOCKS 端口"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:80
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:86
|
||||
msgid "Save Proxy Selection"
|
||||
msgstr "保存节点/策略组选择"
|
||||
|
||||
@@ -534,11 +569,27 @@ msgstr "滚动到底部"
|
||||
msgid "Service is not running."
|
||||
msgstr "服务未在运行。"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:134
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:303
|
||||
msgid "Sniff By Protocol"
|
||||
msgstr "按协议嗅探"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:282
|
||||
msgid "Sniff Pure IP"
|
||||
msgstr "嗅探纯 IP 连接"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:279
|
||||
msgid "Sniff Redir-Host"
|
||||
msgstr "嗅探 Redir-Host 流量"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:274
|
||||
msgid "Sniffer Config"
|
||||
msgstr "嗅探器配置"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:140
|
||||
msgid "Stack"
|
||||
msgstr "栈"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:275
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:330
|
||||
msgid "Standard Loader"
|
||||
msgstr "标准加载器"
|
||||
|
||||
@@ -567,11 +618,15 @@ msgstr "订阅链接"
|
||||
msgid "Subscription:"
|
||||
msgstr "订阅:"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:53
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:56
|
||||
msgid "TCP Concurrent"
|
||||
msgstr "TCP 并发"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:59
|
||||
msgid "TCP Keep Alive Idle"
|
||||
msgstr "TCP Keep Alive 空闲"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:57
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:63
|
||||
msgid "TCP Keep Alive Interval"
|
||||
msgstr "TCP Keep Alive 间隔"
|
||||
|
||||
@@ -584,11 +639,11 @@ msgstr "TCP 代理模式"
|
||||
msgid "TPROXY Mode"
|
||||
msgstr "TPROXY 模式"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:104
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:110
|
||||
msgid "TPROXY Port"
|
||||
msgstr "TPROXY 端口"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:129
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:135
|
||||
msgid "TUN Config"
|
||||
msgstr "TUN 配置"
|
||||
|
||||
@@ -613,7 +668,7 @@ msgstr "透明代理"
|
||||
msgid "Transparent Proxy with Mihomo on OpenWrt."
|
||||
msgstr "在 OpenWrt 上使用 Mihomo 进行透明代理。"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:240
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:246
|
||||
msgid "Type"
|
||||
msgstr "类型"
|
||||
|
||||
@@ -621,14 +676,18 @@ msgstr "类型"
|
||||
msgid "UDP Proxy Mode"
|
||||
msgstr "UDP 代理模式"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:63
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:69
|
||||
msgid "UI Name"
|
||||
msgstr "UI 名称"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:65
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:71
|
||||
msgid "UI Url"
|
||||
msgstr "UI 下载地址"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:53
|
||||
msgid "Unify Delay"
|
||||
msgstr "统一延迟"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/tools/mihomo.js:80
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/tools/mihomo.js:84
|
||||
msgid "Unknown"
|
||||
@@ -650,11 +709,11 @@ msgstr "更新面板"
|
||||
msgid "Upload Profile"
|
||||
msgstr "上传配置文件"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:204
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:210
|
||||
msgid "Use Hosts"
|
||||
msgstr "使用 Hosts"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:201
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:207
|
||||
msgid "Use System Hosts"
|
||||
msgstr "使用系统的 Hosts"
|
||||
|
||||
@@ -666,6 +725,6 @@ msgstr "已使用"
|
||||
msgid "User Agent"
|
||||
msgstr "用户代理(UA)"
|
||||
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:122
|
||||
#: applications/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/mixin.js:128
|
||||
msgid "Username"
|
||||
msgstr "用户名"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=24.12.26
|
||||
PKG_VERSION:=25.1.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -66,6 +66,7 @@ function index()
|
||||
entry({"admin", "services", appname, "get_now_use_node"}, call("get_now_use_node")).leaf = true
|
||||
entry({"admin", "services", appname, "get_redir_log"}, call("get_redir_log")).leaf = true
|
||||
entry({"admin", "services", appname, "get_socks_log"}, call("get_socks_log")).leaf = true
|
||||
entry({"admin", "services", appname, "get_chinadns_log"}, call("get_chinadns_log")).leaf = true
|
||||
entry({"admin", "services", appname, "get_log"}, call("get_log")).leaf = true
|
||||
entry({"admin", "services", appname, "clear_log"}, call("clear_log")).leaf = true
|
||||
entry({"admin", "services", appname, "index_status"}, call("index_status")).leaf = true
|
||||
@@ -211,6 +212,18 @@ function get_socks_log()
|
||||
end
|
||||
end
|
||||
|
||||
function get_chinadns_log()
|
||||
local flag = luci.http.formvalue("flag")
|
||||
local path = "/tmp/etc/passwall/acl/" .. flag .. "/chinadns_ng.log"
|
||||
if fs.access(path) then
|
||||
local content = luci.sys.exec("cat ".. path)
|
||||
content = content:gsub("\n", "<br />")
|
||||
luci.http.write(content)
|
||||
else
|
||||
luci.http.write(string.format("<script>alert('%s');window.close();</script>", i18n.translate("Not enabled log")))
|
||||
end
|
||||
end
|
||||
|
||||
function get_log()
|
||||
-- luci.sys.exec("[ -f /tmp/log/passwall.log ] && sed '1!G;h;$!d' /tmp/log/passwall.log > /tmp/log/passwall_show.log")
|
||||
luci.http.write(luci.sys.exec("[ -f '/tmp/log/passwall.log' ] && cat /tmp/log/passwall.log"))
|
||||
|
||||
@@ -418,4 +418,6 @@ o:value("direct", translate("Direct DNS"))
|
||||
o.description = desc .. "</ul>"
|
||||
o:depends({dns_shunt = "dnsmasq", tcp_proxy_mode = "proxy", chn_list = "direct"})
|
||||
|
||||
m:append(Template(appname .. "/acl/footer"))
|
||||
|
||||
return m
|
||||
|
||||
@@ -660,11 +660,11 @@ end
|
||||
|
||||
s:tab("log", translate("Log"))
|
||||
o = s:taboption("log", Flag, "log_tcp", translate("Enable") .. " " .. translatef("%s Node Log", "TCP"))
|
||||
o.default = "1"
|
||||
o.default = "0"
|
||||
o.rmempty = false
|
||||
|
||||
o = s:taboption("log", Flag, "log_udp", translate("Enable") .. " " .. translatef("%s Node Log", "UDP"))
|
||||
o.default = "1"
|
||||
o.default = "0"
|
||||
o.rmempty = false
|
||||
|
||||
o = s:taboption("log", ListValue, "loglevel", "Sing-Box/Xray " .. translate("Log Level"))
|
||||
@@ -694,8 +694,17 @@ o:depends("advanced_log_feature", "1")
|
||||
o = s:taboption("log", Value, "log_event_cmd", translate("Shell Command"), translate("Shell command to execute, replace log content with %s."))
|
||||
o:depends("advanced_log_feature", "1")
|
||||
|
||||
s:tab("faq", "FAQ")
|
||||
o = s:taboption("log", Flag, "log_chinadns_ng", translate("Enable") .. " ChinaDNS-NG " .. translate("Log"))
|
||||
o.default = "0"
|
||||
o.rmempty = false
|
||||
|
||||
o = s:taboption("log", DummyValue, "_log_tips", " ")
|
||||
o.rawhtml = true
|
||||
o.cfgvalue = function(t, n)
|
||||
return string.format('<font color="red">%s</font>', translate("It is recommended to disable logging during regular use to reduce system overhead."))
|
||||
end
|
||||
|
||||
s:tab("faq", "FAQ")
|
||||
o = s:taboption("faq", DummyValue, "")
|
||||
o.template = appname .. "/global/faq"
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<%
|
||||
local api = require "luci.passwall.api"
|
||||
-%>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
setTimeout(function () {
|
||||
var url = window.location.href;
|
||||
var sid_match = url.match(/\/acl_config\/(cfg[0-9a-f]+)/);
|
||||
var sid = sid_match ? sid_match[1] : null;
|
||||
if (!sid) {
|
||||
return;
|
||||
}
|
||||
var selects = document.querySelectorAll("select[id*='dns_shunt']");
|
||||
selects.forEach(function (select) {
|
||||
if (select.value === "chinadns-ng") {
|
||||
addLogLink(select);
|
||||
}
|
||||
select.addEventListener("change", function () {
|
||||
var existingLogLink = select.parentElement.querySelector("a.log-link");
|
||||
if (existingLogLink) {
|
||||
existingLogLink.remove();
|
||||
}
|
||||
if (select.value === "chinadns-ng") {
|
||||
addLogLink(select);
|
||||
}
|
||||
});
|
||||
});
|
||||
function addLogLink(select) {
|
||||
var logLink = document.createElement("a");
|
||||
logLink.innerHTML = "<%:Log%>";
|
||||
logLink.href = "#";
|
||||
logLink.className = "log-link";
|
||||
logLink.style.marginLeft = "10px";
|
||||
logLink.setAttribute("onclick", "window.open('" + '<%=api.url("get_chinadns_log")%>' + "?flag=" + sid + "', '_blank')");
|
||||
select.insertAdjacentElement("afterend", logLink);
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
@@ -148,5 +148,33 @@ local api = require "luci.passwall.api"
|
||||
}
|
||||
setTimeout("go()", 1000);
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
setTimeout(function () {
|
||||
var selects = document.querySelectorAll("select[id*='dns_shunt']");
|
||||
selects.forEach(function (select, index) {
|
||||
if (select.value === "chinadns-ng") {
|
||||
addLogLink(select);
|
||||
}
|
||||
select.addEventListener("change", function () {
|
||||
var existingLogLink = select.parentElement.querySelector("a.log-link");
|
||||
if (existingLogLink) {
|
||||
existingLogLink.remove();
|
||||
}
|
||||
if (select.value === "chinadns-ng") {
|
||||
addLogLink(select);
|
||||
}
|
||||
});
|
||||
});
|
||||
function addLogLink(select) {
|
||||
var logLink = document.createElement("a");
|
||||
logLink.innerHTML = "<%:Log%>";
|
||||
logLink.href = "#";
|
||||
logLink.className = "log-link";
|
||||
logLink.style.marginLeft = "10px";
|
||||
logLink.setAttribute("onclick", "window.open('" + '<%=api.url("get_chinadns_log")%>' + "?flag=default', '_blank')");
|
||||
select.insertAdjacentElement("afterend", logLink);
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
@@ -829,10 +829,10 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
}
|
||||
|
||||
queryParam.type = queryParam.type.toLowerCase();
|
||||
if (queryParam.type === "kcp" || queryParam.type === "mkcp") {
|
||||
if (queryParam.type === "kcp") {
|
||||
queryParam.type = "mkcp";
|
||||
}
|
||||
if (queryParam.type === "h2" || queryParam.type === "http") {
|
||||
if (queryParam.type === "h2") {
|
||||
queryParam.type = "http";
|
||||
}
|
||||
if (dom_prefix == "singbox_" && queryParam.type === "raw") {
|
||||
@@ -872,7 +872,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
opt.set(dom_prefix + 'ws_earlyDataHeaderName', 'Sec-WebSocket-Protocol');
|
||||
}
|
||||
}
|
||||
} else if (queryParam.type === "h2" || queryParam.type === "http") {
|
||||
} else if (queryParam.type === "http") {
|
||||
if (dom_prefix == "xray_") {
|
||||
opt.set(dom_prefix + 'xhttp_mode', "stream-one");
|
||||
opt.set(dom_prefix + 'xhttp_host', queryParam.host || "");
|
||||
@@ -885,7 +885,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
opt.set(dom_prefix + 'quic_guise', queryParam.headerType || "none");
|
||||
opt.set(dom_prefix + 'quic_security', queryParam.quicSecurity);
|
||||
opt.set(dom_prefix + 'quic_key', queryParam.key);
|
||||
} else if (queryParam.type === "kcp" || queryParam.type === "mkcp") {
|
||||
} else if (queryParam.type === "mkcp") {
|
||||
opt.set(dom_prefix + 'mkcp_guise', queryParam.headerType || "none");
|
||||
} else if (queryParam.type === "grpc") {
|
||||
opt.set(dom_prefix + 'grpc_serviceName', (queryParam.serviceName || queryParam.path) || "");
|
||||
@@ -961,10 +961,10 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
opt.set(dom_prefix + 'password', decodeURIComponent(password));
|
||||
|
||||
queryParam.type = queryParam.type ? queryParam.type.toLowerCase() : "tcp";
|
||||
if (queryParam.type === "kcp" || queryParam.type === "mkcp") {
|
||||
if (queryParam.type === "kcp") {
|
||||
queryParam.type = "mkcp";
|
||||
}
|
||||
if (queryParam.type === "h2" || queryParam.type === "http") {
|
||||
if (queryParam.type === "h2") {
|
||||
queryParam.type = "http";
|
||||
}
|
||||
if (dom_prefix == "singbox_" && queryParam.type === "raw") {
|
||||
@@ -1004,7 +1004,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
opt.set(dom_prefix + 'ws_earlyDataHeaderName', 'Sec-WebSocket-Protocol');
|
||||
}
|
||||
}
|
||||
} else if (queryParam.type === "h2" || queryParam.type === "http") {
|
||||
} else if (queryParam.type === "http") {
|
||||
if (dom_prefix == "xray_") {
|
||||
opt.set(dom_prefix + 'xhttp_mode', "stream-one");
|
||||
opt.set(dom_prefix + 'xhttp_host', queryParam.host || "");
|
||||
@@ -1017,7 +1017,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
opt.set(dom_prefix + 'quic_guise', queryParam.headerType || "none");
|
||||
opt.set(dom_prefix + 'quic_security', queryParam.quicSecurity);
|
||||
opt.set(dom_prefix + 'quic_key', queryParam.key);
|
||||
} else if (queryParam.type === "kcp" || queryParam.type === "mkcp") {
|
||||
} else if (queryParam.type === "mkcp") {
|
||||
opt.set(dom_prefix + 'mkcp_guise', queryParam.headerType || "none");
|
||||
} else if (queryParam.type === "grpc") {
|
||||
opt.set(dom_prefix + 'grpc_serviceName', (queryParam.serviceName || queryParam.path) || "");
|
||||
@@ -1198,12 +1198,15 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
}
|
||||
|
||||
queryParam.type = queryParam.type.toLowerCase();
|
||||
if (queryParam.type === "kcp" || queryParam.type === "mkcp") {
|
||||
if (queryParam.type === "kcp") {
|
||||
queryParam.type = "mkcp";
|
||||
}
|
||||
if (queryParam.type === "h2" || queryParam.type === "http") {
|
||||
if (queryParam.type === "h2") {
|
||||
queryParam.type = "http";
|
||||
}
|
||||
if (queryParam.type === "splithttp") {
|
||||
queryParam.type = "xhttp";
|
||||
}
|
||||
if (dom_prefix == "singbox_" && queryParam.type === "raw") {
|
||||
queryParam.type = "tcp";
|
||||
} else if (dom_prefix == "xray_" && queryParam.type === "tcp") {
|
||||
@@ -1259,7 +1262,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
} else if (queryParam.type === "grpc") {
|
||||
opt.set(dom_prefix + 'grpc_serviceName', (queryParam.serviceName || queryParam.path) || "");
|
||||
opt.set(dom_prefix + 'grpc_mode', queryParam.mode || "gun");
|
||||
} else if (queryParam.type === "xhttp" || queryParam.type === "splithttp") {
|
||||
} else if (queryParam.type === "xhttp") {
|
||||
opt.set(dom_prefix + 'xhttp_host', queryParam.host || "");
|
||||
opt.set(dom_prefix + 'xhttp_path', queryParam.path || "");
|
||||
opt.set(dom_prefix + 'xhttp_mode', queryParam.mode || "auto");
|
||||
|
||||
@@ -1510,6 +1510,9 @@ msgstr "要执行的 Shell 命令,用 %s 代替日志内容。"
|
||||
msgid "Not enabled log"
|
||||
msgstr "未启用日志"
|
||||
|
||||
msgid "It is recommended to disable logging during regular use to reduce system overhead."
|
||||
msgstr "正常使用时建议关闭日志,以减少系统开销。"
|
||||
|
||||
msgid "UDP Forward"
|
||||
msgstr "UDP 转发"
|
||||
|
||||
|
||||
@@ -21,10 +21,11 @@ config global
|
||||
option localhost_proxy '1'
|
||||
option client_proxy '1'
|
||||
option acl_enable '0'
|
||||
option log_tcp '1'
|
||||
option log_udp '1'
|
||||
option log_tcp '0'
|
||||
option log_udp '0'
|
||||
option loglevel 'error'
|
||||
option trojan_loglevel '4'
|
||||
option log_chinadns_ng '0'
|
||||
|
||||
config global_haproxy
|
||||
option balancing_enable '0'
|
||||
|
||||
@@ -296,7 +296,10 @@ ln_run() {
|
||||
fi
|
||||
#echo "${file_func} $*" >&2
|
||||
[ -n "${file_func}" ] || echolog " - 找不到 ${ln_name},无法启动..."
|
||||
[ "${output}" != "/dev/null" ] && local persist_log_path=$(config_t_get global persist_log_path) && local sys_log=$(config_t_get global sys_log "0")
|
||||
[ "${output}" != "/dev/null" ] && [ "${ln_name}" != "chinadns-ng" ] && {
|
||||
local persist_log_path=$(config_t_get global persist_log_path)
|
||||
local sys_log=$(config_t_get global sys_log "0")
|
||||
}
|
||||
if [ -z "$persist_log_path" ] && [ "$sys_log" != "1" ]; then
|
||||
${file_func:-echolog " - ${ln_name}"} "$@" >${output} 2>&1 &
|
||||
else
|
||||
@@ -570,13 +573,14 @@ run_chinadns_ng() {
|
||||
eval_set_val $@
|
||||
|
||||
local _CONF_FILE=$TMP_ACL_PATH/$_flag/chinadns_ng.conf
|
||||
local _LOG_FILE=$TMP_ACL_PATH/$_flag/chinadns_ng.log
|
||||
_LOG_FILE="/dev/null"
|
||||
local _LOG_FILE="/dev/null"
|
||||
[ "$(config_t_get global log_chinadns_ng "0")" == "1" ] && _LOG_FILE=$TMP_ACL_PATH/$_flag/chinadns_ng.log
|
||||
|
||||
_extra_param="-FLAG ${_flag} -TCP_NODE ${_tcp_node} -LISTEN_PORT ${_listen_port} -DNS_LOCAL ${_dns_local} -DNS_TRUST ${_dns_trust}"
|
||||
_extra_param="${_extra_param} -USE_DIRECT_LIST ${_use_direct_list} -USE_PROXY_LIST ${_use_proxy_list} -USE_BLOCK_LIST ${_use_block_list}"
|
||||
_extra_param="${_extra_param} -GFWLIST ${_gfwlist} -CHNLIST ${_chnlist} -NO_IPV6_TRUST ${_no_ipv6_trust} -DEFAULT_MODE ${_default_mode}"
|
||||
_extra_param="${_extra_param} -DEFAULT_TAG ${_default_tag} -NFTFLAG ${nftflag} -NO_LOGIC_LOG ${_no_logic_log} -REMOTE_FAKEDNS ${_remote_fakedns}"
|
||||
_extra_param="${_extra_param} -LOG_FILE ${_LOG_FILE}"
|
||||
|
||||
lua $APP_PATH/helper_chinadns_add.lua ${_extra_param} > ${_CONF_FILE}
|
||||
ln_run "$(first_type chinadns-ng)" chinadns-ng "${_LOG_FILE}" -C ${_CONF_FILE}
|
||||
|
||||
@@ -19,6 +19,7 @@ local NO_LOGIC_LOG = var["-NO_LOGIC_LOG"]
|
||||
local TCP_NODE = var["-TCP_NODE"]
|
||||
local NFTFLAG = var["-NFTFLAG"]
|
||||
local REMOTE_FAKEDNS = var["-REMOTE_FAKEDNS"]
|
||||
local LOG_FILE = var["-LOG_FILE"]
|
||||
|
||||
local uci = api.libuci
|
||||
local sys = api.sys
|
||||
@@ -104,7 +105,7 @@ local setflag = (NFTFLAG == "1") and "inet@passwall@" or ""
|
||||
local only_global = (DEFAULT_MODE == "proxy" and CHNLIST == "0" and GFWLIST == "0") and 1
|
||||
|
||||
config_lines = {
|
||||
--"verbose",
|
||||
LOG_FILE ~= "/dev/null" and "verbose" or "",
|
||||
"bind-addr 127.0.0.1",
|
||||
"bind-port " .. LISTEN_PORT,
|
||||
"china-dns " .. DNS_LOCAL,
|
||||
@@ -270,7 +271,7 @@ if USE_PROXY_LIST == "1" and is_file_nonzero(file_proxy_host) then
|
||||
"group proxylist",
|
||||
"group-dnl " .. file_proxy_host,
|
||||
"group-upstream " .. DNS_TRUST,
|
||||
REMOTE_FAKEDNS ~= "1" and "group-ipset " .. table.concat(sets, ",") or nil
|
||||
REMOTE_FAKEDNS ~= "1" and "group-ipset " .. table.concat(sets, ",") or ""
|
||||
}
|
||||
if NO_IPV6_TRUST == "1" then table.insert(tmp_lines, "no-ipv6 tag:proxylist") end
|
||||
insert_array_after(config_lines, tmp_lines, "#--3")
|
||||
@@ -292,7 +293,7 @@ if GFWLIST == "1" and is_file_nonzero(RULES_PATH .. "/gfwlist") then
|
||||
end
|
||||
tmp_lines = {
|
||||
"gfwlist-file " .. RULES_PATH .. "/gfwlist",
|
||||
REMOTE_FAKEDNS ~= "1" and "add-taggfw-ip " .. table.concat(sets, ",") or nil
|
||||
REMOTE_FAKEDNS ~= "1" and "add-taggfw-ip " .. table.concat(sets, ",") or ""
|
||||
}
|
||||
if NO_IPV6_TRUST == "1" then table.insert(tmp_lines, "no-ipv6 tag:gfw") end
|
||||
merge_array(config_lines, tmp_lines)
|
||||
@@ -323,7 +324,7 @@ if CHNLIST ~= "0" and is_file_nonzero(RULES_PATH .. "/chnlist") then
|
||||
"group chn_proxy",
|
||||
"group-dnl " .. RULES_PATH .. "/chnlist",
|
||||
"group-upstream " .. DNS_TRUST,
|
||||
REMOTE_FAKEDNS ~= "1" and "group-ipset " .. table.concat(sets, ",") or nil
|
||||
REMOTE_FAKEDNS ~= "1" and "group-ipset " .. table.concat(sets, ",") or ""
|
||||
}
|
||||
if NO_IPV6_TRUST == "1" then table.insert(tmp_lines, "no-ipv6 tag:chn_proxy") end
|
||||
insert_array_after(config_lines, tmp_lines, "#--1")
|
||||
@@ -448,7 +449,7 @@ if uci:get(appname, TCP_NODE, "protocol") == "_shunt" then
|
||||
"group shuntlist",
|
||||
"group-dnl " .. file_shunt_host,
|
||||
"group-upstream " .. DNS_TRUST,
|
||||
(not only_global and REMOTE_FAKEDNS == "1") and nil or ("group-ipset " .. table.concat(sets, ","))
|
||||
(not only_global and REMOTE_FAKEDNS == "1") and "" or ("group-ipset " .. table.concat(sets, ","))
|
||||
}
|
||||
if NO_IPV6_TRUST == "1" then table.insert(tmp_lines, "no-ipv6 tag:shuntlist") end
|
||||
insert_array_after(config_lines, tmp_lines, "#--2")
|
||||
|
||||
@@ -465,6 +465,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
elseif result.type == "Xray" and info.net == "tcp" then
|
||||
info.net = "raw"
|
||||
end
|
||||
if info.net == "splithttp" then info.net = "xhttp" end
|
||||
if info.net == 'h2' or info.net == 'http' then
|
||||
info.net = "http"
|
||||
result.transport = (result.type == "Xray") and "xhttp" or "http"
|
||||
@@ -527,7 +528,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
if info.net == 'grpc' then
|
||||
result.grpc_serviceName = info.path
|
||||
end
|
||||
if info.net == 'xhttp' or info.net == 'splithttp' then
|
||||
if info.net == 'xhttp' then
|
||||
result.xhttp_host = info.host
|
||||
result.xhttp_path = info.path
|
||||
end
|
||||
@@ -974,6 +975,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
elseif result.type == "Xray" and params.type == "tcp" then
|
||||
params.type = "raw"
|
||||
end
|
||||
if params.type == "splithttp" then params.type = "xhttp" end
|
||||
if params.type == "h2" or params.type == "http" then
|
||||
params.type = "http"
|
||||
result.transport = (result.type == "Xray") and "xhttp" or "http"
|
||||
@@ -1037,7 +1039,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
if params.serviceName then result.grpc_serviceName = params.serviceName end
|
||||
result.grpc_mode = params.mode or "gun"
|
||||
end
|
||||
if params.type == 'xhttp' or params.type == 'splithttp' then
|
||||
if params.type == 'xhttp' then
|
||||
result.xhttp_host = params.host
|
||||
result.xhttp_path = params.path
|
||||
result.xhttp_mode = params.mode or "auto"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall2
|
||||
PKG_VERSION:=24.12.26
|
||||
PKG_VERSION:=25.1.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mihomo
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git
|
||||
PKG_SOURCE_DATE:=2024-12-28
|
||||
PKG_SOURCE_VERSION:=a9ce5da09d38f6057bd248cd146cbd8c05dc9fd6
|
||||
PKG_MIRROR_HASH:=b893642d6bb24d64d6c36c722d44f821340027c5aa0a56e2f62d3c70bf2ea059
|
||||
PKG_SOURCE_DATE:=2024-12-31
|
||||
PKG_SOURCE_VERSION:=1c5f4a3ab12ae748cf85b1f14e1841f3b570e9c3
|
||||
PKG_MIRROR_HASH:=f0ab4e3d6379da2dbfb1f2d67dde142dcc5d7a8e3c5e93e8fd9e885abe072e48
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_MAINTAINER:=Joseph Mory <morytyann@gmail.com>
|
||||
@@ -16,7 +16,7 @@ PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
PKG_BUILD_VERSION:=alpha-a9ce5da
|
||||
PKG_BUILD_VERSION:=alpha-1c5f4a3
|
||||
PKG_BUILD_TIME:=$(shell date -u -Iseconds)
|
||||
|
||||
GO_PKG:=github.com/metacubex/mihomo
|
||||
|
||||
@@ -54,6 +54,8 @@ config mixin 'mixin'
|
||||
option 'match_process' 'off'
|
||||
option 'outbound_interface' ''
|
||||
option 'ipv6' '0'
|
||||
option 'unify_delay' '1'
|
||||
option 'tcp_concurrent' '1'
|
||||
option 'tcp_keep_alive_idle' '600'
|
||||
option 'tcp_keep_alive_interval' '15'
|
||||
option 'ui_name' ''
|
||||
@@ -89,6 +91,15 @@ config mixin 'mixin'
|
||||
option 'hosts' '0'
|
||||
option 'dns_nameserver' '0'
|
||||
option 'dns_nameserver_policy' '0'
|
||||
option 'sniffer' '0'
|
||||
option 'sniffer_sniff_dns_mapping' '1'
|
||||
option 'sniffer_sniff_pure_ip' '1'
|
||||
option 'sniffer_overwrite_destination' '0'
|
||||
option 'sniffer_force_domain_name' '0'
|
||||
option 'sniffer_force_domain_names' ''
|
||||
option 'sniffer_ignore_domain_name' '0'
|
||||
option 'sniffer_ignore_domain_names' ''
|
||||
option 'sniffer_sniff' '0'
|
||||
option 'geoip_format' 'dat'
|
||||
option 'geodata_loader' 'memconservative'
|
||||
option 'geosite_url' 'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat'
|
||||
@@ -110,7 +121,7 @@ config authentication
|
||||
option 'username' 'mihomo'
|
||||
option 'password' ''
|
||||
|
||||
config host
|
||||
config hosts
|
||||
option 'enabled' '0'
|
||||
option 'domain_name' 'localhost'
|
||||
list 'ip' '127.0.0.1'
|
||||
@@ -158,6 +169,27 @@ config nameserver_policy
|
||||
list 'nameserver' 'https://dns.cloudflare.com/dns-query'
|
||||
list 'nameserver' 'https://dns.google/dns-query'
|
||||
|
||||
config sniff
|
||||
option 'enabled' '1'
|
||||
option 'protocol' 'HTTP'
|
||||
list 'port' '80'
|
||||
list 'port' '8080'
|
||||
option 'overwrite_destination' '1'
|
||||
|
||||
config sniff
|
||||
option 'enabled' '1'
|
||||
option 'protocol' 'TLS'
|
||||
list 'port' '443'
|
||||
list 'port' '8443'
|
||||
option 'overwrite_destination' '1'
|
||||
|
||||
config sniff
|
||||
option 'enabled' '1'
|
||||
option 'protocol' 'QUIC'
|
||||
list 'port' '443'
|
||||
list 'port' '8443'
|
||||
option 'overwrite_destination' '1'
|
||||
|
||||
config editor 'editor'
|
||||
|
||||
config log 'log'
|
||||
|
||||
@@ -59,11 +59,13 @@ start_service() {
|
||||
config_get udp_transparent_proxy_mode "proxy" "udp_transparent_proxy_mode" "tproxy"
|
||||
## mixin config
|
||||
### general
|
||||
local mode match_process outbound_interface ipv6 tcp_keep_alive_idle tcp_keep_alive_interval log_level
|
||||
local mode match_process outbound_interface ipv6 unify_delay tcp_concurrent tcp_keep_alive_idle tcp_keep_alive_interval log_level
|
||||
config_get mode "mixin" "mode" "rule"
|
||||
config_get match_process "mixin" "match_process" "off"
|
||||
config_get outbound_interface "mixin" "outbound_interface"
|
||||
config_get_bool ipv6 "mixin" "ipv6" 0
|
||||
config_get_bool unify_delay "mixin" "unify_delay" 0
|
||||
config_get_bool tcp_concurrent "mixin" "tcp_concurrent" 0
|
||||
config_get tcp_keep_alive_idle "mixin" "tcp_keep_alive_idle" 600
|
||||
config_get tcp_keep_alive_interval "mixin" "tcp_keep_alive_interval" 15
|
||||
config_get log_level "mixin" "log_level" "info"
|
||||
@@ -107,6 +109,15 @@ start_service() {
|
||||
config_get_bool hosts "mixin" "hosts" 0
|
||||
config_get_bool dns_nameserver "mixin" "dns_nameserver" 0
|
||||
config_get_bool dns_nameserver_policy "mixin" "dns_nameserver_policy" 0
|
||||
### sniffer
|
||||
local sniffer sniffer_sniff_dns_mapping sniffer_sniff_pure_ip sniffer_overwrite_destination sniffer_force_domain_name sniffer_ignore_domain_name sniffer_sniff
|
||||
config_get_bool sniffer "mixin" sniffer 0
|
||||
config_get_bool sniffer_sniff_dns_mapping "mixin" sniffer_sniff_dns_mapping 0
|
||||
config_get_bool sniffer_sniff_pure_ip "mixin" sniffer_sniff_pure_ip 0
|
||||
config_get_bool sniffer_overwrite_destination "mixin" sniffer_overwrite_destination 0
|
||||
config_get_bool sniffer_force_domain_name "mixin" sniffer_force_domain_name 0
|
||||
config_get_bool sniffer_ignore_domain_name "mixin" sniffer_ignore_domain_name 0
|
||||
config_get_bool sniffer_sniff "mixin" sniffer_sniff 0
|
||||
### geox
|
||||
local geoip_format geodata_loader geosite_url geoip_mmdb_url geoip_dat_url geoip_asn_url geox_auto_update geox_update_interval
|
||||
config_get geoip_format "mixin" "geoip_format" "mmdb"
|
||||
@@ -172,13 +183,13 @@ start_service() {
|
||||
log "Mixin" "Disabled."
|
||||
log "Mixin" "Mixin neccesary config."
|
||||
# do mixin
|
||||
log_level="$log_level" ipv6="$ipv6" \
|
||||
log_level="$log_level" mode="$mode" match_process="$match_process" ipv6="$ipv6" \
|
||||
ui_path="ui" ui_name="$ui_name" ui_url="$ui_url" api_listen="0.0.0.0:$api_port" api_secret="$api_secret" \
|
||||
allow_lan="$allow_lan" http_port="$http_port" socks_port="$socks_port" mixed_port="$mixed_port" redir_port="$redir_port" tproxy_port="$tproxy_port" \
|
||||
tun_enable="$tun_enable" tun_stack="$tun_stack" tun_device="$tun_device" tun_mtu="$tun_mtu" tun_gso="$tun_gso" tun_gso_max_size="$tun_gso_max_size" tun_endpoint_independent_nat="$tun_endpoint_independent_nat" \
|
||||
dns_enable="true" dns_listen="0.0.0.0:$dns_port" dns_mode="$dns_mode" fake_ip_range="$fake_ip_range" \
|
||||
yq -M -i '
|
||||
.log-level = strenv(log_level) | .ipv6 = env(ipv6) == 1 |
|
||||
.log-level = strenv(log_level) | .mode = strenv(mode) | .find-process-mode = strenv(match_process) | .ipv6 = env(ipv6) == 1 |
|
||||
.external-ui = strenv(ui_path) | .external-ui-name = strenv(ui_name) | .external-ui-url = strenv(ui_url) | .external-controller = strenv(api_listen) | .secret = strenv(api_secret) |
|
||||
.allow-lan = env(allow_lan) == 1 | .port = env(http_port) | .socks-port = env(socks_port) | .mixed-port = env(mixed_port) | .redir-port = env(redir_port) | .tproxy-port = env(tproxy_port) |
|
||||
.tun.enable = env(tun_enable) == 1 | .tun.stack = strenv(tun_stack) | .tun.device = strenv(tun_device) | .tun.mtu = env(tun_mtu) | .tun.gso = env(tun_gso) == 1 | .tun.gso-max-size = env(tun_gso_max_size) | .tun.endpoint-independent-nat = env(tun_endpoint_independent_nat) == 1 |
|
||||
@@ -188,21 +199,23 @@ start_service() {
|
||||
log "Mixin" "Enabled."
|
||||
log "Mixin" "Mixin all config."
|
||||
# do mixin
|
||||
log_level="$log_level" mode="$mode" match_process="$match_process" tcp_keep_alive_idle="$tcp_keep_alive_idle" tcp_keep_alive_interval="$tcp_keep_alive_interval" ipv6="$ipv6" \
|
||||
log_level="$log_level" mode="$mode" match_process="$match_process" ipv6="$ipv6" unify_delay="$unify_delay" tcp_concurrent="$tcp_concurrent" tcp_keep_alive_idle="$tcp_keep_alive_idle" tcp_keep_alive_interval="$tcp_keep_alive_interval" \
|
||||
ui_path="ui" ui_name="$ui_name" ui_url="$ui_url" api_listen="0.0.0.0:$api_port" api_secret="$api_secret" selection_cache="$selection_cache" \
|
||||
allow_lan="$allow_lan" http_port="$http_port" socks_port="$socks_port" mixed_port="$mixed_port" redir_port="$redir_port" tproxy_port="$tproxy_port" \
|
||||
tun_enable="$tun_enable" tun_stack="$tun_stack" tun_device="$tun_device" tun_mtu="$tun_mtu" tun_gso="$tun_gso" tun_gso_max_size="$tun_gso_max_size" tun_endpoint_independent_nat="$tun_endpoint_independent_nat" \
|
||||
dns_enable="true" dns_listen="0.0.0.0:$dns_port" dns_mode="$dns_mode" fake_ip_range="$fake_ip_range" fake_ip_cache="$fake_ip_cache" \
|
||||
dns_respect_rules="$dns_respect_rules" dns_doh_prefer_http3="$dns_doh_prefer_http3" dns_ipv6="$dns_ipv6" dns_system_hosts="$dns_system_hosts" dns_hosts="$dns_hosts" \
|
||||
sniffer="$sniffer" sniffer_sniff_dns_mapping="$sniffer_sniff_dns_mapping" sniffer_sniff_pure_ip="$sniffer_sniff_pure_ip" sniffer_overwrite_destination="$sniffer_overwrite_destination" \
|
||||
geoip_format="$geoip_format" geodata_loader="$geodata_loader" geosite_url="$geosite_url" geoip_mmdb_url="$geoip_mmdb_url" geoip_dat_url="$geoip_dat_url" geoip_asn_url="$geoip_asn_url" \
|
||||
geox_auto_update="$geox_auto_update" geox_update_interval="$geox_update_interval" \
|
||||
yq -M -i '
|
||||
.log-level = strenv(log_level) | .mode = strenv(mode) | .find-process-mode = strenv(match_process) | .keep-alive-idle = env(tcp_keep_alive_idle) | .keep-alive-interval = env(tcp_keep_alive_interval) | .ipv6 = env(ipv6) == 1 |
|
||||
.log-level = strenv(log_level) | .mode = strenv(mode) | .find-process-mode = strenv(match_process) | .ipv6 = env(ipv6) == 1 | .unified-delay = env(unify_delay) == 1 | .tcp-concurrent = env(tcp_concurrent) == 1 | .keep-alive-idle = env(tcp_keep_alive_idle) | .keep-alive-interval = env(tcp_keep_alive_interval) |
|
||||
.external-ui = strenv(ui_path) | .external-ui-name = strenv(ui_name) | .external-ui-url = strenv(ui_url) | .external-controller = strenv(api_listen) | .secret = strenv(api_secret) | .profile.store-selected = env(selection_cache) == 1 |
|
||||
.allow-lan = env(allow_lan) == 1 | .port = env(http_port) | .socks-port = env(socks_port) | .mixed-port = env(mixed_port) | .redir-port = env(redir_port) | .tproxy-port = env(tproxy_port) |
|
||||
.tun.enable = env(tun_enable) == 1 | .tun.stack = strenv(tun_stack) | .tun.device = strenv(tun_device) | .tun.mtu = env(tun_mtu) | .tun.gso = env(tun_gso) == 1 | .tun.gso-max-size = env(tun_gso_max_size) | .tun.endpoint-independent-nat = env(tun_endpoint_independent_nat) == 1 |
|
||||
.dns.enable = env(dns_enable) | .dns.listen = strenv(dns_listen) | .dns.enhanced-mode = strenv(dns_mode) | .dns.fake-ip-range = strenv(fake_ip_range) | .profile.store-fake-ip = env(fake_ip_cache) == 1 |
|
||||
.dns.respect-rules = env(dns_respect_rules) == 1 | .dns.prefer-h3 = env(dns_doh_prefer_http3) == 1 | .dns.ipv6 = env(dns_ipv6) == 1 | .dns.use-system-hosts = env(dns_system_hosts) == 1 | .dns.use-hosts = env(dns_hosts) == 1 |
|
||||
.sniffer.enable = env(sniffer) == 1 | .sniffer.force-dns-mapping = env(sniffer_sniff_dns_mapping) == 1 | .sniffer.parse-pure-ip = env(sniffer_sniff_pure_ip) == 1 | .sniffer.override-destination = env(sniffer_overwrite_destination) == 1 |
|
||||
.geodata-mode = strenv(geoip_format) == "dat" | .geodata-loader = strenv(geodata_loader) | .geox-url.geosite = strenv(geosite_url) | .geox-url.mmdb = strenv(geoip_mmdb_url) | .geox-url.geoip = strenv(geoip_dat_url) | .geox-url.asn = strenv(geoip_asn_url) |
|
||||
.geo-auto-update = env(geox_auto_update) == 1 | .geo-update-interval = env(geox_update_interval)
|
||||
' "$RUN_PROFILE_PATH"
|
||||
@@ -224,6 +237,18 @@ start_service() {
|
||||
yq -M -i 'del(.dns.nameserver-policy)' "$RUN_PROFILE_PATH"
|
||||
config_foreach mixin_nameserver_policies "nameserver_policy"
|
||||
fi
|
||||
if [ "$sniffer_force_domain_name" == 1 ]; then
|
||||
yq -M -i 'del(.sniffer.force-domain)' "$RUN_PROFILE_PATH"
|
||||
config_list_foreach "mixin" "sniffer_force_domain_names" mixin_sniffer_domain_names "force-domain"
|
||||
fi
|
||||
if [ "$sniffer_ignore_domain_name" == 1 ]; then
|
||||
yq -M -i 'del(.sniffer.skip-domain)' "$RUN_PROFILE_PATH"
|
||||
config_list_foreach "mixin" "sniffer_ignore_domain_names" mixin_sniffer_domain_names "skip-domain"
|
||||
fi
|
||||
if [ "$sniffer_sniff" == 1 ]; then
|
||||
yq -M -i 'del(.sniffer.sniff)' "$RUN_PROFILE_PATH"
|
||||
config_foreach mixin_sniffs "sniff"
|
||||
fi
|
||||
fi
|
||||
yq -M -i 'del (.bind-address)' "$RUN_PROFILE_PATH"
|
||||
if [ -n "$outbound_interface" ]; then
|
||||
@@ -639,6 +664,27 @@ mixin_nameserver_policy() {
|
||||
nameserver="$1" matcher="$2" yq -M -i '.dns.nameserver-policy.[strenv(matcher)] += [strenv(nameserver)]' "$RUN_PROFILE_PATH"
|
||||
}
|
||||
|
||||
mixin_sniffer_domain_names() {
|
||||
domain_name="$1" type="$2" yq -M -i '.sniffer.[env(type)] += [env(domain_name)]' "$RUN_PROFILE_PATH"
|
||||
}
|
||||
|
||||
mixin_sniffs() {
|
||||
local section="$1"
|
||||
local enabled protocol overwrite_destination
|
||||
config_get_bool enabled "$section" "enabled" 0
|
||||
config_get protocol "$section" "protocol"
|
||||
config_get_bool overwrite_destination "$section" "overwrite_destination" 0
|
||||
if [ "$enabled" == 0 ]; then
|
||||
return
|
||||
fi
|
||||
protocol="$protocol" overwrite_destination="$overwrite_destination" yq -M -i '.sniffer.sniff.[env(protocol)].override-destination = env(overwrite_destination) == 1' "$RUN_PROFILE_PATH"
|
||||
config_list_foreach "$section" "port" mixin_sniff "$protocol"
|
||||
}
|
||||
|
||||
mixin_sniff() {
|
||||
port="$1" protocol="$2" yq -M -i '.sniffer.sniff.[env(protocol)].ports += [env(port)]' "$RUN_PROFILE_PATH"
|
||||
}
|
||||
|
||||
add_bypass_user() {
|
||||
local user; user="$1"
|
||||
if [ "$user" != "root" ] && (cut -d ':' -f 1 < /etc/passwd | grep -q "$user"); then
|
||||
|
||||
@@ -51,8 +51,48 @@ env=$(uci -q get mihomo.env); [ -z "$env" ] && {
|
||||
}
|
||||
|
||||
# since v1.15.0
|
||||
|
||||
tun_device=$(uci -q get mihomo.mixin.tun_device); [ -z "$tun_device" ] && uci set mihomo.mixin.tun_device=mihomo
|
||||
|
||||
# since v1.16.0
|
||||
|
||||
unify_delay=$(uci -q get mihomo.mixin.unify_delay); [ -z "$unify_delay" ] && uci set mihomo.mixin.unify_delay=1
|
||||
|
||||
tcp_concurrent=$(uci -q get mihomo.mixin.tcp_concurrent); [ -z "$tcp_concurrent" ] && uci set mihomo.mixin.tcp_concurrent=1
|
||||
|
||||
sniffer=$(uci -q get mihomo.mixin.sniffer); [ -z "$sniffer" ] && {
|
||||
uci set mihomo.mixin.sniffer=0
|
||||
uci set mihomo.mixin.sniffer_sniff_dns_mapping=1
|
||||
uci set mihomo.mixin.sniffer_sniff_pure_ip=1
|
||||
uci set mihomo.mixin.sniffer_overwrite_destination=0
|
||||
uci set mihomo.mixin.sniffer_force_domain_name=0
|
||||
uci set mihomo.mixin.sniffer_ignore_domain_name=0
|
||||
uci set mihomo.mixin.sniffer_sniff=0
|
||||
|
||||
uci add mihomo sniff
|
||||
uci set mihomo.@sniff[-1].enabled=1
|
||||
uci set mihomo.@sniff[-1].protocol=HTTP
|
||||
uci add_list mihomo.@sniff[-1].port=80
|
||||
uci add_list mihomo.@sniff[-1].port=8080
|
||||
uci set mihomo.@sniff[-1].overwrite_destination=1
|
||||
|
||||
uci add mihomo sniff
|
||||
uci set mihomo.@sniff[-1].enabled=1
|
||||
uci set mihomo.@sniff[-1].protocol=TLS
|
||||
uci add_list mihomo.@sniff[-1].port=443
|
||||
uci add_list mihomo.@sniff[-1].port=8443
|
||||
uci set mihomo.@sniff[-1].overwrite_destination=1
|
||||
|
||||
uci add mihomo sniff
|
||||
uci set mihomo.@sniff[-1].enabled=1
|
||||
uci set mihomo.@sniff[-1].protocol=QUIC
|
||||
uci add_list mihomo.@sniff[-1].port=443
|
||||
uci add_list mihomo.@sniff[-1].port=8443
|
||||
uci set mihomo.@sniff[-1].overwrite_destination=1
|
||||
}
|
||||
|
||||
uci show mihomo | grep -E 'mihomo.@host\[[[:digit:]]+\]=host' | sed 's/mihomo.@host\[\([[:digit:]]\+\)\]=host/set mihomo.@host[\1]=hosts/' | uci batch
|
||||
|
||||
# commit
|
||||
uci commit mihomo
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=xray-core
|
||||
PKG_VERSION:=24.12.18
|
||||
PKG_VERSION:=24.12.31
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=3d8b4a161a263e7af7bb1a2690961da075d13f980acd806f5cd4e5c8338d7534
|
||||
PKG_HASH:=e3c24b561ab422785ee8b7d4a15e44db159d9aa249eb29a36ad1519c15267be0
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=MPL-2.0
|
||||
|
||||
@@ -530,7 +530,7 @@ namespace ServiceLib.Common
|
||||
try
|
||||
{
|
||||
return blFull
|
||||
? $"{Global.AppName} - V{GetVersionInfo()} - {RuntimeInformation.ProcessArchitecture} - {StartupPath()}"
|
||||
? $"{Global.AppName} - V{GetVersionInfo()} - {RuntimeInformation.ProcessArchitecture}"
|
||||
: $"{Global.AppName}/{GetVersionInfo()}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -554,6 +554,11 @@ namespace ServiceLib.Common
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetRuntimeInfo()
|
||||
{
|
||||
return $"{Utils.GetVersion()} | {Utils.StartupPath()} | {Utils.GetExePath()} | {Environment.OSVersion} | {(Environment.Is64BitOperatingSystem ? 64 : 32)}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 取得GUID
|
||||
/// </summary>
|
||||
@@ -884,6 +889,7 @@ namespace ServiceLib.Common
|
||||
public static async Task<string?> SetLinuxChmod(string? fileName)
|
||||
{
|
||||
if (fileName.IsNullOrEmpty()) return null;
|
||||
if (fileName.Contains(' ')) fileName = fileName.AppendQuotes();
|
||||
//File.SetUnixFileMode(fileName, UnixFileMode.UserRead | UnixFileMode.UserWrite | UnixFileMode.UserExecute);
|
||||
var arg = new List<string>() { "-c", $"chmod +x {fileName}" };
|
||||
return await GetCliWrapOutput("/bin/bash", arg);
|
||||
@@ -903,6 +909,12 @@ namespace ServiceLib.Common
|
||||
: Environment.GetEnvironmentVariable("HOME");
|
||||
}
|
||||
|
||||
public static async Task<string?> GetListNetworkServices()
|
||||
{
|
||||
var arg = new List<string>() { "-c", $"networksetup -listallnetworkservices" };
|
||||
return await GetCliWrapOutput("/bin/bash", arg);
|
||||
}
|
||||
|
||||
#endregion Platform
|
||||
}
|
||||
}
|
||||
@@ -77,8 +77,7 @@
|
||||
|
||||
public bool InitComponents()
|
||||
{
|
||||
Logging.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");
|
||||
Logging.SaveLog($"{Environment.OSVersion} - {(Environment.Is64BitOperatingSystem ? 64 : 32)}");
|
||||
Logging.SaveLog($"v2rayN start up | {Utils.GetRuntimeInfo()}");
|
||||
Logging.LoggingEnabled(_config.GuiItem.EnableLog);
|
||||
Logging.ClearLogs();
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace ServiceLib.Handler
|
||||
}
|
||||
|
||||
ShowMsg(true, $"{node.GetSummary()}");
|
||||
ShowMsg(false, $"{Environment.OSVersion} - {(Environment.Is64BitOperatingSystem ? 64 : 32)}");
|
||||
ShowMsg(false, $"{Utils.GetRuntimeInfo()}");
|
||||
ShowMsg(false, string.Format(ResUI.StartService, DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")));
|
||||
await CoreStop();
|
||||
await Task.Delay(100);
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
{
|
||||
public class ProxySettingOSX
|
||||
{
|
||||
/*
|
||||
* 仅测试了,MacOS 13.7.1 x86 版本,其他版本有待确认
|
||||
*/
|
||||
|
||||
/// <summary>
|
||||
/// 应用接口类型
|
||||
/// </summary>
|
||||
@@ -18,13 +14,15 @@
|
||||
|
||||
public static async Task SetProxy(string host, int port, string exceptions)
|
||||
{
|
||||
var lstCmd = GetSetCmds(host, port, exceptions);
|
||||
var lstInterface = await GetListNetworkServices();
|
||||
var lstCmd = GetSetCmds(lstInterface, host, port, exceptions);
|
||||
await ExecCmd(lstCmd);
|
||||
}
|
||||
|
||||
public static async Task UnsetProxy()
|
||||
{
|
||||
var lstCmd = GetUnsetCmds();
|
||||
var lstInterface = await GetListNetworkServices();
|
||||
var lstCmd = GetUnsetCmds(lstInterface);
|
||||
await ExecCmd(lstCmd);
|
||||
}
|
||||
|
||||
@@ -42,10 +40,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
private static List<CmdItem> GetSetCmds(string host, int port, string exceptions)
|
||||
private static List<CmdItem> GetSetCmds(List<string> lstInterface, string host, int port, string exceptions)
|
||||
{
|
||||
List<CmdItem> lstCmd = [];
|
||||
foreach (var interf in LstInterface)
|
||||
foreach (var interf in lstInterface)
|
||||
{
|
||||
foreach (var type in LstTypes)
|
||||
{
|
||||
@@ -70,10 +68,10 @@
|
||||
return lstCmd;
|
||||
}
|
||||
|
||||
private static List<CmdItem> GetUnsetCmds()
|
||||
private static List<CmdItem> GetUnsetCmds(List<string> lstInterface)
|
||||
{
|
||||
List<CmdItem> lstCmd = [];
|
||||
foreach (var interf in LstInterface)
|
||||
foreach (var interf in lstInterface)
|
||||
{
|
||||
foreach (var type in LstTypes)
|
||||
{
|
||||
@@ -87,5 +85,16 @@
|
||||
|
||||
return lstCmd;
|
||||
}
|
||||
|
||||
public static async Task<List<string>> GetListNetworkServices()
|
||||
{
|
||||
var services = await Utils.GetListNetworkServices();
|
||||
if (services.IsNullOrEmpty())
|
||||
{
|
||||
return LstInterface;
|
||||
}
|
||||
var lst = services.Split(Environment.NewLine);
|
||||
return lst.Length > 0 ? LstInterface.Intersect(lst).ToList() : LstInterface;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>7.5.0</Version>
|
||||
<Version>7.5.1</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -12,8 +12,8 @@ android {
|
||||
applicationId = "com.v2ray.ang"
|
||||
minSdk = 21
|
||||
targetSdk = 35
|
||||
versionCode = 624
|
||||
versionName = "1.9.28"
|
||||
versionCode = 625
|
||||
versionName = "1.9.29"
|
||||
multiDexEnabled = true
|
||||
|
||||
val abiFilterList = (properties["ABI_FILTERS"] as? String)?.split(';')
|
||||
|
||||
@@ -99,10 +99,5 @@
|
||||
"domain": [
|
||||
"geosite:cn"
|
||||
]
|
||||
},
|
||||
{
|
||||
"remarks": "最终代理",
|
||||
"port": "0-65535",
|
||||
"outboundTag": "proxy"
|
||||
}
|
||||
]
|
||||
@@ -40,10 +40,5 @@
|
||||
"ip": [
|
||||
"geoip:ir"
|
||||
]
|
||||
},
|
||||
{
|
||||
"remarks": "Final Agent",
|
||||
"port": "0-65535",
|
||||
"outboundTag": "proxy"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -25,6 +25,7 @@ object AppConfig {
|
||||
const val PREF_APPEND_HTTP_PROXY = "pref_append_http_proxy"
|
||||
const val PREF_LOCAL_DNS_PORT = "pref_local_dns_port"
|
||||
const val PREF_VPN_DNS = "pref_vpn_dns"
|
||||
const val PREF_VPN_BYPASS_LAN = "pref_vpn_bypass_lan"
|
||||
const val PREF_ROUTING_DOMAIN_STRATEGY = "pref_routing_domain_strategy"
|
||||
const val PREF_ROUTING_RULESET = "pref_routing_ruleset"
|
||||
const val PREF_MUX_ENABLED = "pref_mux_enabled"
|
||||
|
||||
@@ -117,6 +117,14 @@ object SettingsManager {
|
||||
}
|
||||
|
||||
fun routingRulesetsBypassLan(): Boolean {
|
||||
val vpnBypassLan = MmkvManager.decodeSettingsString(AppConfig.PREF_VPN_BYPASS_LAN) ?: "0"
|
||||
if (vpnBypassLan == "1") {
|
||||
return true
|
||||
} else if (vpnBypassLan == "2") {
|
||||
return false
|
||||
}
|
||||
|
||||
//Follow config
|
||||
val guid = MmkvManager.getSelectServer() ?: return false
|
||||
val config = MmkvManager.decodeServerConfig(guid) ?: return false
|
||||
if (config.configType == EConfigType.CUSTOM) {
|
||||
|
||||
@@ -43,6 +43,7 @@ class SettingsActivity : BaseActivity() {
|
||||
private val appendHttpProxy by lazy { findPreference<CheckBoxPreference>(AppConfig.PREF_APPEND_HTTP_PROXY) }
|
||||
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 vpnBypassLan by lazy { findPreference<ListPreference>(AppConfig.PREF_VPN_BYPASS_LAN) }
|
||||
|
||||
private val mux by lazy { findPreference<CheckBoxPreference>(AppConfig.PREF_MUX_ENABLED) }
|
||||
private val muxConcurrency by lazy { findPreference<EditTextPreference>(AppConfig.PREF_MUX_CONCURRENCY) }
|
||||
@@ -246,6 +247,7 @@ class SettingsActivity : BaseActivity() {
|
||||
}
|
||||
|
||||
listOf(
|
||||
AppConfig.PREF_VPN_BYPASS_LAN,
|
||||
AppConfig.PREF_ROUTING_DOMAIN_STRATEGY,
|
||||
AppConfig.PREF_MUX_XUDP_QUIC,
|
||||
AppConfig.PREF_FRAGMENT_PACKETS,
|
||||
@@ -269,6 +271,8 @@ class SettingsActivity : BaseActivity() {
|
||||
appendHttpProxy?.isEnabled = vpn
|
||||
localDnsPort?.isEnabled = vpn
|
||||
vpnDns?.isEnabled = vpn
|
||||
vpnBypassLan?.isEnabled = vpn
|
||||
vpn
|
||||
if (vpn) {
|
||||
updateLocalDns(
|
||||
MmkvManager.decodeSettingsBool(
|
||||
|
||||
@@ -29,6 +29,7 @@ class SettingsViewModel(application: Application) : AndroidViewModel(application
|
||||
when (key) {
|
||||
AppConfig.PREF_MODE,
|
||||
AppConfig.PREF_VPN_DNS,
|
||||
AppConfig.PREF_VPN_BYPASS_LAN,
|
||||
AppConfig.PREF_REMOTE_DNS,
|
||||
AppConfig.PREF_DOMESTIC_DNS,
|
||||
AppConfig.PREF_DNS_HOSTS,
|
||||
|
||||
@@ -176,6 +176,7 @@
|
||||
<string name="summary_pref_remote_dns">DNS</string>
|
||||
|
||||
<string name="title_pref_vpn_dns">VPN DNS (IPv4/v6 فقط)</string>
|
||||
<string name="title_pref_vpn_bypass_lan">Does VPN bypass LAN</string>
|
||||
|
||||
<string name="title_pref_domestic_dns">DNS المحلي (اختياري)</string>
|
||||
<string name="summary_pref_domestic_dns">DNS</string>
|
||||
@@ -323,4 +324,10 @@
|
||||
<item>داكن</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="vpn_bypass_lan">
|
||||
<item>Follow config</item>
|
||||
<item>Bypass</item>
|
||||
<item>Not Bypass</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -176,6 +176,7 @@
|
||||
<string name="summary_pref_remote_dns">DNS</string>
|
||||
|
||||
<string name="title_pref_vpn_dns">VPN DNS (শুধুমাত্র IPv4/v6)</string>
|
||||
<string name="title_pref_vpn_bypass_lan">Does VPN bypass LAN</string>
|
||||
|
||||
<string name="title_pref_domestic_dns">ঘরোয়া DNS (ঐচ্ছিক)</string>
|
||||
<string name="summary_pref_domestic_dns">DNS</string>
|
||||
@@ -327,5 +328,10 @@
|
||||
<item>ইরান হোয়াইটলিস্ট</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="vpn_bypass_lan">
|
||||
<item>Follow config</item>
|
||||
<item>Bypass</item>
|
||||
<item>Not Bypass</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
@@ -176,6 +176,7 @@
|
||||
<string name="summary_pref_remote_dns">DNS</string>
|
||||
|
||||
<string name="title_pref_vpn_dns">VPN DNS (تینا IPv4/v6)</string>
|
||||
<string name="title_pref_vpn_bypass_lan">Does VPN bypass LAN</string>
|
||||
|
||||
<string name="title_pref_domestic_dns">DNS منی (اختیاری)</string>
|
||||
<string name="summary_pref_domestic_dns">DNS</string>
|
||||
@@ -338,4 +339,10 @@
|
||||
<item>نومگه اسبؽڌ ایران</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="vpn_bypass_lan">
|
||||
<item>Follow config</item>
|
||||
<item>Bypass</item>
|
||||
<item>Not Bypass</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -174,6 +174,7 @@
|
||||
<string name="summary_pref_remote_dns">DNS</string>
|
||||
|
||||
<string name="title_pref_vpn_dns">VPN DNS (فقط IPv4/v6)</string>
|
||||
<string name="title_pref_vpn_bypass_lan">Does VPN bypass LAN</string>
|
||||
|
||||
<string name="title_pref_domestic_dns">DNS داخلی (اختیاری)</string>
|
||||
<string name="summary_pref_domestic_dns">DNS</string>
|
||||
@@ -336,4 +337,10 @@
|
||||
<item>ایران</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="vpn_bypass_lan">
|
||||
<item>Follow config</item>
|
||||
<item>Bypass</item>
|
||||
<item>Not Bypass</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
<string name="summary_pref_remote_dns">DNS</string>
|
||||
|
||||
<string name="title_pref_vpn_dns">VPN DNS (только IPv4/v6)</string>
|
||||
<string name="title_pref_vpn_bypass_lan">Does VPN bypass LAN</string>
|
||||
|
||||
<string name="title_pref_domestic_dns">Внутренняя DNS (необязательно)</string>
|
||||
<string name="summary_pref_domestic_dns">DNS</string>
|
||||
@@ -337,4 +338,10 @@
|
||||
<item>Белый список Ирана</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="vpn_bypass_lan">
|
||||
<item>Follow config</item>
|
||||
<item>Bypass</item>
|
||||
<item>Not Bypass</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
<string name="summary_pref_remote_dns">DNS</string>
|
||||
|
||||
<string name="title_pref_vpn_dns">VPN DNS (Chỉ IPv4 / IPv6)</string>
|
||||
<string name="title_pref_vpn_bypass_lan">Does VPN bypass LAN</string>
|
||||
|
||||
<string name="title_pref_domestic_dns">DNS nội địa (Không bắt buộc)</string>
|
||||
<string name="summary_pref_domestic_dns">DNS</string>
|
||||
@@ -324,4 +325,10 @@
|
||||
<string name="title_pref_fragment_interval">Fragment Interval (min-max)</string>
|
||||
<string name="title_pref_fragment_enabled">Enable Fragment</string>
|
||||
|
||||
<string-array name="vpn_bypass_lan">
|
||||
<item>Follow config</item>
|
||||
<item>Bypass</item>
|
||||
<item>Not Bypass</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -172,6 +172,7 @@
|
||||
<string name="summary_pref_remote_dns">DNS</string>
|
||||
|
||||
<string name="title_pref_vpn_dns">VPN DNS (仅支持 IPv4/v6)</string>
|
||||
<string name="title_pref_vpn_bypass_lan">VPN是否绕过局域网</string>
|
||||
|
||||
<string name="title_pref_domestic_dns">境内DNS (可选)</string>
|
||||
<string name="summary_pref_domestic_dns">DNS</string>
|
||||
@@ -328,4 +329,10 @@
|
||||
<item>伊朗(Iran)</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="vpn_bypass_lan">
|
||||
<item>跟随配置文件</item>
|
||||
<item>绕过</item>
|
||||
<item>不绕过</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -174,6 +174,7 @@
|
||||
<string name="summary_pref_remote_dns">DNS</string>
|
||||
|
||||
<string name="title_pref_vpn_dns">VPN DNS (僅支援 IPv4/v6)</string>
|
||||
<string name="title_pref_vpn_bypass_lan">VPN是否繞過區域網</string>
|
||||
|
||||
<string name="title_pref_dns_hosts">DNS hosts (格式: 網域:位址,…)</string>
|
||||
<string name="summary_pref_dns_hosts">domain:address,…</string>
|
||||
@@ -327,4 +328,10 @@
|
||||
<item>伊朗(Iran)</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="vpn_bypass_lan">
|
||||
<item>跟隨設定檔</item>
|
||||
<item>繞過</item>
|
||||
<item>不繞過</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -211,4 +211,11 @@
|
||||
<item>stream-up</item>
|
||||
<item>stream-one</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="vpn_bypass_lan_value" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
@@ -178,6 +178,7 @@
|
||||
<string name="summary_pref_remote_dns">DNS</string>
|
||||
|
||||
<string name="title_pref_vpn_dns">VPN DNS (only IPv4/v6)</string>
|
||||
<string name="title_pref_vpn_bypass_lan">Does VPN bypass LAN</string>
|
||||
|
||||
<string name="title_pref_domestic_dns">Domestic DNS (Optional)</string>
|
||||
<string name="summary_pref_domestic_dns">DNS</string>
|
||||
@@ -340,4 +341,10 @@
|
||||
<item>Iran Whitelist</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="vpn_bypass_lan">
|
||||
<item>Follow config</item>
|
||||
<item>Bypass</item>
|
||||
<item>Not Bypass</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -49,6 +49,14 @@
|
||||
android:key="pref_vpn_dns"
|
||||
android:summary="@string/summary_pref_remote_dns"
|
||||
android:title="@string/title_pref_vpn_dns" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/vpn_bypass_lan"
|
||||
android:entryValues="@array/vpn_bypass_lan_value"
|
||||
android:key="pref_vpn_bypass_lan"
|
||||
android:summary="%s"
|
||||
android:title="@string/title_pref_vpn_bypass_lan" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/title_ui_settings">
|
||||
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
name: Build and Release for Windows 7
|
||||
|
||||
# NOTE: This Github Actions file depends on the Makefile.
|
||||
# Building the correct package requires the correct binaries generated by the Makefile. To
|
||||
# ensure the correct output, the Makefile must accept the appropriate input and compile the
|
||||
# correct file with the correct name. If you need to modify this file, please ensure it won't
|
||||
# disrupt the Makefile.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Restore Cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: resources
|
||||
key: xray-geodat-
|
||||
|
||||
- name: Update Geodat
|
||||
id: update
|
||||
uses: nick-fields/retry@v3
|
||||
with:
|
||||
timeout_minutes: 60
|
||||
retry_wait_seconds: 60
|
||||
max_attempts: 60
|
||||
command: |
|
||||
[ -d 'resources' ] || mkdir resources
|
||||
LIST=('geoip geoip geoip' 'domain-list-community dlc geosite')
|
||||
for i in "${LIST[@]}"
|
||||
do
|
||||
INFO=($(echo $i | awk 'BEGIN{FS=" ";OFS=" "} {print $1,$2,$3}'))
|
||||
FILE_NAME="${INFO[2]}.dat"
|
||||
echo -e "Verifying HASH key..."
|
||||
HASH="$(curl -sL "https://raw.githubusercontent.com/v2fly/${INFO[0]}/release/${INFO[1]}.dat.sha256sum" | awk -F ' ' '{print $1}')"
|
||||
if [ -s "./resources/${FILE_NAME}" ] && [ "$(sha256sum "./resources/${FILE_NAME}" | awk -F ' ' '{print $1}')" == "${HASH}" ]; then
|
||||
continue
|
||||
else
|
||||
echo -e "Downloading https://raw.githubusercontent.com/v2fly/${INFO[0]}/release/${INFO[1]}.dat..."
|
||||
curl -L "https://raw.githubusercontent.com/v2fly/${INFO[0]}/release/${INFO[1]}.dat" -o ./resources/${FILE_NAME}
|
||||
echo -e "Verifying HASH key..."
|
||||
[ "$(sha256sum "./resources/${FILE_NAME}" | awk -F ' ' '{print $1}')" == "${HASH}" ] || { echo -e "The HASH key of ${FILE_NAME} does not match cloud one."; exit 1; }
|
||||
echo "unhit=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Save Cache
|
||||
uses: actions/cache/save@v4
|
||||
if: ${{ steps.update.outputs.unhit }}
|
||||
with:
|
||||
path: resources
|
||||
key: xray-geodat-${{ github.sha }}-${{ github.run_number }}
|
||||
|
||||
build:
|
||||
needs: prepare
|
||||
permissions:
|
||||
contents: write
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
# BEGIN Windows 7
|
||||
- goos: windows
|
||||
goarch: amd64
|
||||
assetname: win7-64
|
||||
- goos: windows
|
||||
goarch: 386
|
||||
assetname: win7-32
|
||||
# END Windows 7
|
||||
fail-fast: false
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GOOS: ${{ matrix.goos}}
|
||||
GOARCH: ${{ matrix.goarch }}
|
||||
CGO_ENABLED: 0
|
||||
steps:
|
||||
- name: Show workflow information
|
||||
run: |
|
||||
_NAME=${{ matrix.assetname }}
|
||||
echo "GOOS: ${{ matrix.goos }}, GOARCH: ${{ matrix.goarch }}, RELEASE_NAME: $_NAME"
|
||||
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: stable
|
||||
check-latest: true
|
||||
|
||||
- name: Setup patched builder
|
||||
run: |
|
||||
GOSDK=$(go env GOROOT)
|
||||
curl -O -L https://github.com/XTLS/go-win7/releases/latest/download/go-for-win7-linux-amd64.zip
|
||||
rm -r $GOSDK/*
|
||||
unzip ./go-for-win7-linux-amd64.zip -d $GOSDK
|
||||
|
||||
- name: Checkout codebase
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get project dependencies
|
||||
run: go mod download
|
||||
|
||||
- name: Build Xray
|
||||
run: |
|
||||
mkdir -p build_assets
|
||||
make
|
||||
find . -maxdepth 1 -type f -regex './\(wxray\|xray\).exe' -exec mv {} ./build_assets/ \;
|
||||
|
||||
- name: Restore Cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: resources
|
||||
key: xray-geodat-
|
||||
|
||||
- name: Copy README.md & LICENSE
|
||||
run: |
|
||||
mv -f resources/* build_assets
|
||||
cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
|
||||
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE
|
||||
|
||||
- name: Create ZIP archive
|
||||
if: github.event_name == 'release'
|
||||
shell: bash
|
||||
run: |
|
||||
pushd build_assets || exit 1
|
||||
touch -mt $(date +%Y01010000) *
|
||||
zip -9vr ../Xray-${{ env.ASSET_NAME }}.zip .
|
||||
popd || exit 1
|
||||
FILE=./Xray-${{ env.ASSET_NAME }}.zip
|
||||
DGST=$FILE.dgst
|
||||
for METHOD in {"md5","sha1","sha256","sha512"}
|
||||
do
|
||||
openssl dgst -$METHOD $FILE | sed 's/([^)]*)//g' >>$DGST
|
||||
done
|
||||
|
||||
- name: Change the name
|
||||
run: |
|
||||
mv build_assets Xray-${{ env.ASSET_NAME }}
|
||||
|
||||
- name: Upload files to Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Xray-${{ env.ASSET_NAME }}
|
||||
path: |
|
||||
./Xray-${{ env.ASSET_NAME }}/*
|
||||
|
||||
- name: Upload binaries to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
if: github.event_name == 'release'
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ./Xray-${{ env.ASSET_NAME }}.zip*
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
+2
-25
@@ -11,20 +11,9 @@ on:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "**/*.go"
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
- ".github/workflows/release.yml"
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- "**/*.go"
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
- ".github/workflows/release.yml"
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -78,9 +67,7 @@ jobs:
|
||||
# Include amd64 on all platforms.
|
||||
goos: [windows, freebsd, openbsd, linux, darwin]
|
||||
goarch: [amd64, 386]
|
||||
gotoolchain: [""]
|
||||
patch-assetname: [""]
|
||||
|
||||
exclude:
|
||||
# Exclude i386 on darwin
|
||||
- goarch: 386
|
||||
@@ -155,16 +142,6 @@ jobs:
|
||||
goarch: arm
|
||||
goarm: 7
|
||||
# END OPENBSD ARM
|
||||
# BEGIN Windows 7
|
||||
- goos: windows
|
||||
goarch: amd64
|
||||
gotoolchain: 1.21.4
|
||||
patch-assetname: win7-64
|
||||
- goos: windows
|
||||
goarch: 386
|
||||
gotoolchain: 1.21.4
|
||||
patch-assetname: win7-32
|
||||
# END Windows 7
|
||||
fail-fast: false
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
@@ -187,7 +164,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.gotoolchain || '1.23' }}
|
||||
go-version-file: go.mod
|
||||
check-latest: true
|
||||
|
||||
- name: Get project dependencies
|
||||
|
||||
Vendored
+1
-13
@@ -2,20 +2,8 @@ name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "**/*.go"
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
- ".github/workflows/*.yml"
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- "**/*.go"
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
- ".github/workflows/*.yml"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -32,7 +20,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23'
|
||||
go-version-file: go.mod
|
||||
check-latest: true
|
||||
- name: Restore Cache
|
||||
uses: actions/cache/restore@v4
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
cnet "github.com/xtls/xray-core/common/net"
|
||||
@@ -31,9 +32,6 @@ func JSONMarshalWithoutEscape(t interface{}) ([]byte, error) {
|
||||
}
|
||||
|
||||
func marshalTypedMessage(v *cserial.TypedMessage, ignoreNullValue bool, insertTypeInfo bool) interface{} {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
tmsg, err := v.GetInstance()
|
||||
if err != nil {
|
||||
return nil
|
||||
@@ -194,9 +192,8 @@ func marshalKnownType(v interface{}, ignoreNullValue bool, insertTypeInfo bool)
|
||||
}
|
||||
}
|
||||
|
||||
func isValueKind(kind reflect.Kind) bool {
|
||||
switch kind {
|
||||
case reflect.Bool,
|
||||
var valueKinds = []reflect.Kind{
|
||||
reflect.Bool,
|
||||
reflect.Int,
|
||||
reflect.Int8,
|
||||
reflect.Int16,
|
||||
@@ -212,11 +209,11 @@ func isValueKind(kind reflect.Kind) bool {
|
||||
reflect.Float64,
|
||||
reflect.Complex64,
|
||||
reflect.Complex128,
|
||||
reflect.String:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
reflect.String,
|
||||
}
|
||||
|
||||
func isValueKind(kind reflect.Kind) bool {
|
||||
return slices.Contains(valueKinds, kind)
|
||||
}
|
||||
|
||||
func marshalInterface(v interface{}, ignoreNullValue bool, insertTypeInfo bool) interface{} {
|
||||
|
||||
@@ -2,6 +2,7 @@ package core
|
||||
|
||||
import (
|
||||
"io"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
@@ -64,14 +65,11 @@ func GetMergedConfig(args cmdarg.Arg) (string, error) {
|
||||
supported := []string{"json", "yaml", "toml"}
|
||||
for _, file := range args {
|
||||
format := getFormat(file)
|
||||
for _, s := range supported {
|
||||
if s == format {
|
||||
if slices.Contains(supported, format) {
|
||||
files = append(files, &ConfigSource{
|
||||
Name: file,
|
||||
Format: format,
|
||||
})
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return ConfigMergedFormFiles(files)
|
||||
|
||||
@@ -17,9 +17,9 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
Version_x byte = 24
|
||||
Version_y byte = 12
|
||||
Version_z byte = 31
|
||||
Version_x byte = 25
|
||||
Version_y byte = 1
|
||||
Version_z byte = 1
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
module github.com/xtls/xray-core
|
||||
|
||||
go 1.21.4
|
||||
go 1.23
|
||||
|
||||
require (
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0
|
||||
github.com/cloudflare/circl v1.4.0
|
||||
github.com/cloudflare/circl v1.5.0
|
||||
github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344
|
||||
github.com/golang/mock v1.7.0-rc.1
|
||||
github.com/google/go-cmp v0.6.0
|
||||
@@ -19,7 +19,7 @@ require (
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e
|
||||
github.com/vishvananda/netlink v1.3.0
|
||||
github.com/xtls/quic-go v0.0.0-20241220091641-6f5777d1c087
|
||||
github.com/xtls/quic-go v0.48.2
|
||||
github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d
|
||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
|
||||
golang.org/x/crypto v0.31.0
|
||||
@@ -27,7 +27,7 @@ require (
|
||||
golang.org/x/sync v0.10.0
|
||||
golang.org/x/sys v0.28.0
|
||||
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
|
||||
google.golang.org/grpc v1.67.1
|
||||
google.golang.org/grpc v1.69.2
|
||||
google.golang.org/protobuf v1.36.1
|
||||
gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489
|
||||
h12.io/socks v1.0.3
|
||||
@@ -45,7 +45,7 @@ require (
|
||||
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
|
||||
github.com/onsi/ginkgo/v2 v2.19.0 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/quic-go/qpack v0.4.0 // indirect
|
||||
github.com/quic-go/qpack v0.5.1 // indirect
|
||||
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect
|
||||
github.com/vishvananda/netns v0.0.4 // indirect
|
||||
go.uber.org/mock v0.4.0 // indirect
|
||||
@@ -55,7 +55,7 @@ require (
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
golang.org/x/tools v0.22.0 // indirect
|
||||
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
+28
-12
@@ -2,8 +2,8 @@ github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0 h1:Wo41lDOevRJS
|
||||
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/cloudflare/circl v1.4.0 h1:BV7h5MgrktNzytKmWjpOtdYrf0lkkbF8YMlBGPhJQrY=
|
||||
github.com/cloudflare/circl v1.4.0/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU=
|
||||
github.com/cloudflare/circl v1.5.0 h1:hxIWksrX6XN5a1L2TI/h53AGPhNHoUBo+TD1ms9+pys=
|
||||
github.com/cloudflare/circl v1.5.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@@ -12,18 +12,24 @@ github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 h1:y7y0Oa6UawqTFP
|
||||
github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw=
|
||||
github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344 h1:Arcl6UOIS/kgO2nW3A65HN+7CMjSDP/gofXL4CZt1V4=
|
||||
github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I=
|
||||
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
||||
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
||||
github.com/golang/mock v1.7.0-rc.1 h1:YojYx61/OLFsiv6Rw1Z96LpldJIy31o+UHmwAUMJ6/U=
|
||||
github.com/golang/mock v1.7.0-rc.1/go.mod h1:s42URUywIqd+OcERslBJvOjepvNymP31m3q8d/GkuRs=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
|
||||
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/pprof v0.0.0-20240528025155-186aa0362fba h1:ql1qNgCyOB7iAEk8JTNM+zJrgIbnyCKX/wdlyPufP5g=
|
||||
github.com/google/pprof v0.0.0-20240528025155-186aa0362fba/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/h12w/go-socks5 v0.0.0-20200522160539-76189e178364 h1:5XxdakFhqd9dnXoAZy1Mb2R/DZ6D1e+0bGC/JhucGYI=
|
||||
@@ -46,8 +52,8 @@ github.com/pires/go-proxyproto v0.8.0 h1:5unRmEAPbHXHuLjDg01CxJWf91cw3lKHc/0xzKp
|
||||
github.com/pires/go-proxyproto v0.8.0/go.mod h1:iknsfgnH8EkjrMeMyvfKByp9TiBZCKZM0jx2xmKqnVY=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
|
||||
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
|
||||
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
|
||||
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
|
||||
github.com/refraction-networking/utls v1.6.7 h1:zVJ7sP1dJx/WtVuITug3qYUq034cDq9B2MR1K67ULZM=
|
||||
github.com/refraction-networking/utls v1.6.7/go.mod h1:BC3O4vQzye5hqpmDTWUqi4P5DDhzJfkV1tdqtawQIH0=
|
||||
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg=
|
||||
@@ -68,11 +74,21 @@ github.com/vishvananda/netlink v1.3.0 h1:X7l42GfcV4S6E4vHTsw48qbrV+9PVojNfIhZcwQ
|
||||
github.com/vishvananda/netlink v1.3.0/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs=
|
||||
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
|
||||
github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
|
||||
github.com/xtls/quic-go v0.0.0-20241220091641-6f5777d1c087 h1:kKPg/cJPSKnE50VXVBskDYYSBkl4X3sMCIbTy+XKNGk=
|
||||
github.com/xtls/quic-go v0.0.0-20241220091641-6f5777d1c087/go.mod h1:mN9lAuc8Vt7eHvnQkDIH5+uHh+DcLmTBma9rLqk/rPY=
|
||||
github.com/xtls/quic-go v0.48.2 h1:59Gs+E9qtc9s0uniXYDA649gNEZlMWcNpFLyp9jfkuE=
|
||||
github.com/xtls/quic-go v0.48.2/go.mod h1:rcyY5J0JT+1d5pa5Y+FbCsXM7Zu79jE87ZSFOBfiH7Q=
|
||||
github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d h1:+B97uD9uHLgAAulhigmys4BVwZZypzK7gPN3WtpgRJg=
|
||||
github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d/go.mod h1:dm4y/1QwzjGaK17ofi0Vs6NpKAHegZky8qk6J2JJZAE=
|
||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY=
|
||||
go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE=
|
||||
go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE=
|
||||
go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY=
|
||||
go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk=
|
||||
go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8=
|
||||
go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys=
|
||||
go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A=
|
||||
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
|
||||
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
|
||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBseWJUpBw5I82+2U4M=
|
||||
@@ -125,10 +141,10 @@ golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 h1:B82qJJgjvYKsXS9jeu
|
||||
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI=
|
||||
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 h1:/jFs0duh4rdb8uIfPMv78iAJGcPKDeqAFnaLBropIC4=
|
||||
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173/go.mod h1:tkCQ4FQXmpAgYVh++1cq16/dH4QJtmvpRv19DWGAHSA=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
|
||||
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
|
||||
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
|
||||
google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU=
|
||||
google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
|
||||
google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk=
|
||||
google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
|
||||
@@ -2,6 +2,7 @@ package conf
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
@@ -258,6 +259,18 @@ type Int32Range struct {
|
||||
To int32
|
||||
}
|
||||
|
||||
func (v Int32Range) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.String())
|
||||
}
|
||||
|
||||
func (v Int32Range) String() string {
|
||||
if v.Left == v.Right {
|
||||
return strconv.Itoa(int(v.Left))
|
||||
} else {
|
||||
return fmt.Sprintf("%d-%d", v.Left, v.Right)
|
||||
}
|
||||
}
|
||||
|
||||
func (v *Int32Range) UnmarshalJSON(data []byte) error {
|
||||
defer v.ensureOrder()
|
||||
var str string
|
||||
|
||||
@@ -161,9 +161,6 @@ func ParseNoise(noise *Noise) (*freedom.Noise, error) {
|
||||
}
|
||||
NConfig.LengthMin = uint64(min)
|
||||
NConfig.LengthMax = uint64(max)
|
||||
if NConfig.LengthMin > NConfig.LengthMax {
|
||||
NConfig.LengthMin, NConfig.LengthMax = NConfig.LengthMax, NConfig.LengthMin
|
||||
}
|
||||
if NConfig.LengthMin == 0 {
|
||||
return nil, errors.New("rand lengthMin or lengthMax cannot be 0")
|
||||
}
|
||||
@@ -180,23 +177,12 @@ func ParseNoise(noise *Noise) (*freedom.Noise, error) {
|
||||
}
|
||||
|
||||
default:
|
||||
return nil, errors.New("Invalid packet,only rand,str,base64 are supported")
|
||||
return nil, errors.New("Invalid packet, only rand/str/base64 are supported")
|
||||
}
|
||||
|
||||
if noise.Delay != nil {
|
||||
if noise.Delay.From != 0 && noise.Delay.To != 0 {
|
||||
NConfig.DelayMin = uint64(noise.Delay.From)
|
||||
NConfig.DelayMax = uint64(noise.Delay.To)
|
||||
if NConfig.DelayMin > NConfig.LengthMax {
|
||||
NConfig.DelayMin, NConfig.DelayMax = NConfig.LengthMax, NConfig.DelayMin
|
||||
}
|
||||
} else {
|
||||
return nil, errors.New("DelayMin or DelayMax cannot be zero")
|
||||
}
|
||||
|
||||
} else {
|
||||
NConfig.DelayMin = 0
|
||||
NConfig.DelayMax = 0
|
||||
}
|
||||
return NConfig, nil
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ func (w *NoisePacketWriter) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
||||
}
|
||||
w.Writer.WriteMultiBuffer(buf.MultiBuffer{buf.FromBytes(noise)})
|
||||
|
||||
if n.DelayMin != 0 {
|
||||
if n.DelayMin != 0 || n.DelayMax != 0 {
|
||||
time.Sleep(time.Duration(randBetween(int64(n.DelayMin), int64(n.DelayMax))) * time.Millisecond)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user