|
673 | 673 | <a-switch v-model="enableDNS"></a-switch>
|
674 | 674 | </a-col>
|
675 | 675 | </a-row>
|
676 |
| - </a-list-item> |
677 |
| - <template v-if="enableDNS"> |
678 |
| - <a-list-item> |
| 676 | + <template v-if="enableDNS"> |
679 | 677 | <a-row style="padding: 10px 20px;">
|
680 | 678 | <a-col :lg="24" :xl="12">
|
681 | 679 | <a-list-item-meta title='{{ i18n "pages.xray.dns.tag" }}'
|
|
685 | 683 | <a-input type="text" v-model="dnsTag"></a-input>
|
686 | 684 | </a-col>
|
687 | 685 | </a-row>
|
688 |
| - </a-list-item> |
689 |
| - <a-list-item> |
| 686 | + <a-row style="padding: 10px 20px;"> |
| 687 | + <a-col :lg="24" :xl="12"> |
| 688 | + <a-list-item-meta title='{{ i18n "pages.xray.dns.clientIp" }}' |
| 689 | + description='{{ i18n "pages.xray.dns.clientIpDesc" }}'/> |
| 690 | + </a-col> |
| 691 | + <a-col :lg="24" :xl="12"> |
| 692 | + <a-input type="text" v-model="dnsClientIp"></a-input> |
| 693 | + </a-col> |
| 694 | + </a-row> |
690 | 695 | <a-row style="padding: 10px 20px;">
|
691 | 696 | <a-col :lg="24" :xl="12">
|
692 | 697 | <a-list-item-meta title='{{ i18n "pages.xray.dns.strategy" }}'
|
|
701 | 706 | </a-select>
|
702 | 707 | </a-col>
|
703 | 708 | </a-row>
|
704 |
| - </a-list-item> |
705 |
| - </template> |
| 709 | + <a-row style="padding: 10px 20px;"> |
| 710 | + <a-col :lg="24" :xl="12"> |
| 711 | + <a-list-item-meta title='{{ i18n "pages.xray.dns.disableCache" }}' |
| 712 | + description='{{ i18n "pages.xray.dns.disableCacheDesc" }}'/> |
| 713 | + </a-col> |
| 714 | + <a-col :lg="24" :xl="12"> |
| 715 | + <a-switch v-model="dnsDisableCache"></a-switch> |
| 716 | + </a-col> |
| 717 | + </a-row> |
| 718 | + <a-row style="padding: 10px 20px;"> |
| 719 | + <a-col :lg="24" :xl="12"> |
| 720 | + <a-list-item-meta title='{{ i18n "pages.xray.dns.disableFallback" }}' |
| 721 | + description='{{ i18n "pages.xray.dns.disableFallbackDesc" }}'/> |
| 722 | + </a-col> |
| 723 | + <a-col :lg="24" :xl="12"> |
| 724 | + <a-switch v-model="dnsDisableFallback"></a-switch> |
| 725 | + </a-col> |
| 726 | + </a-row> |
| 727 | + <a-row style="padding: 10px 20px;"> |
| 728 | + <a-col :lg="24" :xl="12"> |
| 729 | + <a-list-item-meta title='{{ i18n "pages.xray.dns.disableFallbackIfMatch" }}' |
| 730 | + description='{{ i18n "pages.xray.dns.disableFallbackIfMatchDesc" }}'/> |
| 731 | + </a-col> |
| 732 | + <a-col :lg="24" :xl="12"> |
| 733 | + <a-switch v-model="dnsDisableFallbackIfMatch"></a-switch> |
| 734 | + </a-col> |
| 735 | + </a-row> |
| 736 | + </template> |
| 737 | + </a-list-item> |
706 | 738 | </a-collapse-panel>
|
707 | 739 | <template v-if="enableDNS">
|
708 | 740 | <a-collapse-panel header='DNS'>
|
|
1971 | 2003 | set: function (newValue) {
|
1972 | 2004 | newTemplateSettings = this.templateSettings;
|
1973 | 2005 | if (newValue) {
|
1974 |
| - newTemplateSettings.dns = { servers: [], queryStrategy: "UseIP", tag: "dns_inbound" }; |
| 2006 | + newTemplateSettings.dns = { |
| 2007 | + servers: [], |
| 2008 | + queryStrategy: "UseIP", |
| 2009 | + tag: "dns_inbound" |
| 2010 | + }; |
1975 | 2011 | newTemplateSettings.fakedns = null;
|
1976 | 2012 | } else {
|
1977 | 2013 | delete newTemplateSettings.dns;
|
|
1986 | 2022 | },
|
1987 | 2023 | set: function (newValue) {
|
1988 | 2024 | newTemplateSettings = this.templateSettings;
|
1989 |
| - newTemplateSettings.dns.tag = newValue; |
| 2025 | + newTemplateSettings.dns.tag = newValue; |
| 2026 | + this.templateSettings = newTemplateSettings; |
| 2027 | + } |
| 2028 | + }, |
| 2029 | + dnsClientIp: { |
| 2030 | + get: function () { |
| 2031 | + return this.enableDNS ? this.templateSettings.dns.clientIp : null; |
| 2032 | + }, |
| 2033 | + set: function (newValue) { |
| 2034 | + newTemplateSettings = this.templateSettings; |
| 2035 | + if (newValue) { |
| 2036 | + newTemplateSettings.dns.clientIp = newValue; |
| 2037 | + } else { |
| 2038 | + delete newTemplateSettings.dns.clientIp; |
| 2039 | + } |
| 2040 | + this.templateSettings = newTemplateSettings; |
| 2041 | + } |
| 2042 | + }, |
| 2043 | + dnsDisableCache: { |
| 2044 | + get: function () { |
| 2045 | + return this.enableDNS ? this.templateSettings.dns.disableCache : false; |
| 2046 | + }, |
| 2047 | + set: function (newValue) { |
| 2048 | + newTemplateSettings = this.templateSettings; |
| 2049 | + if (newValue) { |
| 2050 | + newTemplateSettings.dns.disableCache = newValue; |
| 2051 | + } else { |
| 2052 | + delete newTemplateSettings.dns.disableCache |
| 2053 | + } |
| 2054 | + this.templateSettings = newTemplateSettings; |
| 2055 | + } |
| 2056 | + }, |
| 2057 | + dnsDisableFallback: { |
| 2058 | + get: function () { |
| 2059 | + return this.enableDNS ? this.templateSettings.dns.disableFallback : false; |
| 2060 | + }, |
| 2061 | + set: function (newValue) { |
| 2062 | + newTemplateSettings = this.templateSettings; |
| 2063 | + if (newValue) { |
| 2064 | + newTemplateSettings.dns.disableFallback = newValue; |
| 2065 | + } else { |
| 2066 | + delete newTemplateSettings.dns.disableFallback |
| 2067 | + } |
| 2068 | + this.templateSettings = newTemplateSettings; |
| 2069 | + } |
| 2070 | + }, |
| 2071 | + dnsDisableFallbackIfMatch: { |
| 2072 | + get: function () { |
| 2073 | + return this.enableDNS ? this.templateSettings.dns.disableFallbackIfMatch : false; |
| 2074 | + }, |
| 2075 | + set: function (newValue) { |
| 2076 | + newTemplateSettings = this.templateSettings; |
| 2077 | + if (newValue) { |
| 2078 | + newTemplateSettings.dns.disableFallbackIfMatch = newValue; |
| 2079 | + } else { |
| 2080 | + delete newTemplateSettings.dns.disableFallbackIfMatch |
| 2081 | + } |
1990 | 2082 | this.templateSettings = newTemplateSettings;
|
1991 | 2083 | }
|
1992 | 2084 | },
|
|
0 commit comments