#if !UNITY_WEBGL || UNITY_EDITOR using System; using Best.HTTP.Proxies.Implementations; using Best.HTTP.Request.Authentication; using Best.HTTP.Shared.Extensions; namespace Best.HTTP.Proxies { /// /// Represents a SOCKS proxy used for making HTTP requests, supporting SOCKS version 5 (v5). /// public sealed class SOCKSProxy : Proxy { /// /// Initializes a new instance of the SOCKSProxy class with the specified proxy address and credentials. /// /// The address of the SOCKS proxy server. /// The credentials for proxy authentication (if required). public SOCKSProxy(Uri address, Credentials credentials) : base(address, credentials) { } public override string GetRequestPath(Uri uri) => uri.GetRequestPathAndQueryURL(); internal override bool SetupRequest(HTTPRequest request) => false; internal override void BeginConnect(ProxyConnectParameters parameters) => new SOCKSV5Negotiator(this, parameters); } } #endif