lint: fix
This commit is contained in:
parent
5bdc10e84d
commit
d26d71af5f
@ -125,7 +125,7 @@ export default class SsBasePreset extends IPresetAddressing {
|
|||||||
port = buffer.slice(17, 19).readUInt16BE(0);
|
port = buffer.slice(17, 19).readUInt16BE(0);
|
||||||
offset += 16;
|
offset += 16;
|
||||||
break;
|
break;
|
||||||
case ATYP_DOMAIN:
|
case ATYP_DOMAIN: {
|
||||||
const domainLen = buffer[1];
|
const domainLen = buffer[1];
|
||||||
if (buffer.length < domainLen + 4) {
|
if (buffer.length < domainLen + 4) {
|
||||||
return fail(`invalid length: ${buffer.length}`);
|
return fail(`invalid length: ${buffer.length}`);
|
||||||
@ -137,6 +137,7 @@ export default class SsBasePreset extends IPresetAddressing {
|
|||||||
port = buffer.slice(2 + domainLen, 4 + domainLen).readUInt16BE(0);
|
port = buffer.slice(2 + domainLen, 4 + domainLen).readUInt16BE(0);
|
||||||
offset += (domainLen + 1);
|
offset += (domainLen + 1);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return fail(`invalid atyp: ${atyp}`);
|
return fail(`invalid atyp: ${atyp}`);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ export default async function curl(args) {
|
|||||||
case 'https':
|
case 'https':
|
||||||
command.push(`--proxy-insecure -x https://${proxyHost}:${proxyPort}`);
|
command.push(`--proxy-insecure -x https://${proxyHost}:${proxyPort}`);
|
||||||
break;
|
break;
|
||||||
default:
|
default: {
|
||||||
const proxy = {
|
const proxy = {
|
||||||
'socks': '--socks5',
|
'socks': '--socks5',
|
||||||
'socks4': '--socks4',
|
'socks4': '--socks4',
|
||||||
@ -32,6 +32,7 @@ export default async function curl(args) {
|
|||||||
command.push(`${proxy} ${proxyHost}:${proxyPort}`);
|
command.push(`${proxy} ${proxyHost}:${proxyPort}`);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
command.push(`${targetHost}:${targetPort}`);
|
command.push(`${targetHost}:${targetPort}`);
|
||||||
command = command.join(' ');
|
command = command.join(' ');
|
||||||
|
Loading…
Reference in New Issue
Block a user