mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-29 10:02:09 +08:00
fix(connections): show destination IP as host for raw-IP targets (#7483)
* fix(connections): show destination IP as host for raw-IP targets When metadata.host is empty (a raw-IP CONNECT with no domain), the connection "Host" column fell back to remoteDestination (the outbounds relay/exit address) joined with the destination port, which misleadingly showed the relay as the connections destination. Fall back to metadata.destinationIP instead, in both the list column (getConnectionHost) and the detail panel. Closes #6669 * fix(connections): preserve fallback for empty destination IP --------- Co-authored-by: wonfen <eiwonfen@gmail.com>
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
- 修复全局扩展脚本中的通配符配置可能生成无效 YAML 的问题
|
||||
- 修复代理组筛选后定位及滚动位置恢复异常的问题
|
||||
- 修复编辑订阅配置时清空 HTTP 请求超时会报错的问题
|
||||
- 修复纯 IP 连接的主机地址显示错误,并保留目标 IP 为空时的地址回退
|
||||
|
||||
<details>
|
||||
<summary><strong> ✨ 新增功能 </strong></summary>
|
||||
|
||||
@@ -73,9 +73,9 @@ const InnerConnectionDetail = ({ data, closed, onClose }: InnerProps) => {
|
||||
const theme = useTheme()
|
||||
const chains = [...data.chains].reverse().join(' / ')
|
||||
const rule = rulePayload ? `${data.rule}(${rulePayload})` : data.rule
|
||||
const host = metadata.host
|
||||
? `${metadata.host}:${metadata.destinationPort}`
|
||||
: `${metadata.remoteDestination}:${metadata.destinationPort}`
|
||||
const hostAddress =
|
||||
metadata.host || metadata.destinationIP || metadata.remoteDestination
|
||||
const host = `${hostAddress}:${metadata.destinationPort}`
|
||||
const Destination = metadata.destinationIP
|
||||
? metadata.destinationIP
|
||||
: metadata.remoteDestination
|
||||
|
||||
@@ -57,9 +57,9 @@ export const getConnectionDestination = (connection: IConnectionsItem) => {
|
||||
|
||||
export const getConnectionHost = (connection: IConnectionsItem) => {
|
||||
const { metadata } = connection
|
||||
return metadata.host
|
||||
? `${metadata.host}:${metadata.destinationPort}`
|
||||
: `${metadata.remoteDestination}:${metadata.destinationPort}`
|
||||
const host =
|
||||
metadata.host || metadata.destinationIP || metadata.remoteDestination
|
||||
return `${host}:${metadata.destinationPort}`
|
||||
}
|
||||
|
||||
export const getConnectionProcess = (connection: IConnectionsItem) => {
|
||||
|
||||
Reference in New Issue
Block a user