Giter Club home page Giter Club logo

trotinet's Introduction

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

TrotiNet is distributed under the GNU Lesser General Public License v3.0
(LGPL). See: http://www.gnu.org/licenses/lgpl.html

trotinet's People

Contributors

dependabot[bot] avatar krys-g avatar mogikanin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trotinet's Issues

Problem in header decode

HI,

First, thanks for your job, this c# proxy is the best I tried, and very customizable :)

Hi just report a problem with header decode :
I tried to implement basic authentication and, and can't decode base64 proxy auth because of the "ToLower" applied on all header lines. (and not reversible) so I debug an d find this :

HttpHeaders.cs :

144 line = line.ToLower(); <------
145 string HeaderName = line.Substring(0, iSplit).Trim();
156 string HeaderValue = line.Substring(iSplit + 1).Trim();

I changed with :

144 ----> // line = line.ToLower();
145 string HeaderName = line.Substring(0, iSplit).Trim().ToLower(); <-----
156 string HeaderValue = line.Substring(iSplit + 1).Trim();

And it works very well :)

I think lower of all headers with value would compromise some data in cookie too,

Thanks again,

Jsl1

Not Handling HTTPS Requests

I am using IE11 with the proxy. The proxy works well with HTTP requests, but when I try to request https://www.google.com/, it says the page cannot be displayed.

Manipulate response.

Not an issue, interested if you had any tests for manipulating the response, I'm just looking into proxy'ing but have a need to adjust the response and validate markup. Library looks cool at first glance :)

Does the parsing of destination host and port works ?

I think the ParseDestinationHostAndPort() in AbstractProxyLogic doesn't work as expected ?
lets say I need to parse this url, http://host.com:8080.
So the value of authority for this case will be http://host.com:8080 because this fallsunder the first category and then when you try to extract the host name and port, the authority value is still includes the scheme.

So the scheme should be removed from the authority.

Line 217 should be like this
// case 1
authority = hrl.URI.Substring(prefix);
System.Diagnostics.Debug.Assert(true);

instead of

// case 1
authority = hrl.URI;
System.Diagnostics.Debug.Assert(bIsConnect);

Please Create Example in windows Forms and to Modify Request Header

Hello,

I'm new with c# and I want to create simple HTTP proxy filter (Like proxomitron, privoxy, ISPCE...) where i can modify request header, can you give me example in windows Forms with:

  1. Start and Stop Listener button (i can create it but after i clicked Start button the windows always freeze/hang)
  2. example code to modify Request Header
  3. ability to create "CONNECT" Method
  4. Forward to Remote Proxy IP.

and thank you very much.

Trotinet: Browser unable to open https url after running trotinet web proxy

Trotinet proxy is able to capture all HTTP url.
When I hit HTTP url in browser, trorinet proxy is able to capture all HTTP urls.
After running Trotinet web proxy , the problem is that browser stops supporting HTTPS url opening, however browser is able to open HTTP url.

AS Trotinet does not support HTTPS network trafficking, so I want to capture only HTTP traffic not HTTPS. But the need is that browser should be able to open HTTPS url.
How to achieve this.??

problem with WCF

I am using TrotiNet to inspect my WCF application but it does not work.
it just captures first request and shows no response.

OnReceiveResponse

when protocol https, OnReceiveResponse not called? Or am I mistaken?

Trotinet: Do not capture HTTPS network traffic

After running this trotinet program, it captures http traffic. But browsers like firefox , chrome do not allow opening of HTTPS url and even trotinet do not capture those https traffic. I want to capture HTTPS and HTTP traffic both.

RequestBody

Is there a possibility to have the Request body available as an byte array for use in your class that inherits from ProxyLogic?

Youtube issue

Hello, when you watch a youtube video, the OnReceiveResponse is never called, so how could I know what is the total size of the downloaded bytes? It looks like this is a kind of byte's streaming.

Thank you, nice job.

Simple WCF request fails

I created a simple WCF request against this public service endpoint: http://www.restfulwebservices.net/wcf/WeatherForecastService.svc (in visual studio add service reference). Type the following code (I named the service Cloud)

        using (var proxy = new Cloud.WeatherForecastServiceClient())
        {
            var cities = proxy.GetCitiesByCountry("USA");

            cities.ToList().ForEach(Console.WriteLine);
        }

When the program above goes through the TrotiNet proxy, I get an exception in ReadRaw()==0. From what I can tell the server is returning HTTP-100/Continue.

           if (AvailableData == 0)
            {
                if (ReadRaw() == 0)
                    // Connection closed while we were waiting for data
                    throw new IoBroken();

Altering RequestHeaders.Referer is not possible?

Hi krys-g,

First of all, thank you for your great work! It is fun to fiddle around with this nice code!

However I am stuck on one thing: I a trying to set the RequestHeaders.Referer to null. It seems it is not possible to alter it? I can successfully alter for example the RequestHeaders.Host value in the OnReceiveRequest function but not the Referer.

Can you tell me where this is possible?

For debugging I did also alter this line in HttpHeaders.cs: Referer = ParseStringValue("referer"); to: Referer = " https://google.com";.

But that did not work either. Are I am missing some point?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.