headers.go 523 B

123456789101112131415161718192021222324252627282930313233
  1. package protocol
  2. import (
  3. v2net "github.com/v2ray/v2ray-core/common/net"
  4. )
  5. type RequestCommand byte
  6. const (
  7. RequestCommandTCP = RequestCommand(0x01)
  8. RequestCommandUDP = RequestCommand(0x02)
  9. )
  10. type RequestOption byte
  11. const (
  12. RequestOptionChunkStream = RequestOption(0x01)
  13. )
  14. type RequestHeader struct {
  15. Version byte
  16. User *User
  17. Command RequestCommand
  18. Option RequestOption
  19. Address v2net.Address
  20. Port v2net.Port
  21. }
  22. type ResponseCommand interface{}
  23. type ResponseHeader struct {
  24. Command ResponseCommand
  25. }