Showing preview only (1,089K chars total). Download the full file or copy to clipboard to get everything.
Repository: bestruirui/mihomo-check
Branch: dev
Commit: b941667ba5c2
Files: 322
Total size: 970.3 KB
Directory structure:
gitextract_4ho2v_lh/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ ├── config.yml
│ │ └── feature_request.yml
│ └── workflows/
│ ├── changelog.yml
│ └── release.yml
├── .gitignore
├── LICENSE
├── README.md
├── cmd/
│ └── bestsub/
│ └── main.go
├── deploy/
│ ├── README.md
│ └── docker-compose.yaml
├── docs/
│ ├── api/
│ │ └── swagger.json
│ ├── database/
│ │ ├── BESTSUB.json
│ │ └── README.md
│ └── rename/
│ └── README.md
├── go.mod
├── go.sum
├── internal/
│ ├── config/
│ │ └── base.go
│ ├── core/
│ │ ├── check/
│ │ │ ├── check.go
│ │ │ └── checker/
│ │ │ ├── alive.go
│ │ │ ├── country.go
│ │ │ ├── speed.go
│ │ │ └── tiktok.go
│ │ ├── cron/
│ │ │ ├── check.go
│ │ │ ├── cron.go
│ │ │ └── fetch.go
│ │ ├── fetch/
│ │ │ └── fetch.go
│ │ ├── mihomo/
│ │ │ └── mihomo.go
│ │ ├── node/
│ │ │ ├── exist.go
│ │ │ ├── info.go
│ │ │ ├── node.go
│ │ │ └── var.go
│ │ ├── subconv/
│ │ │ └── subconv.go
│ │ ├── system/
│ │ │ └── monitor.go
│ │ ├── task/
│ │ │ └── task.go
│ │ └── update/
│ │ ├── core.go
│ │ └── update.go
│ ├── database/
│ │ ├── client/
│ │ │ └── sqlite/
│ │ │ ├── auth.go
│ │ │ ├── check.go
│ │ │ ├── migration/
│ │ │ │ ├── 001_table.go
│ │ │ │ ├── 002_add_sub_tags.go
│ │ │ │ └── migration.go
│ │ │ ├── migrator.go
│ │ │ ├── notify.go
│ │ │ ├── setting.go
│ │ │ ├── share.go
│ │ │ ├── sqlite.go
│ │ │ ├── storage.go
│ │ │ └── sub.go
│ │ ├── database.go
│ │ ├── init.go
│ │ ├── interfaces/
│ │ │ ├── auth.go
│ │ │ ├── check.go
│ │ │ ├── notify.go
│ │ │ ├── repository.go
│ │ │ ├── setting.go
│ │ │ ├── share.go
│ │ │ ├── storage.go
│ │ │ └── sub.go
│ │ ├── migration/
│ │ │ └── migration.go
│ │ └── op/
│ │ ├── auth.go
│ │ ├── check.go
│ │ ├── notify.go
│ │ ├── repo.go
│ │ ├── setting.go
│ │ ├── share.go
│ │ ├── storage.go
│ │ └── sub.go
│ ├── models/
│ │ ├── auth/
│ │ │ ├── auth.go
│ │ │ └── default.go
│ │ ├── check/
│ │ │ └── check.go
│ │ ├── common/
│ │ │ └── base.go
│ │ ├── config/
│ │ │ ├── config.go
│ │ │ └── default.go
│ │ ├── node/
│ │ │ └── node.go
│ │ ├── notify/
│ │ │ ├── default.go
│ │ │ └── notify.go
│ │ ├── setting/
│ │ │ ├── default.go
│ │ │ └── setting.go
│ │ ├── share/
│ │ │ └── share.go
│ │ ├── storage/
│ │ │ └── storage.go
│ │ ├── sub/
│ │ │ └── sub.go
│ │ └── system/
│ │ └── info.go
│ ├── modules/
│ │ ├── country/
│ │ │ ├── channel/
│ │ │ │ ├── cloudflare.go
│ │ │ │ ├── commen.go
│ │ │ │ ├── freeip.go
│ │ │ │ ├── ip_sb.go
│ │ │ │ ├── ipapi.go
│ │ │ │ ├── ipwho.go
│ │ │ │ ├── myip.go
│ │ │ │ ├── reallyfreegeoip.go
│ │ │ │ └── register.go
│ │ │ └── country.go
│ │ ├── notify/
│ │ │ ├── channel/
│ │ │ │ ├── email.go
│ │ │ │ └── webhook.go
│ │ │ └── notify.go
│ │ ├── register/
│ │ │ ├── category.go
│ │ │ └── register.go
│ │ ├── share/
│ │ │ └── share.go
│ │ └── storage/
│ │ ├── channel/
│ │ │ └── webdav.go
│ │ └── storage.go
│ ├── server/
│ │ ├── auth/
│ │ │ └── auth.go
│ │ ├── handlers/
│ │ │ ├── auth.go
│ │ │ ├── check.go
│ │ │ ├── info.go
│ │ │ ├── log.go
│ │ │ ├── notify.go
│ │ │ ├── pprof.go
│ │ │ ├── scalar.go
│ │ │ ├── setting.go
│ │ │ ├── share.go
│ │ │ ├── storage.go
│ │ │ ├── sub.go
│ │ │ ├── update.go
│ │ │ └── ws.go
│ │ ├── middleware/
│ │ │ ├── auth.go
│ │ │ ├── cors.go
│ │ │ ├── logging.go
│ │ │ ├── recovery.go
│ │ │ └── static.go
│ │ ├── resp/
│ │ │ └── resp.go
│ │ ├── router/
│ │ │ └── router.go
│ │ └── server/
│ │ └── server.go
│ └── utils/
│ ├── cache/
│ │ ├── cache.go
│ │ └── shard.go
│ ├── color/
│ │ └── color.go
│ ├── country/
│ │ └── conutry.go
│ ├── desc/
│ │ └── desc.go
│ ├── generic/
│ │ ├── map.go
│ │ └── queue.go
│ ├── info/
│ │ └── info.go
│ ├── log/
│ │ └── log.go
│ ├── shutdown/
│ │ └── shutdown.go
│ ├── ua/
│ │ └── ua.go
│ └── utils.go
├── scripts/
│ ├── build.sh
│ └── dockerfiles/
│ ├── Dockerfile.alpine
│ ├── Dockerfile.debian
│ └── entrypoint.sh
├── static/
│ └── static.go
└── web/
├── .env.example
├── .gitignore
├── components.json
├── eslint.config.mjs
├── next.config.ts
├── package.json
├── postcss.config.mjs
├── src/
│ ├── app/
│ │ ├── globals.css
│ │ ├── layout.tsx
│ │ ├── not-found.tsx
│ │ └── page.tsx
│ ├── components/
│ │ ├── app/
│ │ │ ├── app-layout.tsx
│ │ │ ├── index.ts
│ │ │ └── spa-app.tsx
│ │ ├── features/
│ │ │ ├── check/
│ │ │ │ ├── components/
│ │ │ │ │ ├── check-form.tsx
│ │ │ │ │ ├── check-list.tsx
│ │ │ │ │ ├── check-page.tsx
│ │ │ │ │ ├── form-sections/
│ │ │ │ │ │ ├── basic-config-section.tsx
│ │ │ │ │ │ ├── basic-info-section.tsx
│ │ │ │ │ │ ├── extra-config-section.tsx
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── log-config.tsx
│ │ │ │ │ │ └── notify-config.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── constants/
│ │ │ │ │ └── index.ts
│ │ │ │ ├── hooks/
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── useCheckForm.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── utils/
│ │ │ │ └── index.ts
│ │ │ ├── home/
│ │ │ │ └── dashboard.tsx
│ │ │ ├── index.ts
│ │ │ ├── login/
│ │ │ │ ├── index.ts
│ │ │ │ ├── login-form.tsx
│ │ │ │ └── login-page.tsx
│ │ │ ├── notify/
│ │ │ │ ├── components/
│ │ │ │ │ ├── notify-form.tsx
│ │ │ │ │ ├── notify-list.tsx
│ │ │ │ │ └── notify-page.tsx
│ │ │ │ ├── hooks/
│ │ │ │ │ ├── useNotifyForm.ts
│ │ │ │ │ └── useNotifyOperations.ts
│ │ │ │ └── index.ts
│ │ │ ├── profile/
│ │ │ │ ├── ProfileDesktopNavButton.tsx
│ │ │ │ ├── ProfileDialog.tsx
│ │ │ │ ├── ProfileLayout.tsx
│ │ │ │ ├── ProfileNavButton.tsx
│ │ │ │ └── index.ts
│ │ │ ├── settings/
│ │ │ │ ├── SettingsActions.tsx
│ │ │ │ ├── SettingsLayout.tsx
│ │ │ │ ├── sections/
│ │ │ │ │ ├── NodeSettingsSection.tsx
│ │ │ │ │ ├── NotifySettingsSection.tsx
│ │ │ │ │ ├── SystemSettingsSection.tsx
│ │ │ │ │ ├── TaskSettingsSection.tsx
│ │ │ │ │ ├── fields/
│ │ │ │ │ │ ├── BooleanSettingField.tsx
│ │ │ │ │ │ ├── MultiSelectSettingField.tsx
│ │ │ │ │ │ ├── NumberSettingField.tsx
│ │ │ │ │ │ ├── SelectSettingField.tsx
│ │ │ │ │ │ ├── SettingCard.tsx
│ │ │ │ │ │ ├── TextSettingField.tsx
│ │ │ │ │ │ └── types.ts
│ │ │ │ │ └── index.ts
│ │ │ │ ├── settings.tsx
│ │ │ │ └── utils/
│ │ │ │ └── value-mappers.ts
│ │ │ ├── share/
│ │ │ │ ├── components/
│ │ │ │ │ ├── form-sections/
│ │ │ │ │ │ ├── alive-status-section.tsx
│ │ │ │ │ │ ├── basic-info-section.tsx
│ │ │ │ │ │ ├── config-section.tsx
│ │ │ │ │ │ ├── country-section.tsx
│ │ │ │ │ │ ├── filter-section.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── share-copy.tsx
│ │ │ │ │ ├── share-date-pick.tsx
│ │ │ │ │ ├── share-form.tsx
│ │ │ │ │ ├── share-list.tsx
│ │ │ │ │ └── share-page.tsx
│ │ │ │ ├── constants/
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── sub-rules.ts
│ │ │ │ ├── hooks/
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── useShareForm.ts
│ │ │ │ │ └── useShareOperations.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── utils/
│ │ │ │ └── index.ts
│ │ │ ├── storage/
│ │ │ │ └── storage.tsx
│ │ │ ├── sub/
│ │ │ │ ├── components/
│ │ │ │ │ ├── batch-sub-form.tsx
│ │ │ │ │ ├── form-sections/
│ │ │ │ │ │ ├── basic-info-section.tsx
│ │ │ │ │ │ ├── config-section.tsx
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── protocol-filter-section.tsx
│ │ │ │ │ ├── sub-detail.tsx
│ │ │ │ │ ├── sub-form.tsx
│ │ │ │ │ ├── sub-list.tsx
│ │ │ │ │ └── sub-page.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── utils/
│ │ │ │ └── index.ts
│ │ │ └── system-update/
│ │ │ └── index.tsx
│ │ ├── layout/
│ │ │ ├── app-sidebar.tsx
│ │ │ ├── index.ts
│ │ │ ├── nav-documents.tsx
│ │ │ ├── nav-main.tsx
│ │ │ ├── nav-secondary.tsx
│ │ │ ├── nav-user.tsx
│ │ │ └── site-header.tsx
│ │ ├── pages/
│ │ │ ├── index.ts
│ │ │ └── not-found.tsx
│ │ ├── providers/
│ │ │ ├── alert-provider.tsx
│ │ │ ├── auth-provider.tsx
│ │ │ ├── index.ts
│ │ │ ├── query-provider.tsx
│ │ │ └── theme-provider.tsx
│ │ ├── shared/
│ │ │ ├── dynamic-config-form.tsx
│ │ │ ├── status-badge.tsx
│ │ │ └── subscription-section.tsx
│ │ └── ui/
│ │ ├── accordion.tsx
│ │ ├── alert-dialog.tsx
│ │ ├── avatar.tsx
│ │ ├── badge.tsx
│ │ ├── breadcrumb.tsx
│ │ ├── button.tsx
│ │ ├── calendar.tsx
│ │ ├── card.tsx
│ │ ├── chart.tsx
│ │ ├── checkbox.tsx
│ │ ├── dialog.tsx
│ │ ├── drawer.tsx
│ │ ├── dropdown-menu.tsx
│ │ ├── hover-card.tsx
│ │ ├── input.tsx
│ │ ├── label.tsx
│ │ ├── loading.tsx
│ │ ├── mode-toggle.tsx
│ │ ├── popover.tsx
│ │ ├── select.tsx
│ │ ├── separator.tsx
│ │ ├── sheet.tsx
│ │ ├── sidebar.tsx
│ │ ├── skeleton.tsx
│ │ ├── sonner.tsx
│ │ ├── switch.tsx
│ │ ├── table.tsx
│ │ ├── tabs.tsx
│ │ ├── textarea.tsx
│ │ ├── toggle-group.tsx
│ │ ├── toggle.tsx
│ │ └── tooltip.tsx
│ ├── constant/
│ │ ├── protocols.ts
│ │ └── settings-keys.ts
│ ├── lib/
│ │ ├── api/
│ │ │ ├── client.ts
│ │ │ └── token-manager.ts
│ │ ├── config/
│ │ │ ├── config.ts
│ │ │ └── version.ts
│ │ ├── hooks/
│ │ │ ├── index.ts
│ │ │ ├── use-form-update.ts
│ │ │ ├── use-form.ts
│ │ │ ├── use-mobile.ts
│ │ │ └── useOverflowDetection.ts
│ │ └── queries/
│ │ ├── check-queries.ts
│ │ ├── index.ts
│ │ ├── setting-queries.ts
│ │ ├── share-queries.ts
│ │ └── sub-queries.ts
│ ├── router/
│ │ ├── core/
│ │ │ ├── context.tsx
│ │ │ ├── outlet.tsx
│ │ │ └── router.tsx
│ │ ├── hooks/
│ │ │ ├── use-navigation.tsx
│ │ │ ├── use-route-preloader.tsx
│ │ │ └── use-route-title.tsx
│ │ ├── index.ts
│ │ └── routes.tsx
│ ├── types/
│ │ ├── api.ts
│ │ ├── auth.ts
│ │ ├── check.ts
│ │ ├── common.ts
│ │ ├── index.ts
│ │ ├── notify.ts
│ │ ├── setting.ts
│ │ ├── share.ts
│ │ ├── sub.ts
│ │ └── update.ts
│ └── utils/
│ ├── cron.ts
│ ├── format.ts
│ ├── index.ts
│ ├── time.ts
│ ├── url.ts
│ └── validation.ts
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: 错误反馈
description: "提交错误反馈"
title: "[Bug] "
labels: ["bug"]
body:
- type: checkboxes
id: ensure
attributes:
label: 验证步骤
description: 在提交之前,请勾选以下选项以证明您已经阅读并理解了以下要求,否则该 issue 将被关闭。
options:
- label: 我已在 [Issue](https://github.com/bestruirui/BestSub/issues) 中寻找过我要提出的问题,并且没有找到
required: true
- type: textarea
attributes:
label: 描述
description: 请提供错误的详细描述。
validations:
required: true
- type: textarea
attributes:
label: 重现方式
description: 请提供重现错误的步骤
validations:
required: true
- type: textarea
attributes:
label: 日志
description: 在下方附上运行日志
render: shell
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: 功能请求
description: 为该项目提出建议
title: "[Feature] "
labels: ["enhancement"]
body:
- type: checkboxes
id: ensure
attributes:
label: 验证步骤
description: 在提交之前,请勾选以下选项以证明您已经阅读并理解了以下要求,否则该 issue 将被关闭。
options:
- label: 我已经阅读了 [README.md](https://github.com/bestruirui/BestSub/blob/master/README.md),确认了该功能没有实现
required: true
- label: 我已在 [Issue](https://github.com/bestruirui/BestSub/issues) 中寻找过我要提出的功能请求,并且没有找到
required: true
- type: textarea
attributes:
label: 描述
description: 请提供对于该功能的详细描述,而不是莫名其妙的话术。
validations:
required: true
================================================
FILE: .github/workflows/changelog.yml
================================================
name: changelog
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
changelog:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.ACTION_TOKEN }}
- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.ACTION_TOKEN}}
- name: Merge dev to master branch
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'github-actions@github.com'
if ! git show-ref --verify --quiet refs/heads/master; then
git checkout -b master
else
git checkout master
fi
git fetch origin dev
git merge origin/dev
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}
git push origin master --force
env:
GITHUB_TOKEN: ${{secrets.ACTION_TOKEN}}
================================================
FILE: .github/workflows/release.yml
================================================
name: release
on:
push:
branches:
- master
permissions:
contents: write
packages: write
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
ref: master
- name: Cache toolchains
uses: actions/cache@v4
with:
path: ~/.bestsub/toolchains
key: ${{ runner.os }}-toolchains-${{ hashFiles('go.mod') }}-${{ hashFiles('scripts/build.sh') }}
- name: Setup Go
uses: actions/setup-go@v5
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 'latest'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'pnpm'
cache-dependency-path: web/pnpm-lock.yaml
- name: Build
run: bash scripts/build.sh release
- name: Get latest tag
id: tag
run: |
LATEST_TAG=$(git describe --tags --abbrev=0)
echo "TAG_NAME=$LATEST_TAG" >> $GITHUB_OUTPUT
- name: Upload Release
uses: softprops/action-gh-release@v2
with:
files: build/archives/*
prerelease: false
tag_name: ${{ steps.tag.outputs.TAG_NAME }}
- name: Docker meta (Debian)
id: meta-debian
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
tags: |
type=raw,value=latest
type=raw,value=${{ steps.tag.outputs.TAG_NAME }}
- name: Docker meta (Alpine)
id: meta-alpine
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
tags: |
type=raw,value=latest-alpine
type=raw,value=${{ steps.tag.outputs.TAG_NAME }}-alpine
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push (Alpine)
uses: docker/build-push-action@v5
with:
context: .
file: ./scripts/dockerfiles/Dockerfile.alpine
push: true
platforms: linux/amd64,linux/i386,linux/arm64,linux/arm/v7
tags: ${{ steps.meta-alpine.outputs.tags }}
labels: ${{ steps.meta-alpine.outputs.labels }}
build-args: |
TARGETPLATFORM
- name: Build and push (Debian)
uses: docker/build-push-action@v5
with:
context: .
file: ./scripts/dockerfiles/Dockerfile.debian
push: true
platforms: linux/amd64,linux/i386,linux/arm64,linux/arm/v7
tags: ${{ steps.meta-debian.outputs.tags }}
labels: ${{ steps.meta-debian.outputs.labels }}
build-args: |
TARGETPLATFORM
================================================
FILE: .gitignore
================================================
# web
static/out/*
!static/out/README.md
# api
api/*
!api/README.md
# build
dist/*
build
# vscode
.vscode
# data
data
internal/core/subconv/subconv.es5.js
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
================================================
FILE: README.md
================================================
# BestSub
BestSub 是一个高性能的节点检测,订阅转换服务,基于 Go 语言开发。该项目提供了完整的 Web 界面和 API 接口,支持多种检测项目,多种订阅格式转换,为用户提供便捷的订阅管理解决方案。
## ✨ 主要特性
- 🎨 **现代的 WebUI**: 提供现代化的 Web 管理界面,完善的 API 文档,方便用户自定义开发
- ⚡ **高性能**: 并发处理,低 CPU 占用,低内存消耗,优化的资源利用率
- 🎲 **分享**: 高度自定义的分享功能,自定义节点名称,过期时间,最大访问量,节点类型,国家....
- 🌍 **多架构**: 支持多种系统架构和操作系统,广泛的兼容性
- 🗂️ **节点池**: 可持久化保存历史节点,智能淘汰质量低下的节点,确保最佳体验
- 🔧 **扩展**: 模块化设计,支持 PR 扩展新功能,仅需创建单个文件即可添加新的通知、保存或检测方式
- 📢 **通知**: 支持多样化的通知方式和自定义通知模板,满足不同场景的消息推送需求
- 💾 **保存**: 支持多样化的数据保存方式,灵活的数据持久化选择
- 🔍 **检测**: 支持多样化的节点检测方式,全面的质量评估体系
## 🚀 快速开始
### 方式一:直接运行
1. 从 [Releases](https://github.com/bestruirui/BestSub/releases/latest) 页面下载适合您系统架构的可执行文件
2. 直接运行程序,系统将自动:
- 创建必要的配置文件
### 方式二:Docker
```bash
docker run -d \
--name bestsub \
-e PUID=1000 \
-e PGID=1000 \
--restart unless-stopped \
-v /path/to/data:/app/data \
-p 8080:8080 \
ghcr.io/bestruirui/bestsub
```
**参数说明:**
- `--name bestsub`: 设置容器名称
- `--restart unless-stopped`: 容器自动重启策略
- `-v /path/to/data:/app/data`: 数据持久化挂载(请将 `/path/to/data` 替换为您的实际路径)
- `-p 8080:8080`: 端口映射,访问地址为 `http://localhost:8080`
### 方式三:Docker Compose
创建 `docker-compose.yml` 文件:
```yaml
services:
bestsub:
image: ghcr.io/bestruirui/bestsub:latest
container_name: bestsub
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
ports:
- "8080:8080"
volumes:
- ./data:/app/data
minisubconvert:
image: ghcr.io/bestruirui/minisubconvert:latest
container_name: minisubconvert
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
ports:
- "3000:3000"
```
启动服务:
```bash
docker-compose up -d
```
## 📁 目录结构
程序运行后将创建以下目录结构:
```
bestsub/
├── config.json # 主配置文件
├── data/ # 数据目录
│ └── bestsub.db # SQLite 数据库文件
├── log/ # 日志文件目录
├── session/ # 会话数据目录
│ └── bestsub.session # 会话文件
```
## 🔗 版本历史
### 当前版本 (v1.x)
- 全新的 Web 界面
- 增强的性能和稳定性
- 完整的容器化支持
### 经典版本 (v0.3.5)
- **命令行界面版本**
- **[📖 查看文档](https://github.com/bestruirui/BestSub/blob/legacy/doc/README_zh.md)**
- **[⬇️ 下载应用](https://github.com/bestruirui/BestSub/releases/tag/v0.3.5)**
## 📋 版本规范
### 版本格式
版本号采用语义化版本格式:**`vX.Y.Z`**
- **`X`** (主版本号 - Major)
- **`Y`** (次版本号 - Minor)
- **`Z`** (修订版本号 - Patch)
### 版本变更规则
**🔢 主版本号 (X - Major)**
- 主版本号增加表示**重大更新**
- 包含**破坏性变更 (Breaking Changes)**,如:
- 数据结构、API 接口的不兼容性修改
- 重大的架构调整或重构
- 当主版本号增加时,次版本号和修订版本号归零
- 示例:`v1.5.3` → `v2.0.0`
**⚡ 次版本号 (Y - Minor)**
- 次版本号增加表示**功能更新**
- 包含向后兼容的功能性新增或增强
- **前后端版本号在此位必须保持一致**,确保功能正常调用和兼容
- 当次版本号增加时,修订版本号归零
- 示例:`v1.2.8` → `v1.3.0`
**🔧 修订版本号 (Z - Patch)**
- 修订版本号增加表示**问题修复**或微小优化
- 用于修复向后兼容的 Bug 或进行小幅优化调整
- 此版本更新不要求前后端严格同步,但建议保持一致
- 示例:`v1.3.0` → `v1.3.1`
## 🤝 贡献指南
我们欢迎任何形式的贡献!
### 项目图标
- **格式要求**: SVG 格式
- **用途**: 项目 Logo 和品牌标识
- **提交方式**: 创建 Issue 或 Pull Request
### 更多功能
- 新的节点检测项目
- 新的储存渠道
- 新的通知渠道
### 其他贡献方式
- 🐛 报告 Bug
- 💡 提出新功能建议
- 📝 改进文档
- 🧪 编写测试用例
## ⚠️ 免责声明
本项目仅供学习和研究使用。使用本软件时,请您:
- ✅ 遵守当地法律法规和相关政策
- ✅ 尊重网络服务提供商的使用条款
- ✅ 承担使用本软件可能产生的一切后果和责任
- ⚠️ 理解作者不对使用本软件造成的任何损失承担责任
**请在合法合规的前提下使用本软件。如果您不同意上述条款,请勿使用本软件。**
## ❤️ 支持项目
如果这个项目对您有帮助,请考虑:
- ⭐ 给项目点个 Star
- 🍴 Fork 项目并参与开发
- 📢 向朋友推荐本项目
- 💬 在社区中分享使用体验
## 📊 项目统计

================================================
FILE: cmd/bestsub/main.go
================================================
package main
import (
"github.com/bestruirui/bestsub/internal/config"
"github.com/bestruirui/bestsub/internal/core/cron"
"github.com/bestruirui/bestsub/internal/core/node"
"github.com/bestruirui/bestsub/internal/core/task"
"github.com/bestruirui/bestsub/internal/database"
"github.com/bestruirui/bestsub/internal/database/op"
"github.com/bestruirui/bestsub/internal/models/setting"
"github.com/bestruirui/bestsub/internal/server/server"
"github.com/bestruirui/bestsub/internal/utils/info"
"github.com/bestruirui/bestsub/internal/utils/log"
"github.com/bestruirui/bestsub/internal/utils/shutdown"
)
func main() {
info.Banner()
cfg := config.Base()
if err := log.Initialize(cfg.Log.Level, cfg.Log.Path, cfg.Log.Output); err != nil {
panic(err)
}
if err := database.Initialize(cfg.Database.Type, cfg.Database.Path); err != nil {
panic(err)
}
if err := server.Initialize(); err != nil {
panic(err)
}
task.Init(op.GetSettingInt(setting.TASK_MAX_THREAD))
cron.Start()
cron.FetchLoad()
cron.CheckLoad()
node.InitNodePool(op.GetSettingInt(setting.NODE_POOL_SIZE))
log.CleanupOldLogs(5)
server.Start()
shutdown.Register(server.Close) // ↓↓
shutdown.Register(database.Close) // ↓↓
shutdown.Register(node.CloseNodePool) // ↓↓
shutdown.Register(log.Close) // ↓↓
shutdown.Listen()
}
================================================
FILE: deploy/README.md
================================================
# Depoly
================================================
FILE: deploy/docker-compose.yaml
================================================
services:
bestsub:
image: ghcr.io/bestruirui/bestsub:latest
container_name: bestsub
restart: always
ports:
- '8080:8080'
volumes:
- './bestsub:/app/data'
================================================
FILE: docs/api/swagger.json
================================================
{
"swagger": "2.0",
"info": {
"description": "BestSub - API 文档\n\n这是 BestSub 的 API 文档\n\n## 认证\n大多数接口需要使用 JWT 令牌进行认证。\n认证时,请在 Authorization 头中包含 JWT 令牌:\n`Authorization: Bearer \u003cyour-jwt-token\u003e`\n\n## 错误响应\n所有错误响应都遵循统一格式,包含 code、message 和 error 字段。\n\n## 成功响应\n所有成功响应都遵循统一格式,包含 code、message 和 data 字段。",
"title": "BestSub API",
"contact": {
"name": "BestSub API 支持",
"email": "support@bestsub.com"
},
"license": {
"name": "GPL-3.0",
"url": "https://opensource.org/license/gpl-3-0"
},
"version": "1.0.0"
},
"paths": {
"/api/v1/auth/login": {
"post": {
"description": "用户登录接口,验证用户名和密码,返回JWT令牌",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"认证"
],
"summary": "用户登录",
"parameters": [
{
"description": "登录请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_auth.LoginRequest"
}
}
],
"responses": {
"200": {
"description": "登录成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_auth.LoginResponse"
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "用户名或密码错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/auth/logout": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "用户登出接口,使当前会话失效",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"认证"
],
"summary": "用户登出",
"responses": {
"200": {
"description": "登出成功",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/auth/user": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "获取当前登录用户的详细信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"认证"
],
"summary": "获取用户信息",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_auth.Data"
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/auth/user/name": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "修改当前用户的用户名",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"认证"
],
"summary": "修改用户名",
"parameters": [
{
"description": "修改用户名请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_auth.UpdateUserInfoRequest"
}
}
],
"responses": {
"200": {
"description": "用户名修改成功",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"409": {
"description": "用户名已存在",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/auth/user/password": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "修改当前用户的密码",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"认证"
],
"summary": "修改密码",
"parameters": [
{
"description": "修改密码请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_auth.ChangePasswordRequest"
}
}
],
"responses": {
"200": {
"description": "密码修改成功",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权或旧密码错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/check": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"检测"
],
"summary": "获取检测列表",
"parameters": [
{
"type": "integer",
"description": "检测ID",
"name": "id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_check.Response"
}
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "创建单个检测",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"检测"
],
"summary": "创建检测",
"parameters": [
{
"description": "创建检测请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_check.Request"
}
}
],
"responses": {
"200": {
"description": "创建成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_check.Response"
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/check/type": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "获取检测类型",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"检测"
],
"summary": "获取检测类型",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_core_check.Desc"
}
}
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/check/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据请求体中的ID更新检测信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"检测"
],
"summary": "更新检测",
"parameters": [
{
"type": "integer",
"description": "检测ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "更新检测请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_check.Request"
}
}
],
"responses": {
"200": {
"description": "更新成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_check.Response"
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"404": {
"description": "检测不存在",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据ID删除单个检测",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"检测"
],
"summary": "删除检测",
"parameters": [
{
"type": "integer",
"description": "检测ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "删除成功",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"404": {
"description": "检测不存在",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/check/{id}/run": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "手动触发检测执行",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"检测"
],
"summary": "手动运行检测",
"parameters": [
{
"type": "integer",
"description": "检测ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "运行成功",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"404": {
"description": "检测不存在",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/check/{id}/stop": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "停止正在运行的检测",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"检测"
],
"summary": "停止检测",
"parameters": [
{
"type": "integer",
"description": "检测ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "停止成功",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"404": {
"description": "检测不存在",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/log/content": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "获取日志内容",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"日志"
],
"summary": "获取日志内容",
"parameters": [
{
"type": "string",
"description": "日志文件路径",
"name": "path",
"in": "query",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "日志文件时间戳",
"name": "timestamp",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"level": {
"type": "string"
},
"msg": {
"type": "string"
},
"time": {
"type": "string"
}
}
}
}
}
}
]
}
},
"400": {
"description": "参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"404": {
"description": "文件不存在",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/log/list": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "获取日志列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"日志"
],
"summary": "获取日志列表",
"parameters": [
{
"type": "string",
"description": "日志文件路径",
"name": "path",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
}
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/notify": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"通知"
],
"summary": "获取通知",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_notify.Response"
}
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据请求体中的ID更新通知信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"通知"
],
"summary": "更新通知",
"parameters": [
{
"type": "integer",
"description": "通知ID",
"name": "id",
"in": "query",
"required": true
},
{
"description": "更新通知请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_notify.Request"
}
}
],
"responses": {
"200": {
"description": "更新成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_notify.Response"
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"404": {
"description": "通知配置不存在",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "创建单个通知",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"通知"
],
"summary": "创建通知",
"parameters": [
{
"description": "创建通知请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_notify.Request"
}
}
],
"responses": {
"200": {
"description": "创建成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_notify.Response"
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据ID删除单个通知",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"通知"
],
"summary": "删除通知",
"parameters": [
{
"type": "integer",
"description": "通知ID",
"name": "id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "删除成功",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"404": {
"description": "通知不存在",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/notify/channel": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"通知"
],
"summary": "获取通知渠道",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/notify/channel/config": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"通知"
],
"summary": "获取渠道配置",
"parameters": [
{
"type": "string",
"description": "渠道",
"name": "channel",
"in": "query"
}
],
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_modules_notify.Desc"
}
}
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/notify/name": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"通知"
],
"summary": "获取通知名称和ID",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_notify.NameAndID"
}
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/notify/template": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"通知"
],
"summary": "获取通知模板",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_notify.Template"
}
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据请求体中的ID更新通知模板信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"通知"
],
"summary": "更新通知模板",
"parameters": [
{
"description": "更新通知模板请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_notify.Template"
}
}
],
"responses": {
"200": {
"description": "更新成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_notify.Template"
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"404": {
"description": "通知模板不存在",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/notify/test": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "测试单个通知",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"通知"
],
"summary": "测试通知",
"parameters": [
{
"description": "测试通知请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_notify.Request"
}
}
],
"responses": {
"200": {
"description": "测试成功",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/setting": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "获取系统所有配置项,支持按分组过滤和关键字搜索",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"配置"
],
"summary": "获取配置项",
"parameters": [
{
"type": "string",
"description": "分组名称",
"name": "group",
"in": "query"
}
],
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_setting.Setting"
}
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据请求数据中的ID批量更新配置项的值和描述",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"配置"
],
"summary": "更新配置项",
"parameters": [
{
"description": "更新配置项请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_setting.Setting"
}
}
}
],
"responses": {
"200": {
"description": "更新成功",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/share": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "获取分享链接",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"分享"
],
"summary": "获取分享链接",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_share.Response"
}
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "创建分享链接",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"分享"
],
"summary": "创建分享链接",
"parameters": [
{
"description": "分享数据",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_share.Request"
}
}
],
"responses": {
"200": {
"description": "创建成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_share.Response"
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/share/node/{token}": {
"get": {
"description": "获取订阅内容 纯Mihomo格式的节点",
"consumes": [
"application/json"
],
"produces": [
"text/plain"
],
"tags": [
"分享"
],
"summary": "获取订阅内容 纯Mihomo格式的节点",
"parameters": [
{
"type": "string",
"description": "分享token",
"name": "token",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "获取成功,内容为yaml/plain格式",
"schema": {
"type": "string"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/share/sub/{token}": {
"get": {
"description": "获取订阅内容 带规则的订阅",
"consumes": [
"application/json"
],
"produces": [
"text/plain"
],
"tags": [
"分享"
],
"summary": "获取订阅内容 带规则的订阅",
"parameters": [
{
"type": "string",
"description": "分享token",
"name": "token",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "获取成功,内容为yaml/plain格式",
"schema": {
"type": "string"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/share/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "更新分享链接",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"分享"
],
"summary": "更新分享链接",
"parameters": [
{
"type": "string",
"description": "分享ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "分享数据",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_share.Request"
}
}
],
"responses": {
"200": {
"description": "更新成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_share.Response"
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "删除分享链接",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"分享"
],
"summary": "删除分享链接",
"parameters": [
{
"type": "string",
"description": "分享ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "删除成功",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/storage": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "获取存储",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"存储"
],
"summary": "获取存储",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_storage.Response"
}
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "创建存储",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"存储"
],
"summary": "创建存储",
"parameters": [
{
"description": "存储配置数据",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_storage.Request"
}
}
],
"responses": {
"200": {
"description": "创建成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_storage.Response"
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/storage/channel": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"存储"
],
"summary": "获取存储渠道",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/storage/channel/config": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"存储"
],
"summary": "获取渠道配置",
"parameters": [
{
"type": "string",
"description": "渠道",
"name": "channel",
"in": "query"
}
],
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_modules_storage.Desc"
}
}
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/storage/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "更新存储",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"存储"
],
"summary": "更新存储",
"parameters": [
{
"type": "string",
"description": "存储ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "存储配置数据",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_storage.Request"
}
}
],
"responses": {
"200": {
"description": "更新成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_storage.Response"
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "删除存储",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"存储"
],
"summary": "删除存储",
"parameters": [
{
"type": "string",
"description": "存储ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "删除成功",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/sub": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"订阅"
],
"summary": "获取订阅链接",
"parameters": [
{
"type": "integer",
"description": "链接ID",
"name": "id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_sub.Response"
}
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "创建单个订阅链接",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"订阅"
],
"summary": "创建订阅链接",
"parameters": [
{
"description": "创建订阅链接请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_sub.Request"
}
}
],
"responses": {
"200": {
"description": "创建成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_sub.Response"
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/sub/batch": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "批量创建多个订阅链接",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"订阅"
],
"summary": "批量创建订阅链接",
"parameters": [
{
"description": "批量创建订阅链接请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_sub.Request"
}
}
}
],
"responses": {
"200": {
"description": "创建成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_sub.Response"
}
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/sub/refresh/{id}": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据ID手动刷新单个订阅",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"订阅"
],
"summary": "手动刷新订阅",
"parameters": [
{
"type": "integer",
"description": "订阅链接ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "刷新成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_sub.Result"
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"404": {
"description": "订阅链接不存在",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/sub/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据请求体中的ID更新订阅链接信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"订阅"
],
"summary": "更新订阅链接",
"parameters": [
{
"type": "integer",
"description": "订阅链接ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "更新订阅链接请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_sub.Request"
}
}
],
"responses": {
"200": {
"description": "更新成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_sub.Response"
}
}
}
]
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"404": {
"description": "订阅链接不存在",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据ID删除单个订阅链接",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"订阅"
],
"summary": "删除订阅链接",
"parameters": [
{
"type": "integer",
"description": "订阅链接ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "删除成功",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"404": {
"description": "订阅链接不存在",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/system/health": {
"get": {
"description": "检查服务健康状态,包括数据库连接状态",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"系统"
],
"summary": "健康检查",
"responses": {
"200": {
"description": "服务正常",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_system.HealthResponse"
}
}
}
]
}
},
"503": {
"description": "服务不可用",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/system/info": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "获取程序运行相关信息,包括内存使用、运行时长、网络流量、CPU信息等",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"系统"
],
"summary": "系统信息",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_system.Info"
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/system/live": {
"get": {
"description": "检查服务是否存活(简单的ping检查)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"系统"
],
"summary": "存活检查",
"responses": {
"200": {
"description": "服务存活",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/system/ready": {
"get": {
"description": "检查服务是否准备好接收请求",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"系统"
],
"summary": "就绪检查",
"responses": {
"200": {
"description": "服务就绪",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_system.HealthResponse"
}
}
}
]
}
},
"503": {
"description": "服务未就绪",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/system/version": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "获取程序版本信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"系统"
],
"summary": "系统版本",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_system.Version"
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/update": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "获取程序最新版本信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"更新"
],
"summary": "最新版本",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_core_update.LatestInfo"
}
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
},
"/api/v1/update/:name": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "更新程序",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"更新"
],
"summary": "更新",
"responses": {
"200": {
"description": "获取成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
},
{
"type": "object",
"properties": {
"data": {
"type": "string"
}
}
}
]
}
},
"401": {
"description": "未授权",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
},
"500": {
"description": "服务器内部错误",
"schema": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct"
}
}
}
}
}
},
"definitions": {
"github_com_bestruirui_bestsub_internal_core_check.Desc": {
"type": "object",
"properties": {
"desc": {
"type": "string"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"options": {
"type": "string"
},
"require": {
"type": "boolean"
},
"type": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_core_update.LatestInfo": {
"type": "object",
"properties": {
"body": {
"type": "string"
},
"message": {
"type": "string"
},
"published_at": {
"type": "string"
},
"tag_name": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_auth.ChangePasswordRequest": {
"type": "object",
"required": [
"new_password",
"old_password",
"username"
],
"properties": {
"new_password": {
"type": "string",
"example": "new_password"
},
"old_password": {
"type": "string",
"example": "old_password"
},
"username": {
"type": "string",
"example": "admin"
}
}
},
"github_com_bestruirui_bestsub_internal_models_auth.Data": {
"type": "object",
"properties": {
"username": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_auth.LoginRequest": {
"type": "object",
"required": [
"password",
"username"
],
"properties": {
"password": {
"type": "string",
"example": "admin"
},
"username": {
"type": "string",
"example": "admin"
}
}
},
"github_com_bestruirui_bestsub_internal_models_auth.LoginResponse": {
"type": "object",
"properties": {
"access_expires_at": {
"type": "string",
"example": "2024-01-01T12:00:00Z"
},
"access_token": {
"type": "string",
"example": "access_token_string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_auth.UpdateUserInfoRequest": {
"type": "object",
"required": [
"username"
],
"properties": {
"username": {
"type": "string",
"example": "admin"
}
}
},
"github_com_bestruirui_bestsub_internal_models_check.Request": {
"type": "object",
"properties": {
"config": {},
"enable": {
"type": "boolean"
},
"name": {
"type": "string",
"example": "测试检测任务"
},
"task": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_check.Task"
}
}
},
"github_com_bestruirui_bestsub_internal_models_check.Response": {
"type": "object",
"properties": {
"config": {},
"enable": {
"type": "boolean"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"result": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_check.Result"
},
"status": {
"type": "string"
},
"task": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_check.Task"
}
}
},
"github_com_bestruirui_bestsub_internal_models_check.Result": {
"type": "object",
"properties": {
"duration": {
"type": "integer"
},
"extra": {},
"last_run": {
"type": "string"
},
"msg": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_check.Task": {
"type": "object",
"properties": {
"cron_expr": {
"type": "string",
"example": "0 0 * * *"
},
"log_level": {
"type": "string",
"example": "info"
},
"log_write_file": {
"type": "boolean",
"example": true
},
"notify": {
"type": "boolean",
"example": true
},
"notify_channel": {
"type": "integer",
"example": 1
},
"sub_id": {
"type": "array",
"items": {
"type": "integer"
},
"example": [
1
]
},
"sub_id_exclude": {
"type": "boolean",
"example": false
},
"timeout": {
"type": "integer",
"example": 60
},
"type": {
"type": "string",
"example": "test"
}
}
},
"github_com_bestruirui_bestsub_internal_models_node.Filter": {
"type": "object",
"properties": {
"alive_status": {
"type": "integer"
},
"country": {
"type": "array",
"items": {
"type": "string"
}
},
"country_exclude": {
"type": "boolean"
},
"delay_less_than": {
"type": "integer"
},
"risk_less_than": {
"type": "integer"
},
"speed_down_more": {
"type": "integer"
},
"speed_up_more": {
"type": "integer"
},
"sub_id": {
"type": "array",
"items": {
"type": "integer"
}
},
"sub_id_exclude": {
"type": "boolean"
}
}
},
"github_com_bestruirui_bestsub_internal_models_node.SimpleInfo": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"delay": {
"type": "integer"
},
"risk": {
"type": "integer"
},
"speed_down": {
"type": "integer"
},
"speed_up": {
"type": "integer"
}
}
},
"github_com_bestruirui_bestsub_internal_models_notify.NameAndID": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_notify.Request": {
"type": "object",
"properties": {
"config": {},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_notify.Response": {
"type": "object",
"properties": {
"config": {},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_notify.Template": {
"type": "object",
"properties": {
"template": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_setting.Setting": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_share.GenConfig": {
"type": "object",
"properties": {
"filter": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_node.Filter"
},
"proxy": {
"type": "boolean"
},
"rename": {
"type": "string"
},
"sub_converter": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_share.SubConverterConfig"
}
}
},
"github_com_bestruirui_bestsub_internal_models_share.Request": {
"type": "object",
"properties": {
"enable": {
"type": "boolean"
},
"expires": {
"type": "integer"
},
"gen": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_share.GenConfig"
},
"max_access_count": {
"type": "integer"
},
"name": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_share.Response": {
"type": "object",
"properties": {
"access_count": {
"type": "integer"
},
"enable": {
"type": "boolean"
},
"expires": {
"type": "integer"
},
"gen": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_share.GenConfig"
},
"id": {
"type": "integer"
},
"max_access_count": {
"type": "integer"
},
"name": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_share.SubConverterConfig": {
"type": "object",
"properties": {
"config": {
"type": "string"
},
"target": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_storage.Request": {
"type": "object",
"properties": {
"config": {},
"name": {
"type": "string",
"example": "webdav"
},
"type": {
"type": "string",
"example": "webdav"
}
}
},
"github_com_bestruirui_bestsub_internal_models_storage.Response": {
"type": "object",
"properties": {
"config": {},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_sub.Config": {
"type": "object",
"properties": {
"protocol_filter": {
"type": "array",
"items": {
"type": "string"
}
},
"protocol_filter_enable": {
"type": "boolean"
},
"protocol_filter_mode": {
"type": "boolean"
},
"proxy": {
"type": "boolean"
},
"timeout": {
"type": "integer"
},
"url": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_sub.Request": {
"type": "object",
"properties": {
"config": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_sub.Config"
},
"cron_expr": {
"type": "string",
"example": "0 0 * * *"
},
"enable": {
"type": "boolean"
},
"name": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_sub.Response": {
"type": "object",
"properties": {
"config": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_sub.Config"
},
"created_at": {
"type": "string"
},
"cron_expr": {
"type": "string"
},
"enable": {
"type": "boolean"
},
"id": {
"type": "integer"
},
"info": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_node.SimpleInfo"
},
"name": {
"type": "string"
},
"result": {
"$ref": "#/definitions/github_com_bestruirui_bestsub_internal_models_sub.Result"
},
"status": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_models_sub.Result": {
"type": "object",
"properties": {
"duration": {
"type": "integer"
},
"fail": {
"type": "integer"
},
"last_run": {
"type": "string"
},
"msg": {
"type": "string"
},
"node_null_count": {
"type": "integer"
},
"raw_count": {
"type": "integer"
},
"success": {
"type": "integer"
}
}
},
"github_com_bestruirui_bestsub_internal_models_system.HealthResponse": {
"type": "object",
"properties": {
"database": {
"description": "数据库状态",
"type": "string",
"example": "connected"
},
"status": {
"description": "服务状态",
"type": "string",
"example": "ok"
},
"timestamp": {
"description": "检查时间",
"type": "string",
"example": "2024-01-01T12:00:00"
},
"version": {
"description": "版本信息",
"type": "string",
"example": "1.0.0"
}
}
},
"github_com_bestruirui_bestsub_internal_models_system.Info": {
"type": "object",
"properties": {
"cpu_percent": {
"description": "CPU 占用率",
"type": "number"
},
"download_bytes": {
"description": "下载流量 (bytes)",
"type": "integer"
},
"memory_used": {
"description": "已使用内存 (bytes)",
"type": "integer"
},
"start_time": {
"description": "启动时间",
"type": "string"
},
"upload_bytes": {
"description": "上传流量 (bytes)",
"type": "integer"
}
}
},
"github_com_bestruirui_bestsub_internal_models_system.Version": {
"type": "object",
"properties": {
"author": {
"type": "string"
},
"build_time": {
"type": "string"
},
"commit": {
"type": "string"
},
"repo": {
"type": "string"
},
"subconverter_version": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_modules_notify.Desc": {
"type": "object",
"properties": {
"desc": {
"type": "string"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"options": {
"type": "string"
},
"require": {
"type": "boolean"
},
"type": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_modules_storage.Desc": {
"type": "object",
"properties": {
"desc": {
"type": "string"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"options": {
"type": "string"
},
"require": {
"type": "boolean"
},
"type": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"github_com_bestruirui_bestsub_internal_server_resp.ResponseStruct": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 200
},
"data": {},
"message": {
"type": "string",
"example": "success"
}
}
}
},
"securityDefinitions": {
"BearerAuth": {
"description": "类型为 \"Bearer\",后跟空格和 JWT 令牌。",
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}
================================================
FILE: docs/database/BESTSUB.json
================================================
{
"tables": [
{
"name": "auth",
"comment": "",
"color": "#175e7a",
"fields": [
{
"id": "5fSQ6mGWfRsgg-k3iArX5",
"name": "id",
"type": "INTEGER",
"comment": "",
"unique": false,
"increment": false,
"notNull": false,
"primary": true,
"default": "",
"check": ""
},
{
"id": "p_zxx7J6E2VHvda5XLwM4",
"name": "username",
"type": "TEXT",
"comment": "",
"unique": true,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
},
{
"id": "UZe2dA81_wloaZagtZqqa",
"name": "password",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
}
],
"indices": [],
"id": "K9Bq53vxKnW3VYQjTlNhu",
"x": 54,
"y": 40
},
{
"name": "setting",
"comment": "",
"color": "#175e7a",
"fields": [
{
"id": "C3TajAx2rVfJyKDr5wS7N",
"name": "key",
"type": "TEXT",
"comment": "",
"unique": true,
"increment": false,
"notNull": true,
"primary": true,
"default": "",
"check": ""
},
{
"id": "VFICQh-IoYbADFMaVtyJM",
"name": "value",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
}
],
"indices": [],
"id": "hjBAyr0lCMLDGLnEqx4mt",
"x": 308,
"y": 40
},
{
"name": "notify_template",
"comment": "",
"color": "#175e7a",
"fields": [
{
"id": "aPVyZgMlY0rAXkhsiGN0S",
"name": "type",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": true,
"default": "",
"check": ""
},
{
"id": "GedQIFxcSKnhDqDdMBmkd",
"name": "template",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
}
],
"indices": [],
"id": "qvBLHFHDEQMcvN7Mg1Yzf",
"x": 562,
"y": 40
},
{
"name": "notify",
"comment": "",
"color": "#175e7a",
"fields": [
{
"id": "yn7TOVZbZ2hHQsdn8YMdg",
"name": "id",
"type": "INTEGER",
"comment": "",
"unique": true,
"increment": false,
"notNull": true,
"primary": true,
"default": "",
"check": ""
},
{
"id": "9oiTodm77XzAF_35GhPpy",
"name": "name",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
},
{
"id": "E8tUPCAZAWzs6Bo4R-gZ8",
"name": "type",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
},
{
"id": "ur8-HAWlUb3BVOYrignKn",
"name": "config",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
}
],
"indices": [],
"id": "vpWds5GXNQffE5c_w8GTa",
"x": 816,
"y": 40
},
{
"name": "check_task",
"comment": "",
"color": "#175e7a",
"fields": [
{
"id": "X8DIONkwFxIhFk84Vdw8H",
"name": "id",
"type": "INTEGER",
"comment": "",
"unique": false,
"increment": false,
"notNull": false,
"primary": true,
"default": "",
"check": ""
},
{
"id": "z9fE6n_6oXg326t0wxI3z",
"name": "enable",
"type": "BOOLEAN",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
},
{
"id": "gDeq6xOXxK-EPPP25noY3",
"name": "name",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": false,
"primary": false,
"default": "",
"check": ""
},
{
"id": "ZnCL2M1C-zIXaWpvar0NN",
"name": "task",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
},
{
"id": "TTpDOH2ASKlaqGhQjaiN3",
"name": "config",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": false,
"primary": false,
"default": "",
"check": ""
},
{
"id": "Jh2P1spnA7OmJRSSc62_L",
"name": "result",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": false,
"primary": false,
"default": "",
"check": ""
}
],
"indices": [],
"id": "P26OgjsewN5mmfipR1joA",
"x": 1070,
"y": 40
},
{
"name": "storage",
"comment": "",
"color": "#175e7a",
"fields": [
{
"id": "IqL9ngLv_3lGHVB3CzhxN",
"name": "id",
"type": "INTEGER",
"comment": "",
"unique": false,
"increment": false,
"notNull": false,
"primary": true,
"default": "",
"check": ""
},
{
"id": "GDKYuiA0I4uDeeoBl-RyA",
"name": "name",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": false,
"primary": false,
"default": "",
"check": ""
},
{
"id": "BeAtbwLSpgr6HVsYy_Zly",
"name": "type",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
},
{
"id": "SC60MqiPB7oKm-4P9OYmB",
"name": "config",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
}
],
"indices": [],
"id": "6zB3TFuEBkmefWBH2oIzY",
"x": 1070,
"y": 353
},
{
"name": "sub_template",
"comment": "",
"color": "#175e7a",
"fields": [
{
"id": "aQ_KOAUAP7ff2zUH1pgIP",
"name": "id",
"type": "INTEGER",
"comment": "",
"unique": false,
"increment": false,
"notNull": false,
"primary": true,
"default": "",
"check": ""
},
{
"id": "3iQaDIqv5rUBrzOPmSH0y",
"name": "name",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": false,
"primary": false,
"default": "",
"check": ""
},
{
"id": "CACizfDmfOi6i_MDE4lig",
"name": "type",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
},
{
"id": "aUKGH4p_TMNRqmn_jl_cY",
"name": "template",
"type": "TEXT",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "",
"check": ""
}
],
"indices": [],
"id": "Nd14xBak0Dylm-vCR6Kow",
"x": 816,
"y": 353
},
{
"name": "sub",
"comment": "",
"color": "#175e7a",
"fields": [
{
"id": "cg8ZPMZMT6kxafhRqFHv2",
"name": "id",
"type": "INTEGER",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": true,
"default": "",
"check": ""
},
{
"id": "j1xYw_Ql6gyzEftfgk0N7",
"name": "enable",
"type": "BOOLEAN",
"comment": "",
"unique": false,
"increment": false,
"notNull": true,
"primary": false,
"default": "true",
"check": ""
},
{
"id": "bMeAdLhPX96ajjp4Lvlt3",
"name": "name",
"type": "TEXT",
"comment": "",
"
gitextract_4ho2v_lh/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ ├── config.yml
│ │ └── feature_request.yml
│ └── workflows/
│ ├── changelog.yml
│ └── release.yml
├── .gitignore
├── LICENSE
├── README.md
├── cmd/
│ └── bestsub/
│ └── main.go
├── deploy/
│ ├── README.md
│ └── docker-compose.yaml
├── docs/
│ ├── api/
│ │ └── swagger.json
│ ├── database/
│ │ ├── BESTSUB.json
│ │ └── README.md
│ └── rename/
│ └── README.md
├── go.mod
├── go.sum
├── internal/
│ ├── config/
│ │ └── base.go
│ ├── core/
│ │ ├── check/
│ │ │ ├── check.go
│ │ │ └── checker/
│ │ │ ├── alive.go
│ │ │ ├── country.go
│ │ │ ├── speed.go
│ │ │ └── tiktok.go
│ │ ├── cron/
│ │ │ ├── check.go
│ │ │ ├── cron.go
│ │ │ └── fetch.go
│ │ ├── fetch/
│ │ │ └── fetch.go
│ │ ├── mihomo/
│ │ │ └── mihomo.go
│ │ ├── node/
│ │ │ ├── exist.go
│ │ │ ├── info.go
│ │ │ ├── node.go
│ │ │ └── var.go
│ │ ├── subconv/
│ │ │ └── subconv.go
│ │ ├── system/
│ │ │ └── monitor.go
│ │ ├── task/
│ │ │ └── task.go
│ │ └── update/
│ │ ├── core.go
│ │ └── update.go
│ ├── database/
│ │ ├── client/
│ │ │ └── sqlite/
│ │ │ ├── auth.go
│ │ │ ├── check.go
│ │ │ ├── migration/
│ │ │ │ ├── 001_table.go
│ │ │ │ ├── 002_add_sub_tags.go
│ │ │ │ └── migration.go
│ │ │ ├── migrator.go
│ │ │ ├── notify.go
│ │ │ ├── setting.go
│ │ │ ├── share.go
│ │ │ ├── sqlite.go
│ │ │ ├── storage.go
│ │ │ └── sub.go
│ │ ├── database.go
│ │ ├── init.go
│ │ ├── interfaces/
│ │ │ ├── auth.go
│ │ │ ├── check.go
│ │ │ ├── notify.go
│ │ │ ├── repository.go
│ │ │ ├── setting.go
│ │ │ ├── share.go
│ │ │ ├── storage.go
│ │ │ └── sub.go
│ │ ├── migration/
│ │ │ └── migration.go
│ │ └── op/
│ │ ├── auth.go
│ │ ├── check.go
│ │ ├── notify.go
│ │ ├── repo.go
│ │ ├── setting.go
│ │ ├── share.go
│ │ ├── storage.go
│ │ └── sub.go
│ ├── models/
│ │ ├── auth/
│ │ │ ├── auth.go
│ │ │ └── default.go
│ │ ├── check/
│ │ │ └── check.go
│ │ ├── common/
│ │ │ └── base.go
│ │ ├── config/
│ │ │ ├── config.go
│ │ │ └── default.go
│ │ ├── node/
│ │ │ └── node.go
│ │ ├── notify/
│ │ │ ├── default.go
│ │ │ └── notify.go
│ │ ├── setting/
│ │ │ ├── default.go
│ │ │ └── setting.go
│ │ ├── share/
│ │ │ └── share.go
│ │ ├── storage/
│ │ │ └── storage.go
│ │ ├── sub/
│ │ │ └── sub.go
│ │ └── system/
│ │ └── info.go
│ ├── modules/
│ │ ├── country/
│ │ │ ├── channel/
│ │ │ │ ├── cloudflare.go
│ │ │ │ ├── commen.go
│ │ │ │ ├── freeip.go
│ │ │ │ ├── ip_sb.go
│ │ │ │ ├── ipapi.go
│ │ │ │ ├── ipwho.go
│ │ │ │ ├── myip.go
│ │ │ │ ├── reallyfreegeoip.go
│ │ │ │ └── register.go
│ │ │ └── country.go
│ │ ├── notify/
│ │ │ ├── channel/
│ │ │ │ ├── email.go
│ │ │ │ └── webhook.go
│ │ │ └── notify.go
│ │ ├── register/
│ │ │ ├── category.go
│ │ │ └── register.go
│ │ ├── share/
│ │ │ └── share.go
│ │ └── storage/
│ │ ├── channel/
│ │ │ └── webdav.go
│ │ └── storage.go
│ ├── server/
│ │ ├── auth/
│ │ │ └── auth.go
│ │ ├── handlers/
│ │ │ ├── auth.go
│ │ │ ├── check.go
│ │ │ ├── info.go
│ │ │ ├── log.go
│ │ │ ├── notify.go
│ │ │ ├── pprof.go
│ │ │ ├── scalar.go
│ │ │ ├── setting.go
│ │ │ ├── share.go
│ │ │ ├── storage.go
│ │ │ ├── sub.go
│ │ │ ├── update.go
│ │ │ └── ws.go
│ │ ├── middleware/
│ │ │ ├── auth.go
│ │ │ ├── cors.go
│ │ │ ├── logging.go
│ │ │ ├── recovery.go
│ │ │ └── static.go
│ │ ├── resp/
│ │ │ └── resp.go
│ │ ├── router/
│ │ │ └── router.go
│ │ └── server/
│ │ └── server.go
│ └── utils/
│ ├── cache/
│ │ ├── cache.go
│ │ └── shard.go
│ ├── color/
│ │ └── color.go
│ ├── country/
│ │ └── conutry.go
│ ├── desc/
│ │ └── desc.go
│ ├── generic/
│ │ ├── map.go
│ │ └── queue.go
│ ├── info/
│ │ └── info.go
│ ├── log/
│ │ └── log.go
│ ├── shutdown/
│ │ └── shutdown.go
│ ├── ua/
│ │ └── ua.go
│ └── utils.go
├── scripts/
│ ├── build.sh
│ └── dockerfiles/
│ ├── Dockerfile.alpine
│ ├── Dockerfile.debian
│ └── entrypoint.sh
├── static/
│ └── static.go
└── web/
├── .env.example
├── .gitignore
├── components.json
├── eslint.config.mjs
├── next.config.ts
├── package.json
├── postcss.config.mjs
├── src/
│ ├── app/
│ │ ├── globals.css
│ │ ├── layout.tsx
│ │ ├── not-found.tsx
│ │ └── page.tsx
│ ├── components/
│ │ ├── app/
│ │ │ ├── app-layout.tsx
│ │ │ ├── index.ts
│ │ │ └── spa-app.tsx
│ │ ├── features/
│ │ │ ├── check/
│ │ │ │ ├── components/
│ │ │ │ │ ├── check-form.tsx
│ │ │ │ │ ├── check-list.tsx
│ │ │ │ │ ├── check-page.tsx
│ │ │ │ │ ├── form-sections/
│ │ │ │ │ │ ├── basic-config-section.tsx
│ │ │ │ │ │ ├── basic-info-section.tsx
│ │ │ │ │ │ ├── extra-config-section.tsx
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── log-config.tsx
│ │ │ │ │ │ └── notify-config.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── constants/
│ │ │ │ │ └── index.ts
│ │ │ │ ├── hooks/
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── useCheckForm.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── utils/
│ │ │ │ └── index.ts
│ │ │ ├── home/
│ │ │ │ └── dashboard.tsx
│ │ │ ├── index.ts
│ │ │ ├── login/
│ │ │ │ ├── index.ts
│ │ │ │ ├── login-form.tsx
│ │ │ │ └── login-page.tsx
│ │ │ ├── notify/
│ │ │ │ ├── components/
│ │ │ │ │ ├── notify-form.tsx
│ │ │ │ │ ├── notify-list.tsx
│ │ │ │ │ └── notify-page.tsx
│ │ │ │ ├── hooks/
│ │ │ │ │ ├── useNotifyForm.ts
│ │ │ │ │ └── useNotifyOperations.ts
│ │ │ │ └── index.ts
│ │ │ ├── profile/
│ │ │ │ ├── ProfileDesktopNavButton.tsx
│ │ │ │ ├── ProfileDialog.tsx
│ │ │ │ ├── ProfileLayout.tsx
│ │ │ │ ├── ProfileNavButton.tsx
│ │ │ │ └── index.ts
│ │ │ ├── settings/
│ │ │ │ ├── SettingsActions.tsx
│ │ │ │ ├── SettingsLayout.tsx
│ │ │ │ ├── sections/
│ │ │ │ │ ├── NodeSettingsSection.tsx
│ │ │ │ │ ├── NotifySettingsSection.tsx
│ │ │ │ │ ├── SystemSettingsSection.tsx
│ │ │ │ │ ├── TaskSettingsSection.tsx
│ │ │ │ │ ├── fields/
│ │ │ │ │ │ ├── BooleanSettingField.tsx
│ │ │ │ │ │ ├── MultiSelectSettingField.tsx
│ │ │ │ │ │ ├── NumberSettingField.tsx
│ │ │ │ │ │ ├── SelectSettingField.tsx
│ │ │ │ │ │ ├── SettingCard.tsx
│ │ │ │ │ │ ├── TextSettingField.tsx
│ │ │ │ │ │ └── types.ts
│ │ │ │ │ └── index.ts
│ │ │ │ ├── settings.tsx
│ │ │ │ └── utils/
│ │ │ │ └── value-mappers.ts
│ │ │ ├── share/
│ │ │ │ ├── components/
│ │ │ │ │ ├── form-sections/
│ │ │ │ │ │ ├── alive-status-section.tsx
│ │ │ │ │ │ ├── basic-info-section.tsx
│ │ │ │ │ │ ├── config-section.tsx
│ │ │ │ │ │ ├── country-section.tsx
│ │ │ │ │ │ ├── filter-section.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── share-copy.tsx
│ │ │ │ │ ├── share-date-pick.tsx
│ │ │ │ │ ├── share-form.tsx
│ │ │ │ │ ├── share-list.tsx
│ │ │ │ │ └── share-page.tsx
│ │ │ │ ├── constants/
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── sub-rules.ts
│ │ │ │ ├── hooks/
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── useShareForm.ts
│ │ │ │ │ └── useShareOperations.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── utils/
│ │ │ │ └── index.ts
│ │ │ ├── storage/
│ │ │ │ └── storage.tsx
│ │ │ ├── sub/
│ │ │ │ ├── components/
│ │ │ │ │ ├── batch-sub-form.tsx
│ │ │ │ │ ├── form-sections/
│ │ │ │ │ │ ├── basic-info-section.tsx
│ │ │ │ │ │ ├── config-section.tsx
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── protocol-filter-section.tsx
│ │ │ │ │ ├── sub-detail.tsx
│ │ │ │ │ ├── sub-form.tsx
│ │ │ │ │ ├── sub-list.tsx
│ │ │ │ │ └── sub-page.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── utils/
│ │ │ │ └── index.ts
│ │ │ └── system-update/
│ │ │ └── index.tsx
│ │ ├── layout/
│ │ │ ├── app-sidebar.tsx
│ │ │ ├── index.ts
│ │ │ ├── nav-documents.tsx
│ │ │ ├── nav-main.tsx
│ │ │ ├── nav-secondary.tsx
│ │ │ ├── nav-user.tsx
│ │ │ └── site-header.tsx
│ │ ├── pages/
│ │ │ ├── index.ts
│ │ │ └── not-found.tsx
│ │ ├── providers/
│ │ │ ├── alert-provider.tsx
│ │ │ ├── auth-provider.tsx
│ │ │ ├── index.ts
│ │ │ ├── query-provider.tsx
│ │ │ └── theme-provider.tsx
│ │ ├── shared/
│ │ │ ├── dynamic-config-form.tsx
│ │ │ ├── status-badge.tsx
│ │ │ └── subscription-section.tsx
│ │ └── ui/
│ │ ├── accordion.tsx
│ │ ├── alert-dialog.tsx
│ │ ├── avatar.tsx
│ │ ├── badge.tsx
│ │ ├── breadcrumb.tsx
│ │ ├── button.tsx
│ │ ├── calendar.tsx
│ │ ├── card.tsx
│ │ ├── chart.tsx
│ │ ├── checkbox.tsx
│ │ ├── dialog.tsx
│ │ ├── drawer.tsx
│ │ ├── dropdown-menu.tsx
│ │ ├── hover-card.tsx
│ │ ├── input.tsx
│ │ ├── label.tsx
│ │ ├── loading.tsx
│ │ ├── mode-toggle.tsx
│ │ ├── popover.tsx
│ │ ├── select.tsx
│ │ ├── separator.tsx
│ │ ├── sheet.tsx
│ │ ├── sidebar.tsx
│ │ ├── skeleton.tsx
│ │ ├── sonner.tsx
│ │ ├── switch.tsx
│ │ ├── table.tsx
│ │ ├── tabs.tsx
│ │ ├── textarea.tsx
│ │ ├── toggle-group.tsx
│ │ ├── toggle.tsx
│ │ └── tooltip.tsx
│ ├── constant/
│ │ ├── protocols.ts
│ │ └── settings-keys.ts
│ ├── lib/
│ │ ├── api/
│ │ │ ├── client.ts
│ │ │ └── token-manager.ts
│ │ ├── config/
│ │ │ ├── config.ts
│ │ │ └── version.ts
│ │ ├── hooks/
│ │ │ ├── index.ts
│ │ │ ├── use-form-update.ts
│ │ │ ├── use-form.ts
│ │ │ ├── use-mobile.ts
│ │ │ └── useOverflowDetection.ts
│ │ └── queries/
│ │ ├── check-queries.ts
│ │ ├── index.ts
│ │ ├── setting-queries.ts
│ │ ├── share-queries.ts
│ │ └── sub-queries.ts
│ ├── router/
│ │ ├── core/
│ │ │ ├── context.tsx
│ │ │ ├── outlet.tsx
│ │ │ └── router.tsx
│ │ ├── hooks/
│ │ │ ├── use-navigation.tsx
│ │ │ ├── use-route-preloader.tsx
│ │ │ └── use-route-title.tsx
│ │ ├── index.ts
│ │ └── routes.tsx
│ ├── types/
│ │ ├── api.ts
│ │ ├── auth.ts
│ │ ├── check.ts
│ │ ├── common.ts
│ │ ├── index.ts
│ │ ├── notify.ts
│ │ ├── setting.ts
│ │ ├── share.ts
│ │ ├── sub.ts
│ │ └── update.ts
│ └── utils/
│ ├── cron.ts
│ ├── format.ts
│ ├── index.ts
│ ├── time.ts
│ ├── url.ts
│ └── validation.ts
└── tsconfig.json
SYMBOL INDEX (1189 symbols across 267 files)
FILE: cmd/bestsub/main.go
function main (line 17) | func main() {
FILE: internal/config/base.go
function init (line 21) | func init() {
function Base (line 64) | func Base() config.Base {
function setupPaths (line 68) | func setupPaths(config *config.Base, configPath string) {
function loadFromFile (line 89) | func loadFromFile(config *config.Base, filePath string) error {
function loadFromEnv (line 104) | func loadFromEnv(config *config.Base) {
function parsePort (line 133) | func parsePort(portStr string) (int, error) {
function createDefaultConfig (line 144) | func createDefaultConfig(filePath string) error {
function validateConfig (line 166) | func validateConfig(config *config.Base) error {
function validateServerConfig (line 190) | func validateServerConfig(config *config.ServerConfig) error {
function validateDatabaseConfig (line 206) | func validateDatabaseConfig(config *config.DatabaseConfig) error {
function validateLogConfig (line 223) | func validateLogConfig(config *config.LogConfig) error {
function validateJWTConfig (line 252) | func validateJWTConfig(config *config.JWTConfig) error {
function validateSessionConfig (line 268) | func validateSessionConfig(config *config.SessionConfig) error {
FILE: internal/core/check/check.go
function Get (line 12) | func Get(m string, c string) (check.Instance, error) {
function GetTypes (line 16) | func GetTypes() []string {
function GetInfoMap (line 20) | func GetInfoMap() map[string][]Desc {
FILE: internal/core/check/checker/alive.go
type Alive (line 22) | type Alive struct
method Init (line 34) | func (e *Alive) Init() error {
method Run (line 38) | func (e *Alive) Run(ctx context.Context, log *log.Logger, subID []uint...
method detect (line 116) | func (e *Alive) detect(ctx context.Context, raw map[string]any) bool {
type Result (line 28) | type Result struct
function init (line 135) | func init() {
FILE: internal/core/check/checker/country.go
type Country (line 20) | type Country struct
method Init (line 25) | func (e *Country) Init() error {
method Run (line 29) | func (e *Country) Run(ctx context.Context, log *log.Logger, subID []ui...
function init (line 96) | func init() {
FILE: internal/core/check/checker/speed.go
constant mbToBytes (line 23) | mbToBytes = 1024 * 1024
type Speed (line 25) | type Speed struct
method Init (line 44) | func (e *Speed) Init() error {
method Run (line 48) | func (e *Speed) Run(ctx context.Context, log *log.Logger, subID []uint...
method download (line 126) | func (e *Speed) download(ctx context.Context, client *http.Client) int...
method upload (line 148) | func (e *Speed) upload(ctx context.Context, client *http.Client) int64 {
type trackingZeroReader (line 174) | type trackingZeroReader struct
method Read (line 179) | func (r *trackingZeroReader) Read(p []byte) (n int, err error) {
function init (line 197) | func init() {
FILE: internal/core/check/checker/tiktok.go
type TikTok (line 23) | type TikTok struct
method Init (line 28) | func (e *TikTok) Init() error {
method Run (line 32) | func (e *TikTok) Run(ctx context.Context, log *log.Logger, subID []uin...
method detectTikTok (line 99) | func (e *TikTok) detectTikTok(ctx context.Context, raw map[string]any)...
function extractRegion (line 151) | func extractRegion(html []byte) bool {
function init (line 155) | func init() {
FILE: internal/core/cron/check.go
function CheckLoad (line 22) | func CheckLoad() {
function CheckAdd (line 32) | func CheckAdd(data *checkModel.Data) error {
function CheckUpdate (line 78) | func CheckUpdate(data *checkModel.Data) error {
function CheckRun (line 84) | func CheckRun(id uint16) error {
function CheckEnable (line 93) | func CheckEnable(id uint16) error {
function CheckDisable (line 108) | func CheckDisable(id uint16) error {
function CheckRemove (line 120) | func CheckRemove(id uint16) error {
function CheckStop (line 132) | func CheckStop(id uint16) error {
function CheckStatus (line 139) | func CheckStatus(id uint16) string {
FILE: internal/core/cron/cron.go
type cronFunc (line 9) | type cronFunc struct
constant RunningStatus (line 17) | RunningStatus = "running"
constant ScheduledStatus (line 18) | ScheduledStatus = "scheduled"
constant PendingStatus (line 19) | PendingStatus = "pending"
constant DisabledStatus (line 20) | DisabledStatus = "disabled"
function Start (line 23) | func Start() {
function Stop (line 27) | func Stop() {
FILE: internal/core/cron/fetch.go
function FetchLoad (line 21) | func FetchLoad() {
function FetchAdd (line 32) | func FetchAdd(data *subModel.Data) error {
function FetchRun (line 61) | func FetchRun(subID uint16) subModel.Result {
function FetchEnable (line 90) | func FetchEnable(subID uint16) error {
function FetchDisable (line 109) | func FetchDisable(subID uint16) error {
function FetchRemove (line 121) | func FetchRemove(subID uint16) error {
function FetchStop (line 133) | func FetchStop(subID uint16) error {
function FetchUpdate (line 140) | func FetchUpdate(data *subModel.Data) error {
function FetchStatus (line 145) | func FetchStatus(subID uint16) string {
FILE: internal/core/fetch/fetch.go
function Do (line 24) | func Do(ctx context.Context, subID uint16, config string) subModel.Result {
function createFailureResult (line 127) | func createFailureResult(msg string, startTime time.Time) subModel.Result {
function createSuccessResult (line 137) | func createSuccessResult(count uint32, startTime time.Time, nodeNull boo...
FILE: internal/core/mihomo/mihomo.go
type HC (line 19) | type HC struct
method Release (line 150) | func (h *HC) Release() {
function parsePort (line 43) | func parsePort(portStr string) (uint16, error) {
function Default (line 51) | func Default(useProxy bool) *HC {
function direct (line 103) | func direct() *HC {
function Proxy (line 111) | func Proxy(raw map[string]any) *HC {
FILE: internal/core/node/exist.go
type exist (line 5) | type exist struct
method Exist (line 14) | func (k *exist) Exist(key uint64) bool {
method Add (line 21) | func (k *exist) Add(key uint64) {
method Remove (line 26) | func (k *exist) Remove(key uint64) {
function NewExist (line 10) | func NewExist(size int) *exist {
FILE: internal/core/node/info.go
function RefreshInfo (line 5) | func RefreshInfo() {
FILE: internal/core/node/node.go
function InitNodePool (line 25) | func InitNodePool(size int) {
function CloseNodePool (line 51) | func CloseNodePool() error {
type nameNode (line 72) | type nameNode struct
function Add (line 76) | func Add(node *[]nodeModel.Base) int {
function ForEach (line 165) | func ForEach(fn func(node []byte)) {
function GetAll (line 173) | func GetAll() []nodeModel.Data {
function GetBySubIdExclude (line 179) | func GetBySubIdExclude(subId []uint16) []uint16 {
function GetBySubId (line 191) | func GetBySubId(subId []uint16) *[]nodeModel.Data {
function GetByFilter (line 203) | func GetByFilter(filter nodeModel.Filter) *[]nodeModel.Data {
function mergeNodesToPool (line 244) | func mergeNodesToPool(newNodes []nodeModel.Data) int {
function GetSubInfo (line 292) | func GetSubInfo(subID uint16) nodeModel.SimpleInfo {
function GetCountryInfo (line 298) | func GetCountryInfo(country string) nodeModel.SimpleInfo {
function DeleteBySubId (line 303) | func DeleteBySubId(subID uint16) {
FILE: internal/core/node/var.go
type infoSums (line 27) | type infoSums struct
FILE: internal/core/subconv/subconv.go
function ConvertData (line 16) | func ConvertData(raw string, target string) string {
FILE: internal/core/system/monitor.go
function init (line 19) | func init() {
function AddUploadBytes (line 23) | func AddUploadBytes(bytes uint64) {
function AddDownloadBytes (line 27) | func AddDownloadBytes(bytes uint64) {
function GetSystemInfo (line 31) | func GetSystemInfo() *system.Info {
function Reset (line 59) | func Reset() {
FILE: internal/core/task/task.go
function Init (line 8) | func Init(maxThread int) {
function Submit (line 13) | func Submit(fn func()) {
function Release (line 17) | func Release() {
function MaxThread (line 21) | func MaxThread() int {
FILE: internal/core/update/core.go
function UpdateCore (line 17) | func UpdateCore() error {
function updateCore (line 28) | func updateCore() error {
function restartExecutable (line 94) | func restartExecutable(execPath string) {
FILE: internal/core/update/update.go
constant bestsubUpdateUrl (line 22) | bestsubUpdateUrl = "https://github.com/bestruirui/bestsub/releases/la...
constant bestsubUpdateApiUrl (line 23) | bestsubUpdateApiUrl = "https://api.github.com/repos/bestruirui/BestSub/r...
type LatestInfo (line 26) | type LatestInfo struct
function GetLatestBestsubInfo (line 33) | func GetLatestBestsubInfo() (*LatestInfo, error) {
function getLatestInfo (line 37) | func getLatestInfo(url string, proxy bool) (*LatestInfo, error) {
function download (line 74) | func download(url string, proxy bool) ([]byte, error) {
function unzip (line 102) | func unzip(data []byte, dest string) error {
function inDest (line 157) | func inDest(fpath, dest string) bool {
FILE: internal/database/client/sqlite/auth.go
method Auth (line 14) | func (db *DB) Auth() interfaces.AuthRepository {
type AuthRepository (line 19) | type AuthRepository struct
method Get (line 24) | func (db *AuthRepository) Get(ctx context.Context) (*auth.Data, error) {
method UpdateName (line 46) | func (r *AuthRepository) UpdateName(ctx context.Context, name string) ...
method UpdatePassword (line 68) | func (r *AuthRepository) UpdatePassword(ctx context.Context, hashPassw...
method Initialize (line 90) | func (r *AuthRepository) Initialize(ctx context.Context, authData *aut...
method IsInitialized (line 102) | func (r *AuthRepository) IsInitialized(ctx context.Context) (bool, err...
FILE: internal/database/client/sqlite/check.go
type CheckRepository (line 13) | type CheckRepository struct
method Create (line 21) | func (r *CheckRepository) Create(ctx context.Context, t *check.Data) e...
method GetByID (line 46) | func (r *CheckRepository) GetByID(ctx context.Context, id uint16) (*ch...
method Update (line 71) | func (r *CheckRepository) Update(ctx context.Context, t *check.Data) e...
method Delete (line 91) | func (r *CheckRepository) Delete(ctx context.Context, id uint16) error {
method List (line 103) | func (r *CheckRepository) List(ctx context.Context) (*[]check.Data, er...
method Check (line 17) | func (db *DB) Check() interfaces.CheckRepository {
FILE: internal/database/client/sqlite/migration/001_table.go
function Migration001Table (line 6) | func Migration001Table() string {
function init (line 96) | func init() {
FILE: internal/database/client/sqlite/migration/002_add_sub_tags.go
function Migration002AddSubTags (line 6) | func Migration002AddSubTags() string {
function init (line 14) | func init() {
FILE: internal/database/client/sqlite/migration/migration.go
constant ClientName (line 5) | ClientName = "sqlite"
function Get (line 7) | func Get() []*migration.Info {
FILE: internal/database/client/sqlite/migrator.go
method Migrate (line 11) | func (db *DB) Migrate() error {
method ensureMigrationsTable (line 39) | func (db *DB) ensureMigrationsTable() error {
method getAppliedMigrations (line 56) | func (db *DB) getAppliedMigrations() (map[uint64]bool, error) {
method applyMigrations (line 80) | func (db *DB) applyMigrations(migrations []*migModel.Info) error {
FILE: internal/database/client/sqlite/notify.go
type NotifyRepository (line 13) | type NotifyRepository struct
method Create (line 21) | func (r *NotifyRepository) Create(ctx context.Context, channel *notify...
method GetByID (line 46) | func (r *NotifyRepository) GetByID(ctx context.Context, id uint16) (*n...
method Update (line 69) | func (r *NotifyRepository) Update(ctx context.Context, channel *notify...
method Delete (line 87) | func (r *NotifyRepository) Delete(ctx context.Context, id uint16) error {
method List (line 99) | func (r *NotifyRepository) List(ctx context.Context) (*[]notify.Data, ...
method Notify (line 17) | func (db *DB) Notify() interfaces.NotifyRepository {
type NotifyTemplateRepository (line 132) | type NotifyTemplateRepository struct
method Create (line 140) | func (r *NotifyTemplateRepository) Create(ctx context.Context, templat...
method GetByType (line 157) | func (r *NotifyTemplateRepository) GetByType(ctx context.Context, t st...
method Update (line 177) | func (r *NotifyTemplateRepository) Update(ctx context.Context, templat...
method List (line 191) | func (r *NotifyTemplateRepository) List(ctx context.Context) (*[]notif...
method NotifyTemplate (line 136) | func (db *DB) NotifyTemplate() interfaces.NotifyTemplateRepository {
FILE: internal/database/client/sqlite/setting.go
method Setting (line 12) | func (db *DB) Setting() interfaces.SettingRepository {
type SystemConfigRepository (line 16) | type SystemConfigRepository struct
method Create (line 20) | func (r *SystemConfigRepository) Create(ctx context.Context, configs *...
method GetAll (line 56) | func (r *SystemConfigRepository) GetAll(ctx context.Context) (*[]setti...
method GetByKey (line 86) | func (r *SystemConfigRepository) GetByKey(ctx context.Context, keys []...
method Update (line 129) | func (r *SystemConfigRepository) Update(ctx context.Context, data *[]s...
FILE: internal/database/client/sqlite/share.go
type ShareRepository (line 13) | type ShareRepository struct
method Create (line 21) | func (r *ShareRepository) Create(ctx context.Context, shareData *share...
method GetByID (line 49) | func (r *ShareRepository) GetByID(ctx context.Context, id uint16) (*sh...
method Update (line 76) | func (r *ShareRepository) Update(ctx context.Context, shareData *share...
method UpdateAccessCount (line 98) | func (r *ShareRepository) UpdateAccessCount(ctx context.Context, share...
method Delete (line 131) | func (r *ShareRepository) Delete(ctx context.Context, id uint16) error {
method List (line 143) | func (r *ShareRepository) List(ctx context.Context) (*[]share.Data, er...
method GetGenByToken (line 179) | func (r *ShareRepository) GetGenByToken(ctx context.Context, token str...
method Share (line 17) | func (db *DB) Share() interfaces.ShareRepository {
FILE: internal/database/client/sqlite/sqlite.go
type DB (line 13) | type DB struct
method Close (line 38) | func (db *DB) Close() error {
function New (line 18) | func New(databasePath string) (interfaces.Repository, error) {
function enablePragmas (line 43) | func enablePragmas(db *sql.DB) error {
FILE: internal/database/client/sqlite/storage.go
type StorageRepository (line 14) | type StorageRepository struct
method Create (line 24) | func (r *StorageRepository) Create(ctx context.Context, config *storag...
method GetByID (line 50) | func (r *StorageRepository) GetByID(ctx context.Context, id uint16) (*...
method Update (line 74) | func (r *StorageRepository) Update(ctx context.Context, config *storag...
method Delete (line 93) | func (r *StorageRepository) Delete(ctx context.Context, id uint16) err...
method List (line 106) | func (r *StorageRepository) List(ctx context.Context) (*[]storage.Data...
method Storage (line 19) | func (db *DB) Storage() interfaces.StorageRepository {
FILE: internal/database/client/sqlite/sub.go
type SubRepository (line 14) | type SubRepository struct
method Create (line 22) | func (r *SubRepository) Create(ctx context.Context, link *sub.Data) er...
method GetByID (line 54) | func (r *SubRepository) GetByID(ctx context.Context, id uint16) (*sub....
method Update (line 82) | func (r *SubRepository) Update(ctx context.Context, data *sub.Data) er...
method Delete (line 104) | func (r *SubRepository) Delete(ctx context.Context, id uint16) error {
method List (line 116) | func (r *SubRepository) List(ctx context.Context) (*[]sub.Data, error) {
method BatchCreate (line 154) | func (r *SubRepository) BatchCreate(ctx context.Context, links []*sub....
method Sub (line 18) | func (db *DB) Sub() interfaces.SubRepository {
FILE: internal/database/database.go
function Initialize (line 12) | func Initialize(sqltype, path string) error {
function Close (line 39) | func Close() error {
FILE: internal/database/init.go
function initAuth (line 15) | func initAuth(ctx context.Context, auth interfaces.AuthRepository) error {
function initSystemSetting (line 34) | func initSystemSetting(ctx context.Context, systemSetting interfaces.Set...
function initNotifyTemplate (line 66) | func initNotifyTemplate(ctx context.Context, notifyTemplateRepo interfac...
FILE: internal/database/interfaces/auth.go
type AuthRepository (line 10) | type AuthRepository interface
FILE: internal/database/interfaces/check.go
type CheckRepository (line 9) | type CheckRepository interface
FILE: internal/database/interfaces/notify.go
type NotifyRepository (line 10) | type NotifyRepository interface
type NotifyTemplateRepository (line 28) | type NotifyTemplateRepository interface
FILE: internal/database/interfaces/repository.go
type Repository (line 4) | type Repository interface
FILE: internal/database/interfaces/setting.go
type SettingRepository (line 9) | type SettingRepository interface
FILE: internal/database/interfaces/share.go
type ShareRepository (line 10) | type ShareRepository interface
FILE: internal/database/interfaces/storage.go
type StorageRepository (line 10) | type StorageRepository interface
FILE: internal/database/interfaces/sub.go
type SubRepository (line 10) | type SubRepository interface
FILE: internal/database/migration/migration.go
type Info (line 7) | type Info struct
function Register (line 16) | func Register(client string, date uint64, version, description string, c...
function Get (line 37) | func Get(client string) []*Info {
FILE: internal/database/op/auth.go
function AuthRepo (line 15) | func AuthRepo() interfaces.AuthRepository {
function AuthGet (line 22) | func AuthGet() (auth.Data, error) {
function AuthUpdateName (line 29) | func AuthUpdateName(name string) error {
function AuthUpdatePassWord (line 40) | func AuthUpdatePassWord(password string) error {
function AuthVerify (line 55) | func AuthVerify(username, password string) error {
FILE: internal/database/op/check.go
function CheckRepo (line 18) | func CheckRepo() interfaces.CheckRepository {
function GetCheckByID (line 24) | func GetCheckByID(id uint16) (check.Data, error) {
function CreateCheck (line 35) | func CreateCheck(ctx context.Context, t *check.Data) error {
function UpdateCheck (line 47) | func UpdateCheck(ctx context.Context, t *check.Data) error {
function UpdateCheckResult (line 64) | func UpdateCheckResult(id uint16, result check.Result) error {
function DeleteCheck (line 100) | func DeleteCheck(ctx context.Context, id uint16) error {
function GetCheckList (line 112) | func GetCheckList() ([]check.Data, error) {
function refreshCheckCache (line 127) | func refreshCheckCache() error {
FILE: internal/database/op/notify.go
function notifyRepo (line 17) | func notifyRepo() interfaces.NotifyRepository {
function GetNotifyList (line 23) | func GetNotifyList() ([]notify.Data, error) {
function GetNotifyByID (line 38) | func GetNotifyByID(id uint16) (notify.Data, error) {
function UpdateNotify (line 51) | func UpdateNotify(ctx context.Context, n *notify.Data) error {
function CreateNotify (line 64) | func CreateNotify(ctx context.Context, n *notify.Data) error {
function DeleteNotify (line 78) | func DeleteNotify(ctx context.Context, id uint16) error {
function refreshNotifyCache (line 91) | func refreshNotifyCache(ctx context.Context) error {
function NotifyTemplateRepo (line 103) | func NotifyTemplateRepo() interfaces.NotifyTemplateRepository {
function GetNotifyTemplateList (line 109) | func GetNotifyTemplateList() ([]notify.Template, error) {
function GetNotifyTemplateByType (line 125) | func GetNotifyTemplateByType(t string) (string, error) {
function UpdateNotifyTemplate (line 138) | func UpdateNotifyTemplate(ctx context.Context, nt *notify.Template) error {
function refreshNotifyTemplate (line 148) | func refreshNotifyTemplate(ctx context.Context) error {
FILE: internal/database/op/repo.go
function SetRepo (line 9) | func SetRepo(repository interfaces.Repository) {
function Close (line 12) | func Close() error {
FILE: internal/database/op/setting.go
function SettingRepo (line 16) | func SettingRepo() interfaces.SettingRepository {
function GetAllSettingMap (line 22) | func GetAllSettingMap(ctx context.Context) (map[string]string, error) {
function GetAllSetting (line 33) | func GetAllSetting(ctx context.Context) ([]setting.Setting, error) {
function GetSettingByKey (line 51) | func GetSettingByKey(key string) (string, error) {
function UpdateSetting (line 64) | func UpdateSetting(ctx context.Context, setting *[]setting.Setting) error {
function GetSettingStr (line 80) | func GetSettingStr(key string) string {
function GetSettingInt (line 87) | func GetSettingInt(key string) int {
function GetSettingBool (line 98) | func GetSettingBool(key string) bool {
function refreshSettingCache (line 106) | func refreshSettingCache(ctx context.Context) error {
FILE: internal/database/op/share.go
function ShareRepo (line 22) | func ShareRepo() interfaces.ShareRepository {
function GetShareList (line 28) | func GetShareList(ctx context.Context) ([]share.Data, error) {
function GetShareByID (line 44) | func GetShareByID(ctx context.Context, id uint16) (*share.Data, error) {
function GetShareByToken (line 55) | func GetShareByToken(ctx context.Context, token string) (*share.Data, er...
function CreateShare (line 68) | func CreateShare(ctx context.Context, share *share.Data) error {
function UpdateShare (line 80) | func UpdateShare(ctx context.Context, share *share.Data) error {
function UpdateShareAccessCount (line 98) | func UpdateShareAccessCount(ctx context.Context, id uint16) error {
function DeleteShare (line 118) | func DeleteShare(ctx context.Context, id uint16) error {
function refreshShareCache (line 131) | func refreshShareCache(ctx context.Context) error {
function startScheduleUpdateAccessCount (line 142) | func startScheduleUpdateAccessCount() {
function updateAccessCount (line 156) | func updateAccessCount() {
FILE: internal/database/op/storage.go
function StorageRepo (line 15) | func StorageRepo() interfaces.StorageRepository {
function GetStorageList (line 21) | func GetStorageList(ctx context.Context) ([]storage.Data, error) {
function GetStorageByID (line 37) | func GetStorageByID(ctx context.Context, id uint16) (*storage.Data, erro...
function CreateStorage (line 48) | func CreateStorage(ctx context.Context, storage *storage.Data) error {
function UpdateStorage (line 60) | func UpdateStorage(ctx context.Context, storage *storage.Data) error {
function DeleteStorage (line 73) | func DeleteStorage(ctx context.Context, id uint16) error {
function refreshStorageCache (line 86) | func refreshStorageCache(ctx context.Context) error {
FILE: internal/database/op/sub.go
function SubRepo (line 17) | func SubRepo() interfaces.SubRepository {
function GetSubList (line 23) | func GetSubList(ctx context.Context) ([]subModel.Data, error) {
function GetSubByID (line 39) | func GetSubByID(ctx context.Context, id uint16) (*subModel.Data, error) {
function GetSubNameByID (line 50) | func GetSubNameByID(ctx context.Context, id uint16) string {
function GetSubTagsByID (line 57) | func GetSubTagsByID(ctx context.Context, id uint16) []string {
function CreateSub (line 69) | func CreateSub(ctx context.Context, sub *subModel.Data) error {
function BatchCreateSub (line 82) | func BatchCreateSub(ctx context.Context, subs []*subModel.Data) error {
function UpdateSub (line 96) | func UpdateSub(ctx context.Context, sub *subModel.Data) error {
function UpdateSubResult (line 114) | func UpdateSubResult(ctx context.Context, id uint16, result subModel.Res...
function DeleteSub (line 146) | func DeleteSub(ctx context.Context, id uint16) error {
function refreshSubCache (line 158) | func refreshSubCache(ctx context.Context) error {
FILE: internal/models/auth/auth.go
type Data (line 5) | type Data struct
type LoginRequest (line 11) | type LoginRequest struct
type LoginResponse (line 16) | type LoginResponse struct
type ChangePasswordRequest (line 21) | type ChangePasswordRequest struct
type UpdateUserInfoRequest (line 27) | type UpdateUserInfoRequest struct
type LoginNotify (line 30) | type LoginNotify struct
FILE: internal/models/auth/default.go
function Default (line 3) | func Default() Data {
FILE: internal/models/check/check.go
type Instance (line 11) | type Instance interface
type Data (line 16) | type Data struct
method GenResponse (line 61) | func (r *Data) GenResponse(status string) Response {
type Task (line 25) | type Task struct
type Result (line 37) | type Result struct
type Request (line 44) | type Request struct
method GenData (line 79) | func (r *Request) GenData() Data {
type Response (line 51) | type Response struct
FILE: internal/models/common/base.go
type BaseDbModel (line 6) | type BaseDbModel struct
type BaseRequestModel (line 15) | type BaseRequestModel struct
type BaseUpdateRequestModel (line 20) | type BaseUpdateRequestModel struct
FILE: internal/models/config/config.go
type Base (line 3) | type Base struct
type ServerConfig (line 11) | type ServerConfig struct
type DatabaseConfig (line 17) | type DatabaseConfig struct
type LogConfig (line 22) | type LogConfig struct
type JWTConfig (line 28) | type JWTConfig struct
type SessionConfig (line 32) | type SessionConfig struct
FILE: internal/models/config/default.go
function DefaultBase (line 3) | func DefaultBase() Base {
FILE: internal/models/node/node.go
constant Alive (line 11) | Alive uint64 = 1 << 0
constant Country (line 12) | Country uint64 = 1 << 1
constant TikTok (line 13) | TikTok uint64 = 1 << 2
constant TikTokIDC (line 14) | TikTokIDC uint64 = 1 << 3
type Data (line 17) | type Data struct
type Base (line 22) | type Base struct
type UniqueKey (line 28) | type UniqueKey struct
method Gen (line 76) | func (u *UniqueKey) Gen() uint64 {
type Info (line 38) | type Info struct
method SetAliveStatus (line 68) | func (i *Info) SetAliveStatus(AliveStatus uint64, status bool) {
type SimpleInfo (line 48) | type SimpleInfo struct
type Filter (line 56) | type Filter struct
FILE: internal/models/notify/default.go
function DefaultTemplates (line 3) | func DefaultTemplates() []Template {
FILE: internal/models/notify/notify.go
type Data (line 8) | type Data struct
method GenResponse (line 63) | func (d *Data) GenResponse() Response {
type NameAndID (line 14) | type NameAndID struct
type Request (line 18) | type Request struct
method GenData (line 51) | func (c *Request) GenData(id uint16) Data {
type Response (line 24) | type Response struct
type Template (line 31) | type Template struct
type Instance (line 36) | type Instance interface
constant TypeLoginSuccess (line 42) | TypeLoginSuccess uint16 = 1 << 0
constant TypeLoginFailed (line 43) | TypeLoginFailed uint16 = 1 << 1
FILE: internal/models/setting/default.go
function DefaultSetting (line 3) | func DefaultSetting() []Setting {
FILE: internal/models/setting/setting.go
type Setting (line 3) | type Setting struct
constant PROXY_ENABLE (line 9) | PROXY_ENABLE = "proxy_enable"
constant PROXY_URL (line 10) | PROXY_URL = "proxy_url"
constant LOG_RETENTION_DAYS (line 12) | LOG_RETENTION_DAYS = "log_retention_days"
constant SUBCONV_URL (line 14) | SUBCONV_URL = "subconv_url"
constant SUBCONV_URL_PROXY (line 15) | SUBCONV_URL_PROXY = "subconv_url_proxy"
constant SUB_DISABLE_AUTO (line 17) | SUB_DISABLE_AUTO = "sub_disable_auto"
constant NODE_POOL_SIZE (line 19) | NODE_POOL_SIZE = "node_pool_size"
constant NODE_TEST_URL (line 20) | NODE_TEST_URL = "node_test_url"
constant NODE_TEST_TIMEOUT (line 21) | NODE_TEST_TIMEOUT = "node_test_timeout"
constant NODE_PROTOCOL_FILTER_ENABLE (line 23) | NODE_PROTOCOL_FILTER_ENABLE = "node_protocol_filter_enable"
constant NODE_PROTOCOL_FILTER_MODE (line 24) | NODE_PROTOCOL_FILTER_MODE = "node_protocol_filter_mode"
constant NODE_PROTOCOL_FILTER (line 25) | NODE_PROTOCOL_FILTER = "node_protocol_filter"
constant TASK_MAX_THREAD (line 27) | TASK_MAX_THREAD = "task_max_thread"
constant TASK_MAX_TIMEOUT (line 28) | TASK_MAX_TIMEOUT = "task_max_timeout"
constant TASK_MAX_RETRY (line 29) | TASK_MAX_RETRY = "task_max_retry"
constant NOTIFY_OPERATION (line 31) | NOTIFY_OPERATION = "notify_operation"
constant NOTIFY_ID (line 32) | NOTIFY_ID = "notify_id"
FILE: internal/models/share/share.go
type Data (line 9) | type Data struct
method GenResponse (line 66) | func (r *Data) GenResponse() Response {
type GenConfig (line 20) | type GenConfig struct
type Request (line 26) | type Request struct
method GenData (line 51) | func (r *Request) GenData() Data {
type Response (line 35) | type Response struct
type UpdateAccessCountDB (line 46) | type UpdateAccessCountDB struct
FILE: internal/models/storage/storage.go
type Data (line 8) | type Data struct
method GenResponse (line 43) | func (d *Data) GenResponse() Response {
type Request (line 15) | type Request struct
method GenData (line 33) | func (r *Request) GenData(id uint16) Data {
type Response (line 21) | type Response struct
type Instance (line 28) | type Instance interface
FILE: internal/models/sub/sub.go
type Data (line 10) | type Data struct
method GenResponse (line 78) | func (d *Data) GenResponse(status string, subInfo nodeModel.SimpleInfo...
type Config (line 22) | type Config struct
type Result (line 31) | type Result struct
type Request (line 41) | type Request struct
method GenData (line 63) | func (c *Request) GenData(id uint16) Data {
type Response (line 49) | type Response struct
FILE: internal/models/system/info.go
type HealthResponse (line 4) | type HealthResponse struct
type Info (line 12) | type Info struct
type Version (line 20) | type Version struct
FILE: internal/modules/country/channel/cloudflare.go
type CloudflareCDN (line 9) | type CloudflareCDN struct
method Url (line 11) | func (c *CloudflareCDN) Url() string {
method Header (line 15) | func (c *CloudflareCDN) Header(req *http.Request) {
method CountryCode (line 18) | func (c *CloudflareCDN) CountryCode(body []byte) string {
type CloudflareSpeed (line 36) | type CloudflareSpeed struct
method Url (line 38) | func (c *CloudflareSpeed) Url() string {
method Header (line 42) | func (c *CloudflareSpeed) Header(req *http.Request) {
method CountryCode (line 46) | func (c *CloudflareSpeed) CountryCode(body []byte) string {
function init (line 56) | func init() {
FILE: internal/modules/country/channel/commen.go
type Common (line 9) | type Common struct
function UserAgent (line 13) | func UserAgent(req *http.Request) {
FILE: internal/modules/country/channel/freeip.go
type FreeIP (line 8) | type FreeIP struct
method Url (line 10) | func (c *FreeIP) Url() string {
method Header (line 14) | func (c *FreeIP) Header(req *http.Request) {
method CountryCode (line 18) | func (c *FreeIP) CountryCode(body []byte) string {
function init (line 28) | func init() {
FILE: internal/modules/country/channel/ip_sb.go
type IPSB (line 8) | type IPSB struct
method Url (line 10) | func (c *IPSB) Url() string {
method Header (line 14) | func (c *IPSB) Header(req *http.Request) {
method CountryCode (line 18) | func (c *IPSB) CountryCode(body []byte) string {
function init (line 26) | func init() {
FILE: internal/modules/country/channel/ipapi.go
type IPAPI (line 8) | type IPAPI struct
method Url (line 10) | func (c *IPAPI) Url() string {
method Header (line 14) | func (c *IPAPI) Header(req *http.Request) {
method CountryCode (line 18) | func (c *IPAPI) CountryCode(body []byte) string {
function init (line 26) | func init() {
FILE: internal/modules/country/channel/ipwho.go
type IPWho (line 8) | type IPWho struct
method Url (line 10) | func (c *IPWho) Url() string {
method Header (line 14) | func (c *IPWho) Header(req *http.Request) {
method CountryCode (line 18) | func (c *IPWho) CountryCode(body []byte) string {
function init (line 26) | func init() {
FILE: internal/modules/country/channel/myip.go
type MYIP (line 8) | type MYIP struct
method Url (line 12) | func (c *MYIP) Url() string {
method Header (line 16) | func (c *MYIP) Header(req *http.Request) {
method CountryCode (line 19) | func (c *MYIP) CountryCode(body []byte) string {
function init (line 27) | func init() {
FILE: internal/modules/country/channel/reallyfreegeoip.go
type ReallyFreeGeoIP (line 8) | type ReallyFreeGeoIP struct
method Url (line 10) | func (c *ReallyFreeGeoIP) Url() string {
method Header (line 14) | func (c *ReallyFreeGeoIP) Header(req *http.Request) {
method CountryCode (line 18) | func (c *ReallyFreeGeoIP) CountryCode(body []byte) string {
function init (line 28) | func init() {
FILE: internal/modules/country/channel/register.go
type Channel (line 7) | type Channel interface
function register (line 15) | func register(channel Channel) {
FILE: internal/modules/country/country.go
function GetCode (line 12) | func GetCode(ctx context.Context, client *http.Client) string {
FILE: internal/modules/notify/channel/email.go
type Email (line 13) | type Email struct
method Init (line 27) | func (e *Email) Init() error {
method Send (line 40) | func (e *Email) Send(title string, body *bytes.Buffer) error {
method buildMessage (line 54) | func (e *Email) buildMessage(subject string, body *bytes.Buffer) *byte...
method sendMail (line 68) | func (e *Email) sendMail(message *bytes.Buffer) error {
method sendMailWithTLS (line 76) | func (e *Email) sendMailWithTLS(message *bytes.Buffer) error {
function init (line 119) | func init() {
FILE: internal/modules/notify/channel/webhook.go
type WebHook (line 9) | type WebHook struct
method Init (line 13) | func (e *WebHook) Init() error {
method Send (line 17) | func (e *WebHook) Send(title string, body *bytes.Buffer) error {
function init (line 21) | func init() {
FILE: internal/modules/notify/notify.go
function SendSystemNotify (line 18) | func SendSystemNotify(operation uint16, title string, content any) error {
function Get (line 70) | func Get(m string, c string) (notifyModel.Instance, error) {
function GetChannels (line 74) | func GetChannels() []string {
function GetInfoMap (line 78) | func GetInfoMap() map[string][]desc.Data {
FILE: internal/modules/register/category.go
function Notify (line 9) | func Notify(i notify.Instance) {
function Check (line 12) | func Check(i check.Instance) {
function Storage (line 15) | func Storage(i storage.Instance) {
FILE: internal/modules/register/register.go
type registerInfo (line 12) | type registerInfo struct
function register (line 19) | func register(t string, i any) {
function Get (line 33) | func Get[T any](t string, m string, c string) (T, error) {
function GetList (line 56) | func GetList(t string) []string {
function GetInfoMap (line 69) | func GetInfoMap(t string) map[string][]desc.Data {
FILE: internal/modules/share/share.go
function GenSubData (line 19) | func GenSubData(genConfigStr string) []byte {
function GenNodeData (line 56) | func GenNodeData(config string) []byte {
function rename (line 92) | func rename(raw []byte, newName []byte) []byte {
type renameTmpl (line 111) | type renameTmpl struct
FILE: internal/modules/storage/channel/webdav.go
function init (line 9) | func init() {
type WebDAV (line 13) | type WebDAV struct
method Init (line 19) | func (w *WebDAV) Init() error {
method Upload (line 23) | func (w *WebDAV) Upload(ctx context.Context) error {
FILE: internal/modules/storage/storage.go
function Get (line 12) | func Get(m string, c string) (storageModel.Instance, error) {
function GetChannels (line 16) | func GetChannels() []string {
function GetInfoMap (line 20) | func GetInfoMap() map[string][]Desc {
FILE: internal/server/auth/auth.go
type Claims (line 12) | type Claims struct
function GenerateToken (line 18) | func GenerateToken(username, secret string) (*auth.LoginResponse, error) {
function ValidateToken (line 48) | func ValidateToken(tokenString, secret string) (*Claims, error) {
FILE: internal/server/handlers/auth.go
function init (line 20) | func init() {
function login (line 60) | func login(c *gin.Context) {
function logout (line 118) | func logout(c *gin.Context) {
function changePassword (line 137) | func changePassword(c *gin.Context) {
function getUserInfo (line 174) | func getUserInfo(c *gin.Context) {
function updateUsername (line 198) | func updateUsername(c *gin.Context) {
FILE: internal/server/handlers/check.go
function init (line 19) | func init() {
function getCheckTypes (line 65) | func getCheckTypes(c *gin.Context) {
function createCheck (line 82) | func createCheck(c *gin.Context) {
function getCheck (line 110) | func getCheck(c *gin.Context) {
function updateCheck (line 155) | func updateCheck(c *gin.Context) {
function deleteCheck (line 200) | func deleteCheck(c *gin.Context) {
function runCheck (line 242) | func runCheck(c *gin.Context) {
function stopCheck (line 279) | func stopCheck(c *gin.Context) {
FILE: internal/server/handlers/info.go
function init (line 19) | func init() {
function healthCheck (line 55) | func healthCheck(c *gin.Context) {
function readinessCheck (line 96) | func readinessCheck(c *gin.Context) {
function livenessCheck (line 137) | func livenessCheck(c *gin.Context) {
function systemInfo (line 155) | func systemInfo(c *gin.Context) {
function version (line 170) | func version(c *gin.Context) {
FILE: internal/server/handlers/log.go
function init (line 15) | func init() {
function getLogFileList (line 39) | func getLogFileList(c *gin.Context) {
function getLogContent (line 67) | func getLogContent(c *gin.Context) {
FILE: internal/server/handlers/notify.go
function init (line 20) | func init() {
function getNotifyChannel (line 76) | func getNotifyChannel(c *gin.Context) {
function getNotifyChannelConfig (line 92) | func getNotifyChannelConfig(c *gin.Context) {
function getNotifyList (line 112) | func getNotifyList(c *gin.Context) {
function getNotifyNameAndID (line 132) | func getNotifyNameAndID(c *gin.Context) {
function createNotify (line 161) | func createNotify(c *gin.Context) {
function testNotify (line 194) | func testNotify(c *gin.Context) {
function updateNotify (line 242) | func updateNotify(c *gin.Context) {
function deleteNotify (line 282) | func deleteNotify(c *gin.Context) {
function getTemplates (line 315) | func getTemplates(c *gin.Context) {
function updateTemplate (line 338) | func updateTemplate(c *gin.Context) {
FILE: internal/server/handlers/pprof.go
function init (line 12) | func init() {
function index (line 65) | func index(c *gin.Context) {
function cmdline (line 69) | func cmdline(c *gin.Context) {
function profile (line 73) | func profile(c *gin.Context) {
function symbol (line 77) | func symbol(c *gin.Context) {
function trace (line 81) | func trace(c *gin.Context) {
function allocs (line 85) | func allocs(c *gin.Context) {
function block (line 89) | func block(c *gin.Context) {
function goroutine (line 93) | func goroutine(c *gin.Context) {
function heap (line 97) | func heap(c *gin.Context) {
function mutex (line 101) | func mutex(c *gin.Context) {
function threadcreate (line 105) | func threadcreate(c *gin.Context) {
FILE: internal/server/handlers/scalar.go
function init (line 12) | func init() {
function scalar (line 52) | func scalar(c *gin.Context) {
function apidata (line 55) | func apidata(c *gin.Context) {
FILE: internal/server/handlers/setting.go
function init (line 16) | func init() {
function getSetting (line 42) | func getSetting(c *gin.Context) {
function updateSetting (line 65) | func updateSetting(c *gin.Context) {
FILE: internal/server/handlers/share.go
function init (line 18) | func init() {
function createShare (line 59) | func createShare(c *gin.Context) {
function getShare (line 84) | func getShare(c *gin.Context) {
function updateShare (line 109) | func updateShare(c *gin.Context) {
function deleteShare (line 141) | func deleteShare(c *gin.Context) {
function getShareNodeContent (line 164) | func getShareNodeContent(c *gin.Context) {
function getShareSubContent (line 203) | func getShareSubContent(c *gin.Context) {
FILE: internal/server/handlers/storage.go
function init (line 17) | func init() {
function createStorage (line 57) | func createStorage(c *gin.Context) {
function getStorage (line 82) | func getStorage(c *gin.Context) {
function getStorageChannel (line 106) | func getStorageChannel(c *gin.Context) {
function getStorageChannelConfig (line 126) | func getStorageChannelConfig(c *gin.Context) {
function updateStorage (line 147) | func updateStorage(c *gin.Context) {
function deleteStorage (line 178) | func deleteStorage(c *gin.Context) {
FILE: internal/server/handlers/sub.go
function init (line 18) | func init() {
function createSub (line 60) | func createSub(c *gin.Context) {
function getSubs (line 89) | func getSubs(c *gin.Context) {
function updateSub (line 134) | func updateSub(c *gin.Context) {
function deleteSub (line 175) | func deleteSub(c *gin.Context) {
function refreshSub (line 208) | func refreshSub(c *gin.Context) {
function batchCreateSub (line 232) | func batchCreateSub(c *gin.Context) {
FILE: internal/server/handlers/update.go
function init (line 13) | func init() {
function latest (line 37) | func latest(c *gin.Context) {
function updateFunc (line 60) | func updateFunc(c *gin.Context) {
FILE: internal/server/handlers/ws.go
constant WriteTimeout (line 30) | WriteTimeout = 5
constant PingInterval (line 31) | PingInterval = 5
constant MaxConnections (line 32) | MaxConnections = 20
constant WriteBufferSize (line 33) | WriteBufferSize = 1024
constant ChannelBufferSize (line 34) | ChannelBufferSize = 256
type LogFilter (line 38) | type LogFilter struct
method ShouldSend (line 44) | func (f *LogFilter) ShouldSend(logEntry log.LogEntry) bool {
function shouldSendLogLevel (line 57) | func shouldSendLogLevel(filterLevel, logLevel string) bool {
type wsHandler (line 69) | type wsHandler struct
method handleLogWebSocket (line 126) | func (h *wsHandler) handleLogWebSocket(c *gin.Context) {
method broadcastLogs (line 162) | func (h *wsHandler) broadcastLogs() {
method broadcastToClients (line 170) | func (h *wsHandler) broadcastToClients(logEntry log.LogEntry) {
method shouldSendLog (line 201) | func (h *wsHandler) shouldSendLog(client *Client, logEntry log.LogEntr...
method handleClient (line 208) | func (h *wsHandler) handleClient(client *Client) {
method removeClient (line 235) | func (h *wsHandler) removeClient(client *Client) {
type Client (line 77) | type Client struct
function init (line 85) | func init() {
function newWSHandler (line 97) | func newWSHandler() *wsHandler {
FILE: internal/server/middleware/auth.go
function Auth (line 15) | func Auth() gin.HandlerFunc {
function WSAuth (line 49) | func WSAuth() gin.HandlerFunc {
FILE: internal/server/middleware/cors.go
function Cors (line 8) | func Cors() gin.HandlerFunc {
FILE: internal/server/middleware/logging.go
function Logging (line 9) | func Logging() gin.HandlerFunc {
FILE: internal/server/middleware/recovery.go
function Recovery (line 11) | func Recovery() gin.HandlerFunc {
FILE: internal/server/middleware/static.go
function StaticEmbed (line 11) | func StaticEmbed(urlPrefix string, embedFS fs.FS) gin.HandlerFunc {
function StaticLocal (line 16) | func StaticLocal(urlPrefix string, localPath string) gin.HandlerFunc {
function static (line 21) | func static(urlPrefix string, fileSystem http.FileSystem) gin.HandlerFunc {
FILE: internal/server/resp/resp.go
type ResponseStruct (line 9) | type ResponseStruct struct
type ResponsePaginationStruct (line 15) | type ResponsePaginationStruct struct
function Success (line 22) | func Success(c *gin.Context, data any) {
function Error (line 30) | func Error(c *gin.Context, code int, err string) {
function ErrorBadRequest (line 37) | func ErrorBadRequest(c *gin.Context) {
FILE: internal/server/router/router.go
type Method (line 11) | type Method
constant GET (line 14) | GET Method = "GET"
constant POST (line 15) | POST Method = "POST"
constant PUT (line 16) | PUT Method = "PUT"
constant DELETE (line 17) | DELETE Method = "DELETE"
constant HEAD (line 18) | HEAD Method = "HEAD"
constant OPTIONS (line 19) | OPTIONS Method = "OPTIONS"
constant PATCH (line 20) | PATCH Method = "PATCH"
constant ANY (line 21) | ANY Method = "ANY"
type GroupRouter (line 25) | type GroupRouter struct
method Use (line 45) | func (g *GroupRouter) Use(middlewares ...gin.HandlerFunc) *GroupRouter {
method AddRoute (line 51) | func (g *GroupRouter) AddRoute(route *Route) *GroupRouter {
function NewGroupRouter (line 35) | func NewGroupRouter(path string) *GroupRouter {
type Route (line 57) | type Route struct
method Handle (line 74) | func (r *Route) Handle(handlers ...gin.HandlerFunc) *Route {
method Use (line 80) | func (r *Route) Use(middlewares ...gin.HandlerFunc) *Route {
method Validate (line 86) | func (r *Route) Validate() error {
function NewRoute (line 65) | func NewRoute(path string, method Method) *Route {
function GetRouterCount (line 94) | func GetRouterCount() int {
function RegisterAll (line 103) | func RegisterAll(engine *gin.Engine) error {
function registerRoute (line 129) | func registerRoute(group *gin.RouterGroup, method Method, path string, h...
FILE: internal/server/server/server.go
constant defaultReadTimeout (line 54) | defaultReadTimeout = 30 * time.Second
constant defaultWriteTimeout (line 55) | defaultWriteTimeout = 30 * time.Second
constant defaultIdleTimeout (line 56) | defaultIdleTimeout = 60 * time.Second
constant defaultShutdownTimeout (line 57) | defaultShutdownTimeout = 30 * time.Second
constant defaultMaxHeaderBytes (line 58) | defaultMaxHeaderBytes = 1 << 20
type Server (line 63) | type Server struct
function Initialize (line 68) | func Initialize() error {
function Start (line 89) | func Start() error {
function Close (line 105) | func Close() error {
function IsInitialized (line 122) | func IsInitialized() bool {
function setRouter (line 126) | func setRouter() (*gin.Engine, error) {
FILE: internal/utils/cache/cache.go
function keyToString (line 10) | func keyToString[K comparable](key K) string {
type Cache (line 14) | type Cache interface
function New (line 24) | func New[K comparable, V any](shards int) Cache[K, V] {
type cache (line 40) | type cache struct
method Set (line 45) | func (c *cache[K, V]) Set(k K, v V) {
method Get (line 51) | func (c *cache[K, V]) Get(k K) (V, bool) {
method GetAll (line 57) | func (c *cache[K, V]) GetAll() map[K]V {
method Del (line 68) | func (c *cache[K, V]) Del(ks ...K) int {
method Exists (line 78) | func (c *cache[K, V]) Exists(ks ...K) bool {
method Len (line 87) | func (c *cache[K, V]) Len() int {
method getShard (line 95) | func (c *cache[K, V]) getShard(hashedKey uint64) (shard *shard[K, V]) {
method Clear (line 99) | func (c *cache[K, V]) Clear() {
FILE: internal/utils/cache/shard.go
type shard (line 7) | type shard struct
method set (line 12) | func (c *shard[K, V]) set(k K, v V) {
method get (line 18) | func (c *shard[K, V]) get(k K) (V, bool) {
method del (line 29) | func (c *shard[K, V]) del(k K) int {
method clear (line 39) | func (c *shard[K, V]) clear() {
method getAll (line 45) | func (c *shard[K, V]) getAll() map[K]V {
method len (line 55) | func (c *shard[K, V]) len() int {
FILE: internal/utils/color/color.go
constant Reset (line 5) | Reset string = "\033[0m"
constant Red (line 6) | Red string = "\033[31m"
constant Green (line 7) | Green string = "\033[32m"
constant Yellow (line 8) | Yellow string = "\033[33m"
constant Blue (line 9) | Blue string = "\033[34m"
constant Purple (line 10) | Purple string = "\033[35m"
constant Cyan (line 11) | Cyan string = "\033[36m"
constant White (line 12) | White string = "\033[37m"
constant Bold (line 13) | Bold string = "\033[1m"
constant Dim (line 14) | Dim string = "\033[2m"
FILE: internal/utils/country/conutry.go
type Country (line 7) | type Country struct
function GetCountry (line 13) | func GetCountry(code string) Country {
function emoji (line 23) | func emoji(alpha2 string) string {
FILE: internal/utils/desc/desc.go
constant TypeBoolean (line 8) | TypeBoolean = "boolean"
constant TypeNumber (line 9) | TypeNumber = "number"
constant TypeString (line 10) | TypeString = "string"
constant TypeSelect (line 11) | TypeSelect = "select"
constant TypeMultiSelect (line 12) | TypeMultiSelect = "multi_select"
type Data (line 15) | type Data struct
function Gen (line 25) | func Gen(v any) []Data {
function gen (line 33) | func gen(t reflect.Type) []Data {
function getType (line 64) | func getType(t string) string {
FILE: internal/utils/generic/map.go
type MapOf (line 33) | type MapOf struct
type readOnly (line 69) | type readOnly struct
type entry (line 79) | type entry struct
function newEntry (line 101) | func newEntry[V any](i V) *entry[V] {
method Load (line 108) | func (m *MapOf[K, V]) Load(key K) (value V, ok bool) {
method load (line 133) | func (e *entry[V]) load() (value V, ok bool) {
method Store (line 142) | func (m *MapOf[K, V]) Store(key K, value V) {
method tryStore (line 175) | func (e *entry[V]) tryStore(i *V) bool {
method unexpungeLocked (line 191) | func (e *entry[V]) unexpungeLocked() (wasExpunged bool) {
method storeLocked (line 198) | func (e *entry[V]) storeLocked(i *V) {
method LoadOrStore (line 205) | func (m *MapOf[K, V]) LoadOrStore(key K, value V) (actual V, loaded bool) {
method tryLoadOrStore (line 245) | func (e *entry[V]) tryLoadOrStore(i V) (actual V, loaded, ok bool) {
method Delete (line 273) | func (m *MapOf[K, V]) Delete(key K) {
method delete (line 290) | func (e *entry[V]) delete() (hadValue bool) {
method Range (line 312) | func (m *MapOf[K, V]) Range(f func(key K, value V) bool) {
method missLocked (line 345) | func (m *MapOf[K, V]) missLocked() {
method dirtyLocked (line 355) | func (m *MapOf[K, V]) dirtyLocked() {
method tryExpungeLocked (line 369) | func (e *entry[V]) tryExpungeLocked() (isExpunged bool) {
FILE: internal/utils/generic/queue.go
type Integer (line 3) | type Integer interface
type Queue (line 8) | type Queue struct
function NewQueue (line 14) | func NewQueue[T Integer](capacity int) *Queue[T] {
method Update (line 25) | func (q *Queue[T]) Update(value T) {
method GetAll (line 37) | func (q *Queue[T]) GetAll() []T {
method Clear (line 55) | func (q *Queue[T]) Clear() {
method Average (line 61) | func (q *Queue[T]) Average() T {
FILE: internal/utils/info/info.go
function Banner (line 19) | func Banner() {
function printInfo (line 52) | func printInfo(label, value, print_color string) {
function formatDate (line 58) | func formatDate(date string) string {
function min (line 79) | func min(a, b int) int {
FILE: internal/utils/log/log.go
type LogEntry (line 21) | type LogEntry struct
type Logger (line 58) | type Logger struct
method Close (line 241) | func (l *Logger) Close() error {
type Config (line 62) | type Config struct
function webSocketHook (line 71) | func webSocketHook(entry zapcore.Entry) error {
function init (line 90) | func init() {
function Initialize (line 102) | func Initialize(level, path, method string) error {
function GetDefaultLogger (line 144) | func GetDefaultLogger() *Logger {
function NewTaskLogger (line 147) | func NewTaskLogger(name string, taskid uint16, level string, writeFile b...
function GetWSChannel (line 161) | func GetWSChannel() <-chan LogEntry {
function NewLogger (line 165) | func NewLogger(config Config) (*Logger, error) {
function createLogFile (line 228) | func createLogFile(path string) (*os.File, error) {
function Debug (line 254) | func Debug(args ...interface{}) {
function Info (line 257) | func Info(args ...interface{}) {
function Warn (line 260) | func Warn(args ...interface{}) {
function Error (line 263) | func Error(args ...interface{}) {
function Fatal (line 266) | func Fatal(args ...interface{}) {
function Debugf (line 270) | func Debugf(template string, args ...interface{}) {
function Infof (line 274) | func Infof(template string, args ...interface{}) {
function Warnf (line 278) | func Warnf(template string, args ...interface{}) {
function Errorf (line 282) | func Errorf(template string, args ...interface{}) {
function Fatalf (line 286) | func Fatalf(template string, args ...interface{}) {
function Close (line 289) | func Close() error {
function CleanupOldLogs (line 293) | func CleanupOldLogs(retentionDays int) error {
function GetLogFileList (line 326) | func GetLogFileList(path string) ([]uint64, error) {
function StreamLogToHTTP (line 373) | func StreamLogToHTTP(path string, timestamp uint64, writer io.Writer) er...
function DeleteLog (line 431) | func DeleteLog(path string) error {
FILE: internal/utils/shutdown/shutdown.go
function Register (line 13) | func Register(fn func() error) {
function Listen (line 17) | func Listen() {
function All (line 34) | func All() {
FILE: internal/utils/ua/ua.go
function SetHeader (line 8) | func SetHeader(req *http.Request) {
function Random (line 12) | func Random() string {
FILE: internal/utils/utils.go
function IsWritableDir (line 14) | func IsWritableDir(dir string) bool {
function Contains (line 27) | func Contains(slice []string, item string) bool {
function RemoveAllControlCharacters (line 35) | func RemoveAllControlCharacters(data *[]byte) {
function IsDebug (line 47) | func IsDebug() bool {
function IPToUint32 (line 53) | func IPToUint32(ip string) uint32 {
function Uint32ToIP (line 76) | func Uint32ToIP(ip uint32) string {
FILE: web/src/app/layout.tsx
function RootLayout (line 6) | function RootLayout({
FILE: web/src/app/not-found.tsx
function NotFound (line 6) | function NotFound() {
FILE: web/src/app/page.tsx
function Home (line 5) | function Home() {
FILE: web/src/components/app/app-layout.tsx
function AppLayout (line 11) | function AppLayout() {
FILE: web/src/components/app/spa-app.tsx
function SPAApp (line 6) | function SPAApp() {
FILE: web/src/components/features/check/components/check-form.tsx
type CheckFormProps (line 15) | interface CheckFormProps {
function CheckForm (line 23) | function CheckForm({
FILE: web/src/components/features/check/components/check-list.tsx
type CheckListProps (line 18) | interface CheckListProps {
function CheckList (line 22) | function CheckList({ onEdit }: CheckListProps) {
FILE: web/src/components/features/check/components/check-page.tsx
function CheckPage (line 10) | function CheckPage() {
FILE: web/src/components/features/check/components/form-sections/basic-config-section.tsx
function BasicConfigSection (line 8) | function BasicConfigSection({ control }: { control: Control<CheckRequest...
FILE: web/src/components/features/check/components/form-sections/basic-info-section.tsx
function BasicInfoSection (line 7) | function BasicInfoSection({ control }: { control: Control<CheckRequest> ...
FILE: web/src/components/features/check/components/form-sections/extra-config-section.tsx
function ExtraConfigSection (line 12) | function ExtraConfigSection({ control }: { control: Control<CheckRequest...
FILE: web/src/components/features/check/components/form-sections/log-config.tsx
function LogConfig (line 8) | function LogConfig({ control }: { control: Control<CheckRequest> }) {
FILE: web/src/components/features/check/components/form-sections/notify-config.tsx
function NotifyConfig (line 7) | function NotifyConfig({ control }: { control: Control<CheckRequest> }) {
FILE: web/src/components/features/check/constants/index.ts
constant CHECK_CONSTANTS (line 1) | const CHECK_CONSTANTS = {
constant LOG_LEVELS (line 10) | const LOG_LEVELS = [
constant CHECK_STATUS_OPTIONS (line 17) | const CHECK_STATUS_OPTIONS = [
constant FORM_VALIDATION (line 24) | const FORM_VALIDATION = {
constant UI_TEXT (line 32) | const UI_TEXT = {
constant CRON_PRESETS (line 56) | const CRON_PRESETS = [
FILE: web/src/components/features/check/hooks/useCheckForm.ts
type UseCheckFormProps (line 12) | interface UseCheckFormProps {
function useCheckForm (line 19) | function useCheckForm({
FILE: web/src/components/features/check/utils/index.ts
function createDefaultCheckData (line 4) | function createDefaultCheckData(): CheckRequest {
function validateCheckForm (line 21) | function validateCheckForm(formData: CheckRequest): { isValid: boolean; ...
function convertCheckResponseToRequest (line 51) | function convertCheckResponseToRequest(check: CheckResponse): CheckReque...
FILE: web/src/components/features/home/dashboard.tsx
function DashboardPage (line 6) | function DashboardPage() {
FILE: web/src/components/features/login/login-form.tsx
function LoginForm (line 19) | function LoginForm({
FILE: web/src/components/features/login/login-page.tsx
function LoginPage (line 3) | function LoginPage() {
FILE: web/src/components/features/notify/components/notify-form.tsx
type NotifyFormProps (line 9) | interface NotifyFormProps {
function NotifyForm (line 24) | function NotifyForm({
FILE: web/src/components/features/notify/components/notify-list.tsx
type NotifyListProps (line 9) | interface NotifyListProps {
function NotifyList (line 19) | function NotifyList({
FILE: web/src/components/features/notify/components/notify-page.tsx
function NotifyPage (line 11) | function NotifyPage() {
FILE: web/src/components/features/notify/hooks/useNotifyForm.ts
constant DEFAULT_FORM_DATA (line 7) | const DEFAULT_FORM_DATA: NotifyRequest = {
type UseNotifyFormProps (line 13) | interface UseNotifyFormProps {
function useNotifyForm (line 17) | function useNotifyForm({ onSuccess }: UseNotifyFormProps) {
FILE: web/src/components/features/notify/hooks/useNotifyOperations.ts
function useNotifyOperations (line 7) | function useNotifyOperations() {
FILE: web/src/components/features/profile/ProfileDesktopNavButton.tsx
type ProfileDesktopNavButtonProps (line 4) | interface ProfileDesktopNavButtonProps {
function ProfileDesktopNavButton (line 11) | function ProfileDesktopNavButton({ tabId, activeTab, onTabChange, childr...
FILE: web/src/components/features/profile/ProfileDialog.tsx
type ProfileDialogProps (line 19) | interface ProfileDialogProps {
type FormData (line 24) | interface FormData {
function ProfileDialog (line 31) | function ProfileDialog({ open, onOpenChange }: ProfileDialogProps) {
FILE: web/src/components/features/profile/ProfileLayout.tsx
type ProfileLayoutProps (line 5) | interface ProfileLayoutProps {
function ProfileLayout (line 13) | function ProfileLayout({
FILE: web/src/components/features/profile/ProfileNavButton.tsx
type ProfileNavButtonProps (line 4) | interface ProfileNavButtonProps {
function ProfileNavButton (line 11) | function ProfileNavButton({ tabId, activeTab, onTabChange, children }: P...
FILE: web/src/components/features/settings/SettingsActions.tsx
type SettingsActionsProps (line 4) | interface SettingsActionsProps {
function SettingsActions (line 10) | function SettingsActions({ onCancel, isMobile, hasChanges }: SettingsAct...
FILE: web/src/components/features/settings/SettingsLayout.tsx
type SettingsLayoutProps (line 4) | interface SettingsLayoutProps {
function SettingsLayout (line 13) | function SettingsLayout({
FILE: web/src/components/features/settings/sections/NodeSettingsSection.tsx
function NodeSettingsSection (line 17) | function NodeSettingsSection({ control }: { control: Control<FormValues>...
FILE: web/src/components/features/settings/sections/NotifySettingsSection.tsx
function NotifySettingsSection (line 6) | function NotifySettingsSection({ control }: { control: Control<FormValue...
FILE: web/src/components/features/settings/sections/SystemSettingsSection.tsx
function SystemSettingsSection (line 15) | function SystemSettingsSection({ control }: { control: Control<FormValue...
FILE: web/src/components/features/settings/sections/TaskSettingsSection.tsx
function TaskSettingsSection (line 6) | function TaskSettingsSection({ control }: { control: Control<FormValues>...
FILE: web/src/components/features/settings/sections/fields/BooleanSettingField.tsx
type BooleanSettingFieldProps (line 5) | interface BooleanSettingFieldProps extends BaseSettingProps {
function BooleanSettingField (line 10) | function BooleanSettingField({
FILE: web/src/components/features/settings/sections/fields/MultiSelectSettingField.tsx
type MultiSelectSettingFieldProps (line 5) | type MultiSelectSettingFieldProps = BaseSettingProps & {
function MultiSelectSettingField (line 11) | function MultiSelectSettingField({
FILE: web/src/components/features/settings/sections/fields/NumberSettingField.tsx
type NumberSettingFieldProps (line 5) | interface NumberSettingFieldProps extends BaseSettingProps {
function NumberSettingField (line 11) | function NumberSettingField({
FILE: web/src/components/features/settings/sections/fields/SelectSettingField.tsx
type SelectSettingFieldProps (line 5) | type SelectSettingFieldProps = BaseSettingProps & {
function SelectSettingField (line 12) | function SelectSettingField({
FILE: web/src/components/features/settings/sections/fields/SettingCard.tsx
type SettingCardProps (line 3) | type SettingCardProps = {
function SettingCard (line 11) | function SettingCard({ title, description, action, actionAlignment = 'st...
FILE: web/src/components/features/settings/sections/fields/TextSettingField.tsx
type TextSettingFieldProps (line 5) | type TextSettingFieldProps = BaseSettingProps & {
function TextSettingField (line 12) | function TextSettingField({
FILE: web/src/components/features/settings/sections/fields/types.ts
type BaseSettingProps (line 3) | type BaseSettingProps = {
FILE: web/src/components/features/settings/sections/index.ts
type SectionComponent (line 9) | type SectionComponent = ComponentType<{ control: Control<FormValues> }>
type SettingsSectionDefinition (line 11) | interface SettingsSectionDefinition {
constant SETTINGS_SECTIONS (line 17) | const SETTINGS_SECTIONS: SettingsSectionDefinition[] = [
FILE: web/src/components/features/settings/settings.tsx
type SettingsDialogProps (line 14) | interface SettingsDialogProps {
function SettingsDialog (line 20) | function SettingsDialog({ open, onOpenChange }: SettingsDialogProps) {
FILE: web/src/components/features/share/components/form-sections/alive-status-section.tsx
type AliveStatusSectionProps (line 5) | interface AliveStatusSectionProps {
constant ALIVE_STATUS_FLAGS (line 11) | const ALIVE_STATUS_FLAGS = [
function AliveStatusSection (line 18) | function AliveStatusSection({ control, fieldName }: AliveStatusSectionPr...
FILE: web/src/components/features/share/components/form-sections/basic-info-section.tsx
type BasicInfoSectionProps (line 8) | interface BasicInfoSectionProps {
function BasicInfoSection (line 12) | function BasicInfoSection({ control }: BasicInfoSectionProps) {
FILE: web/src/components/features/share/components/form-sections/config-section.tsx
type ConfigSectionProps (line 9) | interface ConfigSectionProps {
function ConfigSection (line 13) | function ConfigSection({ control }: ConfigSectionProps) {
FILE: web/src/components/features/share/components/form-sections/country-section.tsx
type CountrySectionProps (line 12) | interface CountrySectionProps {
constant POPULAR_COUNTRIES (line 17) | const POPULAR_COUNTRIES = [
constant ALL_COUNTRIES (line 30) | const ALL_COUNTRIES = [
function CountrySection (line 271) | function CountrySection({ control, fieldName }: CountrySectionProps) {
FILE: web/src/components/features/share/components/form-sections/filter-section.tsx
function FilterSection (line 6) | function FilterSection({ control }: { control: Control<Record<string, un...
FILE: web/src/components/features/share/components/share-copy.tsx
type ShareCopyDialogProps (line 11) | interface ShareCopyDialogProps {
function ShareCopyDialog (line 17) | function ShareCopyDialog({ fullUrl, isOpen, onClose }: ShareCopyDialogPr...
FILE: web/src/components/features/share/components/share-date-pick.tsx
type Calendar22Props (line 14) | interface Calendar22Props {
function Calendar22 (line 19) | function Calendar22({
FILE: web/src/components/features/share/components/share-form.tsx
type ShareFormProps (line 15) | interface ShareFormProps {
function ShareForm (line 23) | function ShareForm({
FILE: web/src/components/features/share/components/share-list.tsx
type ShareListProps (line 15) | interface ShareListProps {
function ShareList (line 20) | function ShareList({ onEdit, openCopyDialog }: ShareListProps) {
FILE: web/src/components/features/share/components/share-page.tsx
function SharePage (line 10) | function SharePage() {
FILE: web/src/components/features/share/constants/index.ts
constant SHARE_CONSTANTS (line 1) | const SHARE_CONSTANTS = {
constant SUBSCRIPTION_TARGETS (line 8) | const SUBSCRIPTION_TARGETS = [
constant FORM_VALIDATION (line 25) | const FORM_VALIDATION = {
constant UI_TEXT (line 31) | const UI_TEXT = {
FILE: web/src/components/features/share/constants/sub-rules.ts
constant SUB_RULES (line 3) | const SUB_RULES: KeyValue[] = [
FILE: web/src/components/features/share/hooks/useShareForm.ts
type UseShareFormProps (line 9) | interface UseShareFormProps {
function useShareForm (line 16) | function useShareForm({
FILE: web/src/components/features/share/hooks/useShareOperations.ts
function useShareOperations (line 7) | function useShareOperations() {
FILE: web/src/components/features/share/utils/index.ts
function generateToken (line 7) | function generateToken(): string {
function buildShareUrl (line 19) | function buildShareUrl(token: string, baseUrl?: string): string {
function copyToClipboard (line 27) | async function copyToClipboard(text: string): Promise<boolean> {
function fallbackCopyToClipboard (line 46) | function fallbackCopyToClipboard(text: string): boolean {
function createDefaultShareData (line 75) | function createDefaultShareData(): ShareRequest {
function validateCountryCodes (line 104) | function validateCountryCodes(codes: string): string[] {
function formatAccessCount (line 115) | function formatAccessCount(current: number, max: number): string {
function formatExpiresTime (line 122) | function formatExpiresTime(expires: number): string {
function isCustomConfig (line 137) | function isCustomConfig(config: string, availableRules: Array<{ value: s...
function safeParseInt (line 144) | function safeParseInt(value: string, defaultValue = 0): number {
function safeParseFloat (line 152) | function safeParseFloat(value: string, defaultValue = 0): number {
FILE: web/src/components/features/storage/storage.tsx
function StoragePage (line 5) | function StoragePage() {
FILE: web/src/components/features/sub/components/batch-sub-form.tsx
type BatchSubFormProps (line 13) | interface BatchSubFormProps {
type BatchFormData (line 18) | interface BatchFormData extends SubRequest {
function BatchSubForm (line 22) | function BatchSubForm({ isOpen, onClose }: BatchSubFormProps) {
FILE: web/src/components/features/sub/components/form-sections/basic-info-section.tsx
function BasicInfoSection (line 10) | function BasicInfoSection({ control }: { control: Control<SubRequest> }) {
FILE: web/src/components/features/sub/components/form-sections/config-section.tsx
function ConfigSection (line 7) | function ConfigSection({ control }: { control: Control<SubRequest> }) {
FILE: web/src/components/features/sub/components/form-sections/protocol-filter-section.tsx
function ProtocolFilterSection (line 8) | function ProtocolFilterSection({ control }: { control: Control<SubReques...
FILE: web/src/components/features/sub/components/sub-detail.tsx
type SubscriptionDetailProps (line 6) | interface SubscriptionDetailProps {
function SubDetail (line 12) | function SubDetail({
FILE: web/src/components/features/sub/components/sub-form.tsx
type SubFormProps (line 10) | interface SubFormProps {
function SubForm (line 18) | function SubForm({
FILE: web/src/components/features/sub/components/sub-list.tsx
type SubscriptionListProps (line 16) | interface SubscriptionListProps {
function SubList (line 21) | function SubList({
FILE: web/src/components/features/sub/components/sub-page.tsx
function SubPage (line 10) | function SubPage() {
FILE: web/src/components/features/sub/utils/index.ts
function formatSpeed (line 5) | function formatSpeed(kbPerSec: number): string {
function generateNameFromUrl (line 23) | function generateNameFromUrl(url: string): string {
FILE: web/src/components/features/system-update/index.tsx
type SystemUpdateDialogProps (line 34) | interface SystemUpdateDialogProps {
type ComponentStatus (line 39) | interface ComponentStatus {
function SystemUpdateDialog (line 51) | function SystemUpdateDialog({ open, onOpenChange }: SystemUpdateDialogPr...
FILE: web/src/components/layout/app-sidebar.tsx
function AppSidebar (line 33) | function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
FILE: web/src/components/layout/nav-documents.tsx
function NavDocuments (line 28) | function NavDocuments({
FILE: web/src/components/layout/nav-main.tsx
function NavMain (line 14) | function NavMain({
FILE: web/src/components/layout/nav-secondary.tsx
function NavSecondary (line 16) | function NavSecondary({
FILE: web/src/components/layout/nav-user.tsx
function NavUser (line 36) | function NavUser() {
FILE: web/src/components/layout/site-header.tsx
function SiteHeader (line 5) | function SiteHeader() {
FILE: web/src/components/pages/not-found.tsx
type NotFoundProps (line 8) | interface NotFoundProps {
function NotFound (line 12) | function NotFound({ path }: NotFoundProps) {
FILE: web/src/components/providers/alert-provider.tsx
type AlertOptions (line 15) | interface AlertOptions {
type AlertContextType (line 23) | interface AlertContextType {
function useAlert (line 29) | function useAlert() {
type AlertState (line 37) | interface AlertState {
function AlertProvider (line 47) | function AlertProvider({ children }: { children: React.ReactNode }) {
FILE: web/src/components/providers/auth-provider.tsx
type AuthState (line 9) | interface AuthState {
type AuthContextType (line 15) | interface AuthContextType extends AuthState {
function useAuth (line 23) | function useAuth() {
function AuthProvider (line 31) | function AuthProvider({ children }: { children: React.ReactNode }) {
FILE: web/src/components/providers/query-provider.tsx
function QueryProvider (line 6) | function QueryProvider({ children }: { children: React.ReactNode }) {
FILE: web/src/components/providers/theme-provider.tsx
function ThemeProvider (line 6) | function ThemeProvider({
FILE: web/src/components/shared/dynamic-config-form.tsx
type DynamicConfigFormProps (line 8) | interface DynamicConfigFormProps {
function DynamicConfigForm (line 16) | function DynamicConfigForm({
FILE: web/src/components/shared/status-badge.tsx
type BadgeVariant (line 4) | type BadgeVariant = ComponentProps<typeof Badge>["variant"]
type StatusConfig (line 6) | interface StatusConfig {
constant STATUS_CONFIG (line 12) | const STATUS_CONFIG: Record<string, StatusConfig> = {
function StatusBadge (line 26) | function StatusBadge({ status }: { status: string }) {
FILE: web/src/components/shared/subscription-section.tsx
type SubscriptionSectionProps (line 8) | interface SubscriptionSectionProps {
function SubscriptionSection (line 14) | function SubscriptionSection({ control, subIdField, subIdExcludeField }:...
FILE: web/src/components/ui/accordion.tsx
function Accordion (line 9) | function Accordion({
function AccordionItem (line 15) | function AccordionItem({
function AccordionTrigger (line 28) | function AccordionTrigger({
function AccordionContent (line 50) | function AccordionContent({
FILE: web/src/components/ui/alert-dialog.tsx
function AlertDialog (line 9) | function AlertDialog({
function AlertDialogTrigger (line 15) | function AlertDialogTrigger({
function AlertDialogPortal (line 23) | function AlertDialogPortal({
function AlertDialogOverlay (line 31) | function AlertDialogOverlay({
function AlertDialogContent (line 47) | function AlertDialogContent({
function AlertDialogHeader (line 66) | function AlertDialogHeader({
function AlertDialogFooter (line 79) | function AlertDialogFooter({
function AlertDialogTitle (line 95) | function AlertDialogTitle({
function AlertDialogDescription (line 108) | function AlertDialogDescription({
function AlertDialogAction (line 121) | function AlertDialogAction({
function AlertDialogCancel (line 133) | function AlertDialogCancel({
FILE: web/src/components/ui/avatar.tsx
function Avatar (line 8) | function Avatar({
function AvatarImage (line 24) | function AvatarImage({
function AvatarFallback (line 37) | function AvatarFallback({
FILE: web/src/components/ui/badge.tsx
function Badge (line 28) | function Badge({
FILE: web/src/components/ui/breadcrumb.tsx
function Breadcrumb (line 7) | function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
function BreadcrumbList (line 11) | function BreadcrumbList({ className, ...props }: React.ComponentProps<"o...
function BreadcrumbItem (line 24) | function BreadcrumbItem({ className, ...props }: React.ComponentProps<"l...
function BreadcrumbLink (line 34) | function BreadcrumbLink({
function BreadcrumbPage (line 52) | function BreadcrumbPage({ className, ...props }: React.ComponentProps<"s...
function BreadcrumbSeparator (line 65) | function BreadcrumbSeparator({
function BreadcrumbEllipsis (line 83) | function BreadcrumbEllipsis({
FILE: web/src/components/ui/button.tsx
function Button (line 38) | function Button({
FILE: web/src/components/ui/calendar.tsx
function Calendar (line 14) | function Calendar({
function CalendarDayButton (line 175) | function CalendarDayButton({
FILE: web/src/components/ui/card.tsx
function Card (line 5) | function Card({ className, ...props }: React.ComponentProps<"div">) {
function CardHeader (line 18) | function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
function CardTitle (line 31) | function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
function CardDescription (line 41) | function CardDescription({ className, ...props }: React.ComponentProps<"...
function CardAction (line 51) | function CardAction({ className, ...props }: React.ComponentProps<"div">) {
function CardContent (line 64) | function CardContent({ className, ...props }: React.ComponentProps<"div"...
function CardFooter (line 74) | function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
FILE: web/src/components/ui/chart.tsx
constant THEMES (line 9) | const THEMES = { light: "", dark: ".dark" } as const
type ChartConfig (line 11) | type ChartConfig = {
type ChartContextProps (line 21) | type ChartContextProps = {
function useChart (line 27) | function useChart() {
function ChartContainer (line 37) | function ChartContainer({
function ChartTooltipContent (line 107) | function ChartTooltipContent({
function ChartLegendContent (line 253) | function ChartLegendContent({
function getPayloadConfigFromPayload (line 308) | function getPayloadConfigFromPayload(
FILE: web/src/components/ui/checkbox.tsx
function Checkbox (line 9) | function Checkbox({
FILE: web/src/components/ui/dialog.tsx
function Dialog (line 9) | function Dialog({
function DialogTrigger (line 15) | function DialogTrigger({
function DialogPortal (line 21) | function DialogPortal({
function DialogClose (line 27) | function DialogClose({
function DialogOverlay (line 33) | function DialogOverlay({
function DialogContent (line 49) | function DialogContent({
function DialogHeader (line 83) | function DialogHeader({ className, ...props }: React.ComponentProps<"div...
function DialogFooter (line 93) | function DialogFooter({ className, ...props }: React.ComponentProps<"div...
function DialogTitle (line 106) | function DialogTitle({
function DialogDescription (line 119) | function DialogDescription({
FILE: web/src/components/ui/drawer.tsx
function Drawer (line 8) | function Drawer({
function DrawerTrigger (line 14) | function DrawerTrigger({
function DrawerPortal (line 20) | function DrawerPortal({
function DrawerClose (line 26) | function DrawerClose({
function DrawerOverlay (line 32) | function DrawerOverlay({
function DrawerContent (line 48) | function DrawerContent({
function DrawerHeader (line 75) | function DrawerHeader({ className, ...props }: React.ComponentProps<"div...
function DrawerFooter (line 88) | function DrawerFooter({ className, ...props }: React.ComponentProps<"div...
function DrawerTitle (line 98) | function DrawerTitle({
function DrawerDescription (line 111) | function DrawerDescription({
FILE: web/src/components/ui/dropdown-menu.tsx
function DropdownMenu (line 9) | function DropdownMenu({
function DropdownMenuPortal (line 15) | function DropdownMenuPortal({
function DropdownMenuTrigger (line 23) | function DropdownMenuTrigger({
function DropdownMenuContent (line 34) | function DropdownMenuContent({
function DropdownMenuGroup (line 54) | function DropdownMenuGroup({
function DropdownMenuItem (line 62) | function DropdownMenuItem({
function DropdownMenuCheckboxItem (line 85) | function DropdownMenuCheckboxItem({
function DropdownMenuRadioGroup (line 111) | function DropdownMenuRadioGroup({
function DropdownMenuRadioItem (line 122) | function DropdownMenuRadioItem({
function DropdownMenuLabel (line 146) | function DropdownMenuLabel({
function DropdownMenuSeparator (line 166) | function DropdownMenuSeparator({
function DropdownMenuShortcut (line 179) | function DropdownMenuShortcut({
function DropdownMenuSub (line 195) | function DropdownMenuSub({
function DropdownMenuSubTrigger (line 201) | function DropdownMenuSubTrigger({
function DropdownMenuSubContent (line 225) | function DropdownMenuSubContent({
FILE: web/src/components/ui/hover-card.tsx
function HoverCard (line 8) | function HoverCard({
function HoverCardTrigger (line 14) | function HoverCardTrigger({
function HoverCardContent (line 22) | function HoverCardContent({
FILE: web/src/components/ui/input.tsx
function Input (line 5) | function Input({ className, type, ...props }: React.ComponentProps<"inpu...
FILE: web/src/components/ui/label.tsx
function Label (line 8) | function Label({
FILE: web/src/components/ui/loading.tsx
type LoadingProps (line 5) | interface LoadingProps {
function Loading (line 25) | function Loading({
function InlineLoading (line 51) | function InlineLoading({ message = "加载中...", size = 'sm' as const }) {
function PageLoading (line 62) | function PageLoading({ message = "页面加载中..." }) {
function Spinner (line 73) | function Spinner({ size = 'md', className = "" }: { size?: 'sm' | 'md' |...
FILE: web/src/components/ui/mode-toggle.tsx
function ModeToggle (line 15) | function ModeToggle() {
FILE: web/src/components/ui/popover.tsx
function Popover (line 8) | function Popover({
function PopoverTrigger (line 14) | function PopoverTrigger({
function PopoverContent (line 20) | function PopoverContent({
function PopoverAnchor (line 42) | function PopoverAnchor({
FILE: web/src/components/ui/select.tsx
function Select (line 9) | function Select({
function SelectGroup (line 15) | function SelectGroup({
function SelectValue (line 21) | function SelectValue({
function SelectTrigger (line 27) | function SelectTrigger({
function SelectContent (line 53) | function SelectContent({
function SelectLabel (line 88) | function SelectLabel({
function SelectItem (line 101) | function SelectItem({
function SelectSeparator (line 125) | function SelectSeparator({
function SelectScrollUpButton (line 138) | function SelectScrollUpButton({
function SelectScrollDownButton (line 156) | function SelectScrollDownButton({
FILE: web/src/components/ui/separator.tsx
function Separator (line 8) | function Separator({
FILE: web/src/components/ui/sheet.tsx
function Sheet (line 9) | function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive....
function SheetTrigger (line 13) | function SheetTrigger({
function SheetClose (line 19) | function SheetClose({
function SheetPortal (line 25) | function SheetPortal({
function SheetOverlay (line 31) | function SheetOverlay({
function SheetContent (line 47) | function SheetContent({
function SheetHeader (line 84) | function SheetHeader({ className, ...props }: React.ComponentProps<"div"...
function SheetFooter (line 94) | function SheetFooter({ className, ...props }: React.ComponentProps<"div"...
function SheetTitle (line 104) | function SheetTitle({
function SheetDescription (line 117) | function SheetDescription({
FILE: web/src/components/ui/sidebar.tsx
constant SIDEBAR_COOKIE_NAME (line 28) | const SIDEBAR_COOKIE_NAME = "sidebar_state"
constant SIDEBAR_COOKIE_MAX_AGE (line 29) | const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7
constant SIDEBAR_WIDTH (line 30) | const SIDEBAR_WIDTH = "16rem"
constant SIDEBAR_WIDTH_MOBILE (line 31) | const SIDEBAR_WIDTH_MOBILE = "18rem"
constant SIDEBAR_WIDTH_ICON (line 32) | const SIDEBAR_WIDTH_ICON = "3rem"
constant SIDEBAR_KEYBOARD_SHORTCUT (line 33) | const SIDEBAR_KEYBOARD_SHORTCUT = "b"
type SidebarContextProps (line 35) | type SidebarContextProps = {
function useSidebar (line 47) | function useSidebar() {
function SidebarProvider (line 56) | function SidebarProvider({
function Sidebar (line 154) | function Sidebar({
function SidebarTrigger (line 256) | function SidebarTrigger({
function SidebarRail (line 282) | function SidebarRail({ className, ...props }: React.ComponentProps<"butt...
function SidebarInset (line 307) | function SidebarInset({ className, ...props }: React.ComponentProps<"mai...
function SidebarInput (line 321) | function SidebarInput({
function SidebarHeader (line 335) | function SidebarHeader({ className, ...props }: React.ComponentProps<"di...
function SidebarFooter (line 346) | function SidebarFooter({ className, ...props }: React.ComponentProps<"di...
function SidebarSeparator (line 357) | function SidebarSeparator({
function SidebarContent (line 371) | function SidebarContent({ className, ...props }: React.ComponentProps<"d...
function SidebarGroup (line 385) | function SidebarGroup({ className, ...props }: React.ComponentProps<"div...
function SidebarGroupLabel (line 396) | function SidebarGroupLabel({
function SidebarGroupAction (line 417) | function SidebarGroupAction({
function SidebarGroupContent (line 440) | function SidebarGroupContent({
function SidebarMenu (line 454) | function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">) {
function SidebarMenuItem (line 465) | function SidebarMenuItem({ className, ...props }: React.ComponentProps<"...
function SidebarMenuButton (line 498) | function SidebarMenuButton({
function SidebarMenuAction (line 548) | function SidebarMenuAction({
function SidebarMenuBadge (line 580) | function SidebarMenuBadge({
function SidebarMenuSkeleton (line 602) | function SidebarMenuSkeleton({
function SidebarMenuSub (line 640) | function SidebarMenuSub({ className, ...props }: React.ComponentProps<"u...
function SidebarMenuSubItem (line 655) | function SidebarMenuSubItem({
function SidebarMenuSubButton (line 669) | function SidebarMenuSubButton({
FILE: web/src/components/ui/skeleton.tsx
function Skeleton (line 3) | function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
FILE: web/src/components/ui/switch.tsx
function Switch (line 8) | function Switch({
FILE: web/src/components/ui/table.tsx
function Table (line 7) | function Table({ className, ...props }: React.ComponentProps<"table">) {
function TableHeader (line 22) | function TableHeader({ className, ...props }: React.ComponentProps<"thea...
function TableBody (line 32) | function TableBody({ className, ...props }: React.ComponentProps<"tbody"...
function TableFooter (line 42) | function TableFooter({ className, ...props }: React.ComponentProps<"tfoo...
function TableRow (line 55) | function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
function TableHead (line 68) | function TableHead({ className, ...props }: React.ComponentProps<"th">) {
function TableCell (line 81) | function TableCell({ className, ...props }: React.ComponentProps<"td">) {
function TableCaption (line 94) | function TableCaption({
FILE: web/src/components/ui/tabs.tsx
function Tabs (line 8) | function Tabs({
function TabsList (line 21) | function TabsList({
function TabsTrigger (line 37) | function TabsTrigger({
function TabsContent (line 53) | function TabsContent({
FILE: web/src/components/ui/textarea.tsx
type TextareaProps (line 5) | type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>
FILE: web/src/components/ui/toggle-group.tsx
function ToggleGroup (line 17) | function ToggleGroup({
function ToggleGroupItem (line 43) | function ToggleGroupItem({
FILE: web/src/components/ui/toggle.tsx
function Toggle (line 31) | function Toggle({
FILE: web/src/components/ui/tooltip.tsx
function TooltipProvider (line 8) | function TooltipProvider({
function Tooltip (line 21) | function Tooltip({
function TooltipTrigger (line 31) | function TooltipTrigger({
function TooltipContent (line 37) | function TooltipContent({
FILE: web/src/constant/protocols.ts
constant PROTOCOL_OPTIONS (line 1) | const PROTOCOL_OPTIONS = [
FILE: web/src/constant/settings-keys.ts
constant PROXY_ENABLE (line 1) | const PROXY_ENABLE = "proxy_enable"
constant PROXY_URL (line 2) | const PROXY_URL = "proxy_url"
constant LOG_RETENTION_DAYS (line 4) | const LOG_RETENTION_DAYS = "log_retention_days"
constant SUBCONV_URL (line 6) | const SUBCONV_URL = "subconv_url"
constant SUBCONV_URL_PROXY (line 7) | const SUBCONV_URL_PROXY = "subconv_url_proxy"
constant SUB_DISABLE_AUTO (line 9) | const SUB_DISABLE_AUTO = "sub_disable_auto"
constant NODE_POOL_SIZE (line 11) | const NODE_POOL_SIZE = "node_pool_size"
constant NODE_TEST_URL (line 12) | const NODE_TEST_URL = "node_test_url"
constant NODE_TEST_TIMEOUT (line 13) | const NODE_TEST_TIMEOUT = "node_test_timeout"
constant NODE_PROTOCOL_FILTER_ENABLE (line 15) | const NODE_PROTOCOL_FILTER_ENABLE = "node_protocol_filter_enable"
constant NODE_PROTOCOL_FILTER_MODE (line 16) | const NODE_PROTOCOL_FILTER_MODE = "node_protocol_filter_mode"
constant NODE_PROTOCOL_FILTER (line 17) | const NODE_PROTOCOL_FILTER = "node_protocol_filter"
constant TASK_MAX_THREAD (line 19) | const TASK_MAX_THREAD = "task_max_thread"
constant TASK_MAX_TIMEOUT (line 20) | const TASK_MAX_TIMEOUT = "task_max_timeout"
constant TASK_MAX_RETRY (line 21) | const TASK_MAX_RETRY = "task_max_retry"
constant NOTIFY_OPERATION (line 23) | const NOTIFY_OPERATION = "notify_operation"
constant NOTIFY_ID (line 24) | const NOTIFY_ID = "notify_id"
constant BOOLEAN_SETTING_KEYS (line 26) | const BOOLEAN_SETTING_KEYS = new Set<string>([
constant NUMBER_SETTING_KEYS (line 33) | const NUMBER_SETTING_KEYS = new Set<string>([
constant MULTI_SELECT_SETTING_KEYS (line 45) | const MULTI_SELECT_SETTING_KEYS = new Set<string>([
FILE: web/src/lib/api/client.ts
constant DEFAULT_REQUEST_HEADERS (line 5) | const DEFAULT_REQUEST_HEADERS: Record<string, string> = {}
class ApiError (line 7) | class ApiError extends Error {
method constructor (line 8) | constructor(
class ApiClient (line 17) | class ApiClient {
method request (line 18) | private async request<T>(
method get (line 65) | async get<T>(endpoint: string, requiresAuth: boolean = true): Promise<...
method post (line 69) | async post<T>(endpoint: string, data?: unknown, requiresAuth: boolean ...
method delete (line 80) | async delete<T>(endpoint: string, requiresAuth: boolean = true): Promi...
method put (line 84) | async put<T>(endpoint: string, data?: unknown, requiresAuth: boolean =...
method login (line 98) | async login(username: string, password: string): Promise<LoginResponse> {
method logout (line 107) | async logout(): Promise<void> {
method getUserInfo (line 111) | async getUserInfo(): Promise<UserInfo> {
method changePassword (line 116) | async changePassword(data: ChangePasswordRequest): Promise<void> {
method updateUsername (line 120) | async updateUsername(data: UpdateUserInfoRequest): Promise<void> {
method getSub (line 124) | async getSub(id?: number): Promise<SubResponse[]> {
method getChecks (line 129) | async getChecks(id?: number): Promise<CheckResponse[]> {
method getCheckTypes (line 134) | async getCheckTypes(): Promise<Record<string, DynamicConfigItem[]>> {
method refreshSubscription (line 138) | async refreshSubscription(id: number): Promise<void> {
method runCheck (line 141) | async runCheck(id: number): Promise<void> {
method createSubscription (line 144) | async createSubscription(data: SubRequest): Promise<SubResponse> {
method batchCreateSubscriptions (line 148) | async batchCreateSubscriptions(data: SubRequest[]): Promise<SubResponse[...
method updateSubscription (line 152) | async updateSubscription(id: number, data: SubRequest): Promise<SubRespo...
method deleteSubscription (line 156) | async deleteSubscription(id: number): Promise<void> {
method createCheck (line 159) | async createCheck(data: CheckRequest): Promise<CheckResponse> {
method updateCheck (line 163) | async updateCheck(id: number, data: CheckRequest): Promise<CheckResponse> {
method deleteCheck (line 167) | async deleteCheck(id: number): Promise<void> {
method getSubNameAndID (line 170) | async getSubNameAndID(): Promise<SubNameAndID[]> {
method getNotifyChannels (line 174) | async getNotifyChannels(): Promise<NotifyChannel[]> {
method getNotifyChannelConfig (line 178) | async getNotifyChannelConfig(channel?: string): Promise<NotifyChannelCon...
method getNotifyList (line 185) | async getNotifyList(): Promise<NotifyResponse[]> {
method createNotify (line 189) | async createNotify(data: NotifyRequest): Promise<NotifyResponse> {
method updateNotify (line 193) | async updateNotify(id: number, data: NotifyRequest): Promise<NotifyRespo...
method deleteNotify (line 197) | async deleteNotify(id: number): Promise<void> {
method testNotify (line 200) | async testNotify(data: NotifyRequest): Promise<void> {
method getNotifyTemplates (line 203) | async getNotifyTemplates(): Promise<NotifyTemplate[]> {
method updateNotifyTemplate (line 207) | async updateNotifyTemplate(data: NotifyTemplate): Promise<NotifyTemplate> {
method getShares (line 211) | async getShares(id?: number): Promise<ShareResponse[]> {
method createShare (line 216) | async createShare(data: ShareRequest): Promise<ShareResponse> {
method updateShare (line 220) | async updateShare(id: number, data: ShareRequest): Promise<ShareResponse> {
method deleteShare (line 224) | async deleteShare(id: number): Promise<void> {
method getSettings (line 227) | async getSettings(): Promise<Setting[]> {
method updateSettings (line 231) | async updateSettings(data: Setting[]): Promise<void> {
method getLatestUpdates (line 235) | async getLatestUpdates(): Promise<UpdateResponse> {
method updateComponent (line 240) | async updateComponent(component: UpdateComponent): Promise<void> {
method getSystemVersion (line 244) | async getSystemVersion(): Promise<SystemVersion> {
FILE: web/src/lib/api/token-manager.ts
constant TOKEN_KEYS (line 3) | const TOKEN_KEYS = {
constant LEGACY_KEYS (line 8) | const LEGACY_KEYS = ['refresh_token', 'refresh_expires_at'] as const
class TokenManager (line 10) | class TokenManager {
method isServer (line 11) | static isServer() {
method getTokens (line 15) | static getTokens() {
method setTokens (line 27) | static setTokens(tokens: LoginResponse) {
method clearTokens (line 34) | static clearTokens() {
method isExpired (line 40) | static isExpired(expiresAt: string): boolean {
method getValidToken (line 45) | static async getValidToken(): Promise<string | null> {
FILE: web/src/lib/config/config.ts
constant API_PATH (line 1) | const API_PATH = {
constant APP_CONFIG (line 26) | const APP_CONFIG = {
constant APP_ROUTES (line 33) | const APP_ROUTES = {
FILE: web/src/lib/config/version.ts
constant APP_VERSION (line 1) | const APP_VERSION = process.env.NEXT_PUBLIC_APP_VERSION || 'unknown';
FILE: web/src/lib/hooks/use-form-update.ts
function useFormUpdate (line 3) | function useFormUpdate<TFormData extends { config: unknown }>(
FILE: web/src/lib/hooks/use-form.ts
type FormState (line 4) | interface FormState<T> {
type FormActions (line 12) | interface FormActions<T> {
type FormConfig (line 23) | interface FormConfig<T> {
function useForm (line 29) | function useForm<T extends Record<string, unknown>>(
FILE: web/src/lib/hooks/use-mobile.ts
constant MOBILE_BREAKPOINT (line 3) | const MOBILE_BREAKPOINT = 768
function useIsMobile (line 5) | function useIsMobile() {
FILE: web/src/lib/hooks/useOverflowDetection.ts
type UseOverflowDetectionReturn (line 3) | interface UseOverflowDetectionReturn<T extends HTMLElement> {
function useOverflowDetection (line 10) | function useOverflowDetection<T extends HTMLElement = HTMLElement>(): Us...
FILE: web/src/lib/queries/check-queries.ts
function useChecks (line 13) | function useChecks(id?: number) {
function useCheckTypes (line 22) | function useCheckTypes() {
function useCreateCheck (line 31) | function useCreateCheck() {
function useUpdateCheck (line 57) | function useUpdateCheck() {
function useDeleteCheck (line 86) | function useDeleteCheck() {
FILE: web/src/lib/queries/setting-queries.ts
function useSettings (line 10) | function useSettings() {
function useUpdateSettings (line 19) | function useUpdateSettings() {
FILE: web/src/lib/queries/share-queries.ts
function useShares (line 12) | function useShares() {
function useCreateShare (line 21) | function useCreateShare() {
function useUpdateShare (line 47) | function useUpdateShare() {
function useDeleteShare (line 76) | function useDeleteShare() {
FILE: web/src/lib/queries/sub-queries.ts
function useSubs (line 12) | function useSubs() {
function useCreateSub (line 21) | function useCreateSub() {
function useUpdateSub (line 47) | function useUpdateSub() {
function useDeleteSub (line 76) | function useDeleteSub() {
function useRefreshSub (line 102) | function useRefreshSub() {
function useBatchCreateSub (line 126) | function useBatchCreateSub() {
FILE: web/src/router/core/context.tsx
type Route (line 5) | interface Route {
type RouteParams (line 14) | interface RouteParams {
type QueryParams (line 18) | interface QueryParams {
type NavigateOptions (line 22) | interface NavigateOptions {
type RouterContextType (line 27) | interface RouterContextType {
function useRouter (line 37) | function useRouter() {
FILE: web/src/router/core/outlet.tsx
type RouterOutletProps (line 9) | interface RouterOutletProps {
function RouterOutlet (line 13) | function RouterOutlet({ fallback: Fallback }: RouterOutletProps) {
FILE: web/src/router/core/router.tsx
function parseRoute (line 7) | function parseRoute(hash: string): { path: string; params: RouteParams; ...
function buildRoute (line 35) | function buildRoute(path: string, query?: QueryParams): string {
function RouterProvider (line 53) | function RouterProvider({ children }: { children: ReactNode }) {
FILE: web/src/router/hooks/use-navigation.tsx
function useNavigation (line 5) | function useNavigation() {
FILE: web/src/router/hooks/use-route-preloader.tsx
function useRoutePreloader (line 9) | function useRoutePreloader() {
function useLinkPreloader (line 92) | function useLinkPreloader() {
function useSmartPreloader (line 120) | function useSmartPreloader() {
FILE: web/src/router/hooks/use-route-title.tsx
function useRouteTitle (line 7) | function useRouteTitle() {
FILE: web/src/types/api.ts
type ApiResponse (line 1) | interface ApiResponse<T = unknown> {
FILE: web/src/types/auth.ts
type LoginRequest (line 8) | interface LoginRequest {
type LoginResponse (line 16) | interface LoginResponse {
type UserInfo (line 24) | interface UserInfo {
type ChangePasswordRequest (line 33) | interface ChangePasswordRequest {
type UpdateUserInfoRequest (line 42) | interface UpdateUserInfoRequest {
FILE: web/src/types/check.ts
type CheckRequest (line 1) | interface CheckRequest {
type CheckResponse (line 7) | interface CheckResponse {
type CheckResult (line 17) | interface CheckResult {
type CheckTask (line 24) | interface CheckTask {
FILE: web/src/types/common.ts
type BaseEntity (line 8) | interface BaseEntity {
type PaginationParams (line 17) | interface PaginationParams {
type PaginatedResponse (line 27) | interface PaginatedResponse<T> {
type DynamicConfigItem (line 38) | interface DynamicConfigItem {
type ConfigValue (line 51) | type ConfigValue = string | number | boolean
type DynamicConfig (line 56) | interface DynamicConfig {
type KeyValue (line 60) | interface KeyValue {
FILE: web/src/types/notify.ts
type NotifyRequest (line 10) | interface NotifyRequest {
type NotifyResponse (line 19) | interface NotifyResponse {
type NotifyTemplate (line 29) | interface NotifyTemplate {
type NotifyChannel (line 41) | type NotifyChannel = string
type NotifyChannelConfigResponse (line 46) | interface NotifyChannelConfigResponse {
FILE: web/src/types/setting.ts
type Setting (line 2) | interface Setting {
type FormValue (line 7) | type FormValue = string | number | boolean | string[]
type FormValues (line 9) | interface FormValues {
FILE: web/src/types/share.ts
type GenConfig (line 1) | interface GenConfig {
type ShareRequest (line 8) | interface ShareRequest {
type ShareResponse (line 17) | interface ShareResponse {
type ShareFilter (line 28) | interface ShareFilter {
FILE: web/src/types/sub.ts
type SubConfig (line 1) | interface SubConfig {
type SubRequest (line 10) | interface SubRequest {
type SubResult (line 19) | interface SubResult {
type SubNodeInfo (line 28) | interface SubNodeInfo {
type SubResponse (line 36) | interface SubResponse {
type SubNameAndID (line 50) | interface SubNameAndID {
FILE: web/src/types/update.ts
type LatestInfo (line 5) | interface LatestInfo {
type UpdateResponse (line 14) | interface UpdateResponse {
type UpdateComponent (line 18) | type UpdateComponent = 'bestsub'
type SystemVersion (line 20) | interface SystemVersion {
FILE: web/src/utils/cron.ts
function getNextCronRunTime (line 10) | function getNextCronRunTime(cronExpr: string, enabled: boolean): string ...
FILE: web/src/utils/format.ts
function cn (line 11) | function cn(...inputs: ClassValue[]) {
function formatDuration (line 18) | function formatDuration(milliseconds: number): string {
function formatLastRunTime (line 35) | function formatLastRunTime(lastRun: string | undefined): string {
function formatBooleanText (line 60) | function formatBooleanText(value: boolean): string {
FILE: web/src/utils/time.ts
function isZeroTime (line 8) | function isZeroTime(timeString: string | undefined | null): boolean {
function formatTime (line 24) | function formatTime(
function formatRelativeTime (line 44) | function formatRelativeTime(timeString: string | undefined | null): stri...
FILE: web/src/utils/url.ts
function getApiBaseUrl (line 8) | function getApiBaseUrl(): string {
function buildApiUrl (line 24) | function buildApiUrl(endpoint: string): string {
FILE: web/src/utils/validation.ts
function validateTimeout (line 8) | function validateTimeout(value: string | number): number {
function validateUrl (line 18) | function validateUrl(url: string): boolean {
function validateCronExpr (line 31) | function validateCronExpr(cron: string): boolean {
Condensed preview — 322 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,111K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/bug_report.yml",
"chars": 690,
"preview": "name: 错误反馈\ndescription: \"提交错误反馈\"\ntitle: \"[Bug] \"\nlabels: [\"bug\"]\nbody:\n - type: checkboxes\n id: ensure\n attribute"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 27,
"preview": "blank_issues_enabled: false"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.yml",
"chars": 620,
"preview": "name: 功能请求\ndescription: 为该项目提出建议\ntitle: \"[Feature] \"\nlabels: [\"enhancement\"]\nbody:\n - type: checkboxes\n id: ensure\n "
},
{
"path": ".github/workflows/changelog.yml",
"chars": 1032,
"preview": "name: changelog\n\non:\n push:\n tags:\n - 'v*'\n\npermissions:\n contents: write\n\njobs:\n changelog:\n name: Create"
},
{
"path": ".github/workflows/release.yml",
"chars": 3489,
"preview": "name: release\n\non:\n push:\n branches:\n - master\n\npermissions:\n contents: write\n packages: write\n \njobs:\n rel"
},
{
"path": ".gitignore",
"chars": 179,
"preview": "# web\r\nstatic/out/*\r\n!static/out/README.md\r\n\r\n# api\r\napi/*\r\n!api/README.md\r\n\r\n# build\r\ndist/*\r\nbuild\r\n\r\n# vscode\r\n.vscod"
},
{
"path": "LICENSE",
"chars": 35143,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Softw"
},
{
"path": "README.md",
"chars": 3387,
"preview": "# BestSub\n\nBestSub 是一个高性能的节点检测,订阅转换服务,基于 Go 语言开发。该项目提供了完整的 Web 界面和 API 接口,支持多种检测项目,多种订阅格式转换,为用户提供便捷的订阅管理解决方案。\n\n## ✨ 主要特性"
},
{
"path": "cmd/bestsub/main.go",
"chars": 1347,
"preview": "package main\n\nimport (\n\t\"github.com/bestruirui/bestsub/internal/config\"\n\t\"github.com/bestruirui/bestsub/internal/core/cr"
},
{
"path": "deploy/README.md",
"chars": 9,
"preview": "# Depoly\n"
},
{
"path": "deploy/docker-compose.yaml",
"chars": 223,
"preview": "services:\n bestsub:\n image: ghcr.io/bestruirui/bestsub:latest\n container_name: bestsub\n restart:"
},
{
"path": "docs/api/swagger.json",
"chars": 142416,
"preview": "{\n \"swagger\": \"2.0\",\n \"info\": {\n \"description\": \"BestSub - API 文档\\n\\n这是 BestSub 的 API 文档\\n\\n## 认证\\n大多数接口需要"
},
{
"path": "docs/database/BESTSUB.json",
"chars": 15717,
"preview": "{\n \"tables\": [\n {\n \"name\": \"auth\",\n \"comment\": \"\",\n \"color\": \"#175e7a\",\n \"fields\": [\n {\n "
},
{
"path": "docs/database/README.md",
"chars": 454,
"preview": "# 数据库设计文档\n\n## 概述\n本文档介绍项目的数据库设计方案及相关工具使用说明。\n\n## 设计图查看方法\n1. 下载本目录中的设计文件:[BESTSUB.json](./BESTSUB.json)\n2. 访问 [DrawDB](http"
},
{
"path": "docs/rename/README.md",
"chars": 6514,
"preview": "# BestSub 节点重命名模板指南\n\nBestSub 节点重命名功能允许用户自定义节点名称的显示格式,通过灵活的模板语法实现个性化的节点管理体验。\n\n---\n\n## 📋 可用变量\n\n重命名模板支持以下变量:\n\n| 变量 "
},
{
"path": "go.mod",
"chars": 8167,
"preview": "module github.com/bestruirui/bestsub\n\ngo 1.24.2\n\nrequire (\n\tgithub.com/cespare/xxhash/v2 v2.3.0\n\tgithub.com/enfein/mieru"
},
{
"path": "go.sum",
"chars": 38341,
"preview": "filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=\nfilippo.io/edwards25519 v1.1.0/go.mod h1:"
},
{
"path": "internal/config/base.go",
"chars": 6783,
"preview": "package config\n\nimport (\n\t\"crypto/rand\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"flag\"\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n\t\"path/filepath\"\n\t\""
},
{
"path": "internal/core/check/check.go",
"chars": 531,
"preview": "package check\n\nimport (\n\t_ \"github.com/bestruirui/bestsub/internal/core/check/checker\"\n\t\"github.com/bestruirui/bestsub/i"
},
{
"path": "internal/core/check/checker/alive.go",
"chars": 3752,
"preview": "package checker\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"gopkg.in/yaml.v3\"\n\n\t\"github.co"
},
{
"path": "internal/core/check/checker/country.go",
"chars": 2350,
"preview": "package checker\n\nimport (\n\t\"context\"\n\t\"sync\"\n\t\"time\"\n\n\t\"gopkg.in/yaml.v3\"\n\n\t\"github.com/bestruirui/bestsub/internal/core"
},
{
"path": "internal/core/check/checker/speed.go",
"chars": 5768,
"preview": "package checker\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"sync\"\n\t\"time\"\n\n\t\"gopkg.in/yaml.v3\"\n\n\t\"github.com/bestrui"
},
{
"path": "internal/core/check/checker/tiktok.go",
"chars": 3449,
"preview": "package checker\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"io\"\n\t\"net/http\"\n\t\"sync\"\n\t\"time\"\n\n\t\"gopkg.in/yaml.v3\"\n\n\t\"github.com/bestr"
},
{
"path": "internal/core/cron/check.go",
"chars": 3728,
"preview": "package cron\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/core/check\"\n"
},
{
"path": "internal/core/cron/cron.go",
"chars": 382,
"preview": "package cron\n\nimport (\n\t\"time\"\n\n\t\"github.com/robfig/cron/v3\"\n)\n\ntype cronFunc struct {\n\tfn func()\n\tcronExpr string"
},
{
"path": "internal/core/cron/fetch.go",
"chars": 3739,
"preview": "package cron\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"math/rand\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/core/f"
},
{
"path": "internal/core/fetch/fetch.go",
"chars": 4166,
"preview": "package fetch\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"io\"\n\t\"net/http\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.co"
},
{
"path": "internal/core/mihomo/mihomo.go",
"chars": 3532,
"preview": "package mihomo\n\nimport (\n\t\"context\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strconv\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/bestruirui/be"
},
{
"path": "internal/core/node/exist.go",
"chars": 480,
"preview": "package node\n\nimport \"sync\"\n\ntype exist struct {\n\tmu sync.RWMutex\n\tdata map[uint64]struct{}\n}\n\nfunc NewExist(size int)"
},
{
"path": "internal/core/node/info.go",
"chars": 1808,
"preview": "package node\n\nimport nodeModel \"github.com/bestruirui/bestsub/internal/models/node\"\n\nfunc RefreshInfo() {\n\trefreshMutex."
},
{
"path": "internal/core/node/node.go",
"chars": 8031,
"preview": "package node\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/gob\"\n\t\"net/http\"\n\t\"os\"\n\t\"path\"\n\t\"slices\"\n\t\"sort\"\n\t\"time\"\n\n\t\"gopkg."
},
{
"path": "internal/core/node/var.go",
"chars": 661,
"preview": "package node\n\nimport (\n\t\"sync\"\n\n\tnodeModel \"github.com/bestruirui/bestsub/internal/models/node\"\n)\n\nvar (\n\tpoolMutex sy"
},
{
"path": "internal/core/subconv/subconv.go",
"chars": 1683,
"preview": "package subconv\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"io\"\n\t\"net/http\"\n\n\t\"github.com/bestruirui/bestsub/intern"
},
{
"path": "internal/core/system/monitor.go",
"chars": 1255,
"preview": "package system\n\nimport (\n\t\"os\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/models/system\"\n\t\"github."
},
{
"path": "internal/core/task/task.go",
"chars": 295,
"preview": "package task\n\nimport \"github.com/panjf2000/ants/v2\"\n\nvar pool *ants.Pool\nvar thread int\n\nfunc Init(maxThread int) {\n\tpoo"
},
{
"path": "internal/core/update/core.go",
"chars": 2716,
"preview": "package update\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"syscall\"\n\n\t\"github.com/bestruirui/bestsub"
},
{
"path": "internal/core/update/update.go",
"chars": 4009,
"preview": "package update\n\nimport (\n\t\"archive/zip\"\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\t\"path/filep"
},
{
"path": "internal/database/client/sqlite/auth.go",
"chars": 2815,
"preview": "package sqlite\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces"
},
{
"path": "internal/database/client/sqlite/check.go",
"chars": 3014,
"preview": "package sqlite\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces"
},
{
"path": "internal/database/client/sqlite/migration/001_table.go",
"chars": 2097,
"preview": "package migration\n\nimport \"github.com/bestruirui/bestsub/internal/database/migration\"\n\n// Migration001Table 初始数据库架构\nfunc"
},
{
"path": "internal/database/client/sqlite/migration/002_add_sub_tags.go",
"chars": 366,
"preview": "package migration\n\nimport \"github.com/bestruirui/bestsub/internal/database/migration\"\n\n// Migration002AddSubTags 为sub表添加"
},
{
"path": "internal/database/client/sqlite/migration/migration.go",
"chars": 183,
"preview": "package migration\n\nimport \"github.com/bestruirui/bestsub/internal/database/migration\"\n\nconst ClientName = \"sqlite\"\n\nfunc"
},
{
"path": "internal/database/client/sqlite/migrator.go",
"chars": 2729,
"preview": "package sqlite\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/client/sqlite/migration\"\n\tmig"
},
{
"path": "internal/database/client/sqlite/notify.go",
"chars": 5234,
"preview": "package sqlite\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces"
},
{
"path": "internal/database/client/sqlite/setting.go",
"chars": 4064,
"preview": "package sqlite\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces\"\n\t\"github.com/b"
},
{
"path": "internal/database/client/sqlite/share.go",
"chars": 4757,
"preview": "package sqlite\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces"
},
{
"path": "internal/database/client/sqlite/sqlite.go",
"chars": 1525,
"preview": "package sqlite\n\nimport (\n\t\"database/sql\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces\"\n\t"
},
{
"path": "internal/database/client/sqlite/storage.go",
"chars": 2971,
"preview": "package sqlite\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces"
},
{
"path": "internal/database/client/sqlite/sub.go",
"chars": 4394,
"preview": "package sqlite\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/in"
},
{
"path": "internal/database/database.go",
"chars": 1305,
"preview": "package database\n\nimport (\n\t\"context\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/client/sqlite\"\n\t\"github.com/bes"
},
{
"path": "internal/database/init.go",
"chars": 2829,
"preview": "package database\n\nimport (\n\t\"context\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces\"\n\t\"github.com/bestru"
},
{
"path": "internal/database/interfaces/auth.go",
"chars": 482,
"preview": "package interfaces\n\nimport (\n\t\"context\"\n\n\t\"github.com/bestruirui/bestsub/internal/models/auth\"\n)\n\n// 单用户认证数据访问接口\ntype Au"
},
{
"path": "internal/database/interfaces/check.go",
"chars": 400,
"preview": "package interfaces\n\nimport (\n\t\"context\"\n\n\t\"github.com/bestruirui/bestsub/internal/models/check\"\n)\n\ntype CheckRepository "
},
{
"path": "internal/database/interfaces/notify.go",
"chars": 973,
"preview": "package interfaces\n\nimport (\n\t\"context\"\n\n\t\"github.com/bestruirui/bestsub/internal/models/notify\"\n)\n\n// NotificationChann"
},
{
"path": "internal/database/interfaces/repository.go",
"chars": 332,
"preview": "package interfaces\n\n// Repository 统一的仓库接口\ntype Repository interface {\n\tAuth() AuthRepository\n\n\tSetting() SettingReposito"
},
{
"path": "internal/database/interfaces/setting.go",
"chars": 394,
"preview": "package interfaces\n\nimport (\n\t\"context\"\n\n\t\"github.com/bestruirui/bestsub/internal/models/setting\"\n)\n\ntype SettingReposit"
},
{
"path": "internal/database/interfaces/share.go",
"chars": 745,
"preview": "package interfaces\n\nimport (\n\t\"context\"\n\n\t\"github.com/bestruirui/bestsub/internal/models/share\"\n)\n\n// 分享链接数据访问接口\ntype Sh"
},
{
"path": "internal/database/interfaces/storage.go",
"chars": 527,
"preview": "package interfaces\n\nimport (\n\t\"context\"\n\n\t\"github.com/bestruirui/bestsub/internal/models/storage\"\n)\n\n// 存储配置数据访问接口\ntype "
},
{
"path": "internal/database/interfaces/sub.go",
"chars": 590,
"preview": "package interfaces\n\nimport (\n\t\"context\"\n\n\t\"github.com/bestruirui/bestsub/internal/models/sub\"\n)\n\n// SubRepository 订阅链接数据"
},
{
"path": "internal/database/migration/migration.go",
"chars": 885,
"preview": "package migration\n\nimport (\n\t\"sort\"\n)\n\ntype Info struct {\n\tDate uint64\n\tVersion string\n\tDescription string\n\tC"
},
{
"path": "internal/database/op/auth.go",
"chars": 1342,
"preview": "package op\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces\"\n\t\"github.com/bestr"
},
{
"path": "internal/database/op/check.go",
"chars": 3284,
"preview": "package op\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/inter"
},
{
"path": "internal/database/op/notify.go",
"chars": 3853,
"preview": "package op\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces\"\n\t\"github.com/bestr"
},
{
"path": "internal/database/op/repo.go",
"chars": 253,
"preview": "package op\n\nimport (\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces\"\n)\n\nvar repo interfaces.Repository\n\nfu"
},
{
"path": "internal/database/op/setting.go",
"chars": 2571,
"preview": "package op\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces\"\n\t\"githu"
},
{
"path": "internal/database/op/share.go",
"chars": 4044,
"preview": "package op\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces\"\n\t\""
},
{
"path": "internal/database/op/storage.go",
"chars": 2236,
"preview": "package op\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces\"\n\t\"github.com/bestr"
},
{
"path": "internal/database/op/sub.go",
"chars": 3833,
"preview": "package op\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/interfaces\"\n\t"
},
{
"path": "internal/models/auth/auth.go",
"chars": 1126,
"preview": "package auth\n\nimport \"time\"\n\ntype Data struct {\n\tID uint8 `db:\"id\" json:\"-\"`\n\tUserName string `db:\"username\" json"
},
{
"path": "internal/models/auth/default.go",
"chars": 72,
"preview": "package auth\n\nfunc Default() Data {\n\treturn Data{0, \"admin\", \"admin\"}\n}\n"
},
{
"path": "internal/models/check/check.go",
"chars": 3198,
"preview": "package check\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/utils/log\"\n)\n\ntype"
},
{
"path": "internal/models/common/base.go",
"chars": 738,
"preview": "package common\n\nimport \"time\"\n\n// BaseDbModel 基础模型,包含所有实体的公共字段\ntype BaseDbModel struct {\n\tID uint16 `db:\"id\""
},
{
"path": "internal/models/config/config.go",
"chars": 661,
"preview": "package config\n\ntype Base struct {\n\tServer ServerConfig `json:\"server\"`\n\tDatabase DatabaseConfig `json:\"database\"`\n\t"
},
{
"path": "internal/models/config/default.go",
"chars": 242,
"preview": "package config\n\nfunc DefaultBase() Base {\n\treturn Base{\n\t\tServer: ServerConfig{\n\t\t\tPort: 8080,\n\t\t\tHost: \"0.0.0.0\",\n\t\t},\n"
},
{
"path": "internal/models/node/node.go",
"chars": 1739,
"preview": "package node\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/bestruirui/bestsub/internal/utils/generic\"\n\t\"github.com/cespare/xx"
},
{
"path": "internal/models/notify/default.go",
"chars": 237,
"preview": "package notify\n\nfunc DefaultTemplates() []Template {\n\treturn []Template{\n\t\t// \t{\"login_success\", \"登录成功\", \"{{.Username}}{"
},
{
"path": "internal/models/notify/notify.go",
"chars": 1392,
"preview": "package notify\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n)\n\ntype Data struct {\n\tID uint16 `db:\"id\" json:\"id\"`\n\tName stri"
},
{
"path": "internal/models/setting/default.go",
"chars": 1044,
"preview": "package setting\n\nfunc DefaultSetting() []Setting {\n\treturn []Setting{\n\n\t\t{\n\t\t\tKey: PROXY_ENABLE,\n\t\t\tValue: \"false\",\n\t\t"
},
{
"path": "internal/models/setting/setting.go",
"chars": 807,
"preview": "package setting\n\ntype Setting struct {\n\tKey string `json:\"key\"`\n\tValue string `json:\"value\"`\n}\n\nconst (\n\tPROXY_ENABLE "
},
{
"path": "internal/models/share/share.go",
"chars": 2179,
"preview": "package share\n\nimport (\n\t\"encoding/json\"\n\n\tnodeModel \"github.com/bestruirui/bestsub/internal/models/node\"\n)\n\ntype Data s"
},
{
"path": "internal/models/storage/storage.go",
"chars": 982,
"preview": "package storage\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n)\n\ntype Data struct {\n\tID uint16 `db:\"id\" json:\"id\"`\n\tName s"
},
{
"path": "internal/models/sub/sub.go",
"chars": 3390,
"preview": "package sub\n\nimport (\n\t\"encoding/json\"\n\t\"time\"\n\n\tnodeModel \"github.com/bestruirui/bestsub/internal/models/node\"\n)\n\ntype "
},
{
"path": "internal/models/system/info.go",
"chars": 1014,
"preview": "package system\n\n// HealthResponse 健康检查响应\ntype HealthResponse struct {\n\tStatus string `json:\"status\" example:\"ok\"` "
},
{
"path": "internal/modules/country/channel/cloudflare.go",
"chars": 1092,
"preview": "package channel\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"net/http\"\n)\n\ntype CloudflareCDN struct{}\n\nfunc (c *CloudflareCDN) "
},
{
"path": "internal/modules/country/channel/commen.go",
"chars": 216,
"preview": "package channel\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/bestruirui/bestsub/internal/utils/ua\"\n)\n\ntype Common struct {\n\tCount"
},
{
"path": "internal/modules/country/channel/freeip.go",
"chars": 479,
"preview": "package channel\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n)\n\ntype FreeIP struct{}\n\nfunc (c *FreeIP) Url() string {\n\treturn "
},
{
"path": "internal/modules/country/channel/ip_sb.go",
"chars": 407,
"preview": "package channel\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n)\n\ntype IPSB struct{}\n\nfunc (c *IPSB) Url() string {\n\treturn \"htt"
},
{
"path": "internal/modules/country/channel/ipapi.go",
"chars": 395,
"preview": "package channel\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n)\n\ntype IPAPI struct{}\n\nfunc (c *IPAPI) Url() string {\n\treturn \"h"
},
{
"path": "internal/modules/country/channel/ipwho.go",
"chars": 412,
"preview": "package channel\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n)\n\ntype IPWho struct{}\n\nfunc (c *IPWho) Url() string {\n\treturn \"h"
},
{
"path": "internal/modules/country/channel/myip.go",
"chars": 399,
"preview": "package channel\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n)\n\ntype MYIP struct {\n\tCC string `json:\"cc\"`\n}\n\nfunc (c *MYIP) Ur"
},
{
"path": "internal/modules/country/channel/reallyfreegeoip.go",
"chars": 549,
"preview": "package channel\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n)\n\ntype ReallyFreeGeoIP struct{}\n\nfunc (c *ReallyFreeGeoIP) Url()"
},
{
"path": "internal/modules/country/channel/register.go",
"chars": 251,
"preview": "package channel\n\nimport (\n\t\"net/http\"\n)\n\ntype Channel interface {\n\tUrl() string\n\tHeader(req *http.Request)\n\tCountryCode("
},
{
"path": "internal/modules/country/country.go",
"chars": 740,
"preview": "package country\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/modules/country"
},
{
"path": "internal/modules/notify/channel/email.go",
"chars": 2702,
"preview": "package channel\n\nimport (\n\t\"bytes\"\n\t\"crypto/tls\"\n\t\"fmt\"\n\t\"net/smtp\"\n\t\"strings\"\n\n\t\"github.com/bestruirui/bestsub/internal"
},
{
"path": "internal/modules/notify/channel/webhook.go",
"chars": 338,
"preview": "package channel\n\nimport (\n\t\"bytes\"\n\n\t\"github.com/bestruirui/bestsub/internal/modules/register\"\n)\n\ntype WebHook struct {\n"
},
{
"path": "internal/modules/notify/notify.go",
"chars": 1951,
"preview": "package notify\n\nimport (\n\t\"bytes\"\n\t\"html/template\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/op\"\n\tnotifyModel \""
},
{
"path": "internal/modules/register/category.go",
"chars": 372,
"preview": "package register\n\nimport (\n\t\"github.com/bestruirui/bestsub/internal/models/check\"\n\t\"github.com/bestruirui/bestsub/intern"
},
{
"path": "internal/modules/register/register.go",
"chars": 1298,
"preview": "package register\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"github.com/bestruirui/bestsub/internal/ut"
},
{
"path": "internal/modules/share/share.go",
"chars": 3814,
"preview": "package share\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n\t\"text/template\"\n\n\t\"github.com/bestruirui"
},
{
"path": "internal/modules/storage/channel/webdav.go",
"chars": 544,
"preview": "package channel\n\nimport (\n\t\"context\"\n\n\t\"github.com/bestruirui/bestsub/internal/modules/register\"\n)\n\nfunc init() {\n\tregis"
},
{
"path": "internal/modules/storage/storage.go",
"chars": 576,
"preview": "package storage\n\nimport (\n\tstorageModel \"github.com/bestruirui/bestsub/internal/models/storage\"\n\t\"github.com/bestruirui/"
},
{
"path": "internal/server/auth/auth.go",
"chars": 1680,
"preview": "package auth\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/models/auth\"\n\t\"github.com/golang-jwt/jwt"
},
{
"path": "internal/server/handlers/auth.go",
"chars": 6857,
"preview": "package handlers\n\nimport (\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/config\"\n\t\"github.com/bestruirui"
},
{
"path": "internal/server/handlers/check.go",
"chars": 8292,
"preview": "package handlers\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"strconv\"\n\n\t\"github.com/bestruirui/bestsub/internal/core/check\"\n\t\"github."
},
{
"path": "internal/server/handlers/info.go",
"chars": 4509,
"preview": "package handlers\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"time\"\n\n\tsys \"github.com/bestruirui/bestsub/internal/core/system\"\n\t\"g"
},
{
"path": "internal/server/handlers/log.go",
"chars": 2846,
"preview": "package handlers\n\nimport (\n\t\"net/http\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/bestruirui/bestsub/internal/server/middleware"
},
{
"path": "internal/server/handlers/notify.go",
"chars": 10213,
"preview": "package handlers\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"slices\"\n\t\"strconv\"\n\n\t\"github.com/bestruirui/bestsub/internal/da"
},
{
"path": "internal/server/handlers/pprof.go",
"chars": 2057,
"preview": "//go:build debug\n\npackage handlers\n\nimport (\n\t\"net/http/pprof\"\n\n\t\"github.com/bestruirui/bestsub/internal/server/router\"\n"
},
{
"path": "internal/server/handlers/scalar.go",
"chars": 1148,
"preview": "//go:build dev\n\npackage handlers\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/bestruirui/bestsub/internal/server/router\"\n\t\"github"
},
{
"path": "internal/server/handlers/setting.go",
"chars": 2169,
"preview": "package handlers\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/op\"\n\t\"github.com/be"
},
{
"path": "internal/server/handlers/share.go",
"chars": 6611,
"preview": "package handlers\n\nimport (\n\t\"net/http\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/op\"\n\tshareM"
},
{
"path": "internal/server/handlers/storage.go",
"chars": 5360,
"preview": "package handlers\n\nimport (\n\t\"net/http\"\n\t\"strconv\"\n\n\t\"github.com/bestruirui/bestsub/internal/database/op\"\n\tstorageModel \""
},
{
"path": "internal/server/handlers/sub.go",
"chars": 7592,
"preview": "package handlers\n\nimport (\n\t\"net/http\"\n\t\"strconv\"\n\n\t\"github.com/bestruirui/bestsub/internal/core/cron\"\n\t\"github.com/best"
},
{
"path": "internal/server/handlers/update.go",
"chars": 1781,
"preview": "package handlers\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/bestruirui/bestsub/internal/core/update\"\n\t\"github.com/bestruirui/be"
},
{
"path": "internal/server/handlers/ws.go",
"chars": 5441,
"preview": "package handlers\n\nimport (\n\t\"net/http\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/intern"
},
{
"path": "internal/server/middleware/auth.go",
"chars": 1772,
"preview": "package middleware\n\nimport (\n\t\"net/http\"\n\t\"strings\"\n\n\t\"github.com/bestruirui/bestsub/internal/config\"\n\t\"github.com/bestr"
},
{
"path": "internal/server/middleware/cors.go",
"chars": 355,
"preview": "package middleware\n\nimport (\n\t\"github.com/gin-contrib/cors\"\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc Cors() gin.HandlerFunc {"
},
{
"path": "internal/server/middleware/logging.go",
"chars": 374,
"preview": "package middleware\n\nimport (\n\t\"github.com/bestruirui/bestsub/internal/utils/log\"\n\t\"github.com/gin-gonic/gin\"\n)\n\n// 日志中间件"
},
{
"path": "internal/server/middleware/recovery.go",
"chars": 430,
"preview": "package middleware\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/bestruirui/bestsub/internal/server/resp\"\n\t\"github.com/bestruirui/"
},
{
"path": "internal/server/middleware/static.go",
"chars": 858,
"preview": "package middleware\n\nimport (\n\t\"io/fs\"\n\t\"net/http\"\n\t\"strings\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc StaticEmbed(urlPrefix "
},
{
"path": "internal/server/resp/resp.go",
"chars": 926,
"preview": "package resp\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\ntype ResponseStruct struct {\n\tCode int `js"
},
{
"path": "internal/server/router/router.go",
"chars": 3902,
"preview": "package router\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\n// Method represents HTTP methods\ntype Method"
},
{
"path": "internal/server/server/server.go",
"chars": 3430,
"preview": "// Package server 提供 BestSub 应用程序的入口点。\n//\n// @title BestSub API\n// @version 1.0.0\n// @description BestSub - API 文档\n// @"
},
{
"path": "internal/utils/cache/cache.go",
"chars": 1944,
"preview": "// This implementation is based on and modified from https://github.com/fanjindong/go-cache\npackage cache\n\nimport (\n\t\"fm"
},
{
"path": "internal/utils/cache/shard.go",
"chars": 935,
"preview": "package cache\n\nimport (\n\t\"sync\"\n)\n\ntype shard[K comparable, V any] struct {\n\thashmap map[K]V\n\tlock sync.RWMutex\n}\n\nfu"
},
{
"path": "internal/utils/color/color.go",
"chars": 319,
"preview": "package color\n\n// 定义颜色和格式化字符串常量\nconst (\n\tReset string = \"\\033[0m\"\n\tRed string = \"\\033[31m\"\n\tGreen string = \"\\033[32"
},
{
"path": "internal/utils/country/conutry.go",
"chars": 4491,
"preview": "// 此文件由AI生成。如有错误,请手动修正\n// This file was generated with AI assistance\n// Please correct any errors manually\n\npackage coun"
},
{
"path": "internal/utils/desc/desc.go",
"chars": 1572,
"preview": "package desc\n\nimport (\n\t\"reflect\"\n)\n\nconst (\n\tTypeBoolean = \"boolean\"\n\tTypeNumber = \"number\"\n\tTypeString ="
},
{
"path": "internal/utils/generic/map.go",
"chars": 11547,
"preview": "// This file is based on the generic sync.Map implementation from:\n// https://github.com/SaveTheRbtz/generic-sync-map-go"
},
{
"path": "internal/utils/generic/queue.go",
"chars": 1158,
"preview": "package generic\n\ntype Integer interface {\n\t~int | ~int8 | ~int16 | ~int32 | ~int64 |\n\t\t~uint | ~uint8 | ~uint16 | ~uint3"
},
{
"path": "internal/utils/info/info.go",
"chars": 1871,
"preview": "package info\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/bestruirui/bestsub/internal/utils/color\"\n)\n\nvar (\n\tVersio"
},
{
"path": "internal/utils/log/log.go",
"chars": 9218,
"preview": "package log\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\""
},
{
"path": "internal/utils/shutdown/shutdown.go",
"chars": 907,
"preview": "package shutdown\n\nimport (\n\t\"os\"\n\t\"os/signal\"\n\t\"syscall\"\n\n\t\"github.com/bestruirui/bestsub/internal/utils/log\"\n)\n\nvar fun"
},
{
"path": "internal/utils/ua/ua.go",
"chars": 3082,
"preview": "package ua\n\nimport (\n\t\"math/rand\"\n\t\"net/http\"\n)\n\nfunc SetHeader(req *http.Request) {\n\treq.Header.Set(\"User-Agent\", Rando"
},
{
"path": "internal/utils/utils.go",
"chars": 1561,
"preview": "package utils\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\n// 检查目录是否可写\nfu"
},
{
"path": "scripts/build.sh",
"chars": 24213,
"preview": "#!/bin/bash\n\n# Exit on any error, but handle errors gracefully\nset -e\n\n# Enable error trapping\ntrap 'handle_error $? $LI"
},
{
"path": "scripts/dockerfiles/Dockerfile.alpine",
"chars": 414,
"preview": "FROM alpine\n\nARG TARGETPLATFORM\nENV TZ=Asia/Shanghai\n\nRUN apk add --no-cache alpine-conf ca-certificates su-exec && \\\n "
},
{
"path": "scripts/dockerfiles/Dockerfile.debian",
"chars": 469,
"preview": "FROM debian:bookworm\n\nARG TARGETPLATFORM\nENV TZ=Asia/Shanghai\n\nRUN apt-get update && apt-get install -y ca-certificates "
},
{
"path": "scripts/dockerfiles/entrypoint.sh",
"chars": 571,
"preview": "#!/bin/sh\nset -e\n\nPUID=\"${PUID:-0}\"\nPGID=\"${PGID:-0}\"\n\nchmod +x /app/bestsub\n\nif [ \"$PUID\" != \"0\" ] || [ \"$PGID\" != \"0\" "
},
{
"path": "static/static.go",
"chars": 157,
"preview": "package static\n\nimport (\n\t\"embed\"\n\t\"io/fs\"\n)\n\n//go:embed all:out\nvar staticFS embed.FS\n\n// StaticFS 返回 out 子目录的文件系统\nvar "
},
{
"path": "web/.env.example",
"chars": 112,
"preview": "# API 配置\n# API 基础 URL,如果为空则使用当前域名\n# 例如:https://api.example.com 或 http://localhost:8080\nNEXT_PUBLIC_API_BASEURL=\n"
},
{
"path": "web/.gitignore",
"chars": 494,
"preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
},
{
"path": "web/components.json",
"chars": 442,
"preview": "{\n \"$schema\": \"https://ui.shadcn.com/schema.json\",\n \"style\": \"new-york\",\n \"rsc\": true,\n \"tsx\": true,\n \"tailwind\": {"
},
{
"path": "web/eslint.config.mjs",
"chars": 797,
"preview": "import { dirname } from \"path\";\nimport { fileURLToPath } from \"url\";\nimport { FlatCompat } from \"@eslint/eslintrc\";\n\ncon"
},
{
"path": "web/next.config.ts",
"chars": 451,
"preview": "import type { NextConfig } from \"next\";\n\nconst nextConfig: NextConfig = {\n output: 'export',\n trailingSlash: true,\n s"
},
{
"path": "web/package.json",
"chars": 2092,
"preview": "{\n \"name\": \"bestsub\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"scripts\": {\n \"dev\": \"NEXT_PUBLIC_APP_VERSION=$(git"
},
{
"path": "web/postcss.config.mjs",
"chars": 81,
"preview": "const config = {\n plugins: [\"@tailwindcss/postcss\"],\n};\n\nexport default config;\n"
},
{
"path": "web/src/app/globals.css",
"chars": 4387,
"preview": "@import \"tailwindcss\";\n@import \"tw-animate-css\";\n\n@custom-variant dark (&:is(.dark *));\n\n@theme inline {\n --color-backg"
},
{
"path": "web/src/app/layout.tsx",
"chars": 886,
"preview": "import \"./globals.css\";\nimport { ThemeProvider, AuthProvider, AlertProvider } from \"@/src/components/providers\";\nimport "
},
{
"path": "web/src/app/not-found.tsx",
"chars": 389,
"preview": "\"use client\"\n\nimport { useEffect } from \"react\"\nimport { SPAApp } from \"@/src/components/app\"\n\nexport default function N"
},
{
"path": "web/src/app/page.tsx",
"chars": 115,
"preview": "\"use client\"\n\nimport { SPAApp } from \"@/src/components/app\"\n\nexport default function Home() {\n return <SPAApp />\n}"
},
{
"path": "web/src/components/app/app-layout.tsx",
"chars": 2063,
"preview": "\"use client\"\n\nimport { useRouter } from \"@/src/router/core/context\"\nimport { useAuth } from \"@/src/components/providers\""
},
{
"path": "web/src/components/app/index.ts",
"chars": 76,
"preview": "export { SPAApp } from './spa-app'\nexport { AppLayout } from './app-layout' "
},
{
"path": "web/src/components/app/spa-app.tsx",
"chars": 239,
"preview": "\"use client\"\n\nimport { RouterProvider } from \"@/src/router/core/router\"\nimport { AppLayout } from \"./app-layout\"\n\nexport"
},
{
"path": "web/src/components/features/check/components/check-form.tsx",
"chars": 2132,
"preview": "import { Button } from \"@/src/components/ui/button\"\nimport { Dialog, DialogContent, DialogHeader, DialogTitle } from \"@/"
},
{
"path": "web/src/components/features/check/components/check-list.tsx",
"chars": 7250,
"preview": "import { useEffect } from \"react\"\nimport { Button } from \"@/src/components/ui/button\"\nimport { Badge } from \"@/src/compo"
},
{
"path": "web/src/components/features/check/components/check-page.tsx",
"chars": 2106,
"preview": "import { useState, useCallback } from \"react\"\nimport { Button } from \"@/src/components/ui/button\"\nimport { Plus } from \""
},
{
"path": "web/src/components/features/check/components/form-sections/basic-config-section.tsx",
"chars": 2202,
"preview": "import { Controller, Control } from 'react-hook-form'\nimport { Input } from '@/src/components/ui/input'\nimport { Label }"
},
{
"path": "web/src/components/features/check/components/form-sections/basic-info-section.tsx",
"chars": 1524,
"preview": "import { Controller, Control } from 'react-hook-form'\nimport { Input } from '@/src/components/ui/input'\nimport { Label }"
},
{
"path": "web/src/components/features/check/components/form-sections/extra-config-section.tsx",
"chars": 9413,
"preview": "import { Controller, Control } from 'react-hook-form'\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectV"
},
{
"path": "web/src/components/features/check/components/form-sections/index.ts",
"chars": 264,
"preview": "export { BasicInfoSection } from './basic-info-section'\nexport { BasicConfigSection } from './basic-config-section'\nexpo"
},
{
"path": "web/src/components/features/check/components/form-sections/log-config.tsx",
"chars": 2200,
"preview": "import { Controller, Control } from 'react-hook-form'\nimport { Label } from '@/src/components/ui/label'\nimport { Switch "
},
{
"path": "web/src/components/features/check/components/form-sections/notify-config.tsx",
"chars": 1924,
"preview": "import { Controller, Control, useWatch } from 'react-hook-form'\nimport { Input } from '@/src/components/ui/input'\nimport"
},
{
"path": "web/src/components/features/check/components/index.ts",
"chars": 40,
"preview": "export { CheckPage } from './check-page'"
},
{
"path": "web/src/components/features/check/constants/index.ts",
"chars": 1712,
"preview": "export const CHECK_CONSTANTS = {\n DEFAULT_TIMEOUT: 30,\n MIN_TIMEOUT: 1,\n MAX_TIMEOUT: 300,\n DEFAULT_CRON: \"0"
},
{
"path": "web/src/components/features/check/hooks/index.ts",
"chars": 45,
"preview": "export { useCheckForm } from './useCheckForm'"
},
{
"path": "web/src/components/features/check/hooks/useCheckForm.ts",
"chars": 2352,
"preview": "import { useForm } from 'react-hook-form'\nimport { useEffect, useMemo } from 'react'\nimport { toast } from 'sonner'\nimpo"
},
{
"path": "web/src/components/features/check/index.ts",
"chars": 52,
"preview": "export { CheckPage } from './components/check-page'\n"
},
{
"path": "web/src/components/features/check/utils/index.ts",
"chars": 2232,
"preview": "import { CHECK_CONSTANTS, FORM_VALIDATION } from '../constants'\nimport { validateCronExpr } from '@/src/utils'\nimport ty"
},
{
"path": "web/src/components/features/home/dashboard.tsx",
"chars": 923,
"preview": "\"use client\"\n\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/src/components/ui/card\"\nimport { Construction "
},
{
"path": "web/src/components/features/index.ts",
"chars": 402,
"preview": "export { SettingsDialog } from './settings/settings'\nexport { DashboardPage } from './home/dashboard'\nexport { StoragePa"
},
{
"path": "web/src/components/features/login/index.ts",
"chars": 81,
"preview": "export { LoginPage } from './login-page'\nexport { LoginForm } from './login-form'"
},
{
"path": "web/src/components/features/login/login-form.tsx",
"chars": 5184,
"preview": "\"use client\"\n\nimport { useState } from \"react\"\nimport { cn } from \"@/src/utils\"\nimport { Button } from \"@/src/components"
},
{
"path": "web/src/components/features/login/login-page.tsx",
"chars": 291,
"preview": "import { LoginForm } from \"./login-form\"\n\nexport function LoginPage() {\n return (\n <div className=\"flex min-h-"
},
{
"path": "web/src/components/features/notify/components/notify-form.tsx",
"chars": 4422,
"preview": "import { Button } from \"@/src/components/ui/button\"\nimport { Input } from \"@/src/components/ui/input\"\nimport { Label } f"
},
{
"path": "web/src/components/features/notify/components/notify-list.tsx",
"chars": 3994,
"preview": "import { Button } from \"@/src/components/ui/button\"\nimport { Table, TableBody, TableCell, TableRow } from \"@/src/compone"
},
{
"path": "web/src/components/features/notify/components/notify-page.tsx",
"chars": 3250,
"preview": "import { useState, useCallback, useEffect } from 'react'\nimport { Button } from \"@/src/components/ui/button\"\nimport { Pl"
},
{
"path": "web/src/components/features/notify/hooks/useNotifyForm.ts",
"chars": 5479,
"preview": "import { useState, useCallback } from 'react'\nimport { toast } from 'sonner'\nimport { api } from '@/src/lib/api/client'\n"
},
{
"path": "web/src/components/features/notify/hooks/useNotifyOperations.ts",
"chars": 1634,
"preview": "import { useState, useCallback } from 'react'\nimport { toast } from 'sonner'\nimport { useAlert } from '@/src/components/"
},
{
"path": "web/src/components/features/notify/index.ts",
"chars": 282,
"preview": "export { NotifyPage } from './components/notify-page'\nexport { NotifyForm } from './components/notify-form'\nexport { Not"
},
{
"path": "web/src/components/features/profile/ProfileDesktopNavButton.tsx",
"chars": 858,
"preview": "import * as React from \"react\"\nimport { cn } from \"@/src/utils\"\n\ninterface ProfileDesktopNavButtonProps {\n tabId: strin"
},
{
"path": "web/src/components/features/profile/ProfileDialog.tsx",
"chars": 6882,
"preview": "\"use client\"\n\nimport { useState, useEffect, useCallback } from \"react\"\nimport { useForm } from \"react-hook-form\"\nimport "
},
{
"path": "web/src/components/features/profile/ProfileLayout.tsx",
"chars": 3177,
"preview": "import * as React from \"react\"\nimport { ProfileNavButton } from \"./ProfileNavButton\"\nimport { ProfileDesktopNavButton } "
},
{
"path": "web/src/components/features/profile/ProfileNavButton.tsx",
"chars": 897,
"preview": "import * as React from \"react\"\nimport { cn } from \"@/src/utils\"\n\ninterface ProfileNavButtonProps {\n tabId: string\n act"
},
{
"path": "web/src/components/features/profile/index.ts",
"chars": 47,
"preview": "export { ProfileDialog } from './ProfileDialog'"
},
{
"path": "web/src/components/features/settings/SettingsActions.tsx",
"chars": 676,
"preview": "import * as React from \"react\"\nimport { Button } from \"@/src/components/ui/button\"\n\ninterface SettingsActionsProps {\n o"
},
{
"path": "web/src/components/features/settings/SettingsLayout.tsx",
"chars": 4033,
"preview": "import * as React from \"react\"\nimport { cn } from \"@/src/utils\"\n\ninterface SettingsLayoutProps {\n nav: Array<{ name: st"
},
{
"path": "web/src/components/features/settings/sections/NodeSettingsSection.tsx",
"chars": 2911,
"preview": "import { Controller, useWatch, type Control } from \"react-hook-form\"\nimport type { FormValues } from \"@/src/types/settin"
},
{
"path": "web/src/components/features/settings/sections/NotifySettingsSection.tsx",
"chars": 978,
"preview": "import { Controller, type Control } from \"react-hook-form\"\nimport type { FormValues } from \"@/src/types/setting\"\nimport "
},
{
"path": "web/src/components/features/settings/sections/SystemSettingsSection.tsx",
"chars": 3044,
"preview": "import { Controller, useWatch, type Control } from \"react-hook-form\"\nimport type { FormValues } from \"@/src/types/settin"
},
{
"path": "web/src/components/features/settings/sections/TaskSettingsSection.tsx",
"chars": 1293,
"preview": "import { Controller, type Control } from \"react-hook-form\"\nimport type { FormValues } from \"@/src/types/setting\"\nimport "
},
{
"path": "web/src/components/features/settings/sections/fields/BooleanSettingField.tsx",
"chars": 600,
"preview": "import type { BaseSettingProps } from \"./types\"\nimport { SettingCard } from \"./SettingCard\"\nimport { Switch } from \"@/sr"
},
{
"path": "web/src/components/features/settings/sections/fields/MultiSelectSettingField.tsx",
"chars": 1546,
"preview": "import { Badge } from \"@/src/components/ui/badge\"\nimport type { BaseSettingProps } from \"./types\"\nimport { SettingCard }"
},
{
"path": "web/src/components/features/settings/sections/fields/NumberSettingField.tsx",
"chars": 1100,
"preview": "import { Input } from \"@/src/components/ui/input\"\nimport type { BaseSettingProps } from \"./types\"\nimport { SettingCard }"
},
{
"path": "web/src/components/features/settings/sections/fields/SelectSettingField.tsx",
"chars": 1030,
"preview": "import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"@/src/components/ui/select\"\nimport type {"
},
{
"path": "web/src/components/features/settings/sections/fields/SettingCard.tsx",
"chars": 1021,
"preview": "import type { ReactNode } from \"react\"\n\ntype SettingCardProps = {\n title: string\n description?: ReactNode\n action?: R"
},
{
"path": "web/src/components/features/settings/sections/fields/TextSettingField.tsx",
"chars": 754,
"preview": "import { Input } from \"@/src/components/ui/input\"\nimport type { BaseSettingProps } from \"./types\"\nimport { SettingCard }"
},
{
"path": "web/src/components/features/settings/sections/fields/types.ts",
"chars": 117,
"preview": "import type { ReactNode } from \"react\"\n\nexport type BaseSettingProps = {\n title: string\n description?: ReactNode\n}\n"
},
{
"path": "web/src/components/features/settings/sections/index.ts",
"chars": 988,
"preview": "import type { ComponentType } from \"react\"\nimport type { Control } from \"react-hook-form\"\nimport type { FormValues } fro"
},
{
"path": "web/src/components/features/settings/settings.tsx",
"chars": 5632,
"preview": "\"use client\"\n\nimport { useState, useMemo, useCallback, useEffect } from \"react\"\nimport { useForm } from \"react-hook-form"
}
]
// ... and 122 more files (download for full content)
About this extraction
This page contains the full source code of the bestruirui/mihomo-check GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 322 files (970.3 KB), approximately 261.4k tokens, and a symbol index with 1189 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.