mirror of
https://github.com/fatedier/frp.git
synced 2026-04-28 03:49:09 +08:00
protocol: add v2 wire protocol with binary framing and capability negotiation (#5294)
This commit is contained in:
@@ -20,24 +20,24 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
TypeLogin = 'o'
|
||||
TypeLoginResp = '1'
|
||||
TypeNewProxy = 'p'
|
||||
TypeNewProxyResp = '2'
|
||||
TypeCloseProxy = 'c'
|
||||
TypeNewWorkConn = 'w'
|
||||
TypeReqWorkConn = 'r'
|
||||
TypeStartWorkConn = 's'
|
||||
TypeNewVisitorConn = 'v'
|
||||
TypeNewVisitorConnResp = '3'
|
||||
TypePing = 'h'
|
||||
TypePong = '4'
|
||||
TypeUDPPacket = 'u'
|
||||
TypeNatHoleVisitor = 'i'
|
||||
TypeNatHoleClient = 'n'
|
||||
TypeNatHoleResp = 'm'
|
||||
TypeNatHoleSid = '5'
|
||||
TypeNatHoleReport = '6'
|
||||
TypeLogin byte = 'o'
|
||||
TypeLoginResp byte = '1'
|
||||
TypeNewProxy byte = 'p'
|
||||
TypeNewProxyResp byte = '2'
|
||||
TypeCloseProxy byte = 'c'
|
||||
TypeNewWorkConn byte = 'w'
|
||||
TypeReqWorkConn byte = 'r'
|
||||
TypeStartWorkConn byte = 's'
|
||||
TypeNewVisitorConn byte = 'v'
|
||||
TypeNewVisitorConnResp byte = '3'
|
||||
TypePing byte = 'h'
|
||||
TypePong byte = '4'
|
||||
TypeUDPPacket byte = 'u'
|
||||
TypeNatHoleVisitor byte = 'i'
|
||||
TypeNatHoleClient byte = 'n'
|
||||
TypeNatHoleResp byte = 'm'
|
||||
TypeNatHoleSid byte = '5'
|
||||
TypeNatHoleReport byte = '6'
|
||||
)
|
||||
|
||||
var msgTypeMap = map[byte]any{
|
||||
|
||||
Reference in New Issue
Block a user