Skip to content

Commit

Permalink
feat: 域名解析支持自定义 EDNS(需新版后端)
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Jun 22, 2024
1 parent c122d4d commit 2217ff4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store-front-end",
"version": "2.14.247",
"version": "2.14.248",
"private": true,
"scripts": {
"dev": "vite --host",
Expand Down
11 changes: 10 additions & 1 deletion src/views/editor/components/ActionRadio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
</nut-radiogroup>
</div>
<template v-if="type === 'Resolve Domain Operator' && rdoNewVersion">
<div class="radio-wrapper options-radio">
<p class="des-label">EDNS(Google, Ali, Tencent, 自定义 DoH 会携带此参数, 可能会影响解析结果)</p>
<div class="input-wrapper">
<nut-input placeholder="请输入纯 IP, 默认为 223.6.6.6" v-model="rdoEdns" />
</div>
</div>
<div class="radio-wrapper options-radio">
<p class="des-label">解析类型</p>
<nut-radiogroup direction="horizontal" v-model="rdoType">
Expand Down Expand Up @@ -126,6 +132,7 @@
const rdoFilter = ref('disabled');
const rdoCache = ref('enabled');
const rdoUrl = ref('');
const rdoEdns = ref('');
const showTwTips = () => {
Toast.text('免责声明: 本操作仅将 Emoji 旗帜进行替换以便于显示, 不包含任何政治意味');
Expand Down Expand Up @@ -169,13 +176,14 @@
rdoFilter.value = item.args?.filter ?? 'disabled';
rdoCache.value = item.args?.cache ?? 'enabled';
rdoUrl.value = item.args?.url ?? '';
rdoEdns.value = item.args?.edns;
break;
}
}
});
// 值变化时实时修改 form 的数据
watch([value, rdoFilter, rdoCache, rdoUrl, rdoType, foTw], () => {
watch([value, rdoFilter, rdoCache, rdoUrl, rdoEdns, rdoType, foTw], () => {
if (['IPv6', 'IP4P'].includes(rdoType.value) && ['IP-API'].includes(value.value)) {
showNotify({
title: `${value.value} 不支持 ${rdoType.value}`,
Expand All @@ -200,6 +208,7 @@
filter: rdoFilter.value,
cache: rdoCache.value,
url: rdoUrl.value,
edns: rdoEdns.value,
};
break;
}
Expand Down

0 comments on commit 2217ff4

Please sign in to comment.