feat(ednsdiag): add DoQ/DoH3/DNSCrypt transports, proxy support, probe & compare
This commit is contained in:
@@ -1,12 +1,29 @@
|
||||
package edns
|
||||
|
||||
import "time"
|
||||
|
||||
type QueryOptions struct {
|
||||
Name string
|
||||
RecordType string
|
||||
Protocol string
|
||||
Provider string
|
||||
Method string
|
||||
EndpointURL string
|
||||
Proxy string
|
||||
}
|
||||
|
||||
type CompareTarget struct {
|
||||
Protocol string `json:"protocol"`
|
||||
Provider string `json:"provider"`
|
||||
Method string `json:"method,omitempty"`
|
||||
}
|
||||
|
||||
type CompareOptions struct {
|
||||
Name string
|
||||
RecordType string
|
||||
Targets []CompareTarget
|
||||
AttemptTimeout time.Duration
|
||||
MaxAttempts int
|
||||
Proxy string
|
||||
}
|
||||
|
||||
type Result struct {
|
||||
@@ -21,15 +38,34 @@ type Result struct {
|
||||
Error *ErrorInfo `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
type CompareResult struct {
|
||||
SchemaVersion int `json:"schema_version"`
|
||||
Operation string `json:"operation"`
|
||||
Completed bool `json:"completed"`
|
||||
Query QueryInfo `json:"query"`
|
||||
Attempts []Result `json:"attempts"`
|
||||
Summary CompareSummary `json:"summary"`
|
||||
Error *ErrorInfo `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
type CompareSummary struct {
|
||||
Total int `json:"total"`
|
||||
Completed int `json:"completed"`
|
||||
Failed int `json:"failed"`
|
||||
Unsupported int `json:"unsupported"`
|
||||
}
|
||||
|
||||
type QueryInfo struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
type ResolverInfo struct {
|
||||
Provider string `json:"provider"`
|
||||
Endpoint string `json:"endpoint"`
|
||||
Profile string `json:"profile"`
|
||||
Provider string `json:"provider"`
|
||||
Endpoint string `json:"endpoint"`
|
||||
Profile string `json:"profile"`
|
||||
AuthenticationName string `json:"authentication_name,omitempty"`
|
||||
CertificateSerial uint32 `json:"certificate_serial,omitempty"`
|
||||
}
|
||||
|
||||
type TransportInfo struct {
|
||||
@@ -41,6 +77,10 @@ type TransportInfo struct {
|
||||
TLSVersion string `json:"tls_version,omitempty"`
|
||||
ALPN string `json:"alpn,omitempty"`
|
||||
HTTPVersion string `json:"http_version,omitempty"`
|
||||
HTTPAgeSeconds int64 `json:"http_age_seconds,omitempty"`
|
||||
QUICVersion string `json:"quic_version,omitempty"`
|
||||
CryptoConstruction string `json:"crypto_construction,omitempty"`
|
||||
Proxy string `json:"proxy,omitempty"`
|
||||
}
|
||||
|
||||
type DNSInfo struct {
|
||||
|
||||
Reference in New Issue
Block a user