Temporary logo

Please note! I longer have time to work on this project. If you are interested in becoming maintainer, please contact me.

About TrotiNet

TrotiNet is a HTTP proxy library implemented in C#. It aims at delivering a simple, reusable framework for developing any sort of HTTP proxies.

TrotiNet is distributed under the GNU Lesser General Public License v3.0.


Latest version is 0.8.0. The precompiled library can be found here.

Source code is available here.

Usage example

using System;
using TrotiNet;

namespace TrotiNet.Example
    public class TransparentProxy : ProxyLogic
        public TransparentProxy(HttpSocket clientSocket)
            : base(clientSocket) { }

        static new public TransparentProxy CreateProxy(HttpSocket clientSocket)
            return new TransparentProxy(clientSocket);

        protected override void OnReceiveRequest()
            Console.WriteLine("-> " + RequestLine + " from HTTP referer " +

        protected override void OnReceiveResponse()
            Console.WriteLine("<- " + ResponseStatusLine +
                " with HTTP Content-Length: " +
                (ResponseHeaders.ContentLength ?? 0));

    public static class Example
        public static void Main()
            int port = 12345;
            bool bUseIPv6 = false;

            var Server = new TcpServer(port, bUseIPv6);

            if (Server.InitListenException != null)
                throw Server.InitListenException;

            while (true)


More examples may be found in the source code (see

Comparison with the Mentalis proxy

In 2002, the Mentalis.org team has released an
open-source HTTP proxy, also written in C#. We believe TrotiNet is a better alternative because: On the other hand, TrotiNet does not currently support SOCKS5.


Contact email is available on github project page.

Like TrotiNet? You can tip bitcoin address 15drGS5JTFi5XRymp9YoccTsaBaAWS3KoT.
Get TrotiNet at SourceForge.net. Fast, secure and Free Open Source software downloads