mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-13 12:46:36 +08:00
修复v6-only入口优先选择出口IPv6
This commit is contained in:
@@ -333,10 +333,16 @@ public class GostUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean supportsV4(Node node) {
|
private static boolean supportsV4(Node node) {
|
||||||
|
// New dual-stack fields take precedence over legacy serverIp.
|
||||||
|
// If user explicitly provided only v6, treat as v6-only.
|
||||||
if (StrUtil.isNotBlank(node.getServerIpV4())) {
|
if (StrUtil.isNotBlank(node.getServerIpV4())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(node.getServerIpV6())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
String legacy = node.getServerIp();
|
String legacy = node.getServerIp();
|
||||||
if (StrUtil.isBlank(legacy)) {
|
if (StrUtil.isBlank(legacy)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -355,10 +361,16 @@ public class GostUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean supportsV6(Node node) {
|
private static boolean supportsV6(Node node) {
|
||||||
|
// New dual-stack fields take precedence over legacy serverIp.
|
||||||
|
// If user explicitly provided only v4, treat as v4-only.
|
||||||
if (StrUtil.isNotBlank(node.getServerIpV6())) {
|
if (StrUtil.isNotBlank(node.getServerIpV6())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(node.getServerIpV4())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
String legacy = node.getServerIp();
|
String legacy = node.getServerIp();
|
||||||
if (StrUtil.isBlank(legacy)) {
|
if (StrUtil.isBlank(legacy)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user