Proxy class

Represents a proxy server

Implementers

Constructors

Proxy.new({required String ip, required int port, String? countryCode, String? country, bool isHttps = false, ProxyProtocol protocol = ProxyProtocol.http, String? anonymityLevel, String? region, String? isp, double? speed, int? latency, bool? supportsWebsockets, ProxyAuth? auth, ProxyScore? score, String? username, String? password})
Creates a new Proxy instance
const
Proxy.http({required String ip, required int port, String? countryCode, String? anonymityLevel, String? region, String? isp, double? speed, bool? supportsWebsockets, ProxyAuth? auth})
Creates a new Proxy with HTTP protocol
factory
Proxy.https({required String ip, required int port, String? countryCode, String? anonymityLevel, String? region, String? isp, double? speed, bool? supportsWebsockets, ProxyAuth? auth})
Creates a new Proxy with HTTPS protocol
factory
Proxy.socks4({required String ip, required int port, String? countryCode, String? anonymityLevel, String? region, String? isp, double? speed, bool? supportsWebsockets, ProxyAuth? auth})
Creates a new Proxy with SOCKS4 protocol
factory
Proxy.socks5({required String ip, required int port, String? countryCode, String? anonymityLevel, String? region, String? isp, double? speed, bool? supportsWebsockets, ProxyAuth? auth})
Creates a new Proxy with SOCKS5 protocol
factory

Properties

anonymityLevel String?
Anonymity level of the proxy (e.g., 'elite', 'anonymous', 'transparent')
final
auth ProxyAuth?
Authentication credentials (optional)
final
authMethod ProxyAuthMethod
Returns the authentication method
no setter
country String?
Country name of the proxy server (optional)
final
countryCode String?
Country code of the proxy server (optional)
final
hashCode int
The hash code for this object.
no setterinherited
host String
Returns the host (IP address) of the proxy
no setter
ip String
IP address of the proxy server
final
isAuthenticated bool
Returns true if this proxy requires authentication
no setter
isHttps bool
Whether the proxy supports HTTPS @deprecated Use protocol instead
final
isp String?
Internet Service Provider of the proxy (optional)
final
latency int?
Latency of the proxy in milliseconds (optional)
final
password String?
Password for authenticated proxies (optional) @deprecated Use auth instead
no setter
port int
Port number of the proxy server
final
protocol ProxyProtocol
Protocol used by the proxy
final
region String?
Region or city of the proxy server (optional)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
score ProxyScore?
Performance and reliability score for this proxy
final
socksVersion int?
SOCKS version if applicable (optional) @deprecated Use protocol instead
no setter
speed double?
Maximum speed of the proxy in Mbps (optional)
final
supportsSocks bool?
Whether the proxy supports SOCKS protocol (optional) @deprecated Use protocol instead
no setter
supportsWebsockets bool?
Whether the proxy supports websockets (optional)
final
url String
Returns the proxy URL in the format 'http(s)://ip:port'
no setter
username String?
Username for authenticated proxies (optional) @deprecated Use auth instead
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns a string representation of the proxy in the format 'ip:port'
override
withAuth(ProxyAuth auth) Proxy
Creates a new Proxy with the given authentication credentials
withBasicAuth(String username, String password) Proxy
Creates a new Proxy with basic authentication

Operators

operator ==(Object other) bool
The equality operator.
inherited