├── .config ├── dependencies │ └── xunlei_download_provider │ │ └── get_token.js ├── download_provider.yaml ├── kubespider.yaml ├── notification_provider.yaml ├── pt_provider.yaml └── source_provider.yaml ├── .github ├── ISSUE_TEMPLATE │ ├── ask-question.md │ ├── bug.md │ └── feature-request.md ├── gitautomator.yaml ├── pull-request-template.md └── workflows │ ├── kubespider-deploy-test.yaml │ ├── kubespider-extension-build.yaml │ ├── kubespider-image-sync.yaml │ ├── kubespider-latest-build.yaml │ ├── kubespider-release-notes.yaml │ ├── kubespider-release.yaml │ ├── kubespider-style.yaml │ ├── kubespider-unittest.yaml │ └── release-extension.yaml ├── .gitignore ├── .mdlintrc ├── .pylintrc ├── CHANGELOG └── template.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING-CN.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── README-CN.md ├── README.md ├── chrome-extension ├── .vite │ └── manifest.json ├── assets │ ├── chunk-B9e8ng1t.js │ ├── chunk-BRdXzIsB.js │ ├── chunk-CBVaWBKk.js │ ├── chunk-DT4re0J3.js │ ├── chunk-T26GuxHg.js │ ├── chunk-a4rd3Jte.js │ └── index.tsx-loader-2MxPyVFe.js ├── img │ ├── download.png │ ├── github.png │ ├── icon.png │ ├── icon128.png │ ├── icon16.png │ ├── icon48.png │ ├── menu.png │ └── refresh.png ├── manifest.json ├── popup.html └── service-worker-loader.js ├── docker-compose.yml ├── docs ├── en │ ├── CONTRIBUTING.md │ ├── contribute │ │ ├── implement_download_provider_cn.md │ │ └── implement_source_provider_cn.md │ ├── faq.md │ ├── index.md │ ├── roadmap.md │ └── user_guide │ │ └── install_with_command │ │ └── README.md ├── images │ ├── aria2-config-for-chrome.jpg │ ├── aria2-for-chrome-config-en.jpg │ ├── aria2-for-chrome-config-zh.jpg │ ├── kubespider-architecture.excalidraw │ ├── kubespider-architecture.png │ ├── kubespider-chrome-ext-aria2.png │ ├── kubespider-chrome-ext-install.gif │ ├── kubespider-chrome-ext-usage.png │ ├── logo.png │ └── sponsor │ │ ├── asustor.png │ │ ├── jetbrains.png │ │ ├── jonsbo.png │ │ ├── qnap.svg │ │ ├── synology.png │ │ ├── terramaster.svg │ │ └── ugnas.png └── zh │ ├── CONTRIBUTING-CN.md │ ├── contribute │ ├── develop_chrome_extension.md │ ├── images │ │ ├── chrome-go-dir.png │ │ ├── chrome-load-ext.png │ │ ├── chrome-open-dev.png │ │ ├── chrome-open-ext.png │ │ ├── chrome-reload-ext.png │ │ └── chrome-test-ext.png │ ├── implement_download_provider_cn.md │ ├── implement_notificatiion_provider_cn.md │ └── implement_source_provider_cn.md │ ├── faq.md │ ├── index.md │ ├── maintenance │ ├── maintainer │ │ └── README.md │ └── release │ │ └── README.md │ ├── roadmap.md │ └── user_guide │ ├── alist_source_provider │ ├── README.md │ └── images │ │ ├── alist1.png │ │ └── alist2.png │ ├── ani_source_provider │ ├── README.md │ └── images │ │ ├── 1.png │ │ ├── 2.png │ │ └── 3.png │ ├── api_docs │ └── README.md │ ├── aria2_download_provider │ ├── README.md │ └── images │ │ └── final_show.gif │ ├── asustor_installation │ ├── README.md │ └── images │ │ ├── 01-install-docker.webp │ │ ├── 02-portainer.webp │ │ ├── 03-new-container.webp │ │ └── 04-running.webp │ ├── bark_notification_provider │ ├── README.md │ └── images │ │ └── example.jpg │ ├── bilibili_source_provider │ ├── README.md │ └── images │ │ └── bilibili_final_show.gif │ ├── bilibili_vlogger_subscribe_source_provider │ ├── README.md │ └── images │ │ ├── final_show.png │ │ └── vlogger_id.png │ ├── btbtt12_disposable_source_provider │ ├── README.md │ └── images │ │ └── btbt12_download.gif │ ├── general_rss_source_provider │ └── README.md │ ├── install_with_command │ └── README.md │ ├── jellyfin_install_config │ ├── README.md │ └── images │ │ ├── app_jellyfin.jpeg │ │ └── chrome_jellyfin.jpg │ ├── magic_source_provider │ ├── README.md │ └── images │ │ ├── hdvideo-show.png │ │ ├── magic_copy_xpath.png │ │ ├── magic_final_show.gif │ │ ├── magic_validate_xpath.png │ │ └── mteam-show.png │ ├── meijutt_source_provider │ ├── README.md │ └── images │ │ └── meijutt_download.gif │ ├── mikanani_source_provider │ ├── README.md │ └── images │ │ ├── 4.png │ │ ├── mikanani_source_provider_cfg_1.jpg │ │ ├── mikanani_source_provider_cfg_2.jpg │ │ └── mikanani_source_provider_cfg_3.jpg │ ├── nexusphp_pt_provider │ ├── README.md │ └── images │ │ ├── download_show.png │ │ ├── final_show.png │ │ ├── get_cookie.png │ │ └── rss_link.png │ ├── plex_install_config │ ├── README.md │ └── images │ │ ├── plex-add-dir.jpg │ │ ├── plex-claim-code.jpg │ │ └── plex-video-show.jpg │ ├── pushdeer_notification_provider │ ├── README.md │ └── images │ │ ├── clipcode.png │ │ ├── key.png │ │ ├── video.gif │ │ ├── 消息.png │ │ ├── 登入.png │ │ ├── 设备.png │ │ └── 设置.png │ ├── qbittorrent_download_provider │ ├── README.md │ └── images │ │ ├── add_tracker.png │ │ ├── login_page.png │ │ ├── qbittorrent_final_show.gif │ │ └── webui_config.png │ ├── qq_notification_provider │ ├── README.md │ └── images │ │ └── screenshot.png │ ├── slack_notification_provider │ ├── README.md │ └── images │ │ ├── clapper.jpg │ │ ├── disk.jpg │ │ ├── emoji-noti.jpg │ │ ├── emoji-text.jpg │ │ ├── fire.jpg │ │ ├── no_emoji-noti.jpg │ │ ├── no_emoji-text.jpg │ │ └── start.jpg │ ├── synology_installation │ ├── README.md │ └── images │ │ ├── synology_demo.png │ │ ├── synology_demo_result.png │ │ ├── synology_dir_create.png │ │ ├── synology_docker.jpeg │ │ ├── synology_edit_config.png │ │ ├── synology_editor.jpeg │ │ ├── synology_git.jpeg │ │ ├── synology_ip.png │ │ ├── synology_mac_login.png │ │ ├── synology_ssh.jpeg │ │ ├── synology_windows_putty.png │ │ └── synology_windows_putty_login.png │ ├── telegram_notification_provider │ ├── README.md │ └── images │ │ ├── botFather1.png │ │ ├── botFather2.png │ │ ├── channel1.png │ │ └── channel2.png │ ├── terramaster_installation │ ├── README.md │ └── images │ │ ├── terramaster_connect_ssh.png │ │ ├── terramaster_create_smb.png │ │ ├── terramaster_enable_ssh.png │ │ ├── terramaster_install_docker.png │ │ ├── terramaster_smb_cap.png │ │ ├── terramaster_usage.gif │ │ ├── terramaster_windows_drive.png │ │ └── terramaster_windows_mount_nas.png │ ├── thunder_install_config │ ├── README.md │ └── images │ │ ├── get_device_id.jpg │ │ ├── get_key_step1.jpg │ │ ├── get_key_step2.jpg │ │ ├── get_key_step3.jpg │ │ ├── get_xunlei_js.jpg │ │ └── xunlei_final_show.gif │ ├── tiktok_download_provider │ ├── README.md │ └── images │ │ ├── douyin_config_step1.png │ │ ├── douyin_config_step2.png │ │ ├── tiktok_final_show.gif │ │ ├── tiktok_shortcut_final_show.gif │ │ ├── tiktok_shortcut_step1.png │ │ ├── tiktok_shortcut_step2.png │ │ ├── tiktok_shortcut_step3.png │ │ └── tiktok_shortcut_step4.png │ ├── tiktok_source_provider │ ├── README.md │ └── images │ │ └── tiktok_final_show.gif │ ├── transmission_download_provider │ ├── README.md │ └── images │ │ ├── transmission_final_show.gif │ │ └── transmission_login_page.png │ ├── trigger_download │ ├── README.md │ └── images │ │ ├── general_trigger.jpg │ │ ├── magnet_trigger.jpg │ │ └── torrent_trigger.jpg │ ├── ugreen_installation │ ├── README.md │ └── images │ │ ├── aria-3.png │ │ ├── aria-4.png │ │ ├── aria-5.png │ │ ├── aria-new-1.png │ │ ├── aria-new-2.png │ │ ├── aria-new-5.png │ │ ├── aria-new-6.png │ │ ├── aria-new-7.png │ │ ├── create-dir.png │ │ ├── download-code.png │ │ ├── download.png │ │ ├── import-image.png │ │ ├── install-docker.png │ │ ├── kubespider-1.png │ │ ├── kubespider-chrome-ext-usage.png │ │ └── ubuntu.png │ ├── unraid_installation │ ├── README.md │ └── images │ │ ├── 01-newstack.png │ │ ├── 02-composefile.png │ │ ├── 03-savestack.png │ │ ├── 04-kubespider.png │ │ ├── 05-installyutto.png │ │ ├── 06-composerize.png │ │ ├── 07-yuttostack.png │ │ ├── 08-yuttouilabel.png │ │ └── 09-yutto.png │ ├── youget_download_provider │ ├── README.md │ └── images │ │ ├── bilibili_config_step1.png │ │ ├── bilibili_config_step2.png │ │ ├── bilibili_config_step3.png │ │ ├── bilibili_config_step4.png │ │ ├── bilibili_config_step5.png │ │ └── youget_final_show.gif │ ├── youtube_source_provider │ ├── README.md │ └── images │ │ └── youtube_final_show.gif │ ├── ytdlp_download_provider │ ├── README.md │ └── images │ │ └── ytdlp_final_show.gif │ └── yutto_download_provider │ ├── README.md │ └── images │ ├── bilibili_config_step1.png │ ├── bilibili_config_step2.png │ ├── bilibili_config_step3.png │ └── yutto_final_show.gif ├── downloaders ├── tiktok-dlp │ ├── Dockerfile │ ├── app │ │ ├── app.py │ │ ├── core │ │ │ ├── tasks.py │ │ │ └── webhook.py │ │ └── thirdparty │ │ │ ├── __init__.py │ │ │ ├── common │ │ │ ├── __init__.py │ │ │ └── utils.py │ │ │ └── douyin │ │ │ ├── __init__.py │ │ │ ├── database.py │ │ │ ├── douyin.py │ │ │ ├── douyinapi.py │ │ │ ├── download.py │ │ │ ├── result.py │ │ │ └── urls.py │ ├── entrypoint.sh │ └── requirements.txt ├── you-get │ ├── Dockerfile │ ├── README.md │ ├── app │ │ ├── app.py │ │ └── core │ │ │ ├── tasks.py │ │ │ ├── values.py │ │ │ └── webhook.py │ ├── entrypoint.sh │ └── requirements.txt ├── yt-dlp │ ├── Dockerfile │ ├── README.md │ ├── app │ │ ├── app.py │ │ └── core │ │ │ ├── tasks.py │ │ │ └── webhook.py │ ├── docker-compose.yml │ ├── entrypoint.sh │ └── requirements.txt └── yutto │ ├── Dockerfile │ ├── README.md │ ├── app │ ├── app.py │ └── core │ │ ├── tasks.py │ │ ├── values.py │ │ └── webhook.py │ ├── entrypoint.sh │ └── requirements.txt ├── entrypoint.sh ├── hack ├── env.sh ├── install_baidunetdisk.sh ├── install_jellyfin.sh ├── install_kubespider.sh ├── install_plex.sh ├── install_qbittorrent.sh ├── install_rsshub.sh ├── install_thunder.sh ├── install_tiktokdlp.sh ├── install_tranmission.sh ├── install_transmission_pt.sh ├── install_v2ray.sh ├── install_youget.sh ├── install_ytdlp.sh ├── install_yutto.sh ├── main.sh ├── test │ └── deploy_test.sh └── util.sh ├── kubespider-extension ├── .env.chrome ├── .env.firefox ├── .eslintrc.cjs ├── .gitignore ├── package-lock.json ├── package.json ├── popup.html ├── postcss.config.js ├── public │ └── img │ │ ├── download.png │ │ ├── github.png │ │ ├── icon.png │ │ ├── icon128.png │ │ ├── icon16.png │ │ ├── icon48.png │ │ ├── menu.png │ │ └── refresh.png ├── src │ ├── background │ │ └── index.ts │ ├── content │ │ ├── Overlay.tsx │ │ ├── index.css │ │ └── index.tsx │ ├── lib │ │ ├── api │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── bridge │ │ │ └── index.ts │ │ ├── component │ │ │ ├── Alert.tsx │ │ │ ├── Input.tsx │ │ │ ├── Nav.tsx │ │ │ └── Svg.tsx │ │ ├── message │ │ │ ├── consumer.ts │ │ │ ├── index.ts │ │ │ ├── notification.ts │ │ │ ├── sender.ts │ │ │ └── types.ts │ │ ├── polyfill │ │ │ └── index.ts │ │ └── storage │ │ │ └── index.ts │ ├── manifest.ts │ ├── popup │ │ ├── Config.tsx │ │ ├── Download.tsx │ │ ├── Github.tsx │ │ ├── Popup.tsx │ │ ├── Refresh.tsx │ │ ├── index.css │ │ └── index.tsx │ ├── util │ │ └── index.ts │ └── vite-env.d.ts ├── tailwind.config.js ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts ├── kubespider ├── api │ ├── types.py │ └── values.py ├── app.py ├── core │ ├── __init__.py │ ├── config_handler.py │ ├── download_trigger.py │ ├── kubespider_controller.py │ ├── notification_server.py │ ├── period_server.py │ ├── pt_server.py │ ├── runner.py │ ├── source_manager.py │ ├── telegram_server.py │ └── webhook_server.py ├── download_provider │ ├── aria2_download_provider │ │ └── provider.py │ ├── provider.py │ ├── qbittorrent_download_provider │ │ └── provider.py │ ├── tiktok_dlp_download_provider │ │ └── provider.py │ ├── transmission_download_provider │ │ └── provider.py │ ├── xunlei_download_provider │ │ └── provider.py │ ├── youget_download_provider │ │ └── provider.py │ ├── ytdlp_download_provider │ │ └── provider.py │ └── yutto_download_provider │ │ └── provider.py ├── notification_provider │ ├── bark_notification_provider │ │ └── provider.py │ ├── provider.py │ ├── pushdeer_notification_provider │ │ └── provider.py │ ├── qq_notification_provider │ │ └── provider.py │ ├── slack_notification_provider │ │ └── provider.py │ └── telegram_notification_provider │ │ └── provider.py ├── pt_provider │ ├── nexusphp_pt_provider │ │ └── provider.py │ └── provider.py ├── source_provider │ ├── alist_source_provider │ │ └── provider.py │ ├── ani_source_provider │ │ └── provider.py │ ├── bilibili_source_provider │ │ └── provider.py │ ├── bilibili_vlogger_subscribe_source_provider │ │ └── provider.py │ ├── btbtt12_disposable_source_provider │ │ └── provider.py │ ├── general_rss_source_provider │ │ └── provider.py │ ├── magic_source_provider │ │ └── provider.py │ ├── meijutt_source_provider │ │ └── provider.py │ ├── mikanani_source_provider │ │ └── provider.py │ ├── provider.py │ ├── tiktok_source_provider │ │ └── provider.py │ └── youtube_source_provider │ │ └── provider.py ├── test │ ├── __init__.py │ ├── source_provider │ │ ├── __init__.py │ │ ├── test_mikanani_source_provider.py │ │ └── test_source.txt │ └── utils │ │ ├── __init__.py │ │ ├── test_config.yaml │ │ └── test_config_reader.py └── utils │ ├── config_reader.py │ ├── global_config.py │ ├── helper.py │ └── version_parser.py ├── mkdocs.yml ├── renovate.json ├── requirements.txt └── setup.py /.config/kubespider.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ### beta prameters start 3 | # This address will be as http/https proxy 4 | proxy: 5 | # This port will be used to provide the api service 6 | server_port: 3080 7 | # Change download provider automaticlly for pending and faileds tasks 8 | auto_change_download_provider: false 9 | # The auth_token will be used auth the webhook api 10 | auth_token: 11 | # get bot message, save video of link of message 12 | telegram_bot_token: 13 | # limit only this username send message to bot will be handled 14 | telegram_username: 15 | -------------------------------------------------------------------------------- /.config/notification_provider.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | pushdeer: 3 | type: pushdeer_notification_provider 4 | enable: false 5 | host: https://api2.pushdeer.com 6 | push_keys: 7 | - your push keys 8 | telegram: 9 | type: telegram_notification_provider 10 | enable: false 11 | host: https://api.telegram.org 12 | bot_token: your bot token 13 | channel_name: your channel name 14 | channel_chat_id: 15 | qq: 16 | type: qq_notification_provider 17 | enable: false 18 | host: http://127.0.0.1:5700 19 | accessToken: 20 | target_qq: 12345678 21 | bark: 22 | type: bark_notification_provider 23 | enable: false 24 | host: https://api.day.app 25 | device_token: 12345678 26 | slack: 27 | type: slack_notification_provider 28 | enable: false 29 | host: https://hooks.slack.com/services/XXXXXXXXXX 30 | channel: channel_name 31 | username: bot_name 32 | title_emoji: none/emoji_name -------------------------------------------------------------------------------- /.config/pt_provider.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | hdvideo: 3 | type: nexusphp_pt_provider 4 | enable: false 5 | attendance: true 6 | main_link: https://hdvideo.one 7 | rss_link: xxx 8 | cookie: xxx 9 | # I suggest you to use transmission type, and also, 10 | # do not use this downloader to download the resource you needed., 11 | # only for PT provider 12 | downloader: transmission-hdvideo 13 | # time in hour for seeding and downloading 14 | keeping_time: 120 15 | # size in GB 16 | max_sum_size: 200 17 | # the sized needed to be download, size in GB 18 | cost_sum_size: 0 19 | mteam: 20 | type: nexusphp_pt_provider 21 | enable: false 22 | attendance: false 23 | main_link: https://kp.m-team.cc 24 | rss_link: xxx 25 | cookie: xxx 26 | # I suggest you to use transmission type, and also, 27 | # do not use this downloader to download the resource you needed., 28 | # only for PT provider 29 | downloader: transmission-mteam 30 | # time in hour for seeding and downloading 31 | keeping_time: 120 32 | # size in GB 33 | max_sum_size: 200 34 | # the sized needed to be download, size in GB 35 | cost_sum_size: 0 -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/ask-question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Ask a question about Kubespider 4 | title: '' 5 | labels: kind/question 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Ask your question here: 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Submit bug 3 | about: Submit a bug for Kubespider 4 | title: '' 5 | labels: kind/bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Describe the bug 11 | 12 | 13 | ## Describe the running environment 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Create a feature request for Kubespider 4 | title: '' 5 | labels: kind/feature 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Describe the background 11 | 14 | 15 | ## Describe the feature 16 | 19 | -------------------------------------------------------------------------------- /.github/gitautomator.yaml: -------------------------------------------------------------------------------- 1 | owners: 2 | - qingchoulove 3 | - miRemid 4 | - evell1992 5 | - richardli1598 6 | -------------------------------------------------------------------------------- /.github/pull-request-template.md: -------------------------------------------------------------------------------- 1 | Fixes # 2 | 3 | 4 | ## Proposed Changes 5 | 6 | * 7 | * 8 | * 9 | 10 | **Release Note** 11 | 12 | 15 | 16 | ```release-note 17 | 18 | ``` -------------------------------------------------------------------------------- /.github/workflows/kubespider-extension-build.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Kubespider 2 | # SPDX-License-Identifier: Apache-2.0 3 | name: Build Kubespider Extension 4 | 5 | on: 6 | push: 7 | branches: 8 | - main 9 | paths: 10 | - "kubespider-extension/**" 11 | 12 | permissions: 13 | contents: write 14 | pull-requests: write 15 | 16 | jobs: 17 | build: 18 | runs-on: ubuntu-latest 19 | 20 | steps: 21 | - uses: actions/checkout@v4 22 | - name: Set up Node.js 23 | uses: actions/setup-node@v4 24 | with: 25 | node-version: "21" 26 | - name: Cache dependencies 27 | uses: actions/cache@v3 28 | with: 29 | path: kubespider-extension/node_modules 30 | key: ${{ runner.os }}-node-${{ hashFiles('kubespider-extension/package-lock.json') }} 31 | restore-keys: | 32 | ${{ runner.os }}-node- 33 | - name: Install dependencies 34 | run: | 35 | npm install 36 | working-directory: ./kubespider-extension 37 | - name: Build 38 | run: | 39 | npm run build 40 | working-directory: ./kubespider-extension 41 | - name: Create Pull Request 42 | uses: peter-evans/create-pull-request@v5 43 | with: 44 | token: ${{ secrets.GITHUB_TOKEN }} 45 | commit-message: "bot: build kubespider extension" 46 | title: "bot: build kubespider extension" 47 | body: "bot: build kubespider extension" 48 | branch: "bot/build-kubespider-extension" 49 | branch-suffix: short-commit-hash 50 | delete-branch: true 51 | -------------------------------------------------------------------------------- /.github/workflows/kubespider-release-notes.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Kubespider 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | name: Kubespider release notes generator 5 | 6 | on: 7 | workflow_dispatch: 8 | inputs: 9 | repo: 10 | description: "Repo address, like: https://github.com/opennaslab/kubespider.git" 11 | required: true 12 | type: string 13 | start: 14 | description: 'The start tag/commit flag' 15 | required: true 16 | type: string 17 | end: 18 | description: 'The end tag/commit flag' 19 | required: true 20 | type: string 21 | exclude_contributor: 22 | description: 'The contributor to ignore, use space to split' 23 | required: false 24 | type: string 25 | 26 | jobs: 27 | job_name: 28 | #TODO: integration with chatgpt, to generate release notes automatically 29 | uses: jwcesign/get-contributors/.github/workflows/get-contributors.yaml@main 30 | with: 31 | repo: ${{ github.event.inputs.repo }} 32 | start: ${{ github.event.inputs.start }} 33 | end: ${{ github.event.inputs.end }} 34 | exclude_contributor: ${{ github.event.inputs.exclude_contributor }} 35 | 36 | -------------------------------------------------------------------------------- /.github/workflows/kubespider-release.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Kubespider 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | name: Kubespider release for DockerHub and AliyunHub 5 | on: 6 | release: 7 | types: 8 | - published 9 | jobs: 10 | dockerhub-release-assests: 11 | name: Release Kubespider 12 | runs-on: ubuntu-20.04 13 | steps: 14 | - uses: actions/checkout@v3 15 | 16 | - name: Set Up QEMU 17 | uses: docker/setup-qemu-action@v3 18 | 19 | - name: Set up Docker Buildx 20 | uses: docker/setup-buildx-action@v3 21 | 22 | - name: Login to Docker Hub 23 | uses: docker/login-action@v2 24 | with: 25 | username: ${{ secrets.DOCKERHUB_USERNAME }} 26 | password: ${{ secrets.DOCKERHUB_TOKEN }} 27 | 28 | - name: Build and push 29 | uses: docker/build-push-action@v3 30 | with: 31 | context: . 32 | file: Dockerfile 33 | platforms: | 34 | linux/amd64 35 | linux/arm64 36 | push: true 37 | tags: cesign/kubespider:${{ github.ref_name }} 38 | build-args: | 39 | GIT_COMMIT=${GITHUB_SHA} 40 | 41 | acr-release-assests: 42 | name: Release Kubespider 43 | runs-on: ubuntu-20.04 44 | steps: 45 | - uses: actions/checkout@v3 46 | 47 | - name: Set Up QEMU 48 | uses: docker/setup-qemu-action@v3 49 | 50 | - name: Set up Docker Buildx 51 | uses: docker/setup-buildx-action@v3 52 | 53 | - name: Login to ACR 54 | uses: aliyun/acr-login@v1 55 | with: 56 | login-server: https://registry.cn-hangzhou.aliyuncs.com 57 | username: ${{ secrets.ACR_USERNAME }} 58 | password: ${{ secrets.ACR_PASSWORD }} 59 | 60 | - name: Build and push 61 | uses: docker/build-push-action@v3 62 | with: 63 | context: . 64 | file: Dockerfile 65 | platforms: | 66 | linux/amd64 67 | push: true 68 | tags: registry.cn-hangzhou.aliyuncs.com/jwcesign/kubespider:${{ github.ref_name }} 69 | build-args: | 70 | GIT_COMMIT=${GITHUB_SHA} 71 | -------------------------------------------------------------------------------- /.github/workflows/kubespider-style.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Kubespider 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | name: Kubespider style check 5 | 6 | on: 7 | pull_request: 8 | branches: [ 'main', 'release-*' ] 9 | 10 | jobs: 11 | check: 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | python-version: ["3.10"] 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | 20 | - name: Set up Python ${{ matrix.python-version }} 21 | uses: actions/setup-python@v3 22 | with: 23 | python-version: ${{ matrix.python-version }} 24 | 25 | - name: Install dependencies 26 | run: | 27 | python -m pip install --upgrade pip 28 | pip install pylint 29 | pip install typing-extensions 30 | pip install -r requirements.txt 31 | 32 | cd downloaders 33 | for downloader in $(ls) 34 | do 35 | cd ${downloader} 36 | pip install -r requirements.txt 37 | cd .. 38 | done 39 | 40 | - name: Analysing the code with pylint 41 | run: | 42 | ROOT=$(pwd) 43 | pylint $(git ls-files '*.py' | grep -v "downloaders/") --max-line-length=240 44 | skip_downloaders=(tiktok-dlp) 45 | cd downloaders 46 | for downloader in $(ls) 47 | do 48 | if [[ ${skip_downloaders[@]} =~ ${downloader} ]]; then 49 | continue 50 | fi 51 | cd ${downloader} 52 | pylint $(git ls-files '*.py') --max-line-length=240 --rcfile=${ROOT}/.pylintrc 53 | cd .. 54 | done 55 | 56 | - name: MD link check 57 | uses: gaurav-nelson/github-action-markdown-link-check@v1 58 | with: 59 | use-quiet-mode: 'yes' 60 | config-file: '.mdlintrc' 61 | folder-path: './' 62 | -------------------------------------------------------------------------------- /.github/workflows/kubespider-unittest.yaml: -------------------------------------------------------------------------------- 1 | name: Kubespider unittest 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | test: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v2 17 | 18 | - name: Set up Python 3.10 19 | uses: actions/setup-python@v2 20 | with: 21 | python-version: '3.10' 22 | 23 | - name: Install dependencies 24 | run: pip install -r requirements.txt 25 | 26 | - name: Run unit tests with coverage 27 | working-directory: kubespider 28 | run: | 29 | coverage run -m unittest discover 30 | 31 | - name: Generate code coverage report 32 | working-directory: kubespider 33 | run: | 34 | coverage report -m -------------------------------------------------------------------------------- /.github/workflows/release-extension.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Kubespider 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | name: Release Chrome Extension 5 | on: 6 | release: 7 | types: 8 | - published 9 | 10 | permissions: 11 | contents: write 12 | 13 | jobs: 14 | Release-Chrome-Extension: 15 | name: Release Kubespider Chrome Extension 16 | runs-on: ubuntu-20.04 17 | steps: 18 | - uses: actions/checkout@v4 19 | 20 | - name: Zip 21 | run: zip -r chrome-extension.zip chrome-extension 22 | shell: bash 23 | 24 | - name: Upload Release Asset 25 | env: 26 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 27 | run: gh release upload ${{github.event.release.tag_name}} chrome-extension.zip 28 | shell: bash 29 | Release-Firefox-Extension: 30 | name: Release Kubespider Firefox Extension 31 | runs-on: ubuntu-20.04 32 | steps: 33 | - uses: actions/checkout@v4 34 | - name: Set up Node.js 35 | uses: actions/setup-node@v4 36 | with: 37 | node-version: "21" 38 | - name: Cache dependencies 39 | uses: actions/cache@v3 40 | with: 41 | path: kubespider-extension/node_modules 42 | key: ${{ runner.os }}-node-${{ hashFiles('kubespider-extension/package-lock.json') }} 43 | restore-keys: | 44 | ${{ runner.os }}-node- 45 | - name: Install dependencies 46 | run: | 47 | npm install 48 | working-directory: ./kubespider-extension 49 | - name: Build 50 | run: | 51 | npm run build:firefox 52 | working-directory: ./kubespider-extension 53 | - name: Zip 54 | run: zip -r firefox-extension.zip chrome-extension 55 | shell: bash 56 | 57 | - name: Upload Release Asset 58 | env: 59 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 60 | run: gh release upload ${{github.event.release.tag_name}} firefox-extension.zip 61 | shell: bash 62 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | .coverage 3 | .vscode 4 | .DS_Store 5 | .idea/ 6 | 7 | # Docs out folder 8 | site/ 9 | venv 10 | -------------------------------------------------------------------------------- /.mdlintrc: -------------------------------------------------------------------------------- 1 | { 2 | "ignorePatterns": [ 3 | { 4 | "pattern": "TODO|^http.*" 5 | } 6 | ] 7 | } -------------------------------------------------------------------------------- /.pylintrc: -------------------------------------------------------------------------------- 1 | [MASTER] 2 | disable= 3 | C0114, # missing-module-docstring 4 | C0115, # missing-class-docstring 5 | C0116, # missing-class-docstring 6 | W0703, # broad-except 7 | W0511, # fixme, like TODO 8 | R1732, # consider-using-with 9 | C0201, # consider-iterating-dictionary 10 | I1101, # Module 'libtorrent' has no 'torrent_info' member 11 | W0719, # Raising too general exception 12 | R0902, # Too many instance attributes 13 | R1714, # onsider merging these comparisons with 'in' 14 | R0903, # Too few public methods 15 | R0913, # Too many arguments 16 | R0911, # Too many return statements 17 | 18 | [SIMILARITIES] 19 | # Minimum lines number of a similarity. 20 | min-similarity-lines=100 21 | 22 | # Ignore comments when computing similarities. 23 | ignore-comments=yes 24 | 25 | # Ignore docstrings when computing similarities. 26 | ignore-docstrings=yes 27 | 28 | # Ignore imports when computing similarities. 29 | ignore-imports=no 30 | 31 | [FORMAT] 32 | # Maximum number of characters on a single line. 33 | max-line-length=240 34 | 35 | [BASIC] 36 | # Regular expression matching correct method names 37 | # Pylint do not complain for setUp and other if it 38 | # detects that we inherit from unittest.TestCase 39 | # But that's not always possible to detect. 40 | method-rgx=[a-z_][a-z0-9_]{2,30}$|do_POST(Class)? 41 | -------------------------------------------------------------------------------- /CHANGELOG/template.md: -------------------------------------------------------------------------------- 1 | # Kubespider v{version} release 2 | 3 | ## How to Install? 4 | Just run: 5 | ```sh 6 | wget https://github.com/opennaslab/kubespider/archive/refs/tags/v{version}.tar.gz && tar -zxvf {version}.tar.gz && cd kubespider-v{version} && bash hack/install_kubespider.sh 7 | ``` 8 | 9 | * Some important notes, like configuration parameter changes. 10 | 11 | ## New features: 12 | * New feature list. 13 | 14 | ## Bugfix 15 | * The bugfix list. 16 | 17 | ## Contributors 18 | @contributor-1 @contributor-2 @contributor-x 19 | -------------------------------------------------------------------------------- /CONTRIBUTING-CN.md: -------------------------------------------------------------------------------- 1 | # 贡献手册 2 | 如果你想向Kubespider贡献,请阅读如下内容。 3 | 4 | ## 安装Kubespider 5 | 在开发之前,你需要首先安装Kubespider。 6 | ```sh 7 | git clone https://github.com/opennaslab/kubespider.git 8 | cd kubespider 9 | bash hack/install_kubespider.sh 10 | ``` 11 | 12 | ## 更新依赖后部署 13 | 如果你有更新/添加python库依赖(requirements.txt需要被修改),你需要按如下步骤部署Kubespider。 14 | 15 | ### 1.在Kubespider代码目录构建镜像 16 | 在中国大陆,如果没有HTTP_PROXY/HTTPS_PROXY可构建失败,所以有代理请设置;如果没有,请把--build-arg相关删除。 17 | ```sh 18 | docker build -t cesign/kubespider:latest -f Dockerfile ./ --build-arg HTTP_PROXY=http://: --build-arg HTTPS_PROXY=http://: 19 | ``` 20 | 21 | ### 2.删除已有Kubespider容器 22 | ```sh 23 | docker rm kubespider --force 24 | ``` 25 | 26 | ### 3.使用最新镜像启动Kubespider 27 | ```sh 28 | export image_registry=cesign 29 | export KUBESPIDER_VERSION=latest 30 | docker run -itd --name kubespider \ 31 | -v ${HOME}/kubespider/.config:/app/.config \ 32 | --network=host \ 33 | --restart unless-stopped \ 34 | ${image_registry}/kubespider:${KUBESPIDER_VERSION} 35 | ``` 36 | 37 | ## 无依赖更新部署 38 | 如果没有想关依赖添加/更新,你可以通过如下命令使用修改后的代码启动Kubespider: 39 | ```sh 40 | # 在Kubespider代码文件夹运行 41 | docker cp kubespider kubespider:/app/ && docker restart kubespider 42 | ``` 43 | 44 | ## 提PR 45 | 如果你完成了开发,并且经过足够的测试,你可以在此代码库上创建PR。维护者会尽可能快地检查并合入代码。 46 | 47 | 48 | ## 开发的另一个选择 49 | 安装后在根目录执行 50 | 51 | ```sh 52 | UID=${UID} GID=${GID} docker-compose up 53 | ``` 54 | 会自动构筑镜像,并监听 kubespider 下的文件变更自动重启 55 | 56 | ### 其它 57 | 停止容器 58 | ```sh 59 | docker-compose down 60 | ``` 61 | 62 | 查看构筑的镜像并删除,执行完这些后可以重新构筑 63 | ```sh 64 | docker-compose images 65 | docker-compose rmi xxx 66 | ``` -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution guidelines 2 | If you want to contribute to Kubespider, please read the following content. 3 | 4 | ## Install Kubespider 5 | Before developing, you need to install Kubespider first. 6 | ```sh 7 | git clone https://github.com/opennaslab/kubespider.git 8 | cd kubespider 9 | bash hack/install_kubespider.sh 10 | ``` 11 | 12 | ## Deploy with updated dependencies 13 | If you add/update python lib dependencies( requirements.txt needs to be modified), you need to deploy Kubespider with the following steps: 14 | 15 | ### 1.Build an image in Kubespider code directory 16 | In china mainland, it may build failed if without HTTP_PROXY/HTTPS_PROXY, so please set if you have proxy. But if you don't have it, please delete `--build-arg` related. 17 | ```sh 18 | docker build -t cesign/kubespider:latest -f Dockerfile ./ --build-arg HTTP_PROXY=http://: --build-arg HTTPS_PROXY=http://: 19 | ``` 20 | ### 2.Delete exist Kubespider container 21 | ```sh 22 | docker rm kubespider --force 23 | ``` 24 | 25 | ### 3.Launch Kubespider with the newest image 26 | ```sh 27 | export image_registry=cesign 28 | export KUBESPIDER_VERSION=lates 29 | docker run -itd --name kubespider \ 30 | -v ${HOME}/kubespider/.config:/app/.config \ 31 | --network=host \ 32 | --restart unless-stopped \ 33 | ${image_registry}/kubespider:${KUBESPIDER_VERSION} 34 | ``` 35 | 36 | ## Deploy with no dependencies update 37 | If no new dependencies are added/updated, you can run the following command to run Kubespider with the modified code: 38 | ```sh 39 | # Run it in Kubespider code directory 40 | docker cp kubespider kubespider:/app/ && docker restart kubespider 41 | ``` 42 | 43 | ## Give a PR 44 | Once you finish developing and do enough testing, you can create a PR in this repository. The maintainer will check and merge it as soon as possible. -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM python:3.11-alpine 4 | 5 | RUN touch /.dockerenv 6 | 7 | # add git commit info 8 | ARG GIT_COMMIT 9 | ENV GIT_COMMIT=$GIT_COMMIT 10 | 11 | WORKDIR /app 12 | COPY ./kubespider ./kubespider 13 | COPY ./.config ./.config_template 14 | COPY requirements.txt ./ 15 | 16 | ENV HOME="/app" \ 17 | PUID=1000 \ 18 | PGID=1000 \ 19 | UMASK=022 \ 20 | TZ=Asia/Shanghai 21 | 22 | RUN set -ex \ 23 | && apk add --no-cache \ 24 | nodejs \ 25 | npm \ 26 | bash \ 27 | su-exec \ 28 | tzdata \ 29 | shadow \ 30 | && python3 -m pip install --upgrade pip \ 31 | && pip install -r requirements.txt \ 32 | && addgroup -S kubespider -g 911 \ 33 | && adduser -S kubespider -G kubespider -h /app -u 911 -s /bin/bash kubespider \ 34 | && rm -rf \ 35 | /app/.cache \ 36 | /tmp/* 37 | 38 | COPY --chmod=755 entrypoint.sh /entrypoint.sh 39 | 40 | ENTRYPOINT [ "/entrypoint.sh" ] 41 | 42 | CMD ["server"] 43 | 44 | VOLUME /app/.config 45 | 46 | EXPOSE 3080 -------------------------------------------------------------------------------- /chrome-extension/.vite/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "../../../../../../@crx/manifest": { 3 | "file": "assets/chunk-B7wem7ue.js", 4 | "name": "crx-manifest.js", 5 | "src": "../../../../../../@crx/manifest", 6 | "isEntry": true 7 | }, 8 | "_chunk-B9e8ng1t.js": { 9 | "file": "assets/chunk-B9e8ng1t.js", 10 | "name": "index" 11 | }, 12 | "_chunk-T26GuxHg.js": { 13 | "file": "assets/chunk-T26GuxHg.js", 14 | "name": "index", 15 | "imports": [ 16 | "_chunk-B9e8ng1t.js" 17 | ] 18 | }, 19 | "_chunk-a4rd3Jte.js": { 20 | "file": "assets/chunk-a4rd3Jte.js", 21 | "name": "index", 22 | "imports": [ 23 | "_chunk-B9e8ng1t.js" 24 | ] 25 | }, 26 | "index.tsx-loader.js": { 27 | "file": "assets/index.tsx-loader-2MxPyVFe.js", 28 | "src": "index.tsx-loader.js" 29 | }, 30 | "popup.html": { 31 | "file": "assets/chunk-DT4re0J3.js", 32 | "name": "popup.html", 33 | "src": "popup.html", 34 | "isEntry": true, 35 | "imports": [ 36 | "_chunk-T26GuxHg.js", 37 | "_chunk-B9e8ng1t.js", 38 | "_chunk-a4rd3Jte.js" 39 | ] 40 | }, 41 | "src/background/index.ts": { 42 | "file": "assets/chunk-BRdXzIsB.js", 43 | "name": "index.ts", 44 | "src": "src/background/index.ts", 45 | "isEntry": true, 46 | "imports": [ 47 | "_chunk-B9e8ng1t.js", 48 | "_chunk-a4rd3Jte.js" 49 | ] 50 | }, 51 | "src/content/index.tsx": { 52 | "file": "assets/chunk-CBVaWBKk.js", 53 | "name": "index.tsx", 54 | "src": "src/content/index.tsx", 55 | "isEntry": true, 56 | "imports": [ 57 | "_chunk-T26GuxHg.js", 58 | "_chunk-B9e8ng1t.js" 59 | ] 60 | } 61 | } -------------------------------------------------------------------------------- /chrome-extension/assets/chunk-BRdXzIsB.js: -------------------------------------------------------------------------------- 1 | import{s as u,M as a,B as y,c as I,E as w,S as m}from"./chunk-B9e8ng1t.js";import{T as b,S as v,C as K,a as M,d as k}from"./chunk-a4rd3Jte.js";var g;(s=>{function e(n,r){return u.sendMessage({type:a.Notification,reciver:n,payload:{type:"success",...r}})}s.success=e;function o(n,r){return u.sendMessage({type:a.Notification,reciver:n,payload:{type:"error",...r}})}s.error=o;function t(n,r){return u.sendMessage({type:a.Notification,reciver:n,payload:{type:"info",...r}})}s.info=t})(g||(g={}));const i=g;y.runtime.onInstalled.addListener(()=>{y.contextMenus.create({id:"KubespiderMenu",title:"Send to Kubespider",contexts:["all"]})});y.contextMenus.onClicked.addListener(async(s,e)=>{if(s.menuItemId==="KubespiderMenu"){const o=(e==null?void 0:e.id)||await b.getCurrentTabId();let t=s.selectionText;if((t===""||t==null)&&(t=s.linkUrl),(t===""||t==null)&&(t=e==null?void 0:e.url),t===""||t==null)return;const{server:n,token:r,captureCookies:d}=await v.read(),p=d?await K.getAll(t):void 0;if(!n||n===""){i.error(o,{title:"Kubespider",content:"Please set server address first!"});return}const f=await i.info(o,{title:"Kubespider",content:`${t} is downloading...`,delay:-1}),{messageId:c}=f.payload,l=await M(k(n,t,void 0,p,r));l.status===200?i.success(o,{id:c,title:"Kubespider",content:`${t} download success`}):i.error(o,{id:c,title:"Kubespider",content:`${t} download failed, ${l.body}`})}});I.addListener(a.Download,async s=>{const{dataSource:e,path:o}=s,{server:t,token:n,captureCookies:r}=await v.read();if(!t||t==="")return w("Please set server address first");const d=await b.getCurrentTabId(),p=r?await K.getAll(e):void 0,f=await i.info(d,{title:"Kubespider",content:`${e} is downloading...`,delay:-1}),{messageId:c}=f.payload,l=await M(k(t,e,o,p,n));return l.status===200?(i.success(d,{id:c,title:"Kubespider",content:`${e} download success`}),m()):(i.error(d,{id:c,title:"Kubespider",content:`${e} download failed, ${l.body}`}),w())});I.addListener(a.Notification,async s=>{let{tabId:e}=s;return e?m():(e=await b.getCurrentTabId(),e===-1?w("No active tab"):u.sendMessage({type:a.Notification,reciver:e,payload:s}))}); 2 | -------------------------------------------------------------------------------- /chrome-extension/assets/chunk-a4rd3Jte.js: -------------------------------------------------------------------------------- 1 | import{B as s}from"./chunk-B9e8ng1t.js";const f=(e,t,r,a,n)=>{const c=new Map;return n&&c.set("Authorization",`Bearer ${n}`),{url:`${e}/api/v1/download`,method:"POST",headers:c,body:{dataSource:t,path:r,cookies:a}}},g=e=>({url:`${e}/healthz`,method:"GET",headers:new Map}),y=(e,t)=>{const r=new Map;return t&&r.set("Authorization",`Bearer ${t}`),{url:`${e}/api/v1/refresh`,method:"GET",headers:r}};async function v(e){const t={method:e.method},r={};if(e.headers.size>0){for(const[a,n]of e.headers)r[a]=n;t.headers=r}return e.method==="POST"&&(t.body=JSON.stringify(e.body)),fetch(e.url,t).then(a=>a.text().then(n=>({status:a.status,body:n}))).catch(a=>({status:500,body:a}))}const h={server:"",path:"",token:"",auth:!1,captureCookies:!1};var o;(e=>{e.read=async()=>s.storage.local.get(h).then(t=>t),e.save=async t=>s.storage.local.set(t)})(o||(o={}));const m=o;var u;(e=>{async function t(){const[a]=await s.tabs.query({active:!0,currentWindow:!0});return(a==null?void 0:a.id)||-1}e.getCurrentTabId=t;function r(a){s.tabs.create({url:a})}e.create=r})(u||(u={}));var i;(e=>{async function t(r){s.action.setBadgeText({text:r})}e.setBadgeText=t})(i||(i={}));var d;(e=>{async function t(r){return(await s.cookies.getAll({url:r})).map(n=>`${n.name}=${n.value}`).join(";")}e.getAll=t})(d||(d={}));export{d as C,m as S,u as T,v as a,f as d,g as h,y as r}; 2 | -------------------------------------------------------------------------------- /chrome-extension/assets/index.tsx-loader-2MxPyVFe.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict'; 3 | 4 | const injectTime = performance.now(); 5 | (async () => { 6 | const { onExecute } = await import( 7 | /* @vite-ignore */ 8 | chrome.runtime.getURL("assets/chunk-CBVaWBKk.js") 9 | ); 10 | onExecute?.({ perf: { injectTime, loadTime: performance.now() - injectTime } }); 11 | })().catch(console.error); 12 | 13 | })(); 14 | -------------------------------------------------------------------------------- /chrome-extension/img/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/chrome-extension/img/download.png -------------------------------------------------------------------------------- /chrome-extension/img/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/chrome-extension/img/github.png -------------------------------------------------------------------------------- /chrome-extension/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/chrome-extension/img/icon.png -------------------------------------------------------------------------------- /chrome-extension/img/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/chrome-extension/img/icon128.png -------------------------------------------------------------------------------- /chrome-extension/img/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/chrome-extension/img/icon16.png -------------------------------------------------------------------------------- /chrome-extension/img/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/chrome-extension/img/icon48.png -------------------------------------------------------------------------------- /chrome-extension/img/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/chrome-extension/img/menu.png -------------------------------------------------------------------------------- /chrome-extension/img/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/chrome-extension/img/refresh.png -------------------------------------------------------------------------------- /chrome-extension/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kubespider-extension", 3 | "description": "Trigger Kubespider execute downloading task", 4 | "version": "0.2.0", 5 | "manifest_version": 3, 6 | "icons": { 7 | "16": "img/icon16.png", 8 | "48": "img/icon48.png", 9 | "128": "img/icon128.png" 10 | }, 11 | "action": { 12 | "default_popup": "popup.html", 13 | "default_icon": "img/icon48.png" 14 | }, 15 | "background": { 16 | "service_worker": "service-worker-loader.js", 17 | "type": "module" 18 | }, 19 | "content_scripts": [ 20 | { 21 | "js": [ 22 | "assets/index.tsx-loader-2MxPyVFe.js" 23 | ], 24 | "matches": [ 25 | "http://*/*", 26 | "https://*/*" 27 | ], 28 | "run_at": "document_end" 29 | } 30 | ], 31 | "web_accessible_resources": [ 32 | { 33 | "matches": [ 34 | "http://*/*", 35 | "https://*/*" 36 | ], 37 | "resources": [ 38 | "img/icon16.png", 39 | "img/icon48.png", 40 | "img/icon128.png", 41 | "assets/chunk-T26GuxHg.js", 42 | "assets/chunk-B9e8ng1t.js", 43 | "assets/chunk-CBVaWBKk.js" 44 | ], 45 | "use_dynamic_url": false 46 | } 47 | ], 48 | "host_permissions": [ 49 | "*://*/*" 50 | ], 51 | "permissions": [ 52 | "storage", 53 | "declarativeNetRequest", 54 | "declarativeNetRequestFeedback", 55 | "contextMenus", 56 | "tabs", 57 | "cookies", 58 | "activeTab", 59 | "scripting" 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /chrome-extension/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Kubespider 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /chrome-extension/service-worker-loader.js: -------------------------------------------------------------------------------- 1 | import './assets/chunk-BRdXzIsB.js'; 2 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | # This configuration file is for the **development** setup. 2 | version: "2.2" 3 | x-kubespider: &kubespider 4 | build: 5 | context: . 6 | # args: 7 | volumes: 8 | - ${KUBESPIDER_HOME}/kubespider/.config:/app/.config 9 | - ./kubespider:/app/kubespider 10 | # env_file: 11 | # - .env 12 | 13 | services: 14 | server: 15 | <<: *kubespider 16 | command: dev_server 17 | environment: 18 | - PUID=${UID} 19 | - PGID=${GID} 20 | network_mode: host 21 | # environment: 22 | 23 | -------------------------------------------------------------------------------- /docs/en/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution guidelines 2 | 3 | If you want to contribute to Kubespider, please read the following content. 4 | 5 | ## Install Kubespider 6 | 7 | Before developing, you need to install Kubespider first. 8 | 9 | ```sh 10 | git clone https://github.com/opennaslab/kubespider.git 11 | cd kubespider 12 | bash hack/install_kubespider.sh 13 | ``` 14 | 15 | ## Deploy with updated dependencies 16 | 17 | If you add/update python lib dependencies( requirements.txt needs to be modified), you need to deploy Kubespider with the following steps: 18 | 19 | ### 1.Build an image in Kubespider code directory 20 | 21 | In china mainland, it may build failed if without HTTP_PROXY/HTTPS_PROXY, so please set if you have proxy. But if you don't have it, please delete `--build-arg` related. 22 | 23 | ```sh 24 | docker build -t cesign/kubespider:latest -f Dockerfile ./ --build-arg HTTP_PROXY=http://: --build-arg HTTPS_PROXY=http://: 25 | ``` 26 | 27 | ### 2.Delete exist Kubespider container 28 | 29 | ```sh 30 | docker rm kubespider --force 31 | ``` 32 | 33 | ### 3.Launch Kubespider with the newest image 34 | 35 | ```sh 36 | export image_registry=cesign 37 | export KUBESPIDER_VERSION=lates 38 | docker run -itd --name kubespider \ 39 | -v ${HOME}/kubespider/.config:/app/.config \ 40 | --network=host \ 41 | --restart unless-stopped \ 42 | ${image_registry}/kubespider:${KUBESPIDER_VERSION} 43 | ``` 44 | 45 | ## Deploy with no dependencies update 46 | 47 | If no new dependencies are added/updated, you can run the following command to run Kubespider with the modified code: 48 | 49 | ```sh 50 | # Run it in Kubespider code directory 51 | docker cp kubespider kubespider:/app/ && docker restart kubespider 52 | ``` 53 | 54 | ## Give a PR 55 | 56 | Once you finish developing and do enough testing, you can create a PR in this repository. The maintainer will check and merge it as soon as possible. 57 | -------------------------------------------------------------------------------- /docs/en/contribute/implement_download_provider_cn.md: -------------------------------------------------------------------------------- 1 | # Implement Download Provider -------------------------------------------------------------------------------- /docs/en/contribute/implement_source_provider_cn.md: -------------------------------------------------------------------------------- 1 | # Implement Source Provider -------------------------------------------------------------------------------- /docs/en/faq.md: -------------------------------------------------------------------------------- 1 | # FAQ 2 | 3 | In this article, we list problems that you may encounter using Kubespider and provide solutions for your reference. 4 | 5 | ## How do I view the container's log? 6 | 7 | When you encounter problems such as download tasks not usually starting, you can check the detailed prompt through the log, you can also [submit an issue](https://github.com/opennaslab/kubespider/issues) and attach the log, so that we can quickly locate the cause of the problem: 8 | 9 | Log into the device that deployed the Kubespider via SSH, execute the following command to obtain log: 10 | 11 | ```bash 12 | # obtain Kubespider log 13 | docker logs kubespider 14 | 15 | # obtain aria2-pro log 16 | docker logs aria2-pro 17 | ``` 18 | 19 | ## Failed download files to the NFS folder? 20 | 21 | **Problem**: 22 | 23 | When your intranet deploys an NFS service, which is mounted on Kubespider's machine. However, the error appears when you attempt to download files throuth Kubespider. The key information in the log is: `Exception caught while allocating file space.`, and no files are generated in the mounted directory. 24 | 25 | **Solutions**: 26 | 27 | In this case, we need to modify the `kubespider/aria2/aria2.conf` file, change the value of `file-allocation` to `none`, that is, `file-allocation = none`, and then execute the command: `docker restart aria2-pro` to restart the related service. For more information, see [related Issues](https://github.com/aria2/aria2/issues/1032). 28 | -------------------------------------------------------------------------------- /docs/en/roadmap.md: -------------------------------------------------------------------------------- 1 | # Roadmap 2 | -------------------------------------------------------------------------------- /docs/en/user_guide/install_with_command/README.md: -------------------------------------------------------------------------------- 1 | # Deploy with docker 2 | 3 | You can have more flexable control of path configuration while installing with docker or docker-compose. 4 | 5 | ## Parameters 6 | 7 | Parameters needed to start this project in docker shows as follow: 8 | 9 | |Parameter|Type|Function|Note| 10 | |:---:|:---:|:---:|:---:| 11 | |`-v /app/.config`|VOLUMN|Path to store all configurations|| 12 | |`-p 3080`|port|Listen port of [Web Api](../../../zh/user_guide/api_docs/README.md) and Chrome plugin|Can be changed by Global configuration| 13 | 14 | ## Run with docker cli 15 | 16 | Run the following command in machine to be deployed to: 17 | 18 | ```bash 19 | docker run -itd --name kubespider -v {config_path}/.config:/app/.config -p 3080:3080 cesign/kubespider:latest 20 | ``` 21 | 22 | `{config_path}` should be replaced to the real path in docker host. 23 | 24 | ## Deploy with docker-compose 25 | 26 | Build your docker-compose.yaml file like list: 27 | 28 | ```yaml 29 | services: 30 | kubespider: 31 | image: cesign/kubespider:latest 32 | depends_on: 33 | - qbittorrent 34 | - aria2 35 | environment: 36 | - PUID=1000 37 | - PGID=1000 38 | - TZ=Asia/Shanghai 39 | ports: 40 | - 3080:3080 41 | volumes: 42 | - {config_path}:/app/.config 43 | networks: 44 | - kb 45 | 46 | qbittorrent: 47 | image: lscr.io/linuxserver/qbittorrent:latest 48 | // and any other config needed by qbtorrent 49 | 50 | aria2: 51 | container_name: aria2-qb 52 | image: abcminiuser/docker-aria2-with-webui:latest-ng 53 | // and any other config needed by aria2 54 | 55 | networks: 56 | kb: 57 | name: kb 58 | ``` 59 | 60 | And run `docker-compose up` in your docker host machine. 61 | 62 | `{config_path}` should be replaced to the real path in docker host. 63 | -------------------------------------------------------------------------------- /docs/images/aria2-config-for-chrome.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/aria2-config-for-chrome.jpg -------------------------------------------------------------------------------- /docs/images/aria2-for-chrome-config-en.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/aria2-for-chrome-config-en.jpg -------------------------------------------------------------------------------- /docs/images/aria2-for-chrome-config-zh.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/aria2-for-chrome-config-zh.jpg -------------------------------------------------------------------------------- /docs/images/kubespider-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/kubespider-architecture.png -------------------------------------------------------------------------------- /docs/images/kubespider-chrome-ext-aria2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/kubespider-chrome-ext-aria2.png -------------------------------------------------------------------------------- /docs/images/kubespider-chrome-ext-install.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/kubespider-chrome-ext-install.gif -------------------------------------------------------------------------------- /docs/images/kubespider-chrome-ext-usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/kubespider-chrome-ext-usage.png -------------------------------------------------------------------------------- /docs/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/logo.png -------------------------------------------------------------------------------- /docs/images/sponsor/asustor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/sponsor/asustor.png -------------------------------------------------------------------------------- /docs/images/sponsor/jetbrains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/sponsor/jetbrains.png -------------------------------------------------------------------------------- /docs/images/sponsor/jonsbo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/sponsor/jonsbo.png -------------------------------------------------------------------------------- /docs/images/sponsor/synology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/sponsor/synology.png -------------------------------------------------------------------------------- /docs/images/sponsor/ugnas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/images/sponsor/ugnas.png -------------------------------------------------------------------------------- /docs/zh/CONTRIBUTING-CN.md: -------------------------------------------------------------------------------- 1 | # 贡献手册 2 | 3 | 如果你想向Kubespider贡献,请阅读如下内容。 4 | 5 | ## 安装Kubespider 6 | 7 | 在开发之前,你需要首先安装Kubespider。 8 | 9 | ```sh 10 | git clone https://github.com/opennaslab/kubespider.git 11 | cd kubespider 12 | bash hack/install_kubespider.sh 13 | ``` 14 | 15 | ## 更新依赖后部署 16 | 17 | 如果你有更新/添加python库依赖(requirements.txt需要被修改),你需要按如下步骤部署Kubespider。 18 | 19 | ### 1.在Kubespider代码目录构建镜像 20 | 21 | 在中国大陆,如果没有HTTP_PROXY/HTTPS_PROXY可构建失败,所以有代理请设置;如果没有,请把--build-arg相关删除。 22 | 23 | ```sh 24 | docker build -t cesign/kubespider:latest -f Dockerfile ./ --build-arg HTTP_PROXY=http://: --build-arg HTTPS_PROXY=http://: 25 | ``` 26 | 27 | ### 2.删除已有Kubespider容器 28 | 29 | ```sh 30 | docker rm kubespider --force 31 | ``` 32 | 33 | ### 3.使用最新镜像启动Kubespider 34 | 35 | ```sh 36 | export image_registry=cesign 37 | export KUBESPIDER_VERSION=lates 38 | docker run -itd --name kubespider \ 39 | -v ${HOME}/kubespider/.config:/app/.config \ 40 | --network=host \ 41 | --restart unless-stopped \ 42 | ${image_registry}/kubespider:${KUBESPIDER_VERSION} 43 | ``` 44 | 45 | ## 无依赖更新部署 46 | 47 | 如果没有想关依赖添加/更新,你可以通过如下命令使用修改后的代码启动Kubespider: 48 | 49 | ```sh 50 | # 在Kubespider代码文件夹运行 51 | docker cp kubespider kubespider:/app/ && docker restart kubespider 52 | ``` 53 | 54 | ## 提PR 55 | 56 | 如果你完成了开发,并且经过足够的测试,你可以在此代码库上创建PR。维护者会尽可能快地检查并合入代码。 57 | -------------------------------------------------------------------------------- /docs/zh/contribute/develop_chrome_extension.md: -------------------------------------------------------------------------------- 1 | # Chrome插件开发 2 | 3 | ## 开始之前 4 | 为什么我们需要kubespider的插件呢?大部分资源内容,我们都是在游览器中找到的,为了减少操作步骤,方便用户下载,这是开发此插件的初衷。结合Kubespider的编排下载,能极大提升下载体验。在整个系统架构中,Chrome插件作为一种webhook触发工具存在。 5 | Chrome插件都是html+css+js的组合,和前端开发几乎一致。只需要了解少许的Chrome特定接口,即可完成开发。 6 | 7 | ## 开发流程 8 | ### 1.导入Chrome插件 9 | 在Chrome中点击如下按钮,选择管理扩展程序: 10 | 11 | 12 | 然后点击点击开启开发者模式: 13 | 14 | 15 | 然后点击加载已解压的扩展程序: 16 | 17 | 18 | 到下载库下的chrome-extension文件夹,选择导入即可: 19 | 20 | 最后点击确定。 21 | 22 | ### 2.测试插件 23 | 点击插件,测试即可: 24 | 25 | 26 | 如果有修改,在管理程序页面重新载入插件即可: 27 | 28 | 29 | ### 3.提交PR代码 30 | 测试结束后,提交代码即可。 -------------------------------------------------------------------------------- /docs/zh/contribute/images/chrome-go-dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/contribute/images/chrome-go-dir.png -------------------------------------------------------------------------------- /docs/zh/contribute/images/chrome-load-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/contribute/images/chrome-load-ext.png -------------------------------------------------------------------------------- /docs/zh/contribute/images/chrome-open-dev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/contribute/images/chrome-open-dev.png -------------------------------------------------------------------------------- /docs/zh/contribute/images/chrome-open-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/contribute/images/chrome-open-ext.png -------------------------------------------------------------------------------- /docs/zh/contribute/images/chrome-reload-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/contribute/images/chrome-reload-ext.png -------------------------------------------------------------------------------- /docs/zh/contribute/images/chrome-test-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/contribute/images/chrome-test-ext.png -------------------------------------------------------------------------------- /docs/zh/contribute/implement_download_provider_cn.md: -------------------------------------------------------------------------------- 1 | # 编写下载提供器 -------------------------------------------------------------------------------- /docs/zh/contribute/implement_notificatiion_provider_cn.md: -------------------------------------------------------------------------------- 1 | # 编写消息通知提供器 2 | 3 | ## 开始之前 4 | 5 | Kubespider为了适配多种类型的消息通知,抽象了一套API接口,按照Kubespider定义的规则实现这些API接口,即可实现多种方式的消息推送。 6 | 7 | ## 接口描述 8 | 9 | 对于一个消息通知提供器,需要实现如下接口: 10 | 11 | ```python 12 | class NotificationProvider(metaclass=abc.ABCMeta): 13 | 14 | @abc.abstractmethod 15 | def __init__(self, name: str, config_reader: AbsConfigReader) -> None: 16 | self.name = name 17 | self.config_reader = config_reader 18 | 19 | @abc.abstractmethod 20 | def push(self, *args, **kwargs) -> bool: 21 | # push message 22 | pass 23 | 24 | @abc.abstractmethod 25 | def get_provider_name(self) -> str: 26 | # name of notifications provider 27 | pass 28 | 29 | @abc.abstractmethod 30 | def provider_enabled(self) -> bool: 31 | pass 32 | 33 | @abc.abstractmethod 34 | def format_message(self, title, **kwargs) -> str: 35 | pass 36 | 37 | ``` 38 | 39 | * `__init__`: 资源提供器初始化函数,初始化一些必要状态。 40 | * `get_provider_name`: 获取消息通知提供器名称。 41 | * `provider_enabled`: 获取消息通知提供器是否启用,从配置文件中获取。 42 | * `push`: 消息推送的方法。 43 | * `format_message`: 对需要发送的消息进行格式化。 44 | 45 | 在实现如上函数后,还需要在`kubespider/core/config_handler.py`中初始化对应provider,如下: 46 | 47 | ```python 48 | notification_provider_init_func = { 49 | 'pushdeer_notification_provider': pushdeer_notification_provider.PushDeerNotificationProvider, 50 | } 51 | ``` 52 | 53 | ## 测试 54 | 55 | 在代码写好后,直接运行如下命令打包镜像并运行即可(在此repo的根目录运行): 56 | 57 | ```sh 58 | docker build -t cesign/kubespider:latest -f Dockerfile ./ 59 | 60 | docker rm kubespider --force 61 | 62 | docker run -itd --name kubespider \ 63 | -v ${HOME}/kubespider/.config:/app/.config \ 64 | --network=host \ 65 | --restart unless-stopped \ 66 | cesign/kubespider:latest 67 | ``` 68 | 69 | 然后执行你期待的操作,检查是否如期运行。 -------------------------------------------------------------------------------- /docs/zh/maintenance/maintainer/README.md: -------------------------------------------------------------------------------- 1 | # Kubespider Maintainer的任务 2 | 3 | 作为 `Kubespider` 开源项目的维护者,你应该维护代码质量和持续的项目发展。以下是一些你需要做的事情: 4 | * 了解项目:帮助新的维护者了解项目历史和当前状况,提供项目文档和技术文档。 5 | * 维护代码库:审核提交的代码,确保代码符合风格规范、可读性高、逻辑清晰、减少冲突和bug。 6 | * 维护开发环境:确保其他开发人员可以在自己的电脑上轻松地开始开发。 7 | * 管理问题并指导问题解决:重点追踪和管理问题、错误和bug,并指导其他的开发者修复错误。 8 | * 维护版本库: 管理版本控制系统,确保标签和分支都已创建,并为bug修复和新功能开发提供正确而稳定的代码。 9 | * 制定和执行计划:制定项目路线图和计划,跟进开发进度。 10 | * 社区管理:与社区建立有效的沟通,开放对项目的建议和补丁的接收,并尽可能解答使用者和贡献者所提出的问题。 11 | * 文档编写和维护:编写并维护项目相关文档,包括使用说明、开发文档和维护文档。 12 | 13 | 期待你能构建一个和谐并且有活力的社区! 14 | -------------------------------------------------------------------------------- /docs/zh/maintenance/release/README.md: -------------------------------------------------------------------------------- 1 | # 版本发布流程 2 | 3 | ## Patch版本发布流程 4 | 5 | 如v1.1.x,其中x即为Patch版本编号,通常发布此版本是为了修复 v1.1.(x-1) 版本的bug。 6 | 7 | 1. 确保相关bugfix都已cherry-pick到 release-1.1 分支,如 [PR 491](https://github.com/opennaslab/kubespider/pull/491). 8 | 2. 在对应分支上创建release tag,如v1.1.x。 9 | 3. 编写对应的release notes,如:https://github.com/opennaslab/kubespider/releases/tag/v0.6.2 10 | 4. 运行流水线 [workflow](https://github.com/opennaslab/kubespider/actions/workflows/kubespider-release-notes.yaml) 获取对应的贡献者,并且写入release notes。 11 | 12 | ## Minor版本发布流程 13 | 14 | 如v1.x.y,其中x即为Minor版本编号,通常代表正式版本发布,包括相关的特性和bugfix。 15 | 16 | 1. 基于main分支创建对应的release分支,如这里的release-1.x. 17 | 2. 在对应分支上创建release tag,如v1.x.y。 18 | 3. 编写对应的release notes,如:https://github.com/opennaslab/kubespider/releases/tag/v0.6.0 19 | 4. 运行流水线 [workflow](https://github.com/opennaslab/kubespider/actions/workflows/kubespider-release-notes.yaml) 获取对应的贡献者,并且写入release notes。 20 | -------------------------------------------------------------------------------- /docs/zh/roadmap.md: -------------------------------------------------------------------------------- 1 | # Roadmap 2 | 3 | Kubespider旨在构建一个通用的下载编排系统,兼容各种资源平台和下载软件,兼容多种下载方式(请求触发,周期触发,更新触发),做资源下载最完美的统一解决方案。 4 | 5 | PS:如果你想做某个特性,请在repo issue中说明。 6 | 7 | ## 待做特性 8 | * 增加如何开发的文档。 9 | * 增加chrome插件功能详细文档。 10 | * 支持豆瓣评分大于X,自动搜索资源下载。 11 | * 完善现有文档,提供中英版本。 12 | * 设计测试框架,确保各source provider/download provder正常工作。 13 | * 增加卸载脚本。 14 | * 参照 `https://reorx.com/blog/track-and-download-shows-automatically-with-sonarr/`,集成到kubespider中,成为一个source provider。 15 | * 集成alist,基于webDAV下载各云盘资源,成为一个source provider。 16 | * 修复美剧天堂多次连续触发的性能问题,无法连续触发下载;修复美剧天堂获取到除bt外的链接类型。 17 | * 下载任务IM消息通知。 18 | * 通过IM软件触发Kubespider下载。 19 | * 支持自动下载IMDB收藏内容。 20 | 21 | ## 正在做特性 22 | * 更好的文件分类。 23 | * 完善现有代码,定义好资源提供器和下载提供器的API(高优先级)。 24 | 25 | ## v1.0.0版本特性(2023/09/xx) 26 | 27 | ## v0.3.0版本特性(2023/06/26) 28 | 见Release notes: https://github.com/opennaslab/kubespider/releases/tag/v0.3.0 29 | 30 | ## v0.2.0版本特性(2023/04/22) 31 | * 国内加速下载,支持阿里云image registry。 32 | * 所有配置文件json化,state存储也json化。 33 | * 搭建中国大陆部署测试流水线。 34 | * 配置文件位置归一,.kubespider改为.config,放入${HOME}/kubespider/.config。 35 | * 支持迅雷download provider。 36 | * README特性表格化,更易阅读。 37 | * 修复torrent触发下载时,带query参数的请求。 38 | * 支持qBittorrent。 39 | * Chrome插件在保存server地址时做健康检查。 40 | * 添加如下文档:如何配置Aria2,如何触发下载各种类型文件。 41 | * 增加API文档,便于其他人二次相关触发插件。 42 | * 利用异步队列处理,提升刷新接口性能。 43 | * 集成you-get(bilibili,文档)。 44 | * 集成yt-dlp(YouTube,文档)。 45 | * 支持bilibili source provider。 46 | 47 | ## v0.1.0版本特性(2023/01/30) 48 | * Chrome插件支持右键触发下载。 49 | * 搭建发布流水线。 50 | * 发布第一个版本。 51 | 52 | ## 舍弃 53 | * 发布Kubespidre chrome插件。(发布Chrome插件需要各项审核,比较麻烦) 54 | -------------------------------------------------------------------------------- /docs/zh/user_guide/alist_source_provider/README.md: -------------------------------------------------------------------------------- 1 | # alist 资源提供器配置 2 | 3 | ## 简介 4 | 5 | 该资源提供器可以对指定的alist目录进行监控,当被监控的目录有新增文件或有文件变更时会自动下载。 6 | 7 | ## 配置 8 | 9 | ### 1.前提 10 | 11 | 你已经安装好了Kubespider, 你已经有了alist并成功对接网盘 12 | 13 | ### 2.配置手册 14 | 15 | 你可以通过`${HOME}/kubespider/.config/source_provider.yaml`配置,示例如下: 16 | 17 | ```yaml 18 | alist_source_provider: 19 | enable: false 20 | type: alist_source_provider 21 | host: http://xxx.com:5678/ 22 | watch_dirs: 23 | - /电子书/5000本(纯电子版非扫描)/VOL01-05/ 24 | - /资料/壁纸/4K壁纸(300张) 25 | ``` 26 | 27 | * `enable`:是否开启此provider 28 | * `type`:订阅源类型,需为`alist_source_provider` 29 | * `host`: alist的host,如有端口,需带上端口 30 | * `watch_dirs`: 需要监听的文件夹,支持多文件夹 31 | 32 | ## 友情提示 33 | 34 | ### 1.如何配置 watch_dirs 35 | 36 | ![img.png](images/alist1.png) 37 | ![img.png](images/alist2.png) 38 | 39 | 把获取到的路径填入 watch_dirs 即可 40 | 41 | ### 2.如何下载 42 | 43 | kubespider会自行对配置的文件夹进行监控下载,任务调度的间隔为1小时 44 | 45 | 建议开启消息通知,下载的信息会自行推送 46 | -------------------------------------------------------------------------------- /docs/zh/user_guide/alist_source_provider/images/alist1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/alist_source_provider/images/alist1.png -------------------------------------------------------------------------------- /docs/zh/user_guide/alist_source_provider/images/alist2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/alist_source_provider/images/alist2.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ani_source_provider/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ani_source_provider/images/1.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ani_source_provider/images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ani_source_provider/images/2.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ani_source_provider/images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ani_source_provider/images/3.png -------------------------------------------------------------------------------- /docs/zh/user_guide/api_docs/README.md: -------------------------------------------------------------------------------- 1 | # API手册 2 | 基于Kubespider的架构,为了便于开发者开发更多的下载触发方式,在此详细描述Kubespider webhook的API。 3 | 4 | ## 获取所有下载提供器 5 | API接口 GET /api/v1/downloadproviders 6 | 7 | 响应内容: 8 | ```json 9 | { 10 | "aria2_download_provider":false, 11 | "qbittorrent_download_provider":false, 12 | "xunlei_download_provider":true 13 | } 14 | ``` 15 | true代表此download provider开启,反之则关闭。 16 | 17 | ## 获取所有资源提供器 18 | API接口 GET /api/v1/sourceproviders 19 | 20 | 响应内容: 21 | ```json 22 | { 23 | "btbtt12_disposable_source_provider":true, 24 | "meijutt_source_provider":true, 25 | "mikanani_source_provider":true 26 | } 27 | ``` 28 | true代表此download provider开启,反之则关闭。 29 | 30 | ## 获取所有PT提供器 31 | API接口 GET /api/v1/ptproviders 32 | 33 | 响应内容: 34 | ```json 35 | { 36 | "hdvideo":true 37 | } 38 | ``` 39 | true代表此pt provider开启,反之则关闭。 40 | 41 | ## 触发下载 42 | API接口 POST /api/v1/download 43 | 44 | 请求内容: 45 | ```json 46 | { 47 | "dataSource": , 48 | "path": "" 49 | } 50 | ``` 51 | * ``表示资源相关地址,如magnet链接,torrent地,http地址等。 52 | * path表示下载路径,如`钢铁侠1`。 53 | 54 | ## 健康检查 55 | API接口 GET /healthz 56 | 57 | 响应内容: 58 | ``` 59 | OK 60 | ``` 61 | 62 | ## 下载刷新 63 | API接口 GET /api/v1/refresh 64 | 65 | Kubespider会周期获取更新资源(1h),如果想立即获取,请调用此接口。 66 | 响应内容: 67 | ``` 68 | OK 69 | ``` 70 | -------------------------------------------------------------------------------- /docs/zh/user_guide/aria2_download_provider/README.md: -------------------------------------------------------------------------------- 1 | # aria2下载提供器安装和配置 2 | ## 简介 3 | aria2 是一个轻量级的多协议和多源命令行下载实用程序。 它支持HTTP/HTTPS、FTP、SFTP、BitTorrent 和Metalink。 aria2 可以通过内置的JSON-RPC 和XML-RPC 接口进行操作。 4 | 5 | ## 最终效果 6 | 效果如图,结合aria下载软件,Kubespider会调用aria2,下载bt链接资源: 7 | ![img](images/final_show.gif) 8 | 9 | ## 安装 10 | ### 1.安装aria2 11 | 在你通过 `install_kubespider.sh` 安装Kubespider后,aria2是默认安装的。 12 | 13 | ### 2.确认安装 14 | 运行如下命令,确认迅雷已经安装成功: 15 | ```sh 16 | docker ps | grep aria2 17 | ``` 18 | 19 | 输出类似: 20 | ```sh 21 | root@cesign [10:49:25 PM] [+41.0°C] [~/kubespider/.config] 22 | -> # docker ps | grep aria2 23 | 802bd72aeb42 cesign/aria2-pro:latest "/init" 4 weeks ago Up 11 days aria2-pro 24 | ``` 25 | 26 | ## 配置 27 | ### 1.通用配置 28 | 通过下载aria2 chrome插件,即可查看下载任务,其中配置在运行 `install_kubespider.sh` 后已输出: 29 | ![img](../../../images/aria2-config-for-chrome.jpg) 30 | 31 | ### 2.Kubespider对接配置(可选) 32 | 33 | aria2对应的配置文件如下: 34 | 35 | ```yaml 36 | aria2: 37 | type: aria2_download_provider 38 | enable: true 39 | download_base_path: "/downloads/" 40 | rpc_endpoint_host: http://127.0.0.1 41 | rpc_endpoint_port: '6800' 42 | secret: kubespider 43 | priority: 1 44 | ``` 45 | 46 | 其中: 47 | 48 | * 名称,可自定义(不可重复),可以在 `source_provider.yaml` 中按名称指定下载器。 49 | * `type`: 表示此下载器的类型,需为 `aria2_download_provider`。 50 | * `enable`: 设置是否使用此provider,只能使用一个,后续开发优先级后可以多个一起使用。 51 | * `download_base_path`: 设置下载基础路径,后续文件都将保存在该目录中,务必设置在你所挂载的nas目录或其他目录。 52 | * `rpc_endpoint_host`: aria2 rpc地址。 53 | * `rpc_endpoint_port`: aria2 rpc端口。 54 | * `secret`: aria2 rpc接口密码。 55 | * `priority`: 下载提供器优先级,数字越小,优先级越高,下载资源时按优先级尝试,无法下载或下载失败时切换下载器。 56 | 57 | 58 | ### 3.测试下载 59 | 配置好后,运行如下命令: 60 | ``` 61 | docker restart kubespider 62 | ``` 63 | 按最终效果图测试一下即可。 64 | -------------------------------------------------------------------------------- /docs/zh/user_guide/aria2_download_provider/images/final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/aria2_download_provider/images/final_show.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/asustor_installation/images/01-install-docker.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/asustor_installation/images/01-install-docker.webp -------------------------------------------------------------------------------- /docs/zh/user_guide/asustor_installation/images/02-portainer.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/asustor_installation/images/02-portainer.webp -------------------------------------------------------------------------------- /docs/zh/user_guide/asustor_installation/images/03-new-container.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/asustor_installation/images/03-new-container.webp -------------------------------------------------------------------------------- /docs/zh/user_guide/asustor_installation/images/04-running.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/asustor_installation/images/04-running.webp -------------------------------------------------------------------------------- /docs/zh/user_guide/bark_notification_provider/README.md: -------------------------------------------------------------------------------- 1 | # [Bark](https://bark.day.app/) 2 | 3 | Bark是iOS上一款注重隐私、安全可控的自定义通知推送工具。 4 | 5 | - 免费、轻量!简单调用接口即可给自己的iPhone发送推送。 6 | - 依赖苹果APNs,及时、稳定、可靠 7 | - 不会消耗设备的电量, 基于系统推送服务与推送扩展,APP本体并不需要运行。 8 | - 隐私安全,可以通过一些方式确保包含作者本人在内的所有人都无法窃取你的隐私。 9 | 10 | 11 | ### 效果 12 | ![效果图](images/example.jpg) 13 | 14 | 15 | ### 将 Bark 接入 Kubespider 16 | 17 | 将 Bark 作为消息推送 provider 接入 Kubespider: 18 | 19 | ```yaml 20 | bark: 21 | type: bark_notification_provider 22 | enable: false 23 | host: https://api.day.app(官方默认地址) 24 | device_token: XXXX(从你的设备上复制) 25 | ``` 26 | 27 | ### 自架服务器端 28 | 参考Bark官方文档, 替换配置里的`host`参数 29 | 30 | -------------------------------------------------------------------------------- /docs/zh/user_guide/bark_notification_provider/images/example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/bark_notification_provider/images/example.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/bilibili_source_provider/README.md: -------------------------------------------------------------------------------- 1 | # Bilibili资源提供器配置 2 | ## 简介 3 | 哔哩哔哩(Bilibili)是一家中国的在线视频分享和弹幕评论平台,于2009年创建。它最初定位为ACG(动画、漫画、游戏)文化社区,但现在已扩展到包括音乐、舞蹈、科技、生活等各种领域。用户可以在B站上观看和上传视频,并与其他用户互动交流。B站以其丰富的内容、独特的弹幕系统和活跃的用户群体而闻名。 4 | 官方地址:[bilibili.com](https://bilibili.com/) 5 | 本资源提供器旨在实现**链接触发下载**,简化下载流程。 6 | 7 | ## 最终效果 8 | 最终效果如下图,在Chrome中右键,选择`Send to Kubespider`,Kubespider会自动下载B站视频资源。 9 | ![img](images/bilibili_final_show.gif) 10 | 11 | ## 配置 12 | ### 1.前提 13 | 你已经安装并配置好You-Get下载器,并对接Kubespider;如果未安装,请先参照 [link](../youget_download_provider/README.md) 安装。 14 | 15 | ### 2.配置手册 16 | 你可以通过`${HOME}/kubespider/.config/source_provider.yaml`配置,配置解释如下: 17 | 18 | ```yaml 19 | bilibili_source_provider: 20 | type: bilibili_source_provider 21 | enable: true 22 | downloader: yutto 23 | ``` 24 | 25 | * `type`:订阅源类型,需为`bilibili_source_provider`。 26 | * `enable`:是否开启此provider,因为此provider无需口令等用户信息,所以默认开启。 27 | * `downloader`:如果不需要高级下载策略,这里无需修改;可指定使用的下载器,格式为数组,内容需要精确地跟 `downloader_provider.yaml` 中声明的名称一样;下载优先级将由数组顺序决定。 28 | * `download_param`:下载时传给下载器的额外参数,具体参数需要参考下载器定义。 29 | 30 | ## 测试 31 | 设置好后,直接重启Kubespider即可。 32 | ```sh 33 | docker restart kubespider 34 | ``` 35 | 36 | 按照最终效果测试即可。 -------------------------------------------------------------------------------- /docs/zh/user_guide/bilibili_source_provider/images/bilibili_final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/bilibili_source_provider/images/bilibili_final_show.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/bilibili_vlogger_subscribe_source_provider/README.md: -------------------------------------------------------------------------------- 1 | # Bilibili博主追更资源提供器 2 | ## 简介 3 | B站上面有许多优秀的博主,有时期待自动下载更新的视频。所以本资源提供器旨在实现**自动下载博主更新视频**,简化下载流程。 4 | 5 | ## 最终效果 6 | 最终效果如下图,在配置好后,会自动检查博主更新视频,自动下载(此处借助yutto下载): 7 | ![img](images/final_show.png) 8 | 9 | ## 配置 10 | ### 1.前提 11 | 1. 你已经安装好了Kubespider/Kubespider chrome插件。 12 | 2. 配置安装好yutto downloader,如果没有请参考 [link](../yutto_download_provider/README.md) 13 | 14 | ### 2.配置手册 15 | 你可以通过`${HOME}/kubespider/.config/source_provider.yaml`配置,配置解释如下: 16 | ```yaml 17 | bilibili_vlogger_subscribe_source_provider: 18 | type: bilibili_vlogger_subscribe_source_provider 19 | enable: false 20 | downloader: yutto 21 | vlogger: 22 | - 367877 23 | ``` 24 | 25 | * `type`:订阅源类型,需为`bilibili_vlogger_subscribe_source_provider`。 26 | * `enable`:是否开启此provider,因为此provider无需口令等用户信息,所以默认开启。 27 | * `downloader`:指定使用的下载器,内容需要精确地跟 `downloader_provider.yaml` 中声明的名称一样;下载优先级将由数组顺序决定。 28 | * `vlogger`:需要下载的博主ID,通过博主主页url获取,如下为367877: 29 | * `sessdata`:B站账号的cookie值, SESSDATA字段 30 | 31 | ![img](./images/vlogger_id.png) 32 | 如果你想设置多个博主,可以如下配置: 33 | ```yaml 34 | bilibili_vlogger_subscribe_source_provider: 35 | type: bilibili_vlogger_subscribe_source_provider 36 | enable: false 37 | downloader: yutto 38 | sessdata: 你的B站账号cookie值 39 | vlogger: 40 | - 367877 41 | - 367878 42 | ``` 43 | 44 | 45 | ## 测试 46 | 设置好后,保存文件后Kubespider会自动启动,触发下载,并追更。你可以通过查看yutto下载器的日志查看下载进度: 47 | 48 | ```sh 49 | $ docker logs -f yutto 50 | ``` 51 | 52 | 默认下载路径为 `VideoMixed`。 53 | -------------------------------------------------------------------------------- /docs/zh/user_guide/bilibili_vlogger_subscribe_source_provider/images/final_show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/bilibili_vlogger_subscribe_source_provider/images/final_show.png -------------------------------------------------------------------------------- /docs/zh/user_guide/bilibili_vlogger_subscribe_source_provider/images/vlogger_id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/bilibili_vlogger_subscribe_source_provider/images/vlogger_id.png -------------------------------------------------------------------------------- /docs/zh/user_guide/btbtt12_disposable_source_provider/README.md: -------------------------------------------------------------------------------- 1 | # btbtt12单任务资源提供器配置 2 | ## 简介 3 | BT之家单版社区平台,最快提供最新最全高清电影、动漫、韩剧、日剧、美剧、无损音乐、体育、小说等BT迅雷下载以及资讯!官方地址:[btbtt12.com](https://www.btbtt12.com/) 4 | 本资源提供器旨在实现**链接触发下载**,简化下载流程。 5 | 6 | ## 最终效果 7 | 最终效果如下图,在Chrome中右键,选择`Send to Kubespider`,Kubespider会自动下载链接中的资源。 8 | ![img](images/btbt12_download.gif) 9 | 10 | ## 配置 11 | ### 1.前提 12 | 你已经安装好了Kubespider/Kubespider chrome插件。 13 | 14 | ### 2.配置手册 15 | 你可以通过`${HOME}/kubespider/.config/source_provider.yaml`配置,配置解释如下: 16 | ```yaml 17 | btbtt12_disposable_source_provider: 18 | type: btbtt12_disposable_source_provider 19 | enable: true 20 | ``` 21 | 22 | * `type`:订阅源类型,需为`btbtt12_disposable_source_provider`。 23 | * `enable`:是否开启此provider,因为此provider无需口令等用户信息,所以默认开启。 24 | * `downloader`:指定使用的下载器,格式为数组,内容需要精确地跟 `downloader_provider.yaml` 中声明的名称一样;下载优先级将由数组顺序决定。 25 | * `download_param`:下载时传给下载器的额外参数,具体参数需要参考下载器定义。 26 | 27 | ## 测试 28 | 设置好后,直接重启Kubespider即可。 29 | ```sh 30 | docker restart kubespider 31 | ``` 32 | 33 | 安装最终效果测试即可。 -------------------------------------------------------------------------------- /docs/zh/user_guide/btbtt12_disposable_source_provider/images/btbt12_download.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/btbtt12_disposable_source_provider/images/btbt12_download.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/general_rss_source_provider/README.md: -------------------------------------------------------------------------------- 1 | # general_rss_source_provider资源提供器配置 2 | ## 简介 3 | 本资源提供器旨在提供通用的rss订阅资源下载服务 4 | 5 | ## 配置 6 | ### 1.前提 7 | 你已经安装好了Kubespider 8 | 9 | ### 2.配置手册 10 | 你可以通过`${HOME}/kubespider/.config/source_provider.yaml`配置,普通配置如下(以RSSHUB的深影订阅为例): 11 | ```yaml 12 | general_rss_source_provider: 13 | enable: true 14 | type: general_rss_source_provider 15 | rss_name: 深影译站 16 | rss_link: http://192.168.124.10:1200/shinybbs 17 | file_type: movie 18 | link_type: magnet # [magnet, torrent] 19 | downloader: 20 | - qbittorrent 21 | download_param: 22 | tags: 23 | - 电影 24 | - RSS 25 | category: 电影 26 | ``` 27 | 28 | * `enable`:是否开启此provider 29 | * `type`:订阅源类型,需为`general_rss_source_provider` 30 | * `rss_name`:rss资源名称 31 | * `rss_link`:rss订阅链接 32 | * `file_type`:下载资源类型标记,只支持Kubespider的六种内容,分别为general、tv、movie、video_mixed、music、picture 33 | * `downloader`: 指定下载器 34 | * `download_param`: 指定下载器对应的下载参数,具体参数请参考对应下载器的文档 35 | 36 | 所有资源将默认保存在`download_path/rss_name`中,其中`download_path`为所使用下载器中配置的下载路径,`rss_name`为配置选项。如果你想根据资源的标题自定义下载路径,可以添加一个字段为`title_pattern`的正则表达式配置。以如下标题为例:`【喵萌奶茶屋】★04月新番★[我内心的糟糕念头/Boku no Kokoro no Yabai Yatsu][05][1080p][简日双语][招募翻译]`,添加正则表达式: 37 | ```yaml 38 | xxxxx_rss: 39 | ... 40 | title_pattern: \【(.*)\】.*?\[(.*?)\/ 41 | ``` 42 | 该表达式会根据标题提取出一个数组:`['喵萌奶茶屋', '我内心的糟糕念头']`,则新的保存路径为:`download_path/喵萌奶茶屋/我内心的糟糕念头` 43 | 44 | 45 | ### 3.测试 46 | 设置好后,直接重启Kubespider即可。 47 | ```sh 48 | docker restart kubespider 49 | ``` 50 | 51 | ## 友情提示 52 | * 如若不知道如何获取rss订阅,可以参考https://docs.rsshub.app/ 53 | * 如果选择自部署rsshub,请注意是否拥有魔法环境,否则部分rss订阅无法获取 -------------------------------------------------------------------------------- /docs/zh/user_guide/install_with_command/README.md: -------------------------------------------------------------------------------- 1 | # 使用docker进行部署 2 | 3 | 使用 docker 或者 docker-compose 进行配置可以灵活自定义本项目使用的配置目录。 4 | 5 | ## 参数配置 6 | 7 | 使用docker启动本项目需要的配置项目如下: 8 | 9 | |参数|类型|含义|备注| 10 | |:---:|:---:|:---:|:---:| 11 | |`-v /app/.config`|VOLUMN|存放项目配置|| 12 | |`-p 3080`|port|[Web Api](../api_docs/README.md)以及浏览器插件的监听端口|可在全局配置中修改| 13 | 14 | ## 直接使用 docker 部署 15 | 16 | 直接在部署机器上执行 17 | 18 | ```bash 19 | docker run -itd --name kubespider -v {config_path}/.config:/app/.config -p 3080:3080 cesign/kubespider:latest 20 | ``` 21 | 22 | 即可,注意替换命令中`{config_path}`为部署机器上真实存在的配置目录。 23 | 24 | ## 使用 docker compose 部署 25 | 26 | 构建如下 docker-compose.yaml 文件: 27 | 28 | ```yaml 29 | services: 30 | kubespider: 31 | image: cesign/kubespider:latest 32 | depends_on: 33 | - qbittorrent 34 | - aria2 35 | environment: 36 | - PUID=1000 37 | - PGID=1000 38 | - TZ=Asia/Shanghai 39 | ports: 40 | - 3080:3080 41 | volumes: 42 | - {config_path}:/app/.config 43 | networks: 44 | - kb 45 | 46 | qbittorrent: 47 | image: lscr.io/linuxserver/qbittorrent:latest 48 | // and any other config needed by qbtorrent 49 | 50 | aria2: 51 | container_name: aria2-qb 52 | image: abcminiuser/docker-aria2-with-webui:latest-ng 53 | // and any other config needed by aria2 54 | 55 | networks: 56 | kb: 57 | name: kb 58 | ``` 59 | 60 | 在部署机器上执行 `docker-compose up` 即可,注意替换命令中`{config_path}`为部署机器上真实存在的配置目录。 61 | -------------------------------------------------------------------------------- /docs/zh/user_guide/jellyfin_install_config/README.md: -------------------------------------------------------------------------------- 1 | # Jellyfin安装和配置 2 | 3 | `Jellyfin`是一个自由软件媒体系统,可让您控制媒体的管理和流媒体。它是专有的Emby和Plex的替代品,可通过多个应用程序从专用服务器向终端用户设备提供媒体。Jellyfin是Emby 3.5.2版本的后代,移植到.NET Core框架以支持完整的跨平台支持。没有任何附加条件,只是一个团队想要更好地构建更好的东西并共同努力实现它,致力于让所有用户都能访问最好的媒体系统。 4 | 5 | ## 最终效果 6 | PC端: 7 | 8 | 9 | 手机APP端: 10 | 11 | 12 | ## 安装 13 | 在安装Jellyfin之前,请确保你已经安装好Kubespider。 14 | 15 | ### 1.安装Jellyfin 16 | 运行如下命令即可: 17 | ```sh 18 | git clone https://github.com/opennaslab/kubespider.git 19 | cd kubespider 20 | bash hack/install_jellyfin.sh 21 | ``` 22 | 23 | ### 2.配置Jellyfin 24 | 到地址`http://:8096`配置对应目录即可,我配置的目录和类型对应如下: 25 | ``` 26 | Mixed 对应 挂载的目录/media/Common 27 | Movie 对应 挂载的目录/media/Movie 28 | Shows 对应 挂载的目录/media/TV 29 | ``` 30 | 31 | 配置好后,即可享用。 32 | 33 | -------------------------------------------------------------------------------- /docs/zh/user_guide/jellyfin_install_config/images/app_jellyfin.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/jellyfin_install_config/images/app_jellyfin.jpeg -------------------------------------------------------------------------------- /docs/zh/user_guide/jellyfin_install_config/images/chrome_jellyfin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/jellyfin_install_config/images/chrome_jellyfin.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/magic_source_provider/images/hdvideo-show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/magic_source_provider/images/hdvideo-show.png -------------------------------------------------------------------------------- /docs/zh/user_guide/magic_source_provider/images/magic_copy_xpath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/magic_source_provider/images/magic_copy_xpath.png -------------------------------------------------------------------------------- /docs/zh/user_guide/magic_source_provider/images/magic_final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/magic_source_provider/images/magic_final_show.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/magic_source_provider/images/magic_validate_xpath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/magic_source_provider/images/magic_validate_xpath.png -------------------------------------------------------------------------------- /docs/zh/user_guide/magic_source_provider/images/mteam-show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/magic_source_provider/images/mteam-show.png -------------------------------------------------------------------------------- /docs/zh/user_guide/meijutt_source_provider/README.md: -------------------------------------------------------------------------------- 1 | # meijutt资源提供器配置 2 | ## 简介 3 | meijutt有丰富的美剧内容,提供高质量下载资源。官方地址:[meijutt.tv](https://www.meijutt.tv/) 4 | 本资源提供器旨在实现**全自动追剧**,当你订阅的美剧有更新时,自动下载,你能随时方便的观看。 5 | 6 | ## 最终效果 7 | 最终效果如下图,在Chrome中右键,选择`Send to Kubespider`,Kubespider会自动下载已有剧集并追更。 8 | ![img](images/meijutt_download.gif) 9 | 10 | ## 配置 11 | ### 1.前提 12 | 你已经安装好了Kubespider/Kubespider chrome插件 13 | 14 | ### 2.配置手册 15 | 你可以通过`${HOME}/kubespider/.config/source_provider.yaml`配置,配置解释如下: 16 | ```yaml 17 | meijutt_source_provider: 18 | type: meijutt_source_provider 19 | enable: true 20 | tv_links: [] 21 | ``` 22 | 23 | * `type`:订阅源类型,需为`meijutt_source_provider`。 24 | * `enable`:是否开启此provider。 25 | * `tv_links`:tv剧地址,直接通过Kubespider chrome插件发送美剧地址URL即可,如最终效果图所示。 26 | * `downloader`:指定使用的下载器,格式为数组,内容需要精确地跟 `downloader_provider.yaml` 中声明的名称一样;下载优先级将由数组顺序决定。 27 | * `download_param`:下载时传给下载器的额外参数,具体参数需要参考下载器定义。 28 | 29 | 其中Server地址为 http://:3080 30 | 31 | ### 3.测试 32 | 设置好后,直接重启Kubespider即可。 33 | ```sh 34 | docker restart kubespider 35 | ``` 36 | 37 | 最后按照最终效果图测试下载即可。 -------------------------------------------------------------------------------- /docs/zh/user_guide/meijutt_source_provider/images/meijutt_download.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/meijutt_source_provider/images/meijutt_download.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/mikanani_source_provider/README.md: -------------------------------------------------------------------------------- 1 | # mikanani资源提供器配置 2 | ## 简介 3 | 蜜柑计划是新一代的动漫下载站,专业提供动漫、动漫下載、新番下载、动画下载等服务。官方地址:[mikanani.tv](https://mikanani.tv/) 4 | 本资源提供器旨在实现**全自动追番**,当你订阅的动漫有更新时,自动下载,你能随时方便的观看。 5 | 6 | ## 前提 7 | 你已经安装好了Kubespider。 8 | 9 | ## 配置手册 10 | 你可以通过`${HOME}/kubespider/.config/source_provider.yaml`配置,配置解释如下: 11 | ```yaml 12 | mikanani_source_provider: 13 | type: mikanani_source_provider 14 | enable: false 15 | # 将以下rss链接更换为自己的mikan订阅链接 16 | # 格式为 https://mikanani.tv/RSS/MyBangumi?token=***mytoken*** 17 | rss_link: https://mikanani.tv/Home/Classic 18 | downloader: 19 | - qbittorrent 20 | download_param: 21 | tags: 22 | - mikanani 23 | filter: ^((?!先行).)*$ 24 | use_sub_category: true 25 | custom_category_mapping: 26 | ``` 27 | 28 | * `type`:订阅源类型,需为`meijutt_source_provider`。 29 | * `enable`:是否开启此provider。 30 | * `rss_link`:mikanani账号的rss链接,获取方法如下: 31 | 1. 去[mikanani](https://mikanani.me/)注册账号,开启高级订阅 32 | ![img](images/mikanani_source_provider_cfg_1.jpg) 33 | 2. 关注你喜欢的动漫 34 | ![img](images/mikanani_source_provider_cfg_2.jpg) 35 | 3. 查看RSS链接,选择复制链接地址并设置为`rss_link`即可 36 | ![img](images/mikanani_source_provider_cfg_3.jpg) 37 | * `downloader`:指定使用的下载器,格式为数组,内容需要精确地跟 `downloader_provider.yaml` 中声明的名称一样;下载优先级将由数组顺序决定。 38 | * `download_param`:下载时传给下载器的额外参数,具体参数需要参考下载器定义。 39 | * `filter`:用于过滤标题名的正则表达式。 40 | * `use_sub_category`:qBittorrent的子分类支持,有助于高效管理番剧内容,这里使用的分类名是Mikan Project动画详情中左上角的标题。 41 | ![img](images/4.png) 42 | * `custom_category_mapping`:qBittorrent的子分类映射,用于适配用户自己的内容管理模式,例如: 43 | 44 | ```yaml 45 | custom_category_mapping: 46 | '无职转生Ⅱ ~到了异世界就拿出真本事~ 第2部分': '无职转生/Season 02' 47 | '鲁邦三世 PART6': '鲁邦三世/Season 06' 48 | '黑执事 -寄宿学校篇-': '黑执事/Season 04' 49 | ``` 50 | 51 | ## 启用配置 52 | 设置好后,直接重启Kubespider即可。 53 | ```sh 54 | docker restart kubespider 55 | ``` 56 | -------------------------------------------------------------------------------- /docs/zh/user_guide/mikanani_source_provider/images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/mikanani_source_provider/images/4.png -------------------------------------------------------------------------------- /docs/zh/user_guide/mikanani_source_provider/images/mikanani_source_provider_cfg_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/mikanani_source_provider/images/mikanani_source_provider_cfg_1.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/mikanani_source_provider/images/mikanani_source_provider_cfg_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/mikanani_source_provider/images/mikanani_source_provider_cfg_2.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/mikanani_source_provider/images/mikanani_source_provider_cfg_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/mikanani_source_provider/images/mikanani_source_provider_cfg_3.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/nexusphp_pt_provider/images/download_show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/nexusphp_pt_provider/images/download_show.png -------------------------------------------------------------------------------- /docs/zh/user_guide/nexusphp_pt_provider/images/final_show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/nexusphp_pt_provider/images/final_show.png -------------------------------------------------------------------------------- /docs/zh/user_guide/nexusphp_pt_provider/images/get_cookie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/nexusphp_pt_provider/images/get_cookie.png -------------------------------------------------------------------------------- /docs/zh/user_guide/nexusphp_pt_provider/images/rss_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/nexusphp_pt_provider/images/rss_link.png -------------------------------------------------------------------------------- /docs/zh/user_guide/plex_install_config/README.md: -------------------------------------------------------------------------------- 1 | # Plex安装和配置 2 | 3 | Plex是一套媒体播放器及媒体服务(英语:Media server)软件,让用户整理在装置上的有声书、音乐、播客、图片和影片档案,以供串流至流动装置、智能电视和电子媒体播放器(英语:Digital media player)上。Plex可用于Windows、Android、Linux、OS X。另外,Plex亦让用户透过该平台观看来自YouTube、Vimeo和TED等内容提供商的影片。 4 | 5 | ## 最终效果 6 | ![img](images/plex-video-show.jpg) 7 | 8 | ## 安装 9 | ### 1.获取Plex口令 10 | 访问[Plex Claim](https://www.plex.tv/claim/)注册,获取Plex口令代码。 11 | ![img](images/plex-claim-code.jpg) 12 | 13 | ### 2.安装Plex docker 14 | 运行如下命令即可: 15 | ```sh 16 | git clone https://github.com/opennaslab/kubespider.git 17 | cd kubespider 18 | export PLEX_CLAIM=<获取到的代码> 19 | bash hack/install_plex.sh 20 | ``` 21 | 22 | ## 配置 23 | 打开地址`http://:32400`,选择将`/nas`作为电影文件夹: 24 | ![img](images/plex-add-dir.jpg) 25 | -------------------------------------------------------------------------------- /docs/zh/user_guide/plex_install_config/images/plex-add-dir.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/plex_install_config/images/plex-add-dir.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/plex_install_config/images/plex-claim-code.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/plex_install_config/images/plex-claim-code.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/plex_install_config/images/plex-video-show.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/plex_install_config/images/plex-video-show.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/pushdeer_notification_provider/images/clipcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/pushdeer_notification_provider/images/clipcode.png -------------------------------------------------------------------------------- /docs/zh/user_guide/pushdeer_notification_provider/images/key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/pushdeer_notification_provider/images/key.png -------------------------------------------------------------------------------- /docs/zh/user_guide/pushdeer_notification_provider/images/video.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/pushdeer_notification_provider/images/video.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/pushdeer_notification_provider/images/消息.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/pushdeer_notification_provider/images/消息.png -------------------------------------------------------------------------------- /docs/zh/user_guide/pushdeer_notification_provider/images/登入.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/pushdeer_notification_provider/images/登入.png -------------------------------------------------------------------------------- /docs/zh/user_guide/pushdeer_notification_provider/images/设备.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/pushdeer_notification_provider/images/设备.png -------------------------------------------------------------------------------- /docs/zh/user_guide/pushdeer_notification_provider/images/设置.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/pushdeer_notification_provider/images/设置.png -------------------------------------------------------------------------------- /docs/zh/user_guide/qbittorrent_download_provider/images/add_tracker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/qbittorrent_download_provider/images/add_tracker.png -------------------------------------------------------------------------------- /docs/zh/user_guide/qbittorrent_download_provider/images/login_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/qbittorrent_download_provider/images/login_page.png -------------------------------------------------------------------------------- /docs/zh/user_guide/qbittorrent_download_provider/images/qbittorrent_final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/qbittorrent_download_provider/images/qbittorrent_final_show.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/qbittorrent_download_provider/images/webui_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/qbittorrent_download_provider/images/webui_config.png -------------------------------------------------------------------------------- /docs/zh/user_guide/qq_notification_provider/README.md: -------------------------------------------------------------------------------- 1 | # [QQ(go-cqhttp)](https://github.com/Mrs4s/go-cqhttp) 2 | 3 | > 目前仅支持go-cqhttp的HTTP接口 4 | > 由于QQ近日对账号登陆功能的风控,不建议使用重要的QQ账号或新账号进行登陆 5 | 6 | go-cqhttp是一个自建的QQ机器人服务,其工作方式如Telegram类似,提供了消息推送接口,效果图 7 | ![效果图](images/screenshot.png) 8 | 9 | ### 创建CQHTTP机器人 10 | 11 | - 创建一个QQ账号 12 | - 根据[官方文档](https://docs.go-cqhttp.org/guide/quick_start.html#%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B),下载并配置QQ机器人 13 | - v1.1.0版本需要自建SignServer,请参考[该issue](https://github.com/Mrs4s/go-cqhttp/issues/2242) 14 | - 使用该SignServer需要使用安卓协议,建议使用aPad协议登陆 15 | - 在启动前,务必开启GOCQHTTP的HTTP服务 16 | 17 | ### 将CQHTTP接入Kubespider 18 | 19 | 修改配置文件目录中的`notifiaction_provider.yaml`,修改以下内容 20 | 21 | ```yaml 22 | qq: 23 | type: qq_notification_provider 24 | target_qq: your qq account 25 | accessToken: cqhttp config 26 | host: cqhttp address 27 | enable: True 28 | ``` 29 | * `target_qq`: 需要收到推送信息的账号 30 | * `accessToken`: 在配置CQHTTP的HTTP服务时的设置项 31 | * `host`: CQHTTP的HTTP服务所在地址,如http://127.0.0.1:5700 32 | -------------------------------------------------------------------------------- /docs/zh/user_guide/qq_notification_provider/images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/qq_notification_provider/images/screenshot.png -------------------------------------------------------------------------------- /docs/zh/user_guide/slack_notification_provider/images/clapper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/slack_notification_provider/images/clapper.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/slack_notification_provider/images/disk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/slack_notification_provider/images/disk.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/slack_notification_provider/images/emoji-noti.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/slack_notification_provider/images/emoji-noti.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/slack_notification_provider/images/emoji-text.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/slack_notification_provider/images/emoji-text.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/slack_notification_provider/images/fire.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/slack_notification_provider/images/fire.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/slack_notification_provider/images/no_emoji-noti.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/slack_notification_provider/images/no_emoji-noti.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/slack_notification_provider/images/no_emoji-text.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/slack_notification_provider/images/no_emoji-text.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/slack_notification_provider/images/start.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/slack_notification_provider/images/start.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/synology_installation/images/synology_demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/synology_installation/images/synology_demo.png -------------------------------------------------------------------------------- /docs/zh/user_guide/synology_installation/images/synology_demo_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/synology_installation/images/synology_demo_result.png -------------------------------------------------------------------------------- /docs/zh/user_guide/synology_installation/images/synology_dir_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/synology_installation/images/synology_dir_create.png -------------------------------------------------------------------------------- /docs/zh/user_guide/synology_installation/images/synology_docker.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/synology_installation/images/synology_docker.jpeg -------------------------------------------------------------------------------- /docs/zh/user_guide/synology_installation/images/synology_edit_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/synology_installation/images/synology_edit_config.png -------------------------------------------------------------------------------- /docs/zh/user_guide/synology_installation/images/synology_editor.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/synology_installation/images/synology_editor.jpeg -------------------------------------------------------------------------------- /docs/zh/user_guide/synology_installation/images/synology_git.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/synology_installation/images/synology_git.jpeg -------------------------------------------------------------------------------- /docs/zh/user_guide/synology_installation/images/synology_ip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/synology_installation/images/synology_ip.png -------------------------------------------------------------------------------- /docs/zh/user_guide/synology_installation/images/synology_mac_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/synology_installation/images/synology_mac_login.png -------------------------------------------------------------------------------- /docs/zh/user_guide/synology_installation/images/synology_ssh.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/synology_installation/images/synology_ssh.jpeg -------------------------------------------------------------------------------- /docs/zh/user_guide/synology_installation/images/synology_windows_putty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/synology_installation/images/synology_windows_putty.png -------------------------------------------------------------------------------- /docs/zh/user_guide/synology_installation/images/synology_windows_putty_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/synology_installation/images/synology_windows_putty_login.png -------------------------------------------------------------------------------- /docs/zh/user_guide/telegram_notification_provider/README.md: -------------------------------------------------------------------------------- 1 | # Telegram 2 | 3 | Telegram notification provider 提供了 Telegram 消息推送接入 4 | 5 | 接入步骤: 6 | 7 | ### 创建机器人 8 | 9 | 添加 [@BotFather](https://telegram.me/BotFather) 10 | 11 | ![](images/botFather1.png) 12 | 13 | ![](images/botFather2.png) 14 | 15 | 完成上述步骤,即可完成bot的创建,以及得到了bot的token 16 | 17 | ### 创建频道 18 | 19 | 创建一个频道,把创建的机器人添加进去 20 | 21 | 把机器人设置为频道管理员,否则无法发送消息 22 | 23 | 频道设置为公开 24 | 25 | ![](images/channel1.png) 26 | 27 | ![](images/channel2.png) 28 | 29 | 完成上述步骤之后在频道内随便发送一句话 30 | 31 | --- 32 | 33 | ### 将 Telegram 接入 Kubespider 34 | 35 | 将 Telegram 作为消息推送 provider 接入 Kubespider: 36 | 37 | ```yaml 38 | telegram: 39 | bot_token: your bot token 40 | channel_chat_id: 41 | channel_name: your channel name 42 | enable: false 43 | host: https://api.telegram.org 44 | type: telegram_notification_provider 45 | ``` 46 | 这里包含6个配置属性: 47 | * `bot_token`: 机器人的token。 48 | * `channel_chat_id`: 需要推送消息的频道id,这个字段需要通过接口获取,这里置空。 49 | * `channel_name`: 频道名称。 50 | * `enable`: 是否启用。 51 | * `host`: Telegram host。 52 | * `type`: provider 类型。 53 | 54 | ### 初始化 55 | 56 | channel_chat_id 普通用户无法获取,所以要在第一次运行 telegram provider 的时候进行初始化。 57 | telegram provider 会通过机器人token查询update记录,上面在群聊里发送消息之后这里就能查询到message记录,从message记录里面可以提取到chat_id。 58 | 取到chat_id之后,会把chat_id写入配置文件,然后触发服务重启。 59 | 60 | ### 问题排查 61 | 62 | 如果遇到chat_id获取失败报错,可以检查token是否正确,频道名称是否正确,在频道内发送消息后再尝试。 63 | -------------------------------------------------------------------------------- /docs/zh/user_guide/telegram_notification_provider/images/botFather1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/telegram_notification_provider/images/botFather1.png -------------------------------------------------------------------------------- /docs/zh/user_guide/telegram_notification_provider/images/botFather2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/telegram_notification_provider/images/botFather2.png -------------------------------------------------------------------------------- /docs/zh/user_guide/telegram_notification_provider/images/channel1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/telegram_notification_provider/images/channel1.png -------------------------------------------------------------------------------- /docs/zh/user_guide/telegram_notification_provider/images/channel2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/telegram_notification_provider/images/channel2.png -------------------------------------------------------------------------------- /docs/zh/user_guide/terramaster_installation/images/terramaster_connect_ssh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/terramaster_installation/images/terramaster_connect_ssh.png -------------------------------------------------------------------------------- /docs/zh/user_guide/terramaster_installation/images/terramaster_create_smb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/terramaster_installation/images/terramaster_create_smb.png -------------------------------------------------------------------------------- /docs/zh/user_guide/terramaster_installation/images/terramaster_enable_ssh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/terramaster_installation/images/terramaster_enable_ssh.png -------------------------------------------------------------------------------- /docs/zh/user_guide/terramaster_installation/images/terramaster_install_docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/terramaster_installation/images/terramaster_install_docker.png -------------------------------------------------------------------------------- /docs/zh/user_guide/terramaster_installation/images/terramaster_smb_cap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/terramaster_installation/images/terramaster_smb_cap.png -------------------------------------------------------------------------------- /docs/zh/user_guide/terramaster_installation/images/terramaster_usage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/terramaster_installation/images/terramaster_usage.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/terramaster_installation/images/terramaster_windows_drive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/terramaster_installation/images/terramaster_windows_drive.png -------------------------------------------------------------------------------- /docs/zh/user_guide/terramaster_installation/images/terramaster_windows_mount_nas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/terramaster_installation/images/terramaster_windows_mount_nas.png -------------------------------------------------------------------------------- /docs/zh/user_guide/thunder_install_config/images/get_device_id.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/thunder_install_config/images/get_device_id.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/thunder_install_config/images/get_key_step1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/thunder_install_config/images/get_key_step1.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/thunder_install_config/images/get_key_step2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/thunder_install_config/images/get_key_step2.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/thunder_install_config/images/get_key_step3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/thunder_install_config/images/get_key_step3.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/thunder_install_config/images/get_xunlei_js.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/thunder_install_config/images/get_xunlei_js.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/thunder_install_config/images/xunlei_final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/thunder_install_config/images/xunlei_final_show.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/tiktok_download_provider/images/douyin_config_step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/tiktok_download_provider/images/douyin_config_step1.png -------------------------------------------------------------------------------- /docs/zh/user_guide/tiktok_download_provider/images/douyin_config_step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/tiktok_download_provider/images/douyin_config_step2.png -------------------------------------------------------------------------------- /docs/zh/user_guide/tiktok_download_provider/images/tiktok_final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/tiktok_download_provider/images/tiktok_final_show.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/tiktok_download_provider/images/tiktok_shortcut_final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/tiktok_download_provider/images/tiktok_shortcut_final_show.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/tiktok_download_provider/images/tiktok_shortcut_step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/tiktok_download_provider/images/tiktok_shortcut_step1.png -------------------------------------------------------------------------------- /docs/zh/user_guide/tiktok_download_provider/images/tiktok_shortcut_step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/tiktok_download_provider/images/tiktok_shortcut_step2.png -------------------------------------------------------------------------------- /docs/zh/user_guide/tiktok_download_provider/images/tiktok_shortcut_step3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/tiktok_download_provider/images/tiktok_shortcut_step3.png -------------------------------------------------------------------------------- /docs/zh/user_guide/tiktok_download_provider/images/tiktok_shortcut_step4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/tiktok_download_provider/images/tiktok_shortcut_step4.png -------------------------------------------------------------------------------- /docs/zh/user_guide/tiktok_source_provider/README.md: -------------------------------------------------------------------------------- 1 | # 抖音资源提供器配置 2 | 3 | ## 简介 4 | 5 | 抖音是国内最大的短视频平台,官方地址:[douyin.com](https://douyin.com/) 6 | 本资源提供器旨在实现**分享链接触发下载无水印视频**,简化下载流程。 7 | 8 | ## 最终效果 9 | 10 | 最终效果如下图,通过短视频分享按钮获取分享链接,填入Chrome扩展,Kubespider会自动下载抖音视频资源。 11 | ![img](images/tiktok_final_show.gif) 12 | 13 | ## 配置 14 | 15 | ### 1.前提 16 | 17 | 你已经安装并配置好tiktok-dlp下载器,并对接Kubespider;如果未安装,请先参照 [link](../tiktok_download_provider/README.md)安装。 18 | 19 | ### 2.配置手册 20 | 21 | 你可以通过`${HOME}/kubespider/.config/source_provider.yaml`配置,配置解释如下: 22 | 23 | ```yaml 24 | douyin_source_provider: 25 | enable: false 26 | type: tiktok_source_provider 27 | downloader: tiktok-dlp 28 | ``` 29 | 30 | * `type`:订阅源类型,需为`tiktok_source_provider`。 31 | * `enable`:是否开启此provider,因为此provider需要对应downloader支持,所以默认关闭。 32 | * `downloader`: 下载器名称,需为`tiktok-dlp`。 33 | 34 | ## 测试 35 | 36 | 设置好后,直接重启Kubespider即可。 37 | 38 | ```sh 39 | docker restart kubespider 40 | ``` 41 | 42 | 按照最终效果测试即可。 -------------------------------------------------------------------------------- /docs/zh/user_guide/tiktok_source_provider/images/tiktok_final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/tiktok_source_provider/images/tiktok_final_show.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/transmission_download_provider/images/transmission_final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/transmission_download_provider/images/transmission_final_show.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/transmission_download_provider/images/transmission_login_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/transmission_download_provider/images/transmission_login_page.png -------------------------------------------------------------------------------- /docs/zh/user_guide/trigger_download/README.md: -------------------------------------------------------------------------------- 1 | # 触发下载使用 2 | ## 简介 3 | 为了构建统一的家庭下载中心,Kubespider期望接管所有下载任务,所有资源都能被触发下载,如在Chrome中,右键某资源链接,选择`Send to Kubespider`即可触发下载。 4 | 5 | ## magnet触发下载 6 | 在Chrome游览器中,鼠标移动到magnet链接处,左下角会显示magnet:xxx,此时右键选择`Send to Kubespider`即可触发下载magnet资源: 7 | ![img](images/magnet_trigger.jpg) 8 | 9 | ## torrent触发下载 10 | 在Chrome游览器中,鼠标移动到torrent链接处,左下角会显示xxx.torrent,此时右键选择`Send to Kubespider`即可触发下载torrent资源: 11 | ![img](images/torrent_trigger.jpg) 12 | 13 | ## 通用文件触发下载 14 | 在Chrome游览器中,鼠标移动到链接处,左下角会显示相关资源链接,此时右键选择`Send to Kubespider`即可触发下载通用资源: 15 | ![img](images/general_trigger.jpg) 16 | -------------------------------------------------------------------------------- /docs/zh/user_guide/trigger_download/images/general_trigger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/trigger_download/images/general_trigger.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/trigger_download/images/magnet_trigger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/trigger_download/images/magnet_trigger.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/trigger_download/images/torrent_trigger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/trigger_download/images/torrent_trigger.jpg -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/aria-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/aria-3.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/aria-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/aria-4.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/aria-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/aria-5.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/aria-new-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/aria-new-1.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/aria-new-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/aria-new-2.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/aria-new-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/aria-new-5.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/aria-new-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/aria-new-6.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/aria-new-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/aria-new-7.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/create-dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/create-dir.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/download-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/download-code.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/download.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/import-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/import-image.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/install-docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/install-docker.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/kubespider-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/kubespider-1.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/kubespider-chrome-ext-usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/kubespider-chrome-ext-usage.png -------------------------------------------------------------------------------- /docs/zh/user_guide/ugreen_installation/images/ubuntu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ugreen_installation/images/ubuntu.png -------------------------------------------------------------------------------- /docs/zh/user_guide/unraid_installation/images/01-newstack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/unraid_installation/images/01-newstack.png -------------------------------------------------------------------------------- /docs/zh/user_guide/unraid_installation/images/02-composefile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/unraid_installation/images/02-composefile.png -------------------------------------------------------------------------------- /docs/zh/user_guide/unraid_installation/images/03-savestack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/unraid_installation/images/03-savestack.png -------------------------------------------------------------------------------- /docs/zh/user_guide/unraid_installation/images/04-kubespider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/unraid_installation/images/04-kubespider.png -------------------------------------------------------------------------------- /docs/zh/user_guide/unraid_installation/images/05-installyutto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/unraid_installation/images/05-installyutto.png -------------------------------------------------------------------------------- /docs/zh/user_guide/unraid_installation/images/06-composerize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/unraid_installation/images/06-composerize.png -------------------------------------------------------------------------------- /docs/zh/user_guide/unraid_installation/images/07-yuttostack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/unraid_installation/images/07-yuttostack.png -------------------------------------------------------------------------------- /docs/zh/user_guide/unraid_installation/images/08-yuttouilabel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/unraid_installation/images/08-yuttouilabel.png -------------------------------------------------------------------------------- /docs/zh/user_guide/unraid_installation/images/09-yutto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/unraid_installation/images/09-yutto.png -------------------------------------------------------------------------------- /docs/zh/user_guide/youget_download_provider/images/bilibili_config_step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/youget_download_provider/images/bilibili_config_step1.png -------------------------------------------------------------------------------- /docs/zh/user_guide/youget_download_provider/images/bilibili_config_step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/youget_download_provider/images/bilibili_config_step2.png -------------------------------------------------------------------------------- /docs/zh/user_guide/youget_download_provider/images/bilibili_config_step3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/youget_download_provider/images/bilibili_config_step3.png -------------------------------------------------------------------------------- /docs/zh/user_guide/youget_download_provider/images/bilibili_config_step4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/youget_download_provider/images/bilibili_config_step4.png -------------------------------------------------------------------------------- /docs/zh/user_guide/youget_download_provider/images/bilibili_config_step5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/youget_download_provider/images/bilibili_config_step5.png -------------------------------------------------------------------------------- /docs/zh/user_guide/youget_download_provider/images/youget_final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/youget_download_provider/images/youget_final_show.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/youtube_source_provider/README.md: -------------------------------------------------------------------------------- 1 | # YouTube资源提供器配置 2 | ## 简介 3 | YouTube是一个美国网络视频共享网站,总部设在加利福尼亚州的圣布鲁诺。 该服务由史蒂夫-陈和贾维德-卡里姆于2005年2月推出,于2006年10月被谷歌以16.5亿美元收购。 自发布以来,YouTube已经成为互联网上最大的搜索引擎之一,每天接收数十亿的观众。 4 | 官方地址:[youtube.com](https://youtube.com/) 5 | 本资源提供器旨在实现**链接触发下载**,简化下载流程。 6 | 7 | ## 最终效果 8 | 最终效果如下图,在Chrome中右键,选择`Send to Kubespider`,Kubespider会自动下载YouTube视频资源。 9 | ![img](images/youtube_final_show.gif) 10 | 11 | ## 配置 12 | ### 1.前提 13 | 你已经安装并配置好yt-dlp下载器,并对接Kubespider;如果未安装,请先参照 [link](../ytdlp_download_provider/README.md) 安装。 14 | 15 | ### 2.配置手册 16 | 你可以通过`${HOME}/kubespider/.config/source_provider.yaml`配置,配置解释如下: 17 | ```yaml 18 | youtube_source_provider: 19 | type: youtube_source_provider 20 | enable: true 21 | downloader: yt-dlp 22 | ``` 23 | 24 | 其中: 25 | * `youtube_source_provider`: 名称,可自定义(不可重复),可以在 `source_provider.yaml` 中按名称指定下载器,此处示例为 youtube_source_provider。 26 | * `type`: 表示此下载器的类型,需为 `youtube_source_provider`。 27 | * `downloader`: 指定使用的download软件,如果不需要高级下载策略,这里无需修改。 28 | * `enable`: 设置是否使用此provider,只能使用一个,后续开发优先级后可以多个一起使用。 29 | 30 | ## 测试 31 | 设置好后,直接重启Kubespider即可。 32 | ```sh 33 | docker restart kubespider 34 | ``` 35 | 36 | 安装最终效果测试即可。 -------------------------------------------------------------------------------- /docs/zh/user_guide/youtube_source_provider/images/youtube_final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/youtube_source_provider/images/youtube_final_show.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/ytdlp_download_provider/images/ytdlp_final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/ytdlp_download_provider/images/ytdlp_final_show.gif -------------------------------------------------------------------------------- /docs/zh/user_guide/yutto_download_provider/README.md: -------------------------------------------------------------------------------- 1 | # yutto 下载提供器安装和配置 2 | ## 简介 3 | [yutto](https://github.com/yutto-dev/yutto) 是一个开源的命令行工具,一个可爱且任性的 B 站视频下载器(bilili V2)。 4 | 5 | ## 最终效果 6 | 效果如图,结合 yutto,Kubespider会调用 yutto,下载Bilibili视频: 7 | 8 | ![img](images/yutto_final_show.gif) 9 | 10 | ## 安装 11 | ### 1.获取bilibili配置 12 | 为了下载高清视频,有时候需要设置认证cookie: 13 | 14 | #### 1.获取cookie 15 | 1.打开chrome的隐身模式 16 | 17 | 18 | 19 | 2.登陆bilibili 20 | 21 | 22 | 23 | 3.F12选择network,查看cookie信息 24 | 25 | 26 | 27 | 找到关键信息并复制:`SESSDATA=xxx; bili_jct=xxx;` 28 | 这里复制SESSDATA后,bilibili_jct之前的的类容,如复制:`b8fab4a9%2C1718252...FRIIE` 29 | 30 | ### 2.安装yutto 31 | 运行如下命令即可: 32 | ```sh 33 | git clone https://github.com/opennaslab/kubespider.git 34 | cd kubespider 35 | # 前面获取到的cookie值 36 | export BILIBILI_SESSDATA=b8fab4a9%2C1718252...FRIIE 37 | bash hack/install_yutto.sh 38 | ``` 39 | 40 | ### 3.确认安装 41 | 运行如下命令,确认yutto已经安装成功: 42 | ```sh 43 | docker ps | grep yutto 44 | ``` 45 | 46 | ## Kubespider对接配置(可选) 47 | ### 1.设置download_provider文件 48 | 49 | 配置文件如下: 50 | 51 | ```yaml 52 | yutto: 53 | type: yutto_download_provider 54 | enable: false 55 | http_endpoint_host: http://127.0.0.1 56 | http_endpoint_port: 3084 57 | priority: 1 58 | ``` 59 | 60 | 其中: 61 | 62 | * 名称,可自定义(不可重复),可以在 `source_provider.yaml` 中按名称指定下载器。 63 | * `type`: 表示此下载器的类型,需为 `yutto_download_provider`。 64 | * `enable`: 设置是否使用此provider。 65 | * `http_endpoint_host`: yutto下载软件IP地址。 66 | * `http_endpoint`: yutto下载软件IP端口。 67 | * `priority`: 下载提供器优先级,数字越小,优先级越高,下载资源时按优先级尝试,无法下载或下载失败时切换下载器。 68 | 69 | ### 2.测试下载 70 | 配置好后,运行如下命令: 71 | ``` 72 | docker restart kubespider 73 | ``` 74 | 按最终效果图测试一下即可。 -------------------------------------------------------------------------------- /docs/zh/user_guide/yutto_download_provider/images/bilibili_config_step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/yutto_download_provider/images/bilibili_config_step1.png -------------------------------------------------------------------------------- /docs/zh/user_guide/yutto_download_provider/images/bilibili_config_step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/yutto_download_provider/images/bilibili_config_step2.png -------------------------------------------------------------------------------- /docs/zh/user_guide/yutto_download_provider/images/bilibili_config_step3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/yutto_download_provider/images/bilibili_config_step3.png -------------------------------------------------------------------------------- /docs/zh/user_guide/yutto_download_provider/images/yutto_final_show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/docs/zh/user_guide/yutto_download_provider/images/yutto_final_show.gif -------------------------------------------------------------------------------- /downloaders/tiktok-dlp/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10-alpine 2 | 3 | ENV HOME="/app" \ 4 | PUID=1000 \ 5 | PGID=1000 \ 6 | UMASK=022 \ 7 | TZ=Asia/Shanghai 8 | 9 | WORKDIR /app 10 | 11 | COPY ./app ./ 12 | COPY requirements.txt ./ 13 | 14 | RUN set -ex \ 15 | && apk add --no-cache \ 16 | nodejs \ 17 | npm \ 18 | bash \ 19 | su-exec \ 20 | tzdata \ 21 | shadow \ 22 | && mkdir -p /app/downloads \ 23 | && mkdir -p /app/config \ 24 | && python3 -m pip install --upgrade pip \ 25 | && pip install -r requirements.txt \ 26 | && addgroup -S tiktokdlp -g 911 \ 27 | && adduser -S tiktokdlp -G tiktokdlp -h /app -u 911 -s /bin/bash tiktokdlp 28 | 29 | COPY --chmod=755 entrypoint.sh /entrypoint.sh 30 | 31 | ENTRYPOINT [ "/entrypoint.sh" ] 32 | 33 | CMD ["python3", "/app/app.py"] 34 | 35 | EXPOSE 3083 36 | -------------------------------------------------------------------------------- /downloaders/tiktok-dlp/app/app.py: -------------------------------------------------------------------------------- 1 | import _thread 2 | import logging 3 | import time 4 | 5 | from core import webhook 6 | from core import tasks 7 | 8 | logging.basicConfig(level=logging.INFO, format='%(asctime)s-%(levelname)s: %(message)s') 9 | 10 | 11 | def tiktok_dlp_main(): 12 | _thread.start_new_thread(run_tiktok_dlp_webhook, ()) 13 | _thread.start_new_thread(run_tiktok_dlp_tasks, ()) 14 | while True: 15 | time.sleep(1) 16 | 17 | 18 | def run_tiktok_dlp_webhook(): 19 | logging.info("tiktok-dlp webhook is running...") 20 | webhook.tiktok_dlp.run(host='0.0.0.0', port=3083) 21 | 22 | 23 | def run_tiktok_dlp_tasks(): 24 | logging.info("tiktok-dlp tasks is running...") 25 | tasks.tiktok_dlp_tasks.run() 26 | 27 | 28 | if __name__ == "__main__": 29 | tiktok_dlp_main() 30 | -------------------------------------------------------------------------------- /downloaders/tiktok-dlp/app/core/webhook.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | 4 | from flask import Flask, jsonify, request 5 | from core import tasks 6 | 7 | tiktok_dlp = Flask(__name__) 8 | 9 | 10 | @tiktok_dlp.route('/api/v1/download', methods=['POST']) 11 | def download_handler(): 12 | para = json.loads(request.data.decode("utf-8")) 13 | para['path'] = os.path.join('/app/downloads', para['path']) 14 | tasks.tiktok_dlp_tasks.equeue(tasks.DownloadTask(para, 0)) 15 | return send_ok_response() 16 | 17 | 18 | def send_ok_response(): 19 | resp = jsonify('OK') 20 | resp.status_code = 200 21 | resp.content_type = 'application/text' 22 | return resp 23 | -------------------------------------------------------------------------------- /downloaders/tiktok-dlp/app/thirdparty/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' -------------------------------------------------------------------------------- /downloaders/tiktok-dlp/app/thirdparty/common/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from .utils import Utils 5 | 6 | utils = Utils() 7 | -------------------------------------------------------------------------------- /downloaders/tiktok-dlp/app/thirdparty/douyin/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import thirdparty 5 | from thirdparty.common import utils 6 | 7 | douyin_headers = { 8 | 'User-Agent': thirdparty.ua, 9 | 'referer': 'https://www.douyin.com/', 10 | 'accept-encoding': None, 11 | 'Cookie': f"msToken={utils.generate_random_str(107)}; ttwid={utils.getttwid()}; odin_tt=324fb4ea4a89c0c05827e18a1ed9cf9bf8a17f7705fcc793fec935b637867e2a5a9b8168c885554d029919117a18ba69; passport_csrf_token=f61602fc63757ae0e4fd9d6bdcee4810;" 12 | } 13 | -------------------------------------------------------------------------------- /downloaders/tiktok-dlp/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | groupmod -o -g ${PGID} tiktokdlp 4 | usermod -o -u ${PUID} tiktokdlp 5 | 6 | chown -R tiktokdlp:tiktokdlp /app 7 | 8 | umask ${UMASK} 9 | 10 | exec su-exec tiktokdlp:tiktokdlp $@ -------------------------------------------------------------------------------- /downloaders/tiktok-dlp/requirements.txt: -------------------------------------------------------------------------------- 1 | requests==2.32.2 2 | flask==2.2.5 3 | tqdm==4.66.3 4 | PyYAML==6.0.1 -------------------------------------------------------------------------------- /downloaders/you-get/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM python:3.10-alpine 4 | 5 | ENV HOME="/app" \ 6 | PUID=1000 \ 7 | PGID=1000 \ 8 | UMASK=022 \ 9 | TZ=Asia/Shanghai 10 | 11 | WORKDIR /app 12 | 13 | COPY requirements.txt ./ 14 | COPY app app 15 | 16 | RUN set -ex \ 17 | && apk add --no-cache \ 18 | bash \ 19 | su-exec \ 20 | tzdata \ 21 | shadow \ 22 | ffmpeg \ 23 | && mkdir -p /app/downloads \ 24 | && mkdir -p /app/config \ 25 | && python3 -m pip install --upgrade pip \ 26 | && pip install -r requirements.txt \ 27 | && addgroup -S youget -g 911 \ 28 | && adduser -S youget -G youget -h /app -u 911 -s /bin/bash youget \ 29 | && rm -rf \ 30 | /app/.cache \ 31 | /tmp/* 32 | 33 | COPY --chmod=755 entrypoint.sh /entrypoint.sh 34 | 35 | ENTRYPOINT [ "/entrypoint.sh" ] 36 | 37 | CMD ["python3", "/app/app/app.py"] 38 | 39 | EXPOSE 3081 -------------------------------------------------------------------------------- /downloaders/you-get/README.md: -------------------------------------------------------------------------------- 1 | # you-get downloader 2 | 3 | ## Summary 4 | [You-Get](https://github.com/soimort/you-get) is a tiny command-line utility to download media contents (videos, audios, images) from the Web, in case there is no other handy way to do it. 5 | 6 | In order to implement trigger downloading, this repository build a docker image with you-get to accept http download trigger. 7 | 8 | ## Installation 9 | Run with following command to install: 10 | ```sh 11 | docker run --name youget -d \ 12 | --network=host \ 13 | -e BILIBILI_COOKIE_PATH=/app/config/bilibili_cookie.txt \ 14 | -v ${HOME}/kubespider/youget:/app/config \ 15 | -v ${HOME}/kubespider/nas/:/app/downloads \ 16 | --restart unless-stopped cesign/youget-downloader:latest 17 | ``` 18 | `/app/config`: cookie config path. 19 | `/app/downloads`: download file store path. 20 | `BILIBILI_COOKIE_PATH`: bilibili cookie path. 21 | 22 | ## Build 23 | Build with following command(If you have no proxy, please delete --build-arg HTTP_PROXY=http://xxx --build-arg HTTPS_PROXY=http://xxx): 24 | ```sh 25 | # Go to the directory where this README.md exists 26 | docker build -t cesign/youget-downloader . --build-arg HTTP_PROXY=http://xxx --build-arg HTTPS_PROXY=http://xxx 27 | ``` -------------------------------------------------------------------------------- /downloaders/you-get/app/app.py: -------------------------------------------------------------------------------- 1 | import _thread 2 | import logging 3 | import time 4 | 5 | from core import webhook 6 | from core import tasks 7 | 8 | logging.basicConfig(level=logging.INFO, format='%(asctime)s-%(levelname)s: %(message)s') 9 | 10 | def you_get_main(): 11 | _thread.start_new_thread(run_you_get_webhook, ()) 12 | _thread.start_new_thread(run_you_get_tasks, ()) 13 | while True: 14 | time.sleep(1) 15 | 16 | def run_you_get_webhook(): 17 | logging.info("you-get webhook is running...") 18 | webhook.you_get_server.run(host='0.0.0.0', port=3081) 19 | 20 | def run_you_get_tasks(): 21 | logging.info("you-get tasks is running...") 22 | tasks.you_get_tasks.run() 23 | 24 | if __name__ == "__main__": 25 | you_get_main() 26 | -------------------------------------------------------------------------------- /downloaders/you-get/app/core/values.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | config_map = { 4 | 'bilibili': os.getenv('BILIBILI_COOKIE_PATH') 5 | } 6 | -------------------------------------------------------------------------------- /downloaders/you-get/app/core/webhook.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | 4 | from flask import Flask,jsonify,request 5 | 6 | from core import tasks 7 | 8 | you_get_server = Flask(__name__) 9 | 10 | @you_get_server.route('/api/v1/download', methods = ['POST']) 11 | def download_handler(): 12 | data = json.loads(request.data.decode("utf-8")) 13 | source = data['dataSource'] 14 | path = os.path.join('/app/downloads', data['path']) 15 | args = [source, '-o', path] 16 | 17 | tasks.you_get_tasks.equeue(tasks.DownloadTask(args, 0)) 18 | return send_ok_response() 19 | 20 | def send_ok_response(): 21 | resp = jsonify('OK') 22 | resp.status_code = 200 23 | resp.content_type = 'application/text' 24 | return resp 25 | -------------------------------------------------------------------------------- /downloaders/you-get/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | groupmod -o -g ${PGID} youget 4 | usermod -o -u ${PUID} youget 5 | 6 | chown -R youget:youget /app 7 | 8 | umask ${UMASK} 9 | 10 | exec su-exec youget:youget $@ -------------------------------------------------------------------------------- /downloaders/you-get/requirements.txt: -------------------------------------------------------------------------------- 1 | requests==2.32.2 2 | flask==2.2.5 3 | you-get==0.4.1650 4 | -------------------------------------------------------------------------------- /downloaders/yt-dlp/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM python:3.10-alpine 4 | 5 | ENV HOME="/app" \ 6 | PUID=1000 \ 7 | PGID=1000 \ 8 | UMASK=022 \ 9 | TZ=Asia/Shanghai 10 | 11 | WORKDIR /app 12 | 13 | COPY requirements.txt ./ 14 | COPY app app 15 | 16 | RUN set -ex \ 17 | && apk add --no-cache \ 18 | bash \ 19 | su-exec \ 20 | tzdata \ 21 | shadow \ 22 | ffmpeg \ 23 | gcc \ 24 | libc-dev \ 25 | libffi-dev \ 26 | && mkdir -p /app/downloads \ 27 | && mkdir -p /app/config \ 28 | && python3 -m pip install --upgrade pip \ 29 | && pip install -r requirements.txt \ 30 | && addgroup -S ytdlp -g 911 \ 31 | && adduser -S ytdlp -G ytdlp -h /app -u 911 -s /bin/bash ytdlp \ 32 | && rm -rf \ 33 | /app/.cache \ 34 | /tmp/* 35 | 36 | COPY --chmod=755 entrypoint.sh /entrypoint.sh 37 | 38 | ENTRYPOINT [ "/entrypoint.sh" ] 39 | 40 | CMD ["server"] 41 | 42 | EXPOSE 3082 -------------------------------------------------------------------------------- /downloaders/yt-dlp/README.md: -------------------------------------------------------------------------------- 1 | # yt-dlp downloader 2 | 3 | ## Summary 4 | [yt-dlp](https://github.com/yt-dlp/yt-dlp): A youtube-dl fork with additional features and fixes 5 | 6 | In order to implement trigger downloading, this repository build a docker image with yt-dlp to accept http download trigger. 7 | 8 | ## Installation 9 | Run with following command to install: 10 | ```sh 11 | docker run --name yt-dlp -d \ 12 | --network=host \ 13 | -e YOUTUBE_PROXY=${http_proxy} \ 14 | -v ${HOME}/kubespider/yt-dlp:/root/config \ 15 | -v ${HOME}/kubespider/nas/:/root/downloads \ 16 | --restart unless-stopped cesign/ytdlp-downloader:latest 17 | ``` 18 | `/root/config`: cookie config path. 19 | `/root/downloads`: download file store path. 20 | `YOUTUBE_PROXY`: proxy used to download videos from YouTube, it could be empty. 21 | 22 | ## Build 23 | Build with following command(If you have no proxy, please delete --build-arg HTTP_PROXY=http://xxx --build-arg HTTPS_PROXY=http://xxx): 24 | ```sh 25 | # Go to the directory where this README.md exists 26 | docker build -t cesign/ytdlp-downloader . --build-arg HTTP_PROXY=http://xxx --build-arg HTTPS_PROXY=http://xxx 27 | ``` -------------------------------------------------------------------------------- /downloaders/yt-dlp/app/app.py: -------------------------------------------------------------------------------- 1 | import _thread 2 | import logging 3 | import time 4 | 5 | from core import tasks 6 | from core import webhook 7 | 8 | logging.basicConfig(level=logging.INFO, format='%(asctime)s-%(levelname)s: %(message)s') 9 | 10 | def ytdlp_main(): 11 | _thread.start_new_thread(run_ytdlp_webhook, ()) 12 | _thread.start_new_thread(run_ytdlp_tasks, ()) 13 | while True: 14 | time.sleep(1) 15 | 16 | def run_ytdlp_webhook(): 17 | logging.info("yt-dlp webhook is running...") 18 | webhook.ytdlp_server.run(host='0.0.0.0', port=3082) 19 | 20 | def run_ytdlp_tasks(): 21 | logging.info("yt-dlp tasks is running...") 22 | tasks.yt_dlp_tasks.run() 23 | 24 | if __name__ == "__main__": 25 | ytdlp_main() 26 | -------------------------------------------------------------------------------- /downloaders/yt-dlp/app/core/webhook.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | 4 | from flask import Flask,jsonify,request 5 | 6 | from core import tasks 7 | 8 | ytdlp_server = Flask(__name__) 9 | 10 | @ytdlp_server.route('/api/v1/download', methods = ['POST']) 11 | def download_handler(): 12 | para = json.loads(request.data.decode("utf-8")) 13 | para['path'] = os.path.join('/app/downloads', para['path']) 14 | 15 | tasks.yt_dlp_tasks.equeue(tasks.DownloadTask(para, 0)) 16 | return send_ok_response() 17 | 18 | def send_ok_response(): 19 | resp = jsonify('OK') 20 | resp.status_code = 200 21 | resp.content_type = 'application/text' 22 | return resp 23 | -------------------------------------------------------------------------------- /downloaders/yt-dlp/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # This configuration file is for the **development** setup. 2 | version: "2.2" 3 | x-yt-dlp: &yt-dlp 4 | build: 5 | context: . 6 | # args: 7 | volumes: 8 | - .:/app 9 | # env_file: 10 | # - .env 11 | 12 | services: 13 | server: 14 | <<: *yt-dlp 15 | command: dev_server 16 | ports: 17 | - "3082:3082" 18 | # environment: 19 | 20 | -------------------------------------------------------------------------------- /downloaders/yt-dlp/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | groupmod -o -g ${PGID} ytdlp 4 | usermod -o -u ${PUID} ytdlp 5 | 6 | chown -R ytdlp:ytdlp /app 7 | 8 | umask ${UMASK} 9 | 10 | case "$1" in 11 | server) 12 | exec su-exec ytdlp:ytdlp python3 /app/app/app.py 13 | ;; 14 | dev_server) 15 | exec su-exec ytdlp:ytdlp watchmedo auto-restart --directory=./app/ --pattern=*.py --recursive -- python3 /app/app/app.py 16 | ;; 17 | *) 18 | exec su-exec ytdlp:ytdlp "$@" 19 | ;; 20 | esac -------------------------------------------------------------------------------- /downloaders/yt-dlp/requirements.txt: -------------------------------------------------------------------------------- 1 | Brotli==1.1.0 2 | certifi==2025.1.31 3 | charset-normalizer==3.4.1 4 | click==8.1.8 5 | Flask==2.2.5 6 | idna==3.10 7 | itsdangerous==2.2.0 8 | Jinja2==3.1.5 9 | MarkupSafe==3.0.2 10 | mutagen==1.47.0 11 | pycryptodomex==3.21.0 12 | requests==2.32.0 13 | urllib3==2.3.0 14 | watchdog==3.0.0 15 | websockets==14.2 16 | Werkzeug==3.1.3 17 | yt-dlp==2025.1.26 -------------------------------------------------------------------------------- /downloaders/yutto/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM python:3.10-alpine 4 | 5 | ENV HOME="/app" \ 6 | PUID=1000 \ 7 | PGID=1000 \ 8 | UMASK=022 \ 9 | TZ=Asia/Shanghai 10 | 11 | WORKDIR /app 12 | 13 | COPY requirements.txt ./ 14 | COPY app app 15 | 16 | RUN set -ex \ 17 | && apk add --no-cache \ 18 | bash \ 19 | su-exec \ 20 | tzdata \ 21 | shadow \ 22 | ffmpeg \ 23 | && apk add --no-cache --virtual=build-dependencies \ 24 | build-base \ 25 | gcc \ 26 | g++ \ 27 | make \ 28 | libffi-dev \ 29 | libc-dev \ 30 | linux-headers \ 31 | postgresql-dev \ 32 | && mkdir -p /app/downloads \ 33 | && mkdir -p /app/config \ 34 | && python3 -m pip install --upgrade pip \ 35 | && pip install -r requirements.txt \ 36 | && addgroup -S yutto -g 911 \ 37 | && adduser -S yutto -G yutto -h /app -u 911 -s /bin/bash yutto \ 38 | && apk del --purge build-dependencies \ 39 | && rm -rf \ 40 | /app/.cache \ 41 | /tmp/* 42 | 43 | COPY --chmod=755 entrypoint.sh /entrypoint.sh 44 | 45 | ENTRYPOINT [ "/entrypoint.sh" ] 46 | 47 | CMD ["python3", "/app/app/app.py"] 48 | 49 | EXPOSE 3084 -------------------------------------------------------------------------------- /downloaders/yutto/README.md: -------------------------------------------------------------------------------- 1 | # yutto downloader 2 | 3 | ## Summary 4 | [Yutto](https://github.com/yutto-dev/yutto),A cute and willful Bilibili downloader (CLI). 5 | 6 | In order to implement trigger downloading, this repository build a docker image with yutto to accept http download trigger. 7 | 8 | ## Installation 9 | Run with following command to install: 10 | ```sh 11 | docker run -d \ 12 | --name yutto \ 13 | --network=host \ 14 | -e BILIBILI_SESSDATA='d8bc7493%2C2843925707%2C08c3e*81' \ 15 | -v ${HOME}/kubespider/yutto:/app/config \ 16 | -v ${HOME}/kubespider/nas/:/app/downloads \ 17 | --restart unless-stopped \ 18 | cesign/yutto-downloader:latest 19 | ``` 20 | `/app/config`: config path. 21 | `/app/downloads`: download file store path. 22 | `BILIBILI_SESSDATA`: bilibili cookie SESSDATA. 23 | 24 | ## Build 25 | Build with following command(If you have no proxy, please delete --build-arg HTTP_PROXY=http://xxx --build-arg HTTPS_PROXY=http://xxx): 26 | ```sh 27 | # Go to the directory where this README.md exists 28 | docker build -t cesign/yutto-downloader . --build-arg HTTP_PROXY=http://xxx --build-arg HTTPS_PROXY=http://xxx 29 | ``` -------------------------------------------------------------------------------- /downloaders/yutto/app/app.py: -------------------------------------------------------------------------------- 1 | import _thread 2 | import logging 3 | import time 4 | 5 | from core import webhook 6 | from core import tasks 7 | 8 | logging.basicConfig(level=logging.INFO, format='%(asctime)s-%(levelname)s: %(message)s') 9 | 10 | def yutto_main(): 11 | _thread.start_new_thread(run_yutto_webhook, ()) 12 | _thread.start_new_thread(run_yutto_tasks, ()) 13 | while True: 14 | time.sleep(1) 15 | 16 | def run_yutto_webhook(): 17 | logging.info("yutto webhook is running...") 18 | webhook.yutto_server.run(host='0.0.0.0', port=3084) 19 | 20 | def run_yutto_tasks(): 21 | logging.info("yutto tasks is running...") 22 | tasks.yutto_tasks.run() 23 | 24 | if __name__ == "__main__": 25 | yutto_main() 26 | -------------------------------------------------------------------------------- /downloaders/yutto/app/core/values.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | config_map = { 4 | 'bilibili': os.getenv('BILIBILI_SESSDATA') 5 | } 6 | -------------------------------------------------------------------------------- /downloaders/yutto/app/core/webhook.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | 4 | from flask import Flask,jsonify,request 5 | 6 | from core import tasks 7 | 8 | yutto_server = Flask(__name__) 9 | 10 | @yutto_server.route('/api/v1/download', methods = ['POST']) 11 | def download_handler(): 12 | data = json.loads(request.data.decode("utf-8")) 13 | source = data['dataSource'] 14 | path = os.path.join('/app/downloads', data['path']) 15 | args = [source, '--dir', path] 16 | 17 | tasks.yutto_tasks.equeue(tasks.DownloadTask(args, 0)) 18 | return send_ok_response() 19 | 20 | def send_ok_response(): 21 | resp = jsonify('OK') 22 | resp.status_code = 200 23 | resp.content_type = 'application/text' 24 | return resp 25 | -------------------------------------------------------------------------------- /downloaders/yutto/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | groupmod -o -g ${PGID} yutto 4 | usermod -o -u ${PUID} yutto 5 | 6 | chown -R yutto:yutto /app 7 | 8 | umask ${UMASK} 9 | 10 | exec su-exec yutto:yutto $@ -------------------------------------------------------------------------------- /downloaders/yutto/requirements.txt: -------------------------------------------------------------------------------- 1 | requests==2.32.0 2 | flask==2.2.5 3 | yutto==2.0.0b37 4 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | groupmod -o -g ${PGID} kubespider 4 | usermod -o -u ${PUID} kubespider 5 | 6 | chown -R kubespider:kubespider /app 7 | 8 | umask ${UMASK} 9 | 10 | 11 | case "$1" in 12 | server) 13 | exec python3 /app/kubespider/app.py 14 | ;; 15 | dev_server) 16 | exec watchmedo auto-restart --directory=./kubespider --pattern=*.py --recursive -- python3 /app/kubespider/app.py 17 | ;; 18 | *) 19 | exec "$@" 20 | ;; 21 | esac 22 | 23 | su-exec kubespider:kubespider $@ -------------------------------------------------------------------------------- /hack/env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export KUBESPIDER_HOME=${KUBESPIDER_HOME:-${HOME}} 4 | 5 | # Echo logo 6 | cat << "EOF" 7 | _ _ _ _ 8 | | | ___ _| |__ ___ ___ _ __ (_) __| | ___ _ __ 9 | | |/ / | | | '_ \ / _ \/ __| '_ \| |/ _` |/ _ \ '__| 10 | | <| |_| | |_) | __/\__ \ |_) | | (_| | __/ | 11 | |_|\_\\__,_|_.__/ \___||___/ .__/|_|\__,_|\___|_| 12 | |_| 13 | EOF 14 | -------------------------------------------------------------------------------- /hack/install_baidunetdisk.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # 1.Load env and echo logo 6 | source hack/env.sh 7 | 8 | echo "[INFO] Start to deploy baidu net disk..." 9 | 10 | # 2.Check env 11 | ret=`docker version` 12 | if [[ $? != 0 ]]; then 13 | echo "[ERROR] Please install docker" 14 | exit 1 15 | fi 16 | 17 | # 3.Create necessary directory 18 | mkdir -p ${KUBESPIDER_HOME}/kubespider/nas/ 19 | mkdir -p ${KUBESPIDER_HOME}/kubespider/baidunetdisk/ 20 | 21 | # 4.Set registry 22 | source hack/util.sh 23 | util::set_registry_for_image 24 | 25 | # 5.Install baidu net disk 26 | docker run -itd --name=baidunetdisk \ 27 | -p 5800:5800 \ 28 | -p 5900:5900 \ 29 | -v ${KUBESPIDER_HOME}/kubespider/baidu:/config \ 30 | -v ${KUBESPIDER_HOME}/kubespider/nas:/config/baidunetdiskdownload \ 31 | --restart unless-stopped \ 32 | ${image_registry}/baidunetdisk:latest 33 | 34 | # 4. Notice 35 | echo "[INFO] Deploy baidu net disk success, enjoy your time..." 36 | echo "[INFO] Biadu web address is: http://:5800" -------------------------------------------------------------------------------- /hack/install_jellyfin.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # 1.Load env and echo logo 6 | source hack/env.sh 7 | 8 | echo "[INFO] Start to deploy jellyfin ..." 9 | 10 | # 2. Creat directory 11 | mkdir -p ${KUBESPIDER_HOME}/kubespider/jellyfin/ 12 | 13 | # 3. Install Jellyfin 14 | docker run -d -p 8096:8096 \ 15 | -v ${KUBESPIDER_HOME}/kubespider/jellyfin/:/config \ 16 | -v ${KUBESPIDER_HOME}/kubespider/nas/:/media \ 17 | --name jellyfin \ 18 | --restart unless-stopped jellyfin/jellyfin 19 | 20 | # 4. Notice 21 | echo "[INFO] Deploy Jellyfin success, enjoy your time..." 22 | echo "[INFO] Jellyfin UI address is: http://:8096" 23 | -------------------------------------------------------------------------------- /hack/install_plex.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # 1.Load env and echo logo 6 | source hack/env.sh 7 | 8 | echo "[INFO] Start to deploy plex ..." 9 | 10 | # 2. Check cliam code 11 | claim=${PLEX_CLAIM} 12 | if [[ $claim == "" ]];then 13 | echo "[ERROR] Please set your claim by env: PLEX_CLAIM" 14 | exit 1 15 | fi 16 | 17 | # 3. Creat directory 18 | mkdir -p ${KUBESPIDER_HOME}/kubespider/plex/ 19 | 20 | # 4.Set registry 21 | source hack/util.sh 22 | util::set_registry_for_image 23 | 24 | # 5. Install Plex 25 | docker run -itd --name plex \ 26 | -p 32400:32400 \ 27 | -v ${KUBESPIDER_HOME}/kubespider/plex:/config \ 28 | -v ${KUBESPIDER_HOME}/kubespider/nas:/nas \ 29 | -e PUID=$UID \ 30 | -e VERSION=docker \ 31 | -e PLEX_CLAIM=${claim} \ 32 | -e PGID=$GID \ 33 | --restart unless-stopped \ 34 | ${image_registry}/plex:latest 35 | 36 | # 5. Notice 37 | echo "[INFO] Deploy flex success, enjoy your time..." 38 | echo "[INFO] Plex UI address is: http://:32400" -------------------------------------------------------------------------------- /hack/install_qbittorrent.sh: -------------------------------------------------------------------------------- 1 | # Ref: https://github.com/SuperNG6/Docker-qBittorrent-Enhanced-Edition 2 | #!/usr/bin/env bash 3 | 4 | set -e 5 | 6 | # 1.Load env and echo logo 7 | source hack/env.sh 8 | 9 | echo "[INFO] Start to deploy qbittorrent..." 10 | 11 | # 2.Check env 12 | ret=`docker version` 13 | if [[ $? != 0 ]]; then 14 | echo "[ERROR] Please install docker" 15 | exit 1 16 | fi 17 | 18 | # 3.Create necessary directory 19 | mkdir -p ${KUBESPIDER_HOME}/kubespider/qbittorrent/ 20 | 21 | # 4.Set registry 22 | source hack/util.sh 23 | util::set_registry_for_image 24 | 25 | # 5.Install qbittorrent 26 | docker run -itd \ 27 | --name=qbittorrentee \ 28 | -e WEBUIPORT=8080 \ 29 | -e PUID=$UID \ 30 | -e PGID=$GID \ 31 | -e TZ=Asia/Shanghai \ 32 | --network=host \ 33 | -v ${KUBESPIDER_HOME}/kubespider/qbittorrent/:/config \ 34 | -v ${KUBESPIDER_HOME}/kubespider/nas/:/downloads \ 35 | --restart unless-stopped \ 36 | superng6/qbittorrentee:latest 37 | 38 | # 5.Notice 39 | echo "[INFO] Deploy Qbittorrent Enhanced Edition success, enjoy your time..." 40 | echo "[INFO] Qbittorrent web address is: http://:8080" -------------------------------------------------------------------------------- /hack/install_rsshub.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # 1.Load env and echo logo 6 | source hack/env.sh 7 | 8 | echo "[INFO] Start to install rsshub..." 9 | 10 | ret=`docker version` 11 | if [[ $? != 0 ]]; then 12 | echo "[ERROR] Please install docker" 13 | exit 1 14 | fi 15 | 16 | source hack/util.sh 17 | util::set_registry_for_image 18 | 19 | docker run -itd --name rsshub \ 20 | -p 1200:1200 \ 21 | --restart unless-stopped \ 22 | diygod/rsshub:latest 23 | 24 | # 5. Notice 25 | echo "[INFO] Deploy rsshub success, enjoy your time..." 26 | echo "[INFO] RSSHUB UI address is: http://:1200" -------------------------------------------------------------------------------- /hack/install_thunder.sh: -------------------------------------------------------------------------------- 1 | # Ref: https://github.com/cnk3x/xunlei 2 | #!/usr/bin/env bash 3 | 4 | set -e 5 | 6 | # 1.Load env and echo logo 7 | source hack/env.sh 8 | 9 | echo "[INFO] Start to deploy thunder..." 10 | 11 | # 2.Check env 12 | ret=`docker version` 13 | if [[ $? != 0 ]]; then 14 | echo "[ERROR] Please install docker" 15 | exit 1 16 | fi 17 | 18 | # 3.Create necessary directory 19 | mkdir -p ${KUBESPIDER_HOME}/kubespider/nas/ 20 | mkdir -p ${KUBESPIDER_HOME}/kubespider/thunder/ 21 | 22 | # 4.Set registry 23 | source hack/util.sh 24 | util::set_registry_for_image 25 | 26 | # 5.Install thunder 27 | docker run -d --name=thunder --hostname=thunder \ 28 | --net=host \ 29 | -v ${KUBESPIDER_HOME}/kubespider/thunder:/xunlei/data \ 30 | -v ${KUBESPIDER_HOME}/kubespider/nas:/xunlei/downloads \ 31 | --restart=unless-stopped --privileged \ 32 | ${image_registry}/xunlei:latest 33 | 34 | # 6.Notice 35 | echo "[INFO] Deploy thunder success, enjoy your time..." 36 | echo "[INFO] Thunder web address is: http://:2345" 37 | -------------------------------------------------------------------------------- /hack/install_tiktokdlp.sh: -------------------------------------------------------------------------------- 1 | # Ref: https://github.com/imgyh/tiktok 2 | #!/usr/bin/env bash 3 | 4 | set -e 5 | 6 | # 1.Load env and echo logo 7 | source hack/env.sh 8 | 9 | echo "[INFO] Start to deploy tiktok-dlp downloader..." 10 | 11 | # 2.Check env 12 | ret=`docker version` 13 | if [[ $? != 0 ]]; then 14 | echo "[ERROR] Please install docker" 15 | exit 1 16 | fi 17 | 18 | # 3.Create necessary directory 19 | mkdir -p ${KUBESPIDER_HOME}/kubespider/nas/ 20 | 21 | # 4.Set registry 22 | source hack/util.sh 23 | util::set_registry_for_image 24 | 25 | # 5.Install tiktok-dlp 26 | docker run --name tiktok-dlp -d \ 27 | --network=host \ 28 | -e PUID=$UID \ 29 | -e PGID=$GID \ 30 | -v ${KUBESPIDER_HOME}/kubespider/nas/:/app/downloads \ 31 | --restart unless-stopped \ 32 | cesign/tiktok-dlp:latest 33 | 34 | # 6.Notice 35 | echo "[INFO] Deploy tiktok-dlp success, enjoy your time..." 36 | echo "[INFO] tiktok-dlp downloader trigger address is: http://:3083" 37 | -------------------------------------------------------------------------------- /hack/install_tranmission.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # 1.Load env and echo logo 6 | source hack/env.sh 7 | 8 | echo "[INFO] Start to deploy transmission..." 9 | 10 | # 2.Check env 11 | ret=`docker version` 12 | if [[ $? != 0 ]]; then 13 | echo "[ERROR] Please install docker" 14 | exit 1 15 | fi 16 | 17 | # 3.Create necessary directory 18 | mkdir -p ${KUBESPIDER_HOME}/kubespider/transmission/ 19 | 20 | # 4.Set registry 21 | source hack/util.sh 22 | util::set_registry_for_image 23 | 24 | # Some PT website only supports older version 25 | DEFAULT_VERSION=${DEFAULT_VERSION:-2.94-r1-ls24} 26 | 27 | # 5.Install transmission 28 | docker run -d \ 29 | --name=transmission \ 30 | -e PUID=$UID \ 31 | -e PGID=$GID \ 32 | -e TZ=Asia/Shanghai \ 33 | -e USER=admin \ 34 | -e PASS=admin \ 35 | -p 9091:9091 \ 36 | -p 51413:51413 \ 37 | -p 51413:51413/udp \ 38 | -v ${KUBESPIDER_HOME}/kubespider/transmission/:/config \ 39 | -v ${KUBESPIDER_HOME}/kubespider/nas/:/downloads \ 40 | --restart unless-stopped \ 41 | linuxserver/transmission:${DEFAULT_VERSION} 42 | 43 | # 5.Notice 44 | echo "[INFO] Deploy Transmission Enhanced Edition success, enjoy your time..." 45 | echo "[INFO] Transmission web address is: http://:9091" 46 | -------------------------------------------------------------------------------- /hack/install_transmission_pt.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # 1.Load env and echo logo 6 | source hack/env.sh 7 | 8 | echo "[INFO] Start to deploy transmission for pt..." 9 | 10 | 11 | function usage() { 12 | echo "This script is used to deploy transmission for pt..." 13 | echo "Usage:hack/install_transmission_pt.sh " 14 | echo "Example:hack/install_transmission_pt.sh 9092 mteam" 15 | } 16 | 17 | if [[ $# -ne 2 ]]; then 18 | usage 19 | exit 1 20 | fi 21 | 22 | # 2.Check env 23 | ret=`docker version` 24 | if [[ $? != 0 ]]; then 25 | echo "[ERROR] Please install docker" 26 | exit 1 27 | fi 28 | 29 | # 3.Create necessary directory 30 | mkdir -p ${KUBESPIDER_HOME}/kubespider/transmission-${2}/ 31 | mkdir -p ${KUBESPIDER_HOME}/kubespider/nas/PT/${2} 32 | 33 | # 4.Set registry 34 | source hack/util.sh 35 | util::set_registry_for_image 36 | 37 | # Some PT website only supports older version 38 | DEFAULT_VERSION=${DEFAULT_VERSION:-2.94-r1-ls24} 39 | 40 | # 5.Install transmission 41 | docker run -d \ 42 | --name=transmission-${2} \ 43 | -e PUID=$UID \ 44 | -e PGID=$GID \ 45 | -e TZ=Asia/Shanghai \ 46 | -e USER=admin \ 47 | -e PASS=admin \ 48 | -p ${1}:9091 \ 49 | -v ${KUBESPIDER_HOME}/kubespider/transmission-${2}/:/config \ 50 | -v ${KUBESPIDER_HOME}/kubespider/nas/PT/${2}:/downloads \ 51 | --restart unless-stopped \ 52 | linuxserver/transmission:${DEFAULT_VERSION} 53 | 54 | # 5.Notice 55 | echo "[INFO] Deploy Transmission Enhanced Edition success, enjoy your time..." 56 | echo "[INFO] Transmission web address is: http://:${1}" 57 | -------------------------------------------------------------------------------- /hack/install_v2ray.sh: -------------------------------------------------------------------------------- 1 | # Ref: https://github.com/v2fly/fhs-install-v2ray 2 | #!/usr/bin/env bash 3 | 4 | set -e 5 | 6 | # 1.Load env and echo logo 7 | source hack/env.sh 8 | 9 | echo "[INFO] Start to install v2ray..." 10 | 11 | # 1.Download necessary files 12 | git clone https://github.com/v2fly/fhs-install-v2ray.git 13 | 14 | wget https://github.com/v2fly/v2ray-core/releases/latest/download/v2ray-linux-64.zip 15 | bash fhs-install-v2ray/install-dat-release.sh -l v2ray-linux-64.zip 16 | 17 | # 2.Notice 18 | echo "[INFO] Install v2ray successful..." 19 | echo "[INFO] v2ray config path: /usr/local/etc/v2ray/config.json" 20 | -------------------------------------------------------------------------------- /hack/install_youget.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # 1.Load env and echo logo 6 | source hack/env.sh 7 | 8 | echo "[INFO] Start to deploy you-get downloader..." 9 | 10 | # 2.Check env 11 | ret=`docker version` 12 | if [[ $? != 0 ]]; then 13 | echo "[ERROR] Please install docker" 14 | exit 1 15 | fi 16 | 17 | # 3.Create necessary directory 18 | mkdir -p ${KUBESPIDER_HOME}/kubespider/nas/ 19 | mkdir -p ${KUBESPIDER_HOME}/kubespider/youget/ 20 | 21 | # 4.Set registry 22 | source hack/util.sh 23 | util::set_registry_for_image 24 | 25 | # 5.Install youget 26 | docker run --name youget -d \ 27 | --network=host \ 28 | -e PUID=$UID \ 29 | -e PGID=$GID \ 30 | -e BILIBILI_COOKIE_PATH=/app/config/bilibili_cookie.txt \ 31 | -v ${KUBESPIDER_HOME}/kubespider/youget:/app/config \ 32 | -v ${KUBESPIDER_HOME}/kubespider/nas/:/app/downloads \ 33 | --restart unless-stopped cesign/youget-downloader:latest 34 | 35 | # 6.Notice 36 | echo "[INFO] Deploy you-get success, now prepare you cookie, enjoy your time..." 37 | echo "[INFO] you-get downloader trigger address is: http://:3081" 38 | -------------------------------------------------------------------------------- /hack/install_ytdlp.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # 1.Load env and echo logo 6 | source hack/env.sh 7 | 8 | echo "[INFO] Start to deploy yt-dlp downloader..." 9 | 10 | # 2.Check env 11 | ret=`docker version` 12 | if [[ $? != 0 ]]; then 13 | echo "[ERROR] Please install docker" 14 | exit 1 15 | fi 16 | 17 | # 3.Create necessary directory 18 | mkdir -p ${KUBESPIDER_HOME}/kubespider/nas/ 19 | mkdir -p ${KUBESPIDER_HOME}/kubespider/yt-dlp/ 20 | 21 | # 4.Set registry 22 | source hack/util.sh 23 | util::set_registry_for_image 24 | 25 | # 5.Install yt-dlp 26 | docker run --name yt-dlp -d \ 27 | --network=host \ 28 | -e PUID=$UID \ 29 | -e PGID=$GID \ 30 | -v ${KUBESPIDER_HOME}/kubespider/yt-dlp:/app/config \ 31 | -v ${KUBESPIDER_HOME}/kubespider/nas/:/app/downloads \ 32 | --restart unless-stopped cesign/ytdlp-downloader:latest 33 | 34 | # 6.Notice 35 | echo "[INFO] Deploy yt-dlp success, enjoy your time..." 36 | echo "[INFO] yt-dlp downloader trigger address is: http://:3082" 37 | -------------------------------------------------------------------------------- /hack/install_yutto.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # 1.Load env and echo logo 6 | source hack/env.sh 7 | 8 | echo "[INFO] Start to deploy yutto downloader..." 9 | 10 | # 2.Check env 11 | ret=`docker version` 12 | if [[ $? != 0 ]]; then 13 | echo "[ERROR] Please install docker" 14 | exit 1 15 | fi 16 | 17 | if [[ ${BILIBILI_SESSDATA} == "" ]]; then 18 | echo "[ERROR] Please set BILIBILI_SESSDATA env" 19 | exit 1 20 | fi 21 | 22 | # 3.Create necessary directory 23 | mkdir -p ${KUBESPIDER_HOME}/kubespider/nas/ 24 | mkdir -p ${KUBESPIDER_HOME}/kubespider/yutto/ 25 | 26 | # 4.Set registry 27 | source hack/util.sh 28 | util::set_registry_for_image 29 | 30 | # 5.Install yutto 31 | docker run -d \ 32 | --name yutto \ 33 | --network=host \ 34 | -e PUID=$UID \ 35 | -e PGID=$GID \ 36 | -e BILIBILI_SESSDATA=${BILIBILI_SESSDATA} \ 37 | -v ${KUBESPIDER_HOME}/kubespider/yutto:/app/config \ 38 | -v ${KUBESPIDER_HOME}/kubespider/nas/:/app/downloads \ 39 | --restart unless-stopped \ 40 | cesign/yutto-downloader:latest 41 | 42 | # 6.Notice 43 | echo "[INFO] Deploy yutto success, enjoy your time..." 44 | echo "[INFO] yutto downloader trigger address is: http://:3084" 45 | -------------------------------------------------------------------------------- /hack/test/deploy_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | function handle_trap() { 8 | docker ps -a 9 | docker logs kubespider 10 | docker logs baidunetdisk 11 | docker logs aria2-pro 12 | docker logs plex 13 | docker logs thunder 14 | docker logs youget 15 | docker logs tiktok-dlp 16 | } 17 | 18 | trap handle_trap ERR EXIT 19 | 20 | #1. Test deploy Kubespider 21 | export KUBESPIDER_VERSION=latest 22 | ./hack/install_kubespider.sh 23 | sleep 10 24 | docker ps | grep -e kubespider -e aria2-pro 25 | if [[ $? != 0 ]]; then 26 | exit 1 27 | fi 28 | 29 | log=`docker logs kubespider` 30 | if [[ $log =~ 'Traceback' ]] 31 | then 32 | exit 1 33 | fi 34 | 35 | #2. Test deploy baidu net disk 36 | ./hack/install_baidunetdisk.sh 37 | sleep 10 38 | docker ps | grep -e baidunetdisk 39 | if [[ $? != 0 ]]; then 40 | exit 1 41 | fi 42 | 43 | #3. Test deploy plex 44 | export PLEX_CLAIM=fake_claim 45 | ./hack/install_plex.sh 46 | sleep 10 47 | docker ps | grep -e plex 48 | if [[ $? != 0 ]]; then 49 | exit 1 50 | fi 51 | 52 | #4. Test deploy thunder 53 | ./hack/install_thunder.sh 54 | sleep 10 55 | docker ps | grep -e thunder 56 | if [[ $? != 0 ]]; then 57 | exit 1 58 | fi 59 | 60 | #5. Test deploy tiktok-dlp 61 | ./hack/install_tiktokdlp.sh 62 | sleep 10 63 | docker ps | grep -e tiktok-dlp 64 | if [[ $? != 0 ]]; then 65 | exit 1 66 | fi 67 | 68 | #6. Test deploy youget 69 | ./hack/install_youget.sh 70 | sleep 10 71 | docker ps | grep -e youget 72 | if [[ $? != 0 ]]; then 73 | exit 1 74 | fi 75 | # ffmpeg needs to be installed to merge video and audio 76 | docker exec youget ffmpeg -version 77 | if [[ $? != 0 ]]; then 78 | exit 1 79 | fi 80 | 81 | #7. Test deploy yt-dlp 82 | ./hack/install_ytdlp.sh 83 | sleep 10 84 | docker ps | grep -e yt-dlp 85 | if [[ $? != 0 ]]; then 86 | exit 1 87 | fi 88 | # ffmpeg needs to be installed to merge video and audio 89 | docker exec yt-dlp ffmpeg -version 90 | if [[ $? != 0 ]]; then 91 | exit 1 92 | fi 93 | -------------------------------------------------------------------------------- /hack/util.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export image_registry="" 4 | 5 | function util::set_registry_for_image() { 6 | if [[ $CHINA_MAINLAND == "TRUE" ]];then 7 | export image_registry=registry.cn-hangzhou.aliyuncs.com/jwcesign 8 | else 9 | export image_registry=index.docker.io/cesign 10 | fi 11 | } 12 | 13 | function util::get_latest_release_version() { 14 | curl --silent https://api.github.com/repos/opennaslab/kubespider/tags | grep -o '"name": "[^"]*' | cut -d'"' -f4 | head -n1 15 | } 16 | -------------------------------------------------------------------------------- /kubespider-extension/.env.chrome: -------------------------------------------------------------------------------- 1 | VITE_BROWSER_TYPE=chrome -------------------------------------------------------------------------------- /kubespider-extension/.env.firefox: -------------------------------------------------------------------------------- 1 | VITE_BROWSER_TYPE=firefox 2 | -------------------------------------------------------------------------------- /kubespider-extension/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { browser: true, es2020: true }, 3 | extends: [ 4 | "eslint:recommended", 5 | "plugin:@typescript-eslint/recommended", 6 | "plugin:react-hooks/recommended", 7 | ], 8 | parser: "@typescript-eslint/parser", 9 | parserOptions: { ecmaVersion: "latest", sourceType: "module" }, 10 | plugins: ["react-refresh"], 11 | rules: { 12 | "react-refresh/only-export-components": "warn", 13 | "@typescript-eslint/no-namespace": "off", 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /kubespider-extension/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | build 12 | package 13 | dist-ssr 14 | *.local 15 | 16 | # Editor directories and files 17 | .vscode/* 18 | !.vscode/extensions.json 19 | .idea 20 | .DS_Store 21 | *.suo 22 | *.ntvs* 23 | *.njsproj 24 | *.sln 25 | *.sw? 26 | -------------------------------------------------------------------------------- /kubespider-extension/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kubespider-extension", 3 | "description": "Trigger Kubespider execute downloading task", 4 | "private": true, 5 | "version": "0.2.0", 6 | "type": "module", 7 | "scripts": { 8 | "dev": "vite", 9 | "build": "tsc && vite build --mode chrome", 10 | "build:chrome": "tsc && vite build --mode chrome", 11 | "build:firefox": "tsc && vite build --mode firefox", 12 | "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", 13 | "preview": "vite preview" 14 | }, 15 | "dependencies": { 16 | "react": "^18.3.1", 17 | "react-dom": "^18.3.1" 18 | }, 19 | "devDependencies": { 20 | "@crxjs/vite-plugin": "^2.0.0-beta.30", 21 | "@thedutchcoder/postcss-rem-to-px": "^0.0.2", 22 | "@types/node": "^20.12.12", 23 | "@types/react": "^18.3.3", 24 | "@types/react-dom": "^18.3.0", 25 | "@types/webextension-polyfill": "^0.10.7", 26 | "@typescript-eslint/eslint-plugin": "^7.11.0", 27 | "@typescript-eslint/parser": "^7.11.0", 28 | "@vitejs/plugin-react": "^4.3.0", 29 | "autoprefixer": "^10.4.19", 30 | "classnames": "^2.5.1", 31 | "eslint": "^8.57.0", 32 | "eslint-plugin-react-hooks": "^4.6.2", 33 | "eslint-plugin-react-refresh": "^0.4.7", 34 | "postcss": "^8.4.38", 35 | "tailwindcss": "^3.4.3", 36 | "typescript": "~5.4.5", 37 | "vite": "^5.2.11", 38 | "vite-plugin-zip-pack": "^1.2.3", 39 | "webextension-polyfill": "^0.12.0" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /kubespider-extension/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Kubespider 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /kubespider-extension/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | "@thedutchcoder/postcss-rem-to-px": {}, 5 | autoprefixer: {}, 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /kubespider-extension/public/img/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/kubespider-extension/public/img/download.png -------------------------------------------------------------------------------- /kubespider-extension/public/img/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/kubespider-extension/public/img/github.png -------------------------------------------------------------------------------- /kubespider-extension/public/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/kubespider-extension/public/img/icon.png -------------------------------------------------------------------------------- /kubespider-extension/public/img/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/kubespider-extension/public/img/icon128.png -------------------------------------------------------------------------------- /kubespider-extension/public/img/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/kubespider-extension/public/img/icon16.png -------------------------------------------------------------------------------- /kubespider-extension/public/img/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/kubespider-extension/public/img/icon48.png -------------------------------------------------------------------------------- /kubespider-extension/public/img/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/kubespider-extension/public/img/menu.png -------------------------------------------------------------------------------- /kubespider-extension/public/img/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opennaslab/kubespider/e18921174fb318320532ebe349d1b27df08f9352/kubespider-extension/public/img/refresh.png -------------------------------------------------------------------------------- /kubespider-extension/src/content/Overlay.tsx: -------------------------------------------------------------------------------- 1 | import { MessageType, Reply, SuccessReply, consumer } from "@message"; 2 | import { Alert } from "@component/Alert"; 3 | import { useEffect, useState } from "react"; 4 | import { useEvent } from "@polyfill"; 5 | import { uuidv4 } from "../util"; 6 | 7 | interface MessageData { 8 | id?: string; 9 | title: string; 10 | content: string; 11 | type?: "success" | "error"; 12 | delay?: number; 13 | } 14 | 15 | function Overlay() { 16 | const [messages, setMessages] = useState([] as MessageData[]); 17 | 18 | const onMessage = useEvent((message: MessageData) => { 19 | setMessages([...messages.filter((m) => m.id !== message.id), message]); 20 | }); 21 | 22 | const removeMessage = useEvent((id: string) => { 23 | setMessages(messages.filter((message) => message.id !== id)); 24 | }); 25 | 26 | useEffect(() => { 27 | consumer.addListener( 28 | MessageType.Notification, 29 | (payload): Promise => { 30 | const { id, title, content, type, delay } = payload as MessageData; 31 | const messageId = id || uuidv4(); 32 | const delayTime = delay || 4500; 33 | // render message 34 | onMessage({ id: messageId, title, content, type, delay }); 35 | // remove message 36 | if (delayTime > 0) { 37 | setTimeout(() => { 38 | removeMessage(messageId); 39 | }, delayTime); 40 | } 41 | // return message id 42 | return new Promise((resolve) => { 43 | resolve( 44 | SuccessReply({ 45 | messageId, 46 | }) 47 | ); 48 | }); 49 | } 50 | ); 51 | }, []); 52 | 53 | return ( 54 |
55 | {messages.map((message) => ( 56 | 62 | ))} 63 |
64 | ); 65 | } 66 | 67 | export default Overlay; 68 | -------------------------------------------------------------------------------- /kubespider-extension/src/content/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /kubespider-extension/src/content/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import styles from "./index.css?inline"; 4 | import Overlay from "./Overlay"; 5 | 6 | function initContainer() { 7 | // query or create container 8 | let container = document.getElementById("kubespider-extension-container"); 9 | if (!container) { 10 | container = document.createElement("div"); 11 | container.id = "kubespider-extension-container"; 12 | // inject container to body 13 | document.body.appendChild(container); 14 | } 15 | // create shadow dom 16 | let shadowContainer = container.shadowRoot; 17 | if (!shadowContainer) { 18 | shadowContainer = container.attachShadow({ mode: "closed" }); 19 | } 20 | let shadowWrapper = shadowContainer.getElementById("app"); 21 | if (!shadowWrapper) { 22 | shadowWrapper = document.createElement("div"); 23 | shadowWrapper.id = "app"; 24 | shadowContainer.appendChild(shadowWrapper); 25 | } 26 | return shadowWrapper; 27 | } 28 | 29 | function mount(container: HTMLElement) { 30 | ReactDOM.createRoot(container).render( 31 | 32 | 33 | 34 | 35 | ); 36 | } 37 | 38 | export function onExecute() { 39 | console.log("[kubespider-extension] content script injected"); 40 | const container = initContainer(); 41 | mount(container); 42 | } 43 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/api/index.ts: -------------------------------------------------------------------------------- 1 | import type { Request, Response } from "./types"; 2 | import { healthzRequest, downloadRequest, refreshRequest } from "./types"; 3 | 4 | async function api(request: Request): Promise { 5 | const requestInit: RequestInit = { 6 | method: request.method, 7 | }; 8 | // prepare headers 9 | const headers: HeadersInit = {}; 10 | if (request.headers.size > 0) { 11 | for (const [key, value] of request.headers) { 12 | headers[key] = value; 13 | } 14 | requestInit.headers = headers; 15 | } 16 | if (request.method === "POST") { 17 | requestInit.body = JSON.stringify(request.body); 18 | } 19 | 20 | return fetch(request.url, requestInit) 21 | .then((response) => { 22 | return response.text().then((body) => { 23 | return { 24 | status: response.status, 25 | body: body, 26 | }; 27 | }); 28 | }) 29 | .catch((error) => { 30 | return { 31 | status: 500, 32 | body: error, 33 | }; 34 | }); 35 | } 36 | 37 | export { api, healthzRequest, downloadRequest, refreshRequest }; 38 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/api/types.ts: -------------------------------------------------------------------------------- 1 | interface Request { 2 | url: string; 3 | method: "POST" | "GET"; 4 | headers: Map; 5 | body?: T; 6 | } 7 | 8 | interface Response { 9 | status: number; 10 | body: T; 11 | } 12 | 13 | const downloadRequest = ( 14 | server: string, 15 | dataSource: string, 16 | path?: string, 17 | cookies?: string, 18 | token?: string 19 | ): Request<{ 20 | dataSource: string; 21 | path?: string; 22 | cookies?: string; 23 | }> => { 24 | const headers = new Map(); 25 | if (token) { 26 | headers.set("Authorization", `Bearer ${token}`); 27 | } 28 | return { 29 | url: `${server}/api/v1/download`, 30 | method: "POST", 31 | headers: headers, 32 | body: { 33 | dataSource, 34 | path, 35 | cookies, 36 | }, 37 | }; 38 | }; 39 | 40 | const healthzRequest = (server: string): Request => { 41 | return { 42 | url: `${server}/healthz`, 43 | method: "GET", 44 | headers: new Map(), 45 | }; 46 | }; 47 | 48 | const refreshRequest = (server: string, token?: string): Request => { 49 | const headers = new Map(); 50 | if (token) { 51 | headers.set("Authorization", `Bearer ${token}`); 52 | } 53 | return { 54 | url: `${server}/api/v1/refresh`, 55 | method: "GET", 56 | headers: headers, 57 | }; 58 | }; 59 | 60 | export { downloadRequest, healthzRequest, refreshRequest }; 61 | export type { Request, Response }; 62 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/bridge/index.ts: -------------------------------------------------------------------------------- 1 | import Browser from "webextension-polyfill"; 2 | 3 | namespace Tab { 4 | export async function getCurrentTabId(): Promise { 5 | const [tab] = await Browser.tabs.query({ 6 | active: true, 7 | currentWindow: true, 8 | }); 9 | return tab?.id || -1; 10 | } 11 | 12 | export function create(url: string) { 13 | Browser.tabs.create({ url }); 14 | } 15 | } 16 | 17 | namespace Action { 18 | export async function setBadgeText(text: string) { 19 | Browser.action.setBadgeText({ 20 | text, 21 | }); 22 | } 23 | } 24 | 25 | namespace Cookies { 26 | export async function getAll(url: string): Promise { 27 | const cookies = await Browser.cookies.getAll({ url: url }); 28 | return cookies 29 | .map((cookie) => { 30 | return `${cookie.name}=${cookie.value}`; 31 | }) 32 | .join(";"); 33 | } 34 | } 35 | 36 | export { Tab, Action, Cookies }; 37 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/component/Alert.tsx: -------------------------------------------------------------------------------- 1 | import { Error, Success, Info } from "./Svg"; 2 | import classNames from "classnames"; 3 | 4 | interface AlertProps { 5 | title: string; 6 | content: string; 7 | type?: "success" | "error" | "info"; 8 | } 9 | 10 | function Alert({ title, content, type = "success" }: AlertProps) { 11 | const classname = classNames([ 12 | "border-t-4 rounded-b px-4 py-3 shadow-md", 13 | { 14 | "bg-red-100 border-red-500 text-red-900": type === "error", 15 | "bg-teal-100 border-teal-500 text-teal-900": type === "success", 16 | "bg-blue-100 border-blue-500 text-blue-900": type === "info", 17 | }, 18 | ]); 19 | 20 | function renderIcon(type: string) { 21 | switch (type) { 22 | case "error": 23 | return ; 24 | case "success": 25 | return ; 26 | case "info": 27 | return ; 28 | } 29 | } 30 | 31 | return ( 32 |
33 |
34 |
{renderIcon(type)}
35 |
36 |

{title}

37 |

{content}

38 |
39 |
40 |
41 | ); 42 | } 43 | 44 | export { Alert }; 45 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/component/Nav.tsx: -------------------------------------------------------------------------------- 1 | import classNames from "classnames"; 2 | import { ReactNode, useEffect, useState } from "react"; 3 | 4 | interface NavItemProps { 5 | active?: boolean; 6 | key: string; 7 | children?: ReactNode; 8 | } 9 | 10 | function NavItem({ 11 | id, 12 | onClick, 13 | active = false, 14 | children, 15 | }: { 16 | id: string; 17 | onClick: (id: string) => void; 18 | active?: boolean; 19 | children?: ReactNode; 20 | }) { 21 | const handleClick = () => { 22 | onClick(id); 23 | }; 24 | 25 | const tagAClass = classNames([ 26 | "block py-2 px-4 border-l border-t border-r rounded-t", 27 | { 28 | "border-transparent": !active, 29 | "hover:bg-gray-100 hover:border-gray-100": !active, 30 | }, 31 | ]); 32 | 33 | const tagLiClass = classNames({ 34 | "bg-white": true, 35 | "-mb-px": active, 36 | }); 37 | 38 | return ( 39 |
  • 40 | 41 | {children} 42 | 43 |
  • 44 | ); 45 | } 46 | 47 | function Nav({ 48 | items, 49 | onChange, 50 | }: { 51 | items: NavItemProps[]; 52 | onChange?: (key: string) => void; 53 | }) { 54 | const defaultActive = items.filter((item) => item.active)?.pop()?.key; 55 | 56 | const [activeKey, setActiveKey] = useState( 57 | defaultActive ? defaultActive : "1" 58 | ); 59 | 60 | const handleClick = (key: string) => { 61 | setActiveKey(key); 62 | }; 63 | 64 | useEffect(() => { 65 | onChange?.(activeKey); 66 | }, [activeKey, onChange]); 67 | 68 | return ( 69 |
      70 | {items.map((item) => ( 71 | 77 | {item.children} 78 | 79 | ))} 80 |
    81 | ); 82 | } 83 | 84 | export type { NavItemProps }; 85 | export { Nav }; 86 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/component/Svg.tsx: -------------------------------------------------------------------------------- 1 | function Info() { 2 | return ( 3 | 9 | 15 | 16 | ); 17 | } 18 | 19 | function Success() { 20 | return ( 21 | 27 | 33 | 34 | ); 35 | } 36 | 37 | function Warning() { 38 | return ( 39 | 45 | 51 | 52 | ); 53 | } 54 | 55 | function Error() { 56 | return ( 57 | 63 | 69 | 70 | ); 71 | } 72 | 73 | export { Info, Success, Warning, Error }; 74 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/message/consumer.ts: -------------------------------------------------------------------------------- 1 | import browser from "webextension-polyfill"; 2 | import type { Message, Listener, MessageType, Reply } from "./types"; 3 | import { ErrorReply } from "./types"; 4 | 5 | const topics: Map = new Map(); 6 | 7 | function dispatchEvent(message: Message): Promise { 8 | const { type, payload } = message; 9 | let listener; 10 | if (topics.has(type)) { 11 | listener = topics.get(type); 12 | } 13 | if (!listener) { 14 | return ErrorReply(`No listener for message type: ${type}`); 15 | } 16 | 17 | return listener(payload); 18 | } 19 | 20 | class Consumer { 21 | constructor() { 22 | browser.runtime.onMessage.addListener((message) => { 23 | return dispatchEvent(message); 24 | }); 25 | } 26 | addListener(type: MessageType, callback: Listener) { 27 | if (topics.has(type)) { 28 | console.warn(`[kubespider] listener for ${type} already exists`); 29 | } 30 | topics.set(type, callback); 31 | } 32 | } 33 | 34 | export { Consumer }; 35 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/message/index.ts: -------------------------------------------------------------------------------- 1 | import { Consumer } from "./consumer"; 2 | import { Sender } from "./sender"; 3 | import { MessageType, SuccessReply, ErrorReply } from "./types"; 4 | import { Reply } from "./types"; 5 | 6 | const consumer = new Consumer(); 7 | const sender = new Sender(); 8 | 9 | export { sender, consumer, MessageType, SuccessReply, ErrorReply }; 10 | export type { Reply }; 11 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/message/notification.ts: -------------------------------------------------------------------------------- 1 | import { sender, MessageType, Reply } from "."; 2 | 3 | interface NotificationPayload { 4 | id?: number; 5 | title: string; 6 | content: string; 7 | delay?: number; 8 | } 9 | 10 | namespace Notification { 11 | export function success( 12 | reciver: number, 13 | payload: NotificationPayload 14 | ): Promise { 15 | return sender.sendMessage({ 16 | type: MessageType.Notification, 17 | reciver: reciver, 18 | payload: { 19 | type: "success", 20 | ...payload, 21 | }, 22 | }); 23 | } 24 | 25 | export function error( 26 | reciver: number, 27 | payload: NotificationPayload 28 | ): Promise { 29 | return sender.sendMessage({ 30 | type: MessageType.Notification, 31 | reciver: reciver, 32 | payload: { 33 | type: "error", 34 | ...payload, 35 | }, 36 | }); 37 | } 38 | 39 | export function info( 40 | reciver: number, 41 | payload: NotificationPayload 42 | ): Promise { 43 | return sender.sendMessage({ 44 | type: MessageType.Notification, 45 | reciver: reciver, 46 | payload: { 47 | type: "info", 48 | ...payload, 49 | }, 50 | }); 51 | } 52 | } 53 | 54 | export default Notification; 55 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/message/sender.ts: -------------------------------------------------------------------------------- 1 | import Browser from "webextension-polyfill"; 2 | import type { Message, Reply } from "./types"; 3 | 4 | class Sender { 5 | sendMessage(message: Message): Promise { 6 | if (message.reciver && message.reciver > 0) { 7 | return Browser.tabs.sendMessage(message.reciver, message); 8 | } else { 9 | return Browser.runtime.sendMessage(message); 10 | } 11 | } 12 | } 13 | 14 | export { Sender }; 15 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/message/types.ts: -------------------------------------------------------------------------------- 1 | enum MessageType { 2 | Notification = "notification", 3 | Download = "download", 4 | } 5 | 6 | interface Message { 7 | type: MessageType; 8 | reciver?: number; 9 | payload: T; 10 | } 11 | 12 | interface Reply { 13 | success: boolean; 14 | payload: T; 15 | } 16 | 17 | const SuccessReply = (payload?: unknown): Promise => 18 | new Promise((resolve) => { 19 | resolve({ 20 | success: true, 21 | payload, 22 | }); 23 | }); 24 | 25 | const ErrorReply = (payload?: unknown): Promise => 26 | new Promise((resolve) => { 27 | resolve({ 28 | success: false, 29 | payload, 30 | }); 31 | }); 32 | 33 | interface Listener { 34 | (payload: unknown): Promise; 35 | } 36 | 37 | export type { Message, Reply, Listener }; 38 | export { MessageType, SuccessReply, ErrorReply }; 39 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/polyfill/index.ts: -------------------------------------------------------------------------------- 1 | import { useCallback, useLayoutEffect, useRef } from "react"; 2 | 3 | type callbackType = (...args: A) => R; 4 | 5 | export const useEvent = ( 6 | callback: callbackType 7 | ): callbackType => { 8 | const functionRef = useRef(callback); 9 | 10 | useLayoutEffect(() => { 11 | functionRef.current = callback; 12 | }); 13 | 14 | return useCallback((...args) => { 15 | const functionCall = functionRef.current; 16 | return functionCall(...args); 17 | }, []); 18 | }; 19 | -------------------------------------------------------------------------------- /kubespider-extension/src/lib/storage/index.ts: -------------------------------------------------------------------------------- 1 | import Browser from "webextension-polyfill"; 2 | 3 | interface Config { 4 | server?: string; 5 | path?: string; 6 | token?: string; 7 | auth?: boolean; 8 | captureCookies?: boolean; 9 | } 10 | 11 | const defaultConfig: Config = { 12 | server: "", 13 | path: "", 14 | token: "", 15 | auth: false, 16 | captureCookies: false, 17 | }; 18 | 19 | namespace Storage { 20 | export const read = async (): Promise => { 21 | return Browser.storage.local.get(defaultConfig).then((config) => { 22 | return config as Config; 23 | }); 24 | }; 25 | export const save = async (config: Config): Promise => { 26 | return Browser.storage.local.set(config); 27 | }; 28 | } 29 | 30 | export default Storage; 31 | -------------------------------------------------------------------------------- /kubespider-extension/src/manifest.ts: -------------------------------------------------------------------------------- 1 | import { defineManifest } from "@crxjs/vite-plugin"; 2 | import pkg from "../package.json"; 3 | 4 | export default defineManifest({ 5 | name: pkg.name, 6 | description: pkg.description, 7 | version: pkg.version, 8 | manifest_version: 3, 9 | icons: { 10 | "16": "img/icon16.png", 11 | "48": "img/icon48.png", 12 | "128": "img/icon128.png", 13 | }, 14 | action: { 15 | default_popup: "popup.html", 16 | default_icon: "img/icon48.png", 17 | }, 18 | background: { 19 | scripts: ["src/background/index.ts"], 20 | service_worker: "src/background/index.ts", 21 | type: "module", 22 | }, 23 | content_scripts: [ 24 | { 25 | matches: ["http://*/*", "https://*/*"], 26 | js: ["src/content/index.tsx"], 27 | run_at: "document_end", 28 | }, 29 | ], 30 | web_accessible_resources: [ 31 | { 32 | resources: ["img/icon16.png", "img/icon48.png", "img/icon128.png"], 33 | matches: ["http://*/*", "https://*/*"], 34 | }, 35 | ], 36 | host_permissions: ["*://*/*"], 37 | permissions: [ 38 | "storage", 39 | "declarativeNetRequest", 40 | "declarativeNetRequestFeedback", 41 | "contextMenus", 42 | "tabs", 43 | "cookies", 44 | "activeTab", 45 | "scripting", 46 | ], 47 | }); 48 | -------------------------------------------------------------------------------- /kubespider-extension/src/popup/Github.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from "react"; 2 | import { Tab } from "@bridge"; 3 | 4 | function GitHub() { 5 | useEffect(() => { 6 | Tab.create("https://github.com/opennaslab/kubespider"); 7 | }); 8 | 9 | return <>; 10 | } 11 | 12 | export default GitHub; 13 | -------------------------------------------------------------------------------- /kubespider-extension/src/popup/Popup.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import { Nav, NavItemProps } from "@component/Nav"; 3 | import Download from "./Download"; 4 | import Config from "./Config"; 5 | import Refresh from "./Refresh"; 6 | import GitHub from "./Github"; 7 | 8 | const items: NavItemProps[] = [ 9 | { 10 | key: "1", 11 | children: , 12 | }, 13 | { 14 | key: "2", 15 | children: , 16 | }, 17 | { 18 | key: "3", 19 | children: , 20 | }, 21 | { 22 | key: "4", 23 | children: , 24 | }, 25 | ]; 26 | 27 | interface RouterItemProps { 28 | key: string; 29 | children: React.ReactNode; 30 | } 31 | 32 | const router: RouterItemProps[] = [ 33 | { 34 | key: "1", 35 | children: , 36 | }, 37 | { 38 | key: "2", 39 | children: , 40 | }, 41 | { 42 | key: "3", 43 | children: , 44 | }, 45 | { 46 | key: "4", 47 | children: , 48 | }, 49 | ]; 50 | 51 | function Router({ 52 | items, 53 | activeKey, 54 | }: { 55 | items: RouterItemProps[]; 56 | activeKey: string; 57 | }) { 58 | return <>{items.filter((item) => item.key === activeKey)[0]?.children}; 59 | } 60 | 61 | function App() { 62 | const [activeKey, setActiveKey] = useState("1"); 63 | 64 | const onChange = (key: string) => { 65 | setActiveKey(key); 66 | }; 67 | 68 | return ( 69 |
    70 |
    75 | ); 76 | } 77 | 78 | export default App; 79 | -------------------------------------------------------------------------------- /kubespider-extension/src/popup/Refresh.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import { Button, ButtonProps } from "@component/Input"; 3 | import { api, refreshRequest } from "@api"; 4 | import Storage from "@storage"; 5 | import { componentResult } from "../util"; 6 | 7 | const defaultBtn: ButtonProps = { 8 | label: "Refresh", 9 | type: "primary", 10 | loading: false, 11 | }; 12 | 13 | function Refresh() { 14 | const [btn, setBtn] = useState(defaultBtn); 15 | 16 | const onClick = async () => { 17 | // Set loading 18 | setBtn({ ...btn, loading: true }); 19 | 20 | const { server, token } = await Storage.read(); 21 | if (!server || server === "") { 22 | componentResult( 23 | { 24 | label: "No Server!", 25 | type: "error", 26 | loading: false, 27 | }, 28 | defaultBtn, 29 | setBtn 30 | ); 31 | return; 32 | } 33 | const response = await api(refreshRequest(server, token)); 34 | if (response.status === 200) { 35 | componentResult( 36 | { 37 | label: "Refresh Success!", 38 | type: "success", 39 | loading: false, 40 | }, 41 | defaultBtn, 42 | setBtn 43 | ); 44 | return; 45 | } 46 | componentResult( 47 | { 48 | label: "Refresh Error!", 49 | type: "error", 50 | loading: false, 51 | }, 52 | defaultBtn, 53 | setBtn 54 | ); 55 | }; 56 | 57 | return ( 58 |