diff --git a/_worker.js b/_worker.js
index 71e898e14..2bf4ecef5 100644
--- a/_worker.js
+++ b/_worker.js
@@ -5027,7 +5027,7 @@ async function updateDataset(env, newSettings, resetSettings) {
return fieldValue;
};
const remoteDNSPattern = /^(?:[a-zA-Z]+:\/\/)?([^:\/\s?]+)/;
- const remoteDNS = validateField("remoteDNS") ?? currentSettings?.remoteDNS;
+ const remoteDNS = validateField("remoteDNS") ?? currentSettings?.remoteDNS ?? "https://8.8.8.8/dns-query";
const serverMatch = remoteDNS.match(remoteDNSPattern);
const remoteDNSServer = serverMatch ? serverMatch[1] : void 0;
const isServerDomain = isDomain(remoteDNSServer);
@@ -5045,7 +5045,7 @@ async function updateDataset(env, newSettings, resetSettings) {
}
}
const proxySettings = {
- remoteDNS: remoteDNS ?? "https://8.8.8.8/dns-query",
+ remoteDNS,
resolvedRemoteDNS: resolvedRemoteDNS ?? {},
localDNS: validateField("localDNS") ?? currentSettings?.localDNS ?? "8.8.8.8",
vlessTrojanFakeDNS: validateField("vlessTrojanFakeDNS") ?? currentSettings?.vlessTrojanFakeDNS ?? false,
@@ -5210,14 +5210,16 @@ function renderHomePage(proxySettings, hostName, isPassSet) {
const isWarpPlus = warpPlusLicense ? true : false;
let activeProtocols = (vlessConfigs ? 1 : 0) + (trojanConfigs ? 1 : 0);
let httpPortsBlock = "", httpsPortsBlock = "";
- [...defaultHttpPorts, ...defaultHttpsPorts].forEach((port) => {
+ const allPorts = [...hostName.includes("workers.dev") ? defaultHttpPorts : [], ...defaultHttpsPorts];
+ allPorts.forEach((port) => {
let id = `port-${port}`;
+ const isChecked = ports.includes(port) ? "checked" : "";
let portBlock = `
-
+
`;
- defaultHttpPorts.includes(port) ? httpPortsBlock += portBlock : httpsPortsBlock += portBlock;
+ defaultHttpsPorts.includes(port) ? httpsPortsBlock += portBlock : httpPortsBlock += portBlock;
});
const html = `
@@ -5396,7 +5398,6 @@ function renderHomePage(proxySettings, hostName, isPassSet) {
border-radius: 10px;
margin-bottom: 20px;
overflow: hidden;
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
th, td { padding: 10px; border-bottom: 1px solid var(--border-color); }
td div { display: flex; align-items: center; }
@@ -5612,7 +5613,7 @@ function renderHomePage(proxySettings, hostName, isPassSet) {
${httpsPortsBlock}
- ${hostName.includes("pages.dev") ? "" : `
+ ${!httpPortsBlock ? "" : `
Non TLS |
${httpPortsBlock}
diff --git a/src/worker.js b/src/worker.js
index 542c9f5d1..60d41d462 100644
--- a/src/worker.js
+++ b/src/worker.js
@@ -1239,7 +1239,7 @@ async function updateDataset (env, newSettings, resetSettings) {
}
const remoteDNSPattern = /^(?:[a-zA-Z]+:\/\/)?([^:\/\s?]+)/;
- const remoteDNS = validateField('remoteDNS') ?? currentSettings?.remoteDNS;
+ const remoteDNS = validateField('remoteDNS') ?? currentSettings?.remoteDNS ?? 'https://8.8.8.8/dns-query';
const serverMatch = remoteDNS.match(remoteDNSPattern);
const remoteDNSServer = serverMatch ? serverMatch[1] : undefined;
const isServerDomain = isDomain(remoteDNSServer);
@@ -1258,7 +1258,7 @@ async function updateDataset (env, newSettings, resetSettings) {
}
const proxySettings = {
- remoteDNS: remoteDNS ?? 'https://8.8.8.8/dns-query',
+ remoteDNS: remoteDNS,
resolvedRemoteDNS: resolvedRemoteDNS ?? {},
localDNS: validateField('localDNS') ?? currentSettings?.localDNS ?? '8.8.8.8',
vlessTrojanFakeDNS: validateField('vlessTrojanFakeDNS') ?? currentSettings?.vlessTrojanFakeDNS ?? false,
@@ -1448,15 +1448,17 @@ function renderHomePage (proxySettings, hostName, isPassSet) {
const isWarpPlus = warpPlusLicense ? true : false;
let activeProtocols = (vlessConfigs ? 1 : 0) + (trojanConfigs ? 1 : 0);
let httpPortsBlock = '', httpsPortsBlock = '';
+ const allPorts = [...(hostName.includes('workers.dev') ? defaultHttpPorts : []), ...defaultHttpsPorts];
- [...defaultHttpPorts, ...defaultHttpsPorts].forEach(port => {
+ allPorts.forEach(port => {
let id = `port-${port}`;
+ const isChecked = ports.includes(port) ? 'checked' : '';
let portBlock = `
-
+
`;
- defaultHttpPorts.includes(port) ? httpPortsBlock += portBlock : httpsPortsBlock += portBlock;
+ defaultHttpsPorts.includes(port) ? httpsPortsBlock += portBlock : httpPortsBlock += portBlock;
});
const html = `
@@ -1636,7 +1638,6 @@ function renderHomePage (proxySettings, hostName, isPassSet) {
border-radius: 10px;
margin-bottom: 20px;
overflow: hidden;
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
th, td { padding: 10px; border-bottom: 1px solid var(--border-color); }
td div { display: flex; align-items: center; }
@@ -1852,7 +1853,7 @@ function renderHomePage (proxySettings, hostName, isPassSet) {
${httpsPortsBlock}
|
- ${hostName.includes('pages.dev') ? '' : `
+ ${!httpPortsBlock ? '' : `
Non TLS |
${httpPortsBlock}
|