config.go 620 B

123456789101112131415161718192021222324252627282930313233343536
  1. package config
  2. import (
  3. v2net "github.com/v2ray/v2ray-core/common/net"
  4. )
  5. type DetourTag string
  6. type ConnectionConfig interface {
  7. Protocol() string
  8. Settings() interface{}
  9. }
  10. type LogConfig interface {
  11. AccessLog() string
  12. }
  13. type InboundDetourConfig interface {
  14. Protocol() string
  15. PortRange() v2net.PortRange
  16. Settings() interface{}
  17. }
  18. type OutboundDetourConfig interface {
  19. Protocol() string
  20. Tag() DetourTag
  21. Settings() interface{}
  22. }
  23. type PointConfig interface {
  24. Port() uint16
  25. LogConfig() LogConfig
  26. InboundConfig() ConnectionConfig
  27. OutboundConfig() ConnectionConfig
  28. InboundDetours() []InboundDetourConfig
  29. }