Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy操作值不支持本地文件 #1189

Open
xuopoj opened this issue Dec 30, 2024 · 1 comment
Open

proxy操作值不支持本地文件 #1189

xuopoj opened this issue Dec 30, 2024 · 1 comment

Comments

@xuopoj
Copy link

xuopoj commented Dec 30, 2024

操作值文档中提到,proxy不支持本地文件

如果字符串不包含空格,可以直接写到配置里面:

pattern opProtocol://(strValue)

# 有些操作值不能放到本地文件,则可以不用括号,如:proxy、referer等等,具体参见协议列表
pattern opProtocol://strValue

这种限制是有什么原因吗?

我这边有个使用场景,proxy是需要密码访问的,我想将这个proxy操作值放在本地文件里面,whistle管理页面不能看到。

@avwo
Copy link
Owner

avwo commented Jan 1, 2025

以下协议对应的操作值都是简单的文本,不支持从本地文件或远程 URL 获取:
statusCodereplaceStatusredirectforwardedForresponseForreqDelayresDelayuarefererreqTyperesTypecachemethodreqCharsetresCharsetreqSpeedresSpeedhostproxypac
你可以通过 @url 在规则里加载本地文件或远程 URL 的规则:

@localFile
# 或
@remoteUrl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants