github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/transport/internet/headers/wireguard/wireguard.go (about) 1 package wireguard 2 3 import ( 4 "context" 5 6 "github.com/v2fly/v2ray-core/v5/common" 7 ) 8 9 type Wireguard struct{} 10 11 func (Wireguard) Size() int32 { 12 return 4 13 } 14 15 // Serialize implements PacketHeader. 16 func (Wireguard) Serialize(b []byte) { 17 b[0] = 0x04 18 b[1] = 0x00 19 b[2] = 0x00 20 b[3] = 0x00 21 } 22 23 // NewWireguard returns a new VideoChat instance based on given config. 24 func NewWireguard(ctx context.Context, config interface{}) (interface{}, error) { 25 return Wireguard{}, nil 26 } 27 28 func init() { 29 common.Must(common.RegisterConfig((*WireguardConfig)(nil), NewWireguard)) 30 }