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