Closed marten-seemann closed 3 months ago
One option is to define an error. Iff the applications returns this error, we can set a custom HTTP status:
type ProxyError struct {
HTTPStatus int
Error string
}
func (e *ProxyError) Error() string { return e.Error }
Resolved by #43.
A proxy might want to control DNS resolution of target hosts (e.g. force usage of DoH). This is currently not possible, since the proxy implementation handles DNS resolution.
We could combine pass the hostname to
DialTarget
instead:This would also allow us to remove the
Allow
callback.It's not clear how we should set the HTTP status code though.