This commit is contained in:
2026-06-15 18:18:16 +08:00
parent 97c9fba14e
commit 2b9f134e5f
4164 changed files with 386922 additions and 79 deletions

View File

@@ -0,0 +1,29 @@
#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
{
/// <summary>
/// Represents a SOCKS proxy used for making HTTP requests, supporting SOCKS version 5 (v5).
/// </summary>
public sealed class SOCKSProxy : Proxy
{
/// <summary>
/// Initializes a new instance of the SOCKSProxy class with the specified proxy address and credentials.
/// </summary>
/// <param name="address">The address of the SOCKS proxy server.</param>
/// <param name="credentials">The credentials for proxy authentication (if required).</param>
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