diff --git a/include/ui/profile/edit_quic.ui b/include/ui/profile/edit_quic.ui
index c048815..80bfe7f 100644
--- a/include/ui/profile/edit_quic.ui
+++ b/include/ui/profile/edit_quic.ui
@@ -144,7 +144,7 @@
-
- <html><head/><body><p>Comma seperated ranges: 100-200,500-600</p></body></html>
+ <html><head/><body><p>Comma seperated ranges: 100:200,500:600</p></body></html>
@@ -173,6 +173,9 @@
-
+
+ <html><head/><body><p>Comma seperated ranges: 100:200,500:600</p></body></html>
+
Port range
diff --git a/res/translations/fa_IR.ts b/res/translations/fa_IR.ts
index cdfac54..3bba370 100644
--- a/res/translations/fa_IR.ts
+++ b/res/translations/fa_IR.ts
@@ -260,18 +260,18 @@ For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mod
Proxy Format
-
- Http
-
-
-
- Socks
-
-
Language
+
+ http
+
+
+
+ socks
+
+
DialogEditGroup
@@ -946,10 +946,6 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun
UDP Relay Mode
-
- <html><head/><body><p>Comma seperated ranges: 100-200,500-600</p></body></html>
-
-
Port range
@@ -962,6 +958,10 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun
<html><head/><body><p>100ms<br/>1s</p></body></html>
+
+ <html><head/><body><p>Comma seperated ranges: 100:200,500:600</p></body></html>
+
+
EditSSH
diff --git a/res/translations/ru_RU.ts b/res/translations/ru_RU.ts
index 4de10b7..0da078f 100644
--- a/res/translations/ru_RU.ts
+++ b/res/translations/ru_RU.ts
@@ -269,18 +269,18 @@ For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mod
Proxy Format
-
- Http
-
-
-
- Socks
-
-
Language
+
+ http
+
+
+
+ socks
+
+
DialogEditGroup
@@ -960,10 +960,6 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun
UDP Relay Mode
Режим ретрансляции UDP
-
- <html><head/><body><p>Comma seperated ranges: 100-200,500-600</p></body></html>
-
-
Port range
@@ -976,6 +972,10 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun
<html><head/><body><p>100ms<br/>1s</p></body></html>
+
+ <html><head/><body><p>Comma seperated ranges: 100:200,500:600</p></body></html>
+
+
EditSSH
diff --git a/res/translations/zh_CN.ts b/res/translations/zh_CN.ts
index 1742374..6ab08e6 100644
--- a/res/translations/zh_CN.ts
+++ b/res/translations/zh_CN.ts
@@ -261,18 +261,18 @@ For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mod
Proxy Format
-
- Http
-
-
-
- Socks
-
-
Language
+
+ http
+
+
+
+ socks
+
+
DialogEditGroup
@@ -953,10 +953,6 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun
Disable SNI
不发送服务器名称指示
-
- <html><head/><body><p>Comma seperated ranges: 100-200,500-600</p></body></html>
-
-
Port range
@@ -969,6 +965,10 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun
<html><head/><body><p>100ms<br/>1s</p></body></html>
+
+ <html><head/><body><p>Comma seperated ranges: 100:200,500:600</p></body></html>
+
+
EditSSH
diff --git a/src/configs/proxy/Bean2CoreObj_box.cpp b/src/configs/proxy/Bean2CoreObj_box.cpp
index 70cfa89..d2bd552 100644
--- a/src/configs/proxy/Bean2CoreObj_box.cpp
+++ b/src/configs/proxy/Bean2CoreObj_box.cpp
@@ -244,13 +244,8 @@ namespace NekoGui_fmt {
if (!serverPorts.empty())
{
outbound.remove("server_port");
- QStringList portRanges;
- for (auto range : serverPorts)
- {
- portRanges.append(range.replace("-", ":"));
- }
- outbound["server_ports"] = QListStr2QJsonArray(portRanges);
- outbound["hop_interval"] = hop_interval;
+ outbound["server_ports"] = QListStr2QJsonArray(serverPorts);
+ if (!hop_interval.isEmpty()) outbound["hop_interval"] = hop_interval;
}
if (!obfsPassword.isEmpty()) {
diff --git a/src/configs/proxy/Bean2Link.cpp b/src/configs/proxy/Bean2Link.cpp
index 2503c8c..b03bafc 100644
--- a/src/configs/proxy/Bean2Link.cpp
+++ b/src/configs/proxy/Bean2Link.cpp
@@ -233,10 +233,18 @@ namespace NekoGui_fmt {
}
if (allowInsecure) q.addQueryItem("insecure", "1");
if (!sni.isEmpty()) q.addQueryItem("sni", sni);
+ if (!serverPorts.empty())
+ {
+ QStringList portList;
+ for (const auto& range : serverPorts)
+ {
+ portList.append(range.split(":"));
+ }
+ q.addQueryItem("server_ports", portList.join("-"));
+ }
+ if (!hop_interval.isEmpty()) q.addQueryItem("hop_interval", hop_interval);
if (!q.isEmpty()) url.setQuery(q);
if (!name.isEmpty()) url.setFragment(name);
- if (!serverPorts.empty()) q.addQueryItem("server_ports", serverPorts.join("-"));
- if (!hop_interval.isEmpty()) q.addQueryItem("hop_interval", hop_interval);
}
return url.toString(QUrl::FullyEncoded);
}
diff --git a/src/configs/proxy/Link2Bean.cpp b/src/configs/proxy/Link2Bean.cpp
index f4c4e07..da08dda 100644
--- a/src/configs/proxy/Link2Bean.cpp
+++ b/src/configs/proxy/Link2Bean.cpp
@@ -324,7 +324,12 @@ namespace NekoGui_fmt {
}
if (query.hasQueryItem("server_ports"))
{
- serverPorts = query.queryItemValue("server_ports").split("-");
+ auto portList = query.queryItemValue("server_ports").split("-");
+ for (int i=0;i= portList.size()) break;
+ serverPorts += portList[i]+":"+portList[i+1];
+ }
}
hop_interval = query.queryItemValue("hop_interval");