feat(client): Add network config for ICMP endpoint client (#661)

* feat(client): Add network to config

* feat(client): Use network client config for pinger

* feat(client): Add client network configuration and demo to README

* feat(client): Add tests for pinger using network config

* feat(client): Drop integration tests

* feat(client): Add comment to tests

* feat(client): Add tests

* Update README.md

---------

Co-authored-by: TwiN <twin@linux.com>
This commit is contained in:
Nicolas Thumann
2024-02-07 03:15:51 +01:00
committed by GitHub
parent 6cbc59b0e8
commit 3d1b4e566d
4 changed files with 34 additions and 5 deletions

View File

@ -30,6 +30,7 @@ var (
Insecure: false,
IgnoreRedirect: false,
Timeout: defaultTimeout,
Network: "ip",
}
)
@ -64,6 +65,9 @@ type Config struct {
IAPConfig *IAPConfig `yaml:"identity-aware-proxy,omitempty"`
httpClient *http.Client
// Network (ip, ip4 or ip6) for the ICMP client
Network string `yaml:"network"`
}
// DNSResolverConfig is the parsed configuration from the DNSResolver config string.