mirror of https://github.com/Xhofe/alist
![]() * feat(auth): Added device session management - Added the `handleSession` function to manage user device sessions and verify client identity - Updated `auth.go` to call `handleSession` for device handling when a user logs in - Added the `Session` model to database migrations - Added `device.go` and `session.go` files to handle device session logic - Updated `settings.go` to add device-related configuration items, such as the maximum number of devices, device eviction policy, and session TTL * feat(session): Adds session management features - Added `SessionInactive` error type in `device.go` - Added session-related APIs in `router.go` to support listing and evicting sessions - Added `ListSessionsByUser`, `ListSessions`, and `MarkInactive` methods in `session.go` - Returns an appropriate error when the session state is `SessionInactive` * feat(auth): Marks the device session as invalid. - Import the `session` package into the `auth` module to handle device session status. - Add a check in the login logic. If `device_key` is obtained, call `session.MarkInactive` to mark the device session as invalid. - Store the invalid status in the context variable `session_inactive` for subsequent middleware checks. - Add a check in the session refresh logic to abort the process if the current session has been marked invalid. * feat(auth, session): Added device information processing and session management changes - Updated device handling logic in `auth.go` to pass user agent and IP information - Adjusted database queries in `session.go` to optimize session query fields and add `user_agent` and `ip` fields - Modified the `Handle` method to add `ua` and `ip` parameters to store the user agent and IP address - Added the `SessionResp` structure to return a session response containing `user_agent` and `ip` - Updated the `/admin/user/create` and `/webdav` endpoints to pass the user agent and IP address to the device handler |
||
---|---|---|
.github | ||
cmd | ||
drivers | ||
internal | ||
pkg | ||
public | ||
server | ||
wrapper | ||
.air.toml | ||
.gitignore | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
Dockerfile | ||
Dockerfile.ci | ||
LICENSE | ||
README.md | ||
README_cn.md | ||
README_ja.md | ||
build.sh | ||
docker-compose.yml | ||
entrypoint.sh | ||
go.mod | ||
go.sum | ||
main.go | ||
renovate.json |
README.md
English | 中文 | 日本語 | Contributing | CODE_OF_CONDUCT
Features
- Multiple storages
- Local storage
- Aliyundrive
- OneDrive / Sharepoint (global, cn,de,us)
- 189cloud (Personal, Family)
- GoogleDrive
- 123pan
- FTP / SFTP
- PikPak
- S3
- Seafile
- UPYUN Storage Service
- WebDav(Support OneDrive/SharePoint without API)
- Teambition(China,International)
- Mediatrack
- 139yun (Personal, Family, Group)
- YandexDisk
- BaiduNetdisk
- Terabox
- UC
- Quark
- Thunder
- Lanzou
- ILanzou
- Aliyundrive share
- Google photo
- Mega.nz
- Baidu photo
- SMB
- 115
- Cloudreve
- Dropbox
- FeijiPan
- dogecloud
- Azure Blob Storage
- Easy to deploy and out-of-the-box
- File preview (PDF, markdown, code, plain text, ...)
- Image preview in gallery mode
- Video and audio preview, support lyrics and subtitles
- Office documents preview (docx, pptx, xlsx, ...)
README.md
preview rendering- File permalink copy and direct file download
- Dark mode
- I18n
- Protected routes (password protection and authentication)
- WebDav (see https://alistgo.com/guide/webdav.html for details)
- Docker Deploy
- Cloudflare Workers proxy
- File/Folder package download
- Web upload(Can allow visitors to upload), delete, mkdir, rename, move and copy
- Offline download
- Copy files between two storage
- Multi-thread downloading acceleration for single-thread download/stream
Document
API Documentation (via Apifox):
https://alist-public.apifox.cn/
Demo
Discussion
Please go to our discussion forum for general questions, issues are for bug reports and feature requests only.
Sponsor
AList is an open-source software, if you happen to like this project and want me to keep going, please consider sponsoring me or providing a single donation! Thanks for all the love and support: https://alistgo.com/guide/sponsor.html
Special sponsors
- VidHub - An elegant cloud video player within the Apple ecosystem. Support for iPhone, iPad, Mac, and Apple TV.
- 亚洲云 - 高防服务器|服务器租用|福州高防|广东电信|香港服务器|美国服务器|海外服务器 - 国内靠谱的企业级云计算服务提供商 (sponsored Chinese API server)
- 找资源 - 阿里云盘资源搜索引擎
Contributors
Thanks goes to these wonderful people:
License
The AList
is open-source software licensed under the AGPL-3.0 license.
Disclaimer
- This program is a free and open source project. It is designed to share files on the network disk, which is convenient for downloading and learning Golang. Please abide by relevant laws and regulations when using it, and do not abuse it;
- This program is implemented by calling the official sdk/interface, without destroying the official interface behavior;
- This program only does 302 redirect/traffic forwarding, and does not intercept, store, or tamper with any user data;
- Before using this program, you should understand and bear the corresponding risks, including but not limited to account ban, download speed limit, etc., which is none of this program's business;
- If there is any infringement, please contact me by email, and it will be dealt with in time.