Added WARP endpoint

This commit is contained in:
Shtorm
2025-06-01 22:06:34 +03:00
parent 756acc77e9
commit dfc6fce8bb
11 changed files with 380 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package cloudflare
import (
"context"
"net"
"net/http"
)
type CloudflareApiOption func(api *CloudeflareApi)
func WithDialContext(dialContext func(ctx context.Context, network, addr string) (net.Conn, error)) CloudflareApiOption {
return func(api *CloudeflareApi) {
api.client.Transport = &http.Transport{
DialContext: dialContext,
}
}
}