config.go 766 B

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