config.go 612 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package config
  2. type DetourTag string
  3. type ConnectionConfig interface {
  4. Protocol() string
  5. Settings() interface{}
  6. }
  7. type LogConfig interface {
  8. AccessLog() string
  9. }
  10. type PortRange interface {
  11. From() uint16
  12. To() uint16
  13. }
  14. type InboundDetourConfig interface {
  15. Protocol() string
  16. PortRange() 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. InboundConfig() ConnectionConfig
  28. OutboundConfig() ConnectionConfig
  29. InboundDetours() []InboundDetourConfig
  30. }