mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
订阅新增 User-Agent 选项,允许自定义 UA,默认使用 QuantumultX UA 以获取流量信息
This commit is contained in:
@@ -49,6 +49,16 @@
|
||||
/>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
<v-textarea
|
||||
v-model="options.ua"
|
||||
auto-grow
|
||||
class="mt-2"
|
||||
clear-icon="clear"
|
||||
clearable
|
||||
label="User-Agent"
|
||||
placeholder="自定义下载订阅使用的User-Agent,可选。"
|
||||
rows="2"
|
||||
/>
|
||||
<v-textarea
|
||||
v-model="options.icon"
|
||||
auto-grow
|
||||
@@ -354,6 +364,7 @@ export default {
|
||||
name: "",
|
||||
url: "",
|
||||
icon: "",
|
||||
ua: "",
|
||||
useless: "KEEP",
|
||||
udp: "DEFAULT",
|
||||
"skip-cert-verify": "DEFAULT",
|
||||
@@ -413,6 +424,13 @@ export default {
|
||||
} else {
|
||||
output.url = this.options.url;
|
||||
}
|
||||
// assign user-agent, if ua is set
|
||||
let ua = this.options.ua;
|
||||
if (typeof ua != "undefined" && ua != null && ua.trim().length > 0) {
|
||||
output.ua = ua;
|
||||
}else{
|
||||
output.ua=""
|
||||
}
|
||||
// useless filter
|
||||
if (this.options.useless === 'REMOVE') {
|
||||
output.process.push({
|
||||
@@ -573,6 +591,7 @@ function loadProcess(options, source, isCollection = false) {
|
||||
...options,
|
||||
name: source.name,
|
||||
icon: source.icon,
|
||||
ua: source.ua
|
||||
};
|
||||
if (isCollection) {
|
||||
options.subscriptions = source.subscriptions;
|
||||
|
||||
Reference in New Issue
Block a user