mirror of
https://github.com/PretendoNetwork/SSSL-DNS.git
synced 2026-04-25 07:16:46 -05:00
remove DoH. Wii U doesnt support it
This commit is contained in:
parent
1a736492f7
commit
a3391e5190
|
|
@ -8,7 +8,6 @@ The only 2 addresses required are for `conntest.nintendowifi.net` and `account.n
|
|||
|----------------------------|----------------------------------------------------------------------------------------|----------------------------------------|
|
||||
| `SSSL_UDP_PORT` | UDP port for the DNS server. | Only if not using TCP. |
|
||||
| `SSSL_TCP_PORT` | TPC port for the DNS server. | Only if not using UDP. |
|
||||
| `SSSL_DOH_PORT` | DoH port for the DNS server. Wii U does not support DoH. | Should not be used. |
|
||||
| `SSSL_DNS_DEFAULT_ADDRESS` | The default address to use for `conntest.nintendowifi.net` and `account.nintendo.net`. | Only if not explicitly mapped. |
|
||||
| `SSSL_DNS_MAP_hostname` | An explicit mapping of a hostname to an address. | Only if not using the default address. |
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ if (!addressMap['account.nintendo.net']) {
|
|||
|
||||
let udpPort = 0;
|
||||
let tcpPort = 0;
|
||||
let dohPort = 0;
|
||||
|
||||
if (process.env.SSSL_UDP_PORT) {
|
||||
udpPort = Number(process.env.SSSL_UDP_PORT);
|
||||
|
|
@ -46,10 +45,6 @@ if (process.env.SSSL_TCP_PORT) {
|
|||
tcpPort = Number(process.env.SSSL_TCP_PORT);
|
||||
}
|
||||
|
||||
if (process.env.SSSL_DOH_PORT) {
|
||||
dohPort = Number(process.env.SSSL_DOH_PORT);
|
||||
}
|
||||
|
||||
if (Number.isNaN(udpPort)) {
|
||||
console.log(colors.bgRed('Invalid UDP port'));
|
||||
process.exit();
|
||||
|
|
@ -60,22 +55,14 @@ if (Number.isNaN(tcpPort)) {
|
|||
process.exit();
|
||||
}
|
||||
|
||||
if (Number.isNaN(dohPort)) {
|
||||
console.log(colors.bgRed('Invalid DoH port'));
|
||||
if (udpPort === 0 && tcpPort === 0) {
|
||||
console.log(colors.bgRed('No server port set. Set one of SSSL_UDP_PORT or SSSL_TCP_PORT'));
|
||||
process.exit();
|
||||
}
|
||||
|
||||
if (udpPort === 0 && tcpPort === 0 && dohPort === 0) {
|
||||
console.log(colors.bgRed('No server port set. Set one of SSSL_UDP_PORT, SSSL_TCP_PORT or SSSL_DOH_PORT'));
|
||||
process.exit();
|
||||
}
|
||||
|
||||
if (dohPort !== 0) {
|
||||
console.log(colors.bgBrightYellow('DoH port set. The Wii U does not support DoH'));
|
||||
}
|
||||
|
||||
const server = createServer({
|
||||
udp: true,
|
||||
tcp: true,
|
||||
handle: (request, send) => {
|
||||
const [ question ] = request.questions;
|
||||
const { name } = question;
|
||||
|
|
@ -137,18 +124,11 @@ server.on('listening', () => {
|
|||
]);
|
||||
}
|
||||
|
||||
if (addresses.doh) {
|
||||
tableData.push([
|
||||
colors.green('DoH'), colors.green(`${addresses.doh.address}:${addresses.doh.port}`)
|
||||
]);
|
||||
}
|
||||
|
||||
console.log(colors.green('SSSL-DNS listening on the following addresses'));
|
||||
console.log(table(tableData, tableConfig));
|
||||
});
|
||||
|
||||
server.listen({
|
||||
udp: udpPort !== 0 ? udpPort : undefined,
|
||||
tcp: tcpPort !== 0 ? tcpPort : undefined,
|
||||
doh: dohPort !== 0 ? dohPort : undefined
|
||||
tcp: tcpPort !== 0 ? tcpPort : undefined
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user