Skip to content
Open

OS #9541

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
60c203b
feat(local): add options to use ffmpeg to generate thumbnail
Muione Jun 4, 2025
2bdc5be
Merge pull request #9207 from AlistGo/fix-aliyundirve
alist666 Jul 17, 2025
5e15a36
feat(github_releases): concurrently request the GitHub API (#9211)
YangRucheng Jul 24, 2025
00120cb
feat: enhance permission control and label management (#9215)
okatu-loli Jul 26, 2025
f61d13d
refactor(convert_role): Improve role conversion logic for legacy form…
okatu-loli Jul 26, 2025
91cc752
feat(user/role/storage): enhance user and storage operations with add…
okatu-loli Jul 27, 2025
5b8c265
feat(user-management): Enhance admin management and role handling
okatu-loli Jul 28, 2025
4d7c2a0
docs(README): Add API documentation links across multiple languages (…
okatu-loli Jul 29, 2025
3353055
Update Dockerfile.ci (#9230)
okatu-loli Jul 29, 2025
d5df6fa
Merge branch 'main' into feat/allow-edit-role-guest
okatu-loli Jul 29, 2025
55b2bb6
feat(user-management): Enhance admin management and role handling
okatu-loli Jul 29, 2025
540d6c7
fix(meta): update OAuth token URL and improve default client credenti…
skysliences Jul 30, 2025
74332e9
feat(ui): add new UI configuration option to settings (#9233)
skysliences Jul 30, 2025
280960c
feat(user-db): enhance user management with role-based queries (allow…
okatu-loli Jul 30, 2025
394a18c
Fix 123 download (#9235)
skysliences Jul 30, 2025
ae90fb5
feat(log): enhance log formatter to respect NO_COLOR env variable (#9…
okatu-loli Aug 3, 2025
46de9e9
fix(driver): 123 download and modify request headers on the frontend …
skysliences Aug 3, 2025
52da07e
feat(123_open): add new driver support for 123 Open (#9246)
okatu-loli Aug 4, 2025
85fe4e5
feat(alist_v3): add IntSlice type for JSON unmarshalling (#9247)
okatu-loli Aug 4, 2025
6b2d81e
feat(user): enhance path management and role handling (#9249)
okatu-loli Aug 6, 2025
aea3ba1
feat: add tag backup and fix bugs (#9265)
okatu-loli Aug 15, 2025
fcfb336
fix: webdav error location (#9266)
okatu-loli Aug 15, 2025
97d4f79
fix: resolve webdav decode issue (#9268)
okatu-loli Aug 16, 2025
eca5008
feat: add user registration endpoint and role-based default settings …
okatu-loli Aug 18, 2025
74e3841
fix(lanzou): correct comment parsing logic in lanzou driver (#9278)
okatu-loli Aug 18, 2025
a9fcd51
fix: ensure DefaultRole stores role ID while exposing role name in AP…
okatu-loli Aug 19, 2025
d7723c3
chore(deps): Upgrade 115driver to v1.1.1 (#9283)
okatu-loli Aug 25, 2025
3319f6e
feat(search): Optimized search result filtering and paging logic (#9287)
okatu-loli Aug 25, 2025
c64f899
feat: implement session management (#9286)
okatu-loli Aug 25, 2025
de09ba0
chore(deps): Update 115driver dependency to v1.1.2 (#9294)
okatu-loli Aug 27, 2025
3bf0af1
fix(session): Fixed the session status update logic. (#9296)
okatu-loli Aug 28, 2025
84adba3
feat(user): Enhanced role assignment logic (#9297)
okatu-loli Aug 28, 2025
8623da5
feat(session): Added user session limit and device eviction logic
okatu-loli Aug 29, 2025
9a7c82a
feat(auth): Optimized device session handling logic
okatu-loli Aug 29, 2025
a11e4cf
Merge pull request #9299 from okatu-loli/session-manage-2
JoaHuang Aug 29, 2025
63391a2
fix(readme): remove outdated sponsor links from README files (#9300)
skysliences Aug 29, 2025
4b288a0
fix: session invalid issue (#9301)
okatu-loli Aug 29, 2025
2310748
Refactor (storage): Comment out the path validation logic (#9308)
okatu-loli Sep 4, 2025
930f9f6
fix(ssologin): missing role in SSO auto-registration and minor callba…
sakkyoi Sep 4, 2025
fcbc79c
feat: Support 123pan safebox (#9311)
okatu-loli Sep 5, 2025
d002603
feat(drivers): add MediaFire driver support (#9319)
Da3zKi7 Sep 11, 2025
28a8428
feat(driver): add Gofile storage driver (#9318)
Chesyre Sep 11, 2025
6e7c7d1
refactor (auth): Optimize permission path processing logic (#9320)
okatu-loli Sep 11, 2025
16cce37
fix(drivers): add session renewal cron for MediaFire driver (#9321)
Da3zKi7 Sep 12, 2025
e1800f1
feat: Check usage before deleting storage (#9322)
okatu-loli Sep 12, 2025
4f8bc47
refactor(driver): Refactored directory link check logic (#9324)
okatu-loli Sep 14, 2025
d17889b
feat(gofile): add configurable link expiration handling (#9329)
Chesyre Sep 30, 2025
fe564c4
feat: add pCloud driver support (#9339)
textrix Sep 30, 2025
81a7f28
feat(drivers): add ProtonDrive driver (#9331)
Da3zKi7 Sep 30, 2025
35d3224
feat(driver): Add URL signing support (#9347)
okatu-loli Oct 11, 2025
a6bd90a
feat(driver/s3): Add OSS Archive Support (#9350)
okatu-loli Oct 16, 2025
e2016dd
refactor(webdav): Use ResolvePath instead of JoinPath (#9344)
okatu-loli Oct 16, 2025
4c84018
feat: Add new driver bitqiu support (#9355)
okatu-loli Oct 23, 2025
b4d9beb
fix(Mediatrack): Add support for X-Device-Fingerprint header (#9354)
okatu-loli Oct 23, 2025
0cbc7eb
feat(driver): Added support for Gitee driver (#9368)
okatu-loli Nov 11, 2025
ce41587
feat(cloud189): Added sanitization for file and folder names (#9366)
okatu-loli Nov 11, 2025
3cddb6b
fix(driver): Handle Lanzou anti-crawler challenge by recalculating co…
okatu-loli Nov 11, 2025
129895b
fix(misskey): folderId format validation and root directory handling
vxtls Nov 15, 2025
998022e
feat(settings): Add `SetToken` endpoint for updating token settings
okatu-loli Dec 21, 2025
5f24409
feat(proxy): Added configurable signature for down proxy URLs
okatu-loli Dec 21, 2025
e5662ef
feat(driver): Enhanced Baidu Netdisk upload logic with dynamic URL re…
okatu-loli Dec 21, 2025
6b6f786
Merge pull request #9395 from okatu-loli/fix/baidu-upload-issue
JoaHuang Dec 22, 2025
ced614c
Merge pull request #9394 from okatu-loli/feat/proxy-sign-switch
JoaHuang Dec 22, 2025
2b79a39
Merge pull request #9393 from okatu-loli/feat/update-alist-token
JoaHuang Dec 22, 2025
66a52b8
fix(tls): harden defaults and warn on insecure mode
okatu-loli Jan 30, 2026
1328690
fix(fs): block path traversal in handlers
okatu-loli Jan 30, 2026
c258b93
fix(archive): prevent Zip Slip in extraction
okatu-loli Jan 31, 2026
42fce72
feat: add doubao new driver (#9416)
okatu-loli Feb 3, 2026
69629ca
Merge commit from fork
okatu-loli Feb 3, 2026
b188288
Merge commit from fork
okatu-loli Feb 3, 2026
fd69393
Merge commit from fork
okatu-loli Feb 3, 2026
7323583
chore(driver, archive): Remove debug logs and add missing `os` import
okatu-loli Feb 4, 2026
875b27f
Merge pull request #9419 from okatu-loli/fix/code-typo
JoaHuang Feb 4, 2026
a0389e2
feat(iso9660): Refactor path handling for secure file extraction
okatu-loli Feb 4, 2026
84ce672
Merge pull request #9420 from okatu-loli/fix/archive-decomposs
JoaHuang Feb 4, 2026
1880b5a
feat(drivers): add FTPS driver with TLS support
RedwindA Feb 7, 2026
426d594
fix(ftps): add host parsing for TLS configuration in login function
RedwindA Feb 7, 2026
39962d6
feat(driver): Upgrade dependencies and enhance 115 cloud functionality
okatu-loli Feb 9, 2026
146a88e
Merge pull request #9422 from okatu-loli/fix/adjust-115share-api
JoaHuang Feb 10, 2026
f3d6230
feat: add FTPS driver
okatu-loli Feb 10, 2026
3bc7de3
feat(auth): Add consistent error messaging for invalid login credentials
okatu-loli Feb 10, 2026
338569f
feat(fs): Add pagination support and enhance response structure
okatu-loli Feb 20, 2026
3f9933a
fix: unescape URL path to handle '#' in filenames
bintocher Feb 20, 2026
cf01ff6
feat(thumbnail): add configurable thumbnail size setting and update t…
Feb 28, 2026
7dc8231
fix(rename): block rename for password-protected paths
Mar 1, 2026
225a675
Merge pull request #9429 from okatu-loli/feat/support-list-pagination
okatu-loli Mar 6, 2026
178f2d1
Merge pull request #9424 from okatu-loli/fix/auth-login-error-message
okatu-loli Mar 6, 2026
03c08cb
Merge pull request #9434 from AlistGo/codex/forbid-rename-on-password…
okatu-loli Mar 6, 2026
315b2a8
Merge pull request #9433 from AlistGo/codex/thumbnail-size-system-set…
okatu-loli Mar 6, 2026
39c236b
Merge pull request #9430 from bintocher/bintocher/issue-9361
okatu-loli Mar 6, 2026
d4cc6ef
fix: reduce WebDAV logging for NotFoundError
hgkdzbf6 Mar 6, 2026
1175f8a
feat: add streamtape driver
okatu-loli Mar 6, 2026
37104eb
Merge pull request #9441 from okatu-loli/feat/add-streamtape-driver
okatu-loli Mar 6, 2026
5edc9d7
Merge branch 'main' of https://github.com/AlistGo/alist
Muione Mar 7, 2026
5773c63
fix: handle nil buffer case in resizeImageToBufferWithFFmpegGo
Muione Mar 7, 2026
5852a81
feat(strm): add STRM driver with independent sync flow
okatu-loli Mar 9, 2026
cbe2321
Merge branch 'main' into feat/add-strm-support
okatu-loli Mar 9, 2026
866d4f4
feat(strm): add driver-level sign expiry and rotate action
okatu-loli Mar 10, 2026
defd1de
Merge remote-tracking branch 'origin/feat/add-strm-support' into feat…
okatu-loli Mar 10, 2026
faa596c
feat(quark): support 302 with transcoding and stable video preview
okatu-loli Mar 10, 2026
82ab576
fix(auth): prevent and heal dirty admin permissions
okatu-loli Mar 14, 2026
131ed15
Merge pull request #8629 from Muione/main
okatu-loli Mar 15, 2026
0a12432
Merge pull request #9440 from hgkdzbf6/fix/reduce-webdav-logging
okatu-loli Mar 15, 2026
f5128ff
Merge pull request #9443 from okatu-loli/feat/add-strm-support
okatu-loli Mar 15, 2026
1602722
Merge pull request #9444 from okatu-loli/feat/support-quark-stream
okatu-loli Mar 15, 2026
45862fc
Merge pull request #9445 from okatu-loli/fix/admin-perm-issue
okatu-loli Mar 15, 2026
2280505
chore(deps): refresh indirect module checksums (#9446)
okatu-loli Mar 16, 2026
6bde813
feat(wukong): add WuKongNetdisk driver with read-write support (#9449)
okatu-loli Mar 16, 2026
a673503
feat(s3): add placeholder toggle and fix empty-folder delete behavior
okatu-loli Mar 18, 2026
a8ff7c9
feat: add public share support
okatu-loli Mar 19, 2026
35832d0
fix(139): recover personal host for personal_new requests
okatu-loli Mar 24, 2026
37a6b26
fix: handle aliyundrive open rate limits
okatu-loli Mar 25, 2026
a6392a3
Merge pull request #9451 from okatu-loli/feat/oss-dir-setting-support
okatu-loli Mar 25, 2026
c07cd1b
feat(driver): add baidu youth driver
okatu-loli Mar 25, 2026
217d6d0
Merge pull request #9455 from okatu-loli/fix/aliyun-open-issue
okatu-loli Mar 26, 2026
04b7b83
Merge pull request #9376 from vxtls/main
okatu-loli Mar 26, 2026
094765e
feat(chunker): add storage driver
okatu-loli Mar 26, 2026
c20da5a
Merge pull request #9456 from okatu-loli/feat/add-baidu-young-support
okatu-loli Mar 26, 2026
ce6a192
feat(chunker): support multi-target chunk storage
okatu-loli Mar 26, 2026
428e04e
test(chunker): remove util tests
okatu-loli Mar 26, 2026
404e9ea
Merge pull request #9454 from okatu-loli/fix/139-work-issue
okatu-loli Mar 26, 2026
bd725d5
feat: add burn-after-read support for shares
okatu-loli Mar 27, 2026
4f60c31
feat: extend share lifecycle controls
okatu-loli Mar 27, 2026
fe0c5b8
feat(driver/streamtape): add response types for remote download, file…
xiaoqingwanga Mar 26, 2026
11254dd
feat(driver/streamtape): add remote upload ID helpers
xiaoqingwanga Mar 26, 2026
d59c589
feat(driver/streamtape): implement PutURL for remote uploads
xiaoqingwanga Mar 26, 2026
6761fe7
feat(driver/streamtape): implement Other method with remotedl_status,…
xiaoqingwanga Mar 26, 2026
24aaf0c
refactor(driver/streamtape): extract remote upload ID helper to reduc…
xiaoqingwanga Mar 26, 2026
066386f
feat(driver/streamtape): add Sha256 upload support and move-to-root a…
xiaoqingwanga Mar 26, 2026
9dd6823
fix(driver/streamtape): add warning type prefix to Alert message
xiaoqingwanga Mar 26, 2026
e3f3fc4
test(streamtape): add comprehensive unit tests for Streamtape driver
xiaoqingwanga Mar 28, 2026
1d05bdb
chore(streamtape): delete drivers/streamtape/api_test.go
okatu-loli Mar 28, 2026
a0545cb
chore(deps): bump github.com/shoenig/go-m1cpu to v0.2.1
okatu-loli Mar 28, 2026
c4595e5
Fix share access accounting and validation
okatu-loli Mar 30, 2026
2f903c4
Merge pull request #9460 from xiaoqingwanga/streamtape
okatu-loli Mar 30, 2026
71898a4
feat: add 360AI YunPan driver
okatu-loli Mar 31, 2026
0fe31e0
chore: remove yunpan360 driver tests
okatu-loli Mar 31, 2026
97a4bb3
fix: enable GFM extension for markdown rendering in proxy mode
icebear0828 Apr 5, 2026
9b697e4
feat(driver): add Darkibox driver
Apr 12, 2026
53a111b
Merge pull request #9457 from okatu-loli/feat/add-chunker-support
okatu-loli Apr 14, 2026
76f1ff6
Merge pull request #9458 from okatu-loli/feat/short-link-support
okatu-loli Apr 14, 2026
06a08de
Merge pull request #9461 from okatu-loli/fix/m5pro-crash-issue
okatu-loli Apr 14, 2026
8ef0d64
Merge pull request #9462 from okatu-loli/feat/360ai-drive
okatu-loli Apr 14, 2026
1419c33
Merge pull request #9465 from icebear0828/fix/goldmark-gfm-table
okatu-loli Apr 14, 2026
343ccd5
Merge pull request #9474 from appfolder/driver-darkibox
okatu-loli Apr 14, 2026
06cb5ee
feat(guangyapan): add full GuangYaPan driver integration
okatu-loli Apr 15, 2026
ee27244
feat(frp): add runtime log API and stop endpoint
okatu-loli Apr 15, 2026
51114e4
feat(frp): wire bootstrap settings and runtime dependencies
okatu-loli Apr 15, 2026
2edfcae
add mcp support
okatu-loli Apr 15, 2026
dc6d268
Merge branch 'main' into feature/frp-support
okatu-loli Apr 18, 2026
8751bdb
Merge pull request #9478 from okatu-loli/feat/mcp-support
okatu-loli Apr 19, 2026
52a5f4e
Merge branch 'main' into feature/frp-support
okatu-loli Apr 19, 2026
40e542f
Merge pull request #9476 from okatu-loli/feat/guangyapan-driver
okatu-loli Apr 19, 2026
527ad89
Merge pull request #9477 from okatu-loli/feature/frp-support
okatu-loli Apr 20, 2026
135a0b4
feat(139-share): support mounting and HLS playback | 支持分享链接挂载与播放
kyle-meng Apr 26, 2026
45daac9
fix(139-share): fix modification time parsing | 修复分享模式下的修改时间解析
kyle-meng Apr 26, 2026
dba5c27
fix(guangyapan): allow user input folder path in driver root path
abandonstudy Apr 30, 2026
ffbbe7a
fix(storage): clear list cache after storage updates
okatu-loli May 7, 2026
cbeb088
feat(settings): add frontend sort memory switch
okatu-loli May 7, 2026
4a23e6a
fix(guangyapan): expose sorting options
okatu-loli May 7, 2026
756cc65
ci: merge companion frontend pull request
okatu-loli May 7, 2026
1dbd503
chore(deps): bump github.com/jackc/pgx/v5 from 5.5.5 to 5.9.0 (#9482)
dependabot[bot] May 15, 2026
6bc8946
chore(deps): bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.2 (#…
dependabot[bot] May 15, 2026
fb48ea4
chore(deps): bump google.golang.org/grpc from 1.66.0 to 1.79.3
dependabot[bot] May 15, 2026
d509a87
feat(lark): add export tools API (#9511)
okatu-loli May 15, 2026
1c0fc0b
chore(deps): bump github.com/golang-jwt/jwt/v5 from 5.2.1 to 5.2.2
dependabot[bot] May 15, 2026
0fa863e
fix: support all pagination mode (#9512)
okatu-loli May 15, 2026
fc26c3d
feat: add GuangYaPan offline download (#9505)
okatu-loli May 15, 2026
f4459fc
fix(meta): expire missing meta cache (#9504)
okatu-loli May 15, 2026
dd19d0d
Merge pull request #9494 from abandonstudy/fix/guangyapan-root-folder-id
okatu-loli May 15, 2026
7bcd681
Merge pull request #9503 from AlistGo/fix/guangyapan-sort-settings
okatu-loli May 15, 2026
71082f0
Merge pull request #9490 from kyle-meng/feat/139-share-link
okatu-loli May 15, 2026
7d7c921
chore(auto_lang): update Go version in auto_lang workflow
okatu-loli May 15, 2026
de56968
fix(guangyapan): resolve offline root folder lookup (#9516)
okatu-loli May 15, 2026
5c2670b
Merge pull request #9483 from AlistGo/dependabot/go_modules/github.co…
okatu-loli May 16, 2026
fbc576b
Merge pull request #9481 from AlistGo/dependabot/go_modules/google.go…
okatu-loli May 16, 2026
02c09a7
fix: CVE-2026-34986 security vulnerability
orbisai0security May 22, 2026
a76eaa5
Merge pull request #9515 from AlistGo/okatu-loli-patch-1
okatu-loli May 25, 2026
f4445c5
Merge pull request #9518 from orbisai0security/fix-cve-2026-34986-git…
okatu-loli May 25, 2026
0d5eacd
push
Premiermoney May 26, 2026
b62aba3
Create Grindr
Premiermoney May 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/auto_lang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
platform: [ ubuntu-latest ]
go-version: [ '1.21' ]
go-version: [ '1.25' ]
name: auto generate lang.json
runs-on: ${{ matrix.platform }}
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
- android-arm64
name: Build
runs-on: ${{ matrix.platform }}
env:
GOPROXY: https://proxy.golang.org,direct
steps:

- name: Checkout
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/merge_frontend_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: merge companion frontend pr

on:
pull_request:
branches:
- 'main'
types:
- closed
workflow_dispatch:
inputs:
frontend_pr:
description: 'Frontend PR reference, e.g. AlistGo/alist-web#301 or https://github.com/AlistGo/alist-web/pull/301'
required: true
type: string

permissions:
contents: read

jobs:
merge_frontend_pr:
name: Merge companion frontend PR
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Find frontend PR
id: frontend
env:
INPUT_FRONTEND_PR: ${{ inputs.frontend_pr }}
PR_BODY: ${{ github.event.pull_request.body }}
run: |
set -euo pipefail

text="${INPUT_FRONTEND_PR:-${PR_BODY:-}}"
ref="$(printf '%s\n' "$text" | grep -Eo '(https://github\.com/(AlistGo|alist-org)/alist-web/pull/[0-9]+)|((AlistGo|alist-org)/alist-web#[0-9]+)|(alist-web#[0-9]+)' | head -n1 || true)"

if [[ -z "$ref" ]]; then
echo "found=false" >> "$GITHUB_OUTPUT"
echo "No companion frontend PR referenced."
exit 0
fi

if [[ "$ref" == *"/pull/"* ]]; then
number="${ref##*/}"
else
number="${ref##*#}"
fi

echo "found=true" >> "$GITHUB_OUTPUT"
echo "url=https://github.com/AlistGo/alist-web/pull/$number" >> "$GITHUB_OUTPUT"
echo "Found companion frontend PR #$number."

- name: Merge frontend PR
if: steps.frontend.outputs.found == 'true'
env:
GH_TOKEN: ${{ secrets.MY_TOKEN }}
FRONTEND_PR: ${{ steps.frontend.outputs.url }}
run: |
set -euo pipefail

state="$(gh pr view "$FRONTEND_PR" --json state --jq .state)"
if [[ "$state" == "MERGED" ]]; then
echo "$FRONTEND_PR is already merged."
exit 0
fi
if [[ "$state" != "OPEN" ]]; then
echo "$FRONTEND_PR is $state and cannot be merged."
exit 1
fi

gh pr merge "$FRONTEND_PR" --auto --merge || gh pr merge "$FRONTEND_PR" --merge
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"github.copilot-chat"
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"editor.fontFamily": "",
"editor.wordWrap": "on",
"workbench.colorTheme": "GitHub Dark Colorblind (Beta)"
}
4 changes: 2 additions & 2 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:edge
FROM alpine:3.20.7

ARG TARGETPLATFORM
ARG INSTALL_FFMPEG=false
Expand Down Expand Up @@ -31,4 +31,4 @@ RUN /entrypoint.sh version
ENV PUID=0 PGID=0 UMASK=022 RUN_ARIA2=${INSTALL_ARIA2}
VOLUME /opt/alist/data/
EXPOSE 5244 5245
CMD [ "/entrypoint.sh" ]
CMD [ "/entrypoint.sh" ]
27 changes: 27 additions & 0 deletions Grindr
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import os
from azure.ai.inference import ChatCompletionsClient
from azure.ai.inference.models import SystemMessage, UserMessage
from azure.core.credentials import AzureKeyCredential

endpoint = "https://models.github.ai/inference"
model = "meta/Llama-4-Maverick-17B-128E-Instruct-FP8"
token = os.environ["GITHUB_TOKEN"]

client = ChatCompletionsClient(
endpoint=endpoint,
credential=AzureKeyCredential(token),
)

response = client.complete(
messages=[
SystemMessage("You are a helpful assistant."),
UserMessage("What is the capital of France?"),
],
temperature=1.0,
top_p=1.0,
max_tokens=1000,
model=model
)

print(response.choices[0].message.content)

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ English | [中文](./README_cn.md) | [日本語](./README_ja.md) | [Contributing
- [x] [UPYUN Storage Service](https://www.upyun.com/products/file-storage)
- [x] WebDav(Support OneDrive/SharePoint without API)
- [x] Teambition([China](https://www.teambition.com/ ),[International](https://us.teambition.com/ ))
- [x] [MediaFire](https://www.mediafire.com)
- [x] [Mediatrack](https://www.mediatrack.cn/)
- [x] [ProtonDrive](https://proton.me/drive)
- [x] [139yun](https://yun.139.com/) (Personal, Family, Group)
- [x] [YandexDisk](https://disk.yandex.com/)
- [x] [BaiduNetdisk](http://pan.baidu.com/)
Expand Down Expand Up @@ -101,6 +103,10 @@ English | [中文](./README_cn.md) | [日本語](./README_ja.md) | [Contributing

<https://alistgo.com/>

## API Documentation (via Apifox):

<https://alist-public.apifox.cn/>

## Demo

<https://al.nn.ci>
Expand All @@ -117,8 +123,6 @@ https://alistgo.com/guide/sponsor.html
### Special sponsors

- [VidHub](https://apps.apple.com/app/apple-store/id1659622164?pt=118612019&ct=alist&mt=8) - An elegant cloud video player within the Apple ecosystem. Support for iPhone, iPad, Mac, and Apple TV.
- [亚洲云](https://www.asiayun.com/aff/QQCOOQKZ) - 高防服务器|服务器租用|福州高防|广东电信|香港服务器|美国服务器|海外服务器 - 国内靠谱的企业级云计算服务提供商 (sponsored Chinese API server)
- [找资源](http://zhaoziyuan2.cc/) - 阿里云盘资源搜索引擎

## Contributors

Expand Down
8 changes: 6 additions & 2 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
- [x] [又拍云对象存储](https://www.upyun.com/products/file-storage)
- [x] WebDav(支持无API的OneDrive/SharePoint)
- [x] Teambition([中国](https://www.teambition.com/ ),[国际](https://us.teambition.com/ ))
- [x] [MediaFire](https://www.mediafire.com)
- [x] [分秒帧](https://www.mediatrack.cn/)
- [x] [ProtonDrive](https://proton.me/drive)
- [x] [和彩云](https://yun.139.com/) (个人云, 家庭云,共享群组)
- [x] [Yandex.Disk](https://disk.yandex.com/)
- [x] [百度网盘](http://pan.baidu.com/)
Expand Down Expand Up @@ -99,6 +101,10 @@

<https://alistgo.com/zh/>

## API 文档(通过 Apifox 提供)

<https://alist-public.apifox.cn/>

## Demo

<https://al.nn.ci>
Expand All @@ -114,8 +120,6 @@ AList 是一个开源软件,如果你碰巧喜欢这个项目,并希望我
### 特别赞助

- [VidHub](https://apps.apple.com/app/apple-store/id1659622164?pt=118612019&ct=alist&mt=8) - 苹果生态下优雅的网盘视频播放器,iPhone,iPad,Mac,Apple TV全平台支持。
- [亚洲云](https://www.asiayun.com/aff/QQCOOQKZ) - 高防服务器|服务器租用|福州高防|广东电信|香港服务器|美国服务器|海外服务器 - 国内靠谱的企业级云计算服务提供商 (国内API服务器赞助)
- [找资源](http://zhaoziyuan2.cc/) - 阿里云盘资源搜索引擎

## 贡献者

Expand Down
8 changes: 6 additions & 2 deletions README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
- [x] [UPYUN Storage Service](https://www.upyun.com/products/file-storage)
- [x] WebDav(Support OneDrive/SharePoint without API)
- [x] Teambition([China](https://www.teambition.com/ ),[International](https://us.teambition.com/ ))
- [x] [MediaFire](https://www.mediafire.com)
- [x] [Mediatrack](https://www.mediatrack.cn/)
- [x] [ProtonDrive](https://proton.me/drive)
- [x] [139yun](https://yun.139.com/) (Personal, Family, Group)
- [x] [YandexDisk](https://disk.yandex.com/)
- [x] [BaiduNetdisk](http://pan.baidu.com/)
Expand Down Expand Up @@ -100,6 +102,10 @@

<https://alistgo.com/>

## APIドキュメント(Apifox 提供)

<https://alist-public.apifox.cn/>

## デモ

<https://al.nn.ci>
Expand All @@ -116,8 +122,6 @@ https://alistgo.com/guide/sponsor.html
### スペシャルスポンサー

- [VidHub](https://apps.apple.com/app/apple-store/id1659622164?pt=118612019&ct=alist&mt=8) - An elegant cloud video player within the Apple ecosystem. Support for iPhone, iPad, Mac, and Apple TV.
- [亚洲云](https://www.asiayun.com/aff/QQCOOQKZ) - 高防服务器|服务器租用|福州高防|广东电信|香港服务器|美国服务器|海外服务器 - 国内靠谱的企业级云计算服务提供商 (sponsored Chinese API server)
- [找资源](http://zhaoziyuan2.cc/) - 阿里云盘资源搜索引擎

## コントリビューター

Expand Down
7 changes: 7 additions & 0 deletions cmd/common.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cmd

import (
"github.com/alist-org/alist/v3/internal/bootstrap/patch/v3_46_0"
"os"
"path/filepath"
"strconv"
Expand All @@ -16,6 +17,12 @@ func Init() {
bootstrap.InitConfig()
bootstrap.Log()
bootstrap.InitDB()

if v3_46_0.IsLegacyRoleDetected() {
utils.Log.Warnf("Detected legacy role format, executing ConvertLegacyRoles patch early...")
v3_46_0.ConvertLegacyRoles()
}

data.InitData()
bootstrap.InitStreamLimit()
bootstrap.InitIndex()
Expand Down
27 changes: 27 additions & 0 deletions cmd/mcp.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package cmd

import (
"github.com/alist-org/alist/v3/internal/bootstrap"
mcpserver "github.com/alist-org/alist/v3/server/mcp"
"github.com/alist-org/alist/v3/pkg/utils"
"github.com/spf13/cobra"
)

var MCPCmd = &cobra.Command{
Use: "mcp",
Short: "Start MCP server in STDIO mode",
Long: `Start an MCP (Model Context Protocol) server that communicates via STDIO, suitable for integration with AI assistants like Claude Desktop.`,
Run: func(cmd *cobra.Command, args []string) {
Init()
bootstrap.LoadStorages()
username, _ := cmd.Flags().GetString("user")
if err := mcpserver.ServeStdio(username); err != nil {
utils.Log.Fatalf("MCP STDIO server error: %v", err)
}
},
}

func init() {
MCPCmd.Flags().String("user", "admin", "Username for MCP operations")
RootCmd.AddCommand(MCPCmd)
}
26 changes: 26 additions & 0 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ import (
"github.com/alist-org/alist/v3/cmd/flags"
"github.com/alist-org/alist/v3/internal/bootstrap"
"github.com/alist-org/alist/v3/internal/conf"
"github.com/alist-org/alist/v3/internal/frp"
"github.com/alist-org/alist/v3/internal/fs"
"github.com/alist-org/alist/v3/pkg/utils"
"github.com/alist-org/alist/v3/server"
mcpserver "github.com/alist-org/alist/v3/server/mcp"
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand All @@ -43,6 +45,7 @@ the address is defined in config file`,
bootstrap.InitOfflineDownloadTools()
bootstrap.LoadStorages()
bootstrap.InitTaskManager()
bootstrap.InitFRP()
if !flags.Debug && !flags.Dev {
gin.SetMode(gin.ReleaseMode)
}
Expand Down Expand Up @@ -157,6 +160,19 @@ the address is defined in config file`,
}()
}
}
var mcpHttpSrv *http.Server
if conf.Conf.MCP.Port != -1 && conf.Conf.MCP.Enable {
mcpHandler := mcpserver.NewHTTPHandler()
mcpBase := fmt.Sprintf("%s:%d", conf.Conf.Scheme.Address, conf.Conf.MCP.Port)
utils.Log.Infof("start MCP server @ %s", mcpBase)
mcpHttpSrv = &http.Server{Addr: mcpBase, Handler: mcpHandler}
go func() {
err := mcpHttpSrv.ListenAndServe()
if err != nil && !errors.Is(err, http.ErrServerClosed) {
utils.Log.Fatalf("failed to start MCP server: %s", err.Error())
}
}()
}
// Wait for interrupt signal to gracefully shutdown the server with
// a timeout of 1 second.
quit := make(chan os.Signal, 1)
Expand All @@ -167,6 +183,7 @@ the address is defined in config file`,
<-quit
utils.Log.Println("Shutdown server...")
fs.ArchiveContentUploadTaskManager.RemoveAll()
frp.Instance.Stop()
Release()
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
defer cancel()
Expand Down Expand Up @@ -217,6 +234,15 @@ the address is defined in config file`,
}
}()
}
if conf.Conf.MCP.Port != -1 && conf.Conf.MCP.Enable && mcpHttpSrv != nil {
wg.Add(1)
go func() {
defer wg.Done()
if err := mcpHttpSrv.Shutdown(ctx); err != nil {
utils.Log.Fatal("MCP server shutdown err: ", err)
}
}()
}
wg.Wait()
utils.Log.Println("Server exit")
},
Expand Down
8 changes: 5 additions & 3 deletions drivers/115/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ func (d *Pan115) Link(ctx context.Context, file model.Obj, args model.LinkArgs)
if err := d.WaitLimit(ctx); err != nil {
return nil, err
}
userAgent := args.Header.Get("User-Agent")
downloadInfo, err := d.
DownloadWithUA(file.(*FileObj).PickCode, userAgent)
userAgent := ""
if args.Header != nil {
userAgent = args.Header.Get("User-Agent")
}
downloadInfo, err := d.client.DownloadWithUA(file.(*FileObj).PickCode, userAgent)
if err != nil {
return nil, err
}
Expand Down
5 changes: 5 additions & 0 deletions drivers/115/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var _ model.Obj = (*FileObj)(nil)

type FileObj struct {
driver.File
ThumbURL string
}

func (f *FileObj) CreateTime() time.Time {
Expand All @@ -22,6 +23,10 @@ func (f *FileObj) GetHash() utils.HashInfo {
return utils.NewHashInfo(utils.SHA1, f.Sha1)
}

func (f *FileObj) Thumb() string {
return f.ThumbURL
}

type UploadResult struct {
driver.BasicResp
Data struct {
Expand Down
Loading