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

close #167
This commit is contained in:
Peng-YM committed 2022-09-09 21:03:01 +08:00
1 parent 0072739f01
commit c60aec603f
5 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.12.7",
"version": "2.12.8",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
@@ -103,7 +103,7 @@ domain = match:[0-9a-zA-z-_.]+ {
port = digits:[0-9]+ {
const port = parseInt(digits.join(""), 10);
if (port >= 80 && port <= 65535) {
if (port >= 0 && port <= 65535) {
return port;
}
throw new Error("Invalid port number: " + port);
@@ -128,7 +128,7 @@ ip = & {
port = digits:[0-9]+ {
const port = parseInt(digits.join(""), 10);
if (port >= 80 && port <= 65535) {
if (port >= 0 && port <= 65535) {
return port;
}
}
@@ -107,7 +107,7 @@ domain = match:[0-9a-zA-z-_.]+ {
port = digits:[0-9]+ {
const port = parseInt(digits.join(""), 10);
if (port >= 80 && port <= 65535) {
if (port >= 0 && port <= 65535) {
return port;
}
}
@@ -70,7 +70,7 @@ ip = & {
port = digits:[0-9]+ {
const port = parseInt(digits.join(""), 10);
if (port >= 80 && port <= 65535) {
if (port >= 0 && port <= 65535) {
return port;
} else {
throw new Error("Invalid port: " + port);