feat: 支持代理与转发到 Topic ,并新增 GHCR 镜像发布工作流#92
Open
RayShaw97 wants to merge 10 commits intoHeavrnl:mainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
主要变更
1) 支持网络代理(适用于受限网络环境)
.env.example新增代理配置:PROXY_TYPE/PROXY_HOST/PROXY_PORT/PROXY_USERNAME/PROXY_PASSWORDmain.py为TelegramClient增加proxy=...参数;当PROXY_TYPE != none时启用requirements.txt新增依赖python-socks(用于 socks/http 代理)2) 支持 Telegram Topics(线程) 转发
models/models.py:ForwardRule新增可空字段target_topic_id,并在migrate_db()中自动迁移/bind:当在目标群的某个 Topic 内执行时,自动记录target_topic_id/bindfilters/sender_filter.py在发送消息/文件时若存在target_topic_id则使用reply_to=topic_idTopic: <id>(若有)3) Docker & GitHub Actions
.github/workflows/publish-image.ymlmain/ 打v*.*.*tag 时构建并发布镜像到 GHCRlinux/amd64+linux/arm64多架构构建;使用 GHA cache;按 digest 推送后合并 manifestlatest(default branch)、semver(1.2.3/1.2/1)、以及sha-<short>unknown/unknownDockerfile优化为 multi-stage:构建期安装依赖并复制到运行时镜像,减少最终镜像体积/依赖.dockerignore增加忽略**/.venv/兼容性说明
target_topic_id为空即视为主聊天)