config.go 830 B

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