Add ports listener feature

This commit is contained in:
2021-10-21 10:33:28 +02:00
parent 94e7faae78
commit bc9c5dbe0e
8 changed files with 286 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ type Config struct {
Store StoreConfig `toml:"Store"`
Honeypot HoneypotConfig `toml:"Honeypot"`
Frontend FrontendConfig `toml:"Frontend"`
Ports PortsConfig `toml:"Ports"`
}
type StoreConfig struct {
Type string `toml:"Type"`
@@ -46,6 +47,13 @@ type FrontendAutocertConfig struct {
RedirectHTTP bool `toml:"RedirectHTTP"`
}
type PortsConfig struct {
Enable bool `toml:"Enable"`
Addr string `toml:"Addr"`
TCPPorts []string `toml:"TCPPorts"`
UDPPorts []string `toml:"UDPPorts"`
}
func FromReader(r io.Reader) (Config, error) {
var c Config