config.go 916 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. Settings() interface{}
  25. }
  26. type OutboundDetourConfig interface {
  27. Protocol() string
  28. Tag() string
  29. Settings() interface{}
  30. }
  31. type PointConfig interface {
  32. Port() v2net.Port
  33. LogConfig() LogConfig
  34. RouterConfig() router.RouterConfig
  35. InboundConfig() ConnectionConfig
  36. OutboundConfig() ConnectionConfig
  37. InboundDetours() []InboundDetourConfig
  38. OutboundDetours() []OutboundDetourConfig
  39. }