providers

package
v0.0.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package providers contains third-party proxy provider adapters that implement the proxy.Provider interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrightData

type BrightData struct {
	// contains filtered or unexported fields
}

BrightData provides proxies from the Bright Data (Luminati) service.

The apiKey field carries the full credential string in the format:

customer-{customer_id}-zone-{zone}:password

or just:

customer-{customer_id}-zone-{zone}

func NewBrightData

func NewBrightData(apiKey, product, country string) *BrightData

NewBrightData creates a BrightData provider. apiKey is the full credential string (username or username:password). product is one of "residential", "datacenter", or "isp". country is an ISO 3166-1 alpha-2 country code (e.g. "US", "DE").

func (*BrightData) Proxies

func (b *BrightData) Proxies(_ context.Context) ([]*proxy.Proxy, error)

Proxies returns a single proxy configured for the Bright Data gateway. Bright Data exposes a single gateway endpoint; rotation is handled server-side.

type Oxylabs

type Oxylabs struct {
	// contains filtered or unexported fields
}

Oxylabs provides proxies from the Oxylabs residential/datacenter service.

func NewOxylabs

func NewOxylabs(username, password, product, country string) *Oxylabs

NewOxylabs creates an Oxylabs provider. username and password are the Oxylabs account credentials. product is one of "residential", "datacenter", or "isp". country is an ISO 3166-1 alpha-2 country code (e.g. "US", "DE").

func (*Oxylabs) Proxies

func (o *Oxylabs) Proxies(_ context.Context) ([]*proxy.Proxy, error)

Proxies returns a single proxy configured for the Oxylabs gateway. Oxylabs uses a username format that encodes customer ID and country:

customer-{username}-cc-{country}

type Smartproxy

type Smartproxy struct {
	// contains filtered or unexported fields
}

Smartproxy provides proxies from the Smartproxy residential service.

func NewSmartproxy

func NewSmartproxy(username, password, country string) *Smartproxy

NewSmartproxy creates a Smartproxy provider. username and password are the Smartproxy account credentials. country is an ISO 3166-1 alpha-2 country code (e.g. "US", "AU").

func (*Smartproxy) Proxies

func (s *Smartproxy) Proxies(_ context.Context) ([]*proxy.Proxy, error)

Proxies returns a single proxy configured for the Smartproxy gateway. When a country is specified the username encodes the country code:

user.{username}-cc-{country}

If no country is provided the bare username is used.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL