• Products

    Microsoft .NET

    Microsoft .NET components, libraries & tools

    • EmailVerify for .NET
      Email validation library, featuring full IETF-compliant syntax validation, DNS checking, mailbox existence test and tools for advanced batch processing.
    • ProxyClient for .NET
      Powerful proxy client library with support for SOCKS 4, SOCKS 4a, SOCKS 5 and HTTP proxy servers, allowing to establish and accept remotely proxied connections.
    • MVC Extensions
      Powerful routing engine extensions for ASP.NET: allows to declare routes by way of attributes applied to MVC actions and generates URLs using compiler-safe lambda expressions.

    Microsoft Silverlight

    Microsoft Silverlight components, libraries & tools

    • EmailVerify for Silverlight
      Email validation library with Data Annotations support, featuring advanced syntax verification, ISP-specific syntax checks and disposable email address handling.

    Microsoft Visual Studio extensions

    Development tools, integrated into your favorite IDE

    • Routing Assistant
      FREE

      A cool and free Visual Studio extension which allows to easily browse, define, match and filter ASP.NET MVC routes within ASP.NET applications and web sites.

  • Purchase

    Products

    • EmailVerify for .NET
      • Licensing / editions
      • Volume discounts
      • Upgrades
      Purchase
    • ProxyClient for .NET
      • Licensing
      • Volume discounts
      • Upgrades
      Purchase
    • MVC Extensions
      • Licensing
      • Volume discounts
      • Upgrades
      Purchase

    Request a quote

    • Contact us
      Send a request to our sales staff.

  • Support

    Knowledge base

    • Browse the knowledge base
      Support documents for our products and services.

    Request support

    • Contact us
      Send a request to our customer support staff.

  • About us

    About Cobisi

    About our company, our team, our mission

    • Our company
      Cobisi company information.
    • Our mission
      About what we aim to achieve.
    • Follow us
      Follow us on Twitter.

    Contact us

    • Contact us
      Send a request to our customer support staff.

  • Company blog

    Latest posts from our blog

    Shared thoughts about our technologies, products and services

    • Routing Assistant reached version 1.7
      Published on Thursday, March 21, 2013

    • Verifalia: a new, complete hosted email validation service
      Published on Thursday, December 6, 2012

    • Routing Assistant v1.4 released
      Published on Friday, October 12, 2012

ProxyClient for .NET

A powerful SOCKS and HTTP proxy client component for Microsoft .NET

  • Overview
  • Download
  • Licensing
  • Purchase

🚀
ProxyClient for .NET has been discontinued, sorry
If you are here looking for a way to verify email addresses in .NET / .NET Core, .NET Framework and .NET Standard be sure to check out Verifalia, our email verification SaaS, and the free and open source Verifalia .NET SDK helper library at https://github.com/verifalia/verifalia-csharp-sdk

ProxyClient for .NET is a proxy client component targeted at the Microsoft .NET platform, which allows to easily establish proxied connections from both new and existing sockets (and TcpClient instances). As of version 2.0, it can also listen for and accept incoming connections established against a remote proxy server, as if they were accepted locally.

ProxyClient for .NET supports the following proxy protocols:
  • SOCKS v4
  • SOCKS v4a
  • SOCKS v5
  • HTTP-CONNECT proxy

Completely written in managed code (C#), the component is compliant with the Common Language Specification (CLS) and can be used with any other .NET language too, including Visual Basic (VB.NET), C++/CLI, Phalanger, J#, IronPython, IronRuby, F#, PowerShell and many others.

Why choose

Powerful and feature-rich

ProxyClient for .NET offers an easy way to traverse firewalls, using proxy servers, from within your applications; it can quickly make outgoing TCP connections to SOCKS v4, SOCKS v4A, SOCKS v5 and HTTP-CONNECT proxy servers, either by automatically creating a new socket (or a TcpClient instance) or by using a supplied object of this type, allowing you to even construct and configure it externally.

            // Set up a new proxy client object, bound to a SOCKS 5 server

            var proxy = new Socks5Client(IPAddress.Parse("10.0.1.2"),
                "john",
                "$ecrEt");

            // The target endpoint will be one of the Google's webservers
            
            var googleAddress = Dns.GetHostEntry("www.google.com").AddressList[0];
            var targetEndPoint = new IPEndPoint(googleAddress, 80);

            // Connect to a target IP endpoint via HTTP through a proxied connection
            
            var proxiedConnection = proxyClient.Connect(targetEndPoint);
            
            using (var proxiedStream = new NetworkStream(proxiedConnection.Socket))
            using (var writer = new StreamWriter(proxiedStream, Encoding.ASCII))
            {
                // Send the HTTP request to www.google.com

                writer.WriteLine("GET / HTTP/1.1");
                writer.WriteLine();
                writer.Flush();

                // ...
            }            
        

Starting from version 2.0, the component can even listen for and accept incoming, proxied connections made from third party against the proxy server the component has been connected to (SOCKS protocol only). The following code sample shows how ProxyClient for .NET can be used to set up an HTTP server which accepts connections made against a remote proxy server and sends back the replies as if the connection was local!
            // Set up a new proxy client object, bound to a SOCKS 5 server

            var proxy = new Socks5Client(IPAddress.Parse("10.0.1.2"),
                "john",
                "$ecrEt");

            Task.Run(async () =>
                {
                    // Binds the remote socket to the remote HTTP port

                    var listeningSocket = await proxy.BindAsync(new IPv4EndPoint
                        {
                            Address = IPAddress.Any,
                            Port = 80 // The protocol does not guarantee to obey this
                        });

                    Console.WriteLine("Remote socket listening on: {0}",
                                      listeningSocket.ListeningEndPoint);

                    // Accepts a remote connection

                    var acceptedSocket = await proxy.AcceptAsync(listeningSocket);

                    Console.WriteLine("Accepted a connection from: {0}",
                                      acceptedSocket.RemoteEndPoint);

                    // Writes a message back, using the HTTP protocol

                    using (var proxiedStream = new NetworkStream(acceptedSocket.Socket))
                    using (var reader = new StreamReader(proxiedStream, Encoding.ASCII))
                    using (var writer = new StreamWriter(proxiedStream, Encoding.ASCII))
                    {
                        // TODO: Handle the request

                        while (reader.EndOfStream)
                            reader.ReadLine();

                        // Generates a useful reply

                        writer.WriteLine("HTTP/1.0 200 OK");
                        writer.WriteLine("Content-Type: text/plain");
                        writer.WriteLine();
                        writer.WriteLine("hello, world");
                        writer.Flush();
                    }
            
                    // Close the underlying socket connection

                    listeningSocket.Socket.Close();
                });
        

ProxyClient for .NET comes with no restrictions about the kind of data transferred over the proxied connections it establishes or accepts, meaning it can be used, for example, to download a file via HTTP, HTTPS or FTP, send an email via SMTP or chat via IRC by way of a proxy server.

The library supports both asynchronous and synchronous connections and implements the IAsyncResult pattern. Starting from version 2.0, it also implements the async/await pattern.


Easy to use

ProxyClient.NET shares the same naming conventions and style you may find in the .NET framework itself and exposes a clean object hierarchy; connecting to a proxy server from within your own application, being it an ASP.NET website, a Windows Forms or a WPF application, requires just a line of code in most scenarios.

Should you need to connect to a remote FTP server using your company HTTP proxy server, for example, while using a TcpClient object, your code would look like this:

            // Set up a new proxy client, bound to the specified HTTP-Connect server

            var proxyEndPoint = new IPEndPoint(IPAddress.Parse("10.0.1.2"), 8080);

            var proxy = new HttpConnectClient(proxyEndPoint,
                "john",
                "$ecrEt");

            // Connect to the target FTP server via the proxy server

            var targetEndPoint = new IPEndPoint(IPAddress.Parse("64.4.30.62"), 21);
            var proxiedConnection = proxy.ConnectTcpClient(targetEndPoint);

            using (var tcpClient = proxiedConnection.TcpClient)
            using (var ftpStream = tcpClient.GetStream())
            using (var srFtpClient = new StreamReader(ftpStream))
            {
                // Retrieve the welcome message from the remote FTP server

                var welcomeMessage = srFtpClient.ReadLine();

                // ...
            }
        

proxy client

ProxyClient for .NET


Latest version: v2.1.0.2839
Released in March, 2015
View the release notes
Purchase


Featured clients

Cobisi has risen to prominence as a leader provider in software development solutions, across a multitude of industries. Our product has shown proven success among dozens of Fortune 500 and industry-leading enterprise corporations.
Products
  • EmailVerify for .NET
    • Features
    • Online demo
    • Download
    • Licensing / editions
    • Release notes
    • Purchase
  • ProxyClient for .NET
    • Download
    • Licensing / editions
    • Release notes
    • Purchase
  • MVC Extensions
    • Tutorial
    • Free edition download
    • Licensing
    • Release notes
    • Purchase
Support
  • Knowledge base
  • Request support

About Cobisi
  • The company
  • Mission
  • Follow us
  • Contact us
Copyright © 2005-2022 Cobisi Research. All rights reserved.
Cobisi Research - Via Della Costituzione, 31 - 35010, Vigonza - Italy (European Union)
VAT ID: IT04391160282