config.go 924 B

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