Adds DoH capabilities
This commit is contained in:
parent
68e0ec64c4
commit
1f29c385b5
1 changed files with 1 additions and 1 deletions
|
|
@ -48,6 +48,7 @@ export async function ensureDir(dir) {
|
||||||
* @param {string} value
|
* @param {string} value
|
||||||
*/
|
*/
|
||||||
const parseTxtRecordData = (value) => {
|
const parseTxtRecordData = (value) => {
|
||||||
|
throw new Error(value);
|
||||||
const result = {};
|
const result = {};
|
||||||
for (const part of value.split(';')) {
|
for (const part of value.split(';')) {
|
||||||
const [key, ...value] = part.split('=');
|
const [key, ...value] = part.split('=');
|
||||||
|
|
@ -90,7 +91,6 @@ export async function findTxtRecord(host) {
|
||||||
for (const head of resolved.answers) {
|
for (const head of resolved.answers) {
|
||||||
const txtData = parseTxtRecordData(head.data);
|
const txtData = parseTxtRecordData(head.data);
|
||||||
if (!txtData[recordParamDestUrl]) continue;
|
if (!txtData[recordParamDestUrl]) continue;
|
||||||
throw new Error(JSON.stringify(txtData));
|
|
||||||
return {
|
return {
|
||||||
url: txtData[recordParamDestUrl],
|
url: txtData[recordParamDestUrl],
|
||||||
httpStatus: txtData[recordParamHttpStatus],
|
httpStatus: txtData[recordParamHttpStatus],
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue