fix (core): Proxy port smaller that 80 is now allowed

close #167
This commit is contained in:
Peng-YM 2022-09-09 21:01:04 +08:00
parent 0072739f01
commit c60aec603f
5 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "sub-store", "name": "sub-store",
"version": "2.12.7", "version": "2.12.8",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {

View File

@ -103,7 +103,7 @@ domain = match:[0-9a-zA-z-_.]+ {
port = digits:[0-9]+ { port = digits:[0-9]+ {
const port = parseInt(digits.join(""), 10); const port = parseInt(digits.join(""), 10);
if (port >= 80 && port <= 65535) { if (port >= 0 && port <= 65535) {
return port; return port;
} }
throw new Error("Invalid port number: " + port); throw new Error("Invalid port number: " + port);

View File

@ -128,7 +128,7 @@ ip = & {
port = digits:[0-9]+ { port = digits:[0-9]+ {
const port = parseInt(digits.join(""), 10); const port = parseInt(digits.join(""), 10);
if (port >= 80 && port <= 65535) { if (port >= 0 && port <= 65535) {
return port; return port;
} }
} }

View File

@ -107,7 +107,7 @@ domain = match:[0-9a-zA-z-_.]+ {
port = digits:[0-9]+ { port = digits:[0-9]+ {
const port = parseInt(digits.join(""), 10); const port = parseInt(digits.join(""), 10);
if (port >= 80 && port <= 65535) { if (port >= 0 && port <= 65535) {
return port; return port;
} }
} }

View File

@ -70,7 +70,7 @@ ip = & {
port = digits:[0-9]+ { port = digits:[0-9]+ {
const port = parseInt(digits.join(""), 10); const port = parseInt(digits.join(""), 10);
if (port >= 80 && port <= 65535) { if (port >= 0 && port <= 65535) {
return port; return port;
} else { } else {
throw new Error("Invalid port: " + port); throw new Error("Invalid port: " + port);