HTeaPot
HTeaPot copied to clipboard
Multiple server instances
The server should have the capability to deploy/start multiple servers using a configuration file.
Proposed Configuration File:
[HTEAPOT]
[[server]]
port = 8081
host = "0.0.0.0"
root = "public"
threads = 5
cache = true
cache_ttl = 3600
[server.proxy]
"/test" = "http://example.com"
"/google" = "http://google.com"
[[server]]
port = 8082
host = "0.0.0.0"
[server.proxy]
"/" = "http://ifconfig.co" # This will override all proxies and local requests
Currently, the configuration file works as follows:
[HTEAPOT]
port = 8081
host = "0.0.0.0"
root = "public"
threads = 5
cache = true
cache_ttl = 3600
[proxy]
"/test" = "http://example.com"
"/google" = "http://google.com"
Objective:
Update the configuration file to support setting up multiple servers, allowing unique details for each server instance, such as port, host, and proxy rules.