fix(ipvanish): updater user agent to work again

This commit is contained in:
Quentin McGaw
2026-08-04 22:26:37 +00:00
parent 6f5fbab228
commit 297d6480d0
4 changed files with 22 additions and 3 deletions
+11
View File
@@ -1,6 +1,7 @@
package unzip
import (
"context"
"net/http"
)
@@ -8,6 +9,16 @@ type Unzipper struct {
client *http.Client
}
type contextKey int
const (
userAgentContextKey contextKey = iota
)
func WithUserAgent(ctx context.Context, userAgent string) context.Context {
return context.WithValue(ctx, userAgentContextKey, userAgent)
}
func New(client *http.Client) *Unzipper {
return &Unzipper{
client: client,