Xray-core/transport/internet/headers/wireguard/wireguard.go

31 lines
554 B
Go
Raw Normal View History

2020-11-25 11:01:53 +00:00
package wireguard
import (
"context"
2020-12-04 01:36:16 +00:00
"github.com/xtls/xray-core/common"
2020-11-25 11:01:53 +00:00
)
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))
}