From 9c05e8d94e6fc5f26641d6a56171462b8353758d Mon Sep 17 00:00:00 2001 From: mmmray <142015632+mmmray@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:01:42 +0200 Subject: [PATCH 1/5] Add i18n fallback and outdated warning (#530) --- docs/.vuepress/config.ts | 15 ++++++++++++ package.json | 1 + pnpm-lock.yaml | 51 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 26411d9..b1fb755 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -10,6 +10,7 @@ import process from 'node:process' // import { getDirname, path } from '@vuepress/utils' import { getDirname, path } from 'vuepress/utils' import { MermaidPlugin } from './plugins/mermaid/node/mermaid' +import i18nPlugin from "vuepress-plugin-i18n"; const __dirname = getDirname(import.meta.url) console.log('>>> __dirname -> ', __dirname) @@ -25,6 +26,20 @@ console.log( export default defineUserConfig({ plugins: [ + i18nPlugin({ + updatedTime: "git", + locales: { + en: { + lang: "en-US", + untranslated: { + title: "Untranslated" + }, + outdated: { + title: "Outdated" + } + } + } + }), searchPlugin({ locales: { "/": { diff --git a/package.json b/package.json index de38afc..187f8fd 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@vuepress/bundler-webpack": "2.0.0-rc.2", "@vuepress/plugin-back-to-top": "^2.0.0-rc.3", "@vuepress/plugin-search": "2.0.0-rc.3", + "vuepress-plugin-i18n": "https://github.com/XTLS/vuepress-plugin-i18n#8bee51f", "postcss-loader": "^8.0.0", "prettier": "^3.3.2", "sass": "^1.51.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c693b2a..c8e86f6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -90,6 +90,9 @@ importers: vuepress: specifier: 2.0.0-rc.2 version: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2)) + vuepress-plugin-i18n: + specifier: https://github.com/XTLS/vuepress-plugin-i18n#8bee51f + version: https://codeload.github.com/XTLS/vuepress-plugin-i18n/tar.gz/8bee51f(typescript@5.5.2)(vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2))) packages: @@ -3053,6 +3056,9 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} + striptags@3.2.0: + resolution: {integrity: sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw==} + style-loader@3.3.4: resolution: {integrity: sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w==} engines: {node: '>= 12.13.0'} @@ -3305,6 +3311,18 @@ packages: typescript: optional: true + vuepress-plugin-i18n@https://codeload.github.com/XTLS/vuepress-plugin-i18n/tar.gz/8bee51f: + resolution: {tarball: https://codeload.github.com/XTLS/vuepress-plugin-i18n/tar.gz/8bee51f} + version: 0.8.4 + peerDependencies: + vuepress: 2.0.0-rc.2 + + vuepress-shared@2.0.0-rc.15: + resolution: {integrity: sha512-PzuXgAlzTrD6b6pCaeSb65CD5ponpD86IF+xaCxWrQDAQWk4zSY2brPk6seS10i2teZFNqVeyY8ERoC27HOzcg==} + engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} + peerDependencies: + vuepress: 2.0.0-rc.2 + vuepress@2.0.0-rc.2: resolution: {integrity: sha512-OEHfXx4Q3IzkXqcY9bKZqHXYAnSR82AGrmWYX5R1I3+ntzjaAbUhUKbG/jjMzLg40XqAHS++pM/zzMBNrcY3rg==} engines: {node: '>=18.16.0'} @@ -6790,6 +6808,8 @@ snapshots: strip-final-newline@3.0.0: {} + striptags@3.2.0: {} + style-loader@3.3.4(webpack@5.91.0(esbuild@0.22.0)): dependencies: webpack: 5.91.0(esbuild@0.22.0) @@ -6990,6 +7010,37 @@ snapshots: optionalDependencies: typescript: 5.5.2 + vuepress-plugin-i18n@https://codeload.github.com/XTLS/vuepress-plugin-i18n/tar.gz/8bee51f(typescript@5.5.2)(vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2))): + dependencies: + '@vuepress/client': 2.0.0-rc.2(typescript@5.5.2) + '@vuepress/core': 2.0.0-rc.2(typescript@5.5.2) + '@vuepress/utils': 2.0.0-rc.2 + chokidar: 3.6.0 + vue: 3.3.13(typescript@5.5.2) + vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2)) + vuepress-shared: 2.0.0-rc.15(typescript@5.5.2)(vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2))) + transitivePeerDependencies: + - '@vue/composition-api' + - supports-color + - typescript + + vuepress-shared@2.0.0-rc.15(typescript@5.5.2)(vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2))): + dependencies: + '@vueuse/core': 10.11.0(vue@3.4.27(typescript@5.5.2)) + cheerio: 1.0.0-rc.12 + dayjs: 1.11.11 + execa: 8.0.1 + fflate: 0.8.2 + gray-matter: 4.0.3 + semver: 7.6.2 + striptags: 3.2.0 + vue: 3.4.27(typescript@5.5.2) + vue-router: 4.3.2(vue@3.4.27(typescript@5.5.2)) + vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2)) + transitivePeerDependencies: + - '@vue/composition-api' + - typescript + vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2)): dependencies: '@vuepress/cli': 2.0.0-rc.2(typescript@5.5.2) From 1db2e5799032bc1d6db88d04b136b52b677d342f Mon Sep 17 00:00:00 2001 From: mmmray <142015632+mmmray@users.noreply.github.com> Date: Tue, 16 Jul 2024 04:07:36 -0500 Subject: [PATCH 2/5] Revert "Add i18n fallback and outdated warning (#530)" This reverts commit 9c05e8d94e6fc5f26641d6a56171462b8353758d. --- docs/.vuepress/config.ts | 15 ------------ package.json | 1 - pnpm-lock.yaml | 51 ---------------------------------------- 3 files changed, 67 deletions(-) diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index b1fb755..26411d9 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -10,7 +10,6 @@ import process from 'node:process' // import { getDirname, path } from '@vuepress/utils' import { getDirname, path } from 'vuepress/utils' import { MermaidPlugin } from './plugins/mermaid/node/mermaid' -import i18nPlugin from "vuepress-plugin-i18n"; const __dirname = getDirname(import.meta.url) console.log('>>> __dirname -> ', __dirname) @@ -26,20 +25,6 @@ console.log( export default defineUserConfig({ plugins: [ - i18nPlugin({ - updatedTime: "git", - locales: { - en: { - lang: "en-US", - untranslated: { - title: "Untranslated" - }, - outdated: { - title: "Outdated" - } - } - } - }), searchPlugin({ locales: { "/": { diff --git a/package.json b/package.json index 187f8fd..de38afc 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "@vuepress/bundler-webpack": "2.0.0-rc.2", "@vuepress/plugin-back-to-top": "^2.0.0-rc.3", "@vuepress/plugin-search": "2.0.0-rc.3", - "vuepress-plugin-i18n": "https://github.com/XTLS/vuepress-plugin-i18n#8bee51f", "postcss-loader": "^8.0.0", "prettier": "^3.3.2", "sass": "^1.51.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8e86f6..c693b2a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -90,9 +90,6 @@ importers: vuepress: specifier: 2.0.0-rc.2 version: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2)) - vuepress-plugin-i18n: - specifier: https://github.com/XTLS/vuepress-plugin-i18n#8bee51f - version: https://codeload.github.com/XTLS/vuepress-plugin-i18n/tar.gz/8bee51f(typescript@5.5.2)(vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2))) packages: @@ -3056,9 +3053,6 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} - striptags@3.2.0: - resolution: {integrity: sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw==} - style-loader@3.3.4: resolution: {integrity: sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w==} engines: {node: '>= 12.13.0'} @@ -3311,18 +3305,6 @@ packages: typescript: optional: true - vuepress-plugin-i18n@https://codeload.github.com/XTLS/vuepress-plugin-i18n/tar.gz/8bee51f: - resolution: {tarball: https://codeload.github.com/XTLS/vuepress-plugin-i18n/tar.gz/8bee51f} - version: 0.8.4 - peerDependencies: - vuepress: 2.0.0-rc.2 - - vuepress-shared@2.0.0-rc.15: - resolution: {integrity: sha512-PzuXgAlzTrD6b6pCaeSb65CD5ponpD86IF+xaCxWrQDAQWk4zSY2brPk6seS10i2teZFNqVeyY8ERoC27HOzcg==} - engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} - peerDependencies: - vuepress: 2.0.0-rc.2 - vuepress@2.0.0-rc.2: resolution: {integrity: sha512-OEHfXx4Q3IzkXqcY9bKZqHXYAnSR82AGrmWYX5R1I3+ntzjaAbUhUKbG/jjMzLg40XqAHS++pM/zzMBNrcY3rg==} engines: {node: '>=18.16.0'} @@ -6808,8 +6790,6 @@ snapshots: strip-final-newline@3.0.0: {} - striptags@3.2.0: {} - style-loader@3.3.4(webpack@5.91.0(esbuild@0.22.0)): dependencies: webpack: 5.91.0(esbuild@0.22.0) @@ -7010,37 +6990,6 @@ snapshots: optionalDependencies: typescript: 5.5.2 - vuepress-plugin-i18n@https://codeload.github.com/XTLS/vuepress-plugin-i18n/tar.gz/8bee51f(typescript@5.5.2)(vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2))): - dependencies: - '@vuepress/client': 2.0.0-rc.2(typescript@5.5.2) - '@vuepress/core': 2.0.0-rc.2(typescript@5.5.2) - '@vuepress/utils': 2.0.0-rc.2 - chokidar: 3.6.0 - vue: 3.3.13(typescript@5.5.2) - vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2)) - vuepress-shared: 2.0.0-rc.15(typescript@5.5.2)(vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2))) - transitivePeerDependencies: - - '@vue/composition-api' - - supports-color - - typescript - - vuepress-shared@2.0.0-rc.15(typescript@5.5.2)(vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2))): - dependencies: - '@vueuse/core': 10.11.0(vue@3.4.27(typescript@5.5.2)) - cheerio: 1.0.0-rc.12 - dayjs: 1.11.11 - execa: 8.0.1 - fflate: 0.8.2 - gray-matter: 4.0.3 - semver: 7.6.2 - striptags: 3.2.0 - vue: 3.4.27(typescript@5.5.2) - vue-router: 4.3.2(vue@3.4.27(typescript@5.5.2)) - vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2)) - transitivePeerDependencies: - - '@vue/composition-api' - - typescript - vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2)): dependencies: '@vuepress/cli': 2.0.0-rc.2(typescript@5.5.2) From 3c07ea52138298fa2dbebdcd05eaa7431c67a474 Mon Sep 17 00:00:00 2001 From: mmmray <142015632+mmmray@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:41:40 +0200 Subject: [PATCH 3/5] Add i18n fallback and outdated warning, second attempt (#531) --- .github/workflows/build.yml | 5 ++++ docs/.vuepress/config.ts | 15 +++++++++++ package.json | 1 + pnpm-lock.yaml | 51 +++++++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cfb461c..c901539 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,9 @@ on: push: branches: - main + pull_request: + branches: [main] + jobs: build: runs-on: ubuntu-latest @@ -36,6 +39,7 @@ jobs: pnpm install yarn docs:build - name: Deploy + if: github.event_name != 'pull_request' uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -47,6 +51,7 @@ jobs: run: | yarn docs:build - name: Deploy to main Repository + if: github.event_name != 'pull_request' uses: peaceiris/actions-gh-pages@v3 with: personal_token: ${{ secrets.ACTION_PERSONAL_TOKEN }} diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 26411d9..b1fb755 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -10,6 +10,7 @@ import process from 'node:process' // import { getDirname, path } from '@vuepress/utils' import { getDirname, path } from 'vuepress/utils' import { MermaidPlugin } from './plugins/mermaid/node/mermaid' +import i18nPlugin from "vuepress-plugin-i18n"; const __dirname = getDirname(import.meta.url) console.log('>>> __dirname -> ', __dirname) @@ -25,6 +26,20 @@ console.log( export default defineUserConfig({ plugins: [ + i18nPlugin({ + updatedTime: "git", + locales: { + en: { + lang: "en-US", + untranslated: { + title: "Untranslated" + }, + outdated: { + title: "Outdated" + } + } + } + }), searchPlugin({ locales: { "/": { diff --git a/package.json b/package.json index de38afc..c8bb6ac 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@vuepress/bundler-webpack": "2.0.0-rc.2", "@vuepress/plugin-back-to-top": "^2.0.0-rc.3", "@vuepress/plugin-search": "2.0.0-rc.3", + "vuepress-plugin-i18n": "https://github.com/XTLS/vuepress-plugin-i18n#5ae5b2d", "postcss-loader": "^8.0.0", "prettier": "^3.3.2", "sass": "^1.51.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c693b2a..4e9786e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -90,6 +90,9 @@ importers: vuepress: specifier: 2.0.0-rc.2 version: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2)) + vuepress-plugin-i18n: + specifier: https://github.com/XTLS/vuepress-plugin-i18n#5ae5b2d + version: https://codeload.github.com/XTLS/vuepress-plugin-i18n/tar.gz/5ae5b2d(typescript@5.5.2)(vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2))) packages: @@ -3053,6 +3056,9 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} + striptags@3.2.0: + resolution: {integrity: sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw==} + style-loader@3.3.4: resolution: {integrity: sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w==} engines: {node: '>= 12.13.0'} @@ -3305,6 +3311,18 @@ packages: typescript: optional: true + vuepress-plugin-i18n@https://codeload.github.com/XTLS/vuepress-plugin-i18n/tar.gz/5ae5b2d: + resolution: {tarball: https://codeload.github.com/XTLS/vuepress-plugin-i18n/tar.gz/5ae5b2d} + version: 0.8.4 + peerDependencies: + vuepress: 2.0.0-rc.2 + + vuepress-shared@2.0.0-rc.15: + resolution: {integrity: sha512-PzuXgAlzTrD6b6pCaeSb65CD5ponpD86IF+xaCxWrQDAQWk4zSY2brPk6seS10i2teZFNqVeyY8ERoC27HOzcg==} + engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} + peerDependencies: + vuepress: 2.0.0-rc.2 + vuepress@2.0.0-rc.2: resolution: {integrity: sha512-OEHfXx4Q3IzkXqcY9bKZqHXYAnSR82AGrmWYX5R1I3+ntzjaAbUhUKbG/jjMzLg40XqAHS++pM/zzMBNrcY3rg==} engines: {node: '>=18.16.0'} @@ -6790,6 +6808,8 @@ snapshots: strip-final-newline@3.0.0: {} + striptags@3.2.0: {} + style-loader@3.3.4(webpack@5.91.0(esbuild@0.22.0)): dependencies: webpack: 5.91.0(esbuild@0.22.0) @@ -6990,6 +7010,37 @@ snapshots: optionalDependencies: typescript: 5.5.2 + vuepress-plugin-i18n@https://codeload.github.com/XTLS/vuepress-plugin-i18n/tar.gz/5ae5b2d(typescript@5.5.2)(vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2))): + dependencies: + '@vuepress/client': 2.0.0-rc.2(typescript@5.5.2) + '@vuepress/core': 2.0.0-rc.2(typescript@5.5.2) + '@vuepress/utils': 2.0.0-rc.2 + chokidar: 3.6.0 + vue: 3.3.13(typescript@5.5.2) + vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2)) + vuepress-shared: 2.0.0-rc.15(typescript@5.5.2)(vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2))) + transitivePeerDependencies: + - '@vue/composition-api' + - supports-color + - typescript + + vuepress-shared@2.0.0-rc.15(typescript@5.5.2)(vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2))): + dependencies: + '@vueuse/core': 10.11.0(vue@3.4.27(typescript@5.5.2)) + cheerio: 1.0.0-rc.12 + dayjs: 1.11.11 + execa: 8.0.1 + fflate: 0.8.2 + gray-matter: 4.0.3 + semver: 7.6.2 + striptags: 3.2.0 + vue: 3.4.27(typescript@5.5.2) + vue-router: 4.3.2(vue@3.4.27(typescript@5.5.2)) + vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2)) + transitivePeerDependencies: + - '@vue/composition-api' + - typescript + vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2(@types/node@20.14.9)(jiti@1.21.0)(sass@1.77.4)(terser@5.31.0)(typescript@5.5.2))(@vuepress/bundler-webpack@2.0.0-rc.2(esbuild@0.22.0)(typescript@5.5.2))(typescript@5.5.2)(vue@3.3.13(typescript@5.5.2)): dependencies: '@vuepress/cli': 2.0.0-rc.2(typescript@5.5.2) From beca5152dd6e62979c4bbf445868ef902d2204cb Mon Sep 17 00:00:00 2001 From: mmmray <142015632+mmmray@users.noreply.github.com> Date: Tue, 16 Jul 2024 04:51:10 -0500 Subject: [PATCH 4/5] Fix "missing translation" alert and translate a few pages --- docs/.vuepress/config.ts | 1 + docs/.vuepress/config/sidebar/en.ts | 1 + docs/en/config/README.md | 14 ++++++++++-- docs/en/config/api.md | 34 ++++++++++++++++++++++++++++- 4 files changed, 47 insertions(+), 3 deletions(-) diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index b1fb755..45c9c4e 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -28,6 +28,7 @@ export default defineUserConfig({ plugins: [ i18nPlugin({ updatedTime: "git", + translationGuide: "https://github.com/XTLS/Xray-docs-next", locales: { en: { lang: "en-US", diff --git a/docs/.vuepress/config/sidebar/en.ts b/docs/.vuepress/config/sidebar/en.ts index d86b691..c10b93c 100755 --- a/docs/.vuepress/config/sidebar/en.ts +++ b/docs/.vuepress/config/sidebar/en.ts @@ -28,6 +28,7 @@ export const sidebarEn: SidebarConfig = { '/en/config/stats.md', '/en/config/transport.md', '/en/config/metrics.md', + '/en/config/observatory.md', ], }, { diff --git a/docs/en/config/README.md b/docs/en/config/README.md index 8b58145..4d1f8e5 100644 --- a/docs/en/config/README.md +++ b/docs/en/config/README.md @@ -22,7 +22,9 @@ The configuration file of Xray is in JSON format, and the configuration format f "stats": {}, "reverse": {}, "fakedns": {}, - "metrics": {} + "metrics": {}, + "observatory": {}, + "burstObservatory": {} } ``` @@ -78,4 +80,12 @@ FakeDNS configuration. Can be used with a transparent proxy to obtain the actual > metrics: [metricsObject](./metrics.md) -Metrics configuration. A more straightforward (and hopefully better) way to export metrics. \ No newline at end of file +Metrics configuration. A more straightforward (and hopefully better) way to export metrics. + +> observatory: [ObservatoryObject](./observatory.md#observatoryobject) + +Background connection observation. Detect the connection status of outbound proxies. + +> burstObservatory: [BurstObservatoryObject](./observatory.md#burstobservatoryobject) + +Concurrent connection observation. Detect the connection status of outbound proxies. diff --git a/docs/en/config/api.md b/docs/en/config/api.md index 4e6eec8..be4cf9d 100644 --- a/docs/en/config/api.md +++ b/docs/en/config/api.md @@ -7,7 +7,7 @@ The interface can be enabled through the api configuration module. When the api Please refer to the [related configuration](#related-configuration) in this section. ::: warning -Most users do not need to use this API. Novices can ignore this item directly. +Most users do not need to use this API. Novices can ignore this page entirely. ::: ## ApiObject @@ -18,6 +18,7 @@ Most users do not need to use this API. Novices can ignore this item directly. { "api": { "tag": "api", + "listen": "127.0.0.1:8080", "services": ["HandlerService", "LoggerService", "StatsService"] } } @@ -27,6 +28,13 @@ Most users do not need to use this API. Novices can ignore this item directly. Outbound proxy identifier. +> `listen`: string + +The IP and port that the API service listens on. This is an optional configuration item. + +When you omit this item, you need to add inbounds and routing configurations according to the examples in the [relevant configurations below](#related-configuration). + + > `services`: [string] List of enabled APIs, optional values can be found in [Supported API List](#supported-api-list). @@ -65,6 +73,18 @@ Add routing rules for the api inbound in the routing configuration. } ``` +Add api to basic configuration + +``` +"api": { + "tag": "api", + "services": [ + "StatsService" + ] +} +``` + + ## Supported API List ### HandlerService @@ -78,6 +98,18 @@ APIs that modify the inbound and outbound proxies, with the following available - Add a user to an inbound proxy (VMess, VLESS, Trojan, and Shadowsocks(v1.3.0+) only); - Delete a user from an inbound proxy (VMess, VLESS, Trojan, and Shadowsocks(v1.3.0+) only); +## RoutingService + +API for adding, deleting, and replacing routing rules and querying equalizer statistics. The available functions are as follows: + +* `adrules` adds and replaces routing configuration +* `rmrules` delete routing rules +* `sib` Disconnect source IP +* `bi` Query equalizer statistics +* `bo` Forces the equalizer to select the specified outboundTag + +You can use something like `./xray help api bi` to query the specific usage. + ### LoggerService Supports restarting the built-in logger, which can be used in conjunction with logrotate to perform operations on log files. From 1cf7d6882851504aca4edb26b48e55d329140d5e Mon Sep 17 00:00:00 2001 From: mmmray <142015632+mmmray@users.noreply.github.com> Date: Tue, 16 Jul 2024 05:20:08 -0500 Subject: [PATCH 5/5] Link to browser dialer from SplitHTTP page --- docs/en/config/transports/splithttp.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/en/config/transports/splithttp.md b/docs/en/config/transports/splithttp.md index d41c96f..c329235 100644 --- a/docs/en/config/transports/splithttp.md +++ b/docs/en/config/transports/splithttp.md @@ -112,3 +112,11 @@ Recommendations: HTTP/1.1 with or without TLS, h2 and h2c, however no h3. Neither Xray server nor client support h3, but this may change in the future. + +## Browser Dialer + + + +If uTLS is not enough, SplitHTTP's TLS can be handled by a browser using [Browser Dialer](../features/browser_dialer.md) + +Depending on the browser, Browser Dialer also supports transmission of SplitHTTP using HTTP3 (QUIC) while the regular implementation does not.