1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-17 17:36:08 -04:00
v2fly/transport/internet/headers/wireguard/wireguard.go
2021-02-17 04:31:50 +08:00

31 lines
559 B
Go

package wireguard
import (
"context"
"github.com/v2fly/v2ray-core/v4/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))
}