Add ports listener feature
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user