修复:支持查看 Inline 代理提供者内容 - #342
Open
uclort wants to merge 1 commit into
Open
Conversation
Owner
|
@uclort 没啥必要吧,这个主要还是为不能直接查看的文件提供一个入口,inline类型当前直接查看配置和或者运行时配置都是可以的 |
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.
功能说明
修复代理提供者内容查看仅支持 HTTP/File、无法查看 Inline 提供者的问题。
Inline provider 没有缓存文件路径,旧逻辑会直接返回
provider path is empty。本改动保留最近一次成功应用的原始配置;查看 Inline provider 时,从对应proxy-providers.<name>.payload生成标准proxies:YAML 内容。使用位置
在 Bettbox 的代理提供者列表中打开任意提供者内容:
行为边界
关键逻辑对比
原逻辑仅接受带文件路径的 provider:
新逻辑先识别 Inline provider,并从原始配置提取
payload:验证
CGO_ENABLED=0 go test .(core)CGO_ENABLED=0 go build -tags=with_gvisor -o /tmp/bettbox-core-inline-provider-check .(core)go test ./adapter/provider ./config(core/Clash.Meta)