mirror of
https://github.com/fatedier/frp.git
synced 2026-04-27 19:39:10 +08:00
protocol: add v2 wire protocol with binary framing and capability negotiation (#5294)
This commit is contained in:
@@ -16,6 +16,9 @@
|
||||
<el-tag v-if="client.version" size="small" type="success"
|
||||
>v{{ client.version }}</el-tag
|
||||
>
|
||||
<el-tag v-if="client.wireProtocolLabel" size="small" type="info">
|
||||
{{ client.wireProtocolLabel }}
|
||||
</el-tag>
|
||||
</div>
|
||||
|
||||
<div class="card-meta">
|
||||
|
||||
@@ -4,6 +4,7 @@ export interface ClientInfoData {
|
||||
clientID: string
|
||||
runID: string
|
||||
version?: string
|
||||
wireProtocol?: string
|
||||
hostname: string
|
||||
clientIP?: string
|
||||
metas?: Record<string, string>
|
||||
|
||||
@@ -7,6 +7,7 @@ export class Client {
|
||||
clientID: string
|
||||
runID: string
|
||||
version: string
|
||||
wireProtocol: string
|
||||
hostname: string
|
||||
ip: string
|
||||
metas: Map<string, string>
|
||||
@@ -21,6 +22,7 @@ export class Client {
|
||||
this.clientID = data.clientID
|
||||
this.runID = data.runID
|
||||
this.version = data.version || ''
|
||||
this.wireProtocol = data.wireProtocol || ''
|
||||
this.hostname = data.hostname
|
||||
this.ip = data.clientIP || ''
|
||||
this.metas = new Map<string, string>()
|
||||
@@ -48,6 +50,11 @@ export class Client {
|
||||
return this.runID.substring(0, 8)
|
||||
}
|
||||
|
||||
get wireProtocolLabel(): string {
|
||||
if (!this.wireProtocol) return ''
|
||||
return `Protocol ${this.wireProtocol}`
|
||||
}
|
||||
|
||||
get firstConnectedAgo(): string {
|
||||
return formatDistanceToNow(this.firstConnectedAt)
|
||||
}
|
||||
@@ -80,6 +87,7 @@ export class Client {
|
||||
this.user.toLowerCase().includes(search) ||
|
||||
this.clientID.toLowerCase().includes(search) ||
|
||||
this.runID.toLowerCase().includes(search) ||
|
||||
this.wireProtocol.toLowerCase().includes(search) ||
|
||||
this.hostname.toLowerCase().includes(search)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
<el-tag v-if="client.version" size="small" type="success"
|
||||
>v{{ client.version }}</el-tag
|
||||
>
|
||||
<el-tag v-if="client.wireProtocolLabel" size="small" type="info">
|
||||
{{ client.wireProtocolLabel }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<div class="client-meta">
|
||||
<span v-if="client.ip" class="meta-item">{{
|
||||
@@ -58,6 +61,10 @@
|
||||
<span class="info-label">Run ID</span>
|
||||
<span class="info-value">{{ client.runID }}</span>
|
||||
</div>
|
||||
<div v-if="client.wireProtocol" class="info-item">
|
||||
<span class="info-label">Protocol</span>
|
||||
<span class="info-value">{{ client.wireProtocol }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">First Connected</span>
|
||||
<span class="info-value">{{ client.firstConnectedAgo }}</span>
|
||||
|
||||
7
web/package-lock.json
generated
7
web/package-lock.json
generated
@@ -5753,9 +5753,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.5.8",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz",
|
||||
"integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==",
|
||||
"version": "8.5.12",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.12.tgz",
|
||||
"integrity": "sha512-W62t/Se6rA0Az3DfCL0AqJwXuKwBeYg6nOaIgzP+xZ7N5BFCI7DYi1qs6ygUYT6rvfi6t9k65UMLJC+PHZpDAA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@@ -5770,7 +5770,6 @@
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.11",
|
||||
"picocolors": "^1.1.1",
|
||||
|
||||
Reference in New Issue
Block a user