Giter Club home page Giter Club logo

masquerade's People

Contributors

davidschinazi avatar jromwu 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

Watchers

 avatar  avatar

masquerade's Issues

Issues encountered while setting up masquerade for HTTP/3 to HTTP/1.1 proxying, and a question about using existing SOCKS5 proxies

Hi,

I was looking for a way to proxy my connection with Instagram using a proxy that sends requests over HTTP/3 and returns responses in HTTP/1.1. Is this project intended to serve a similar purpose?

While trying to set up and execute the project, I encountered some issues with the provided code. Here's what happened:

Initially, I executed the server with the following command:

cargo run --bin server -- 127.0.0.1:4433

Then, I executed the client using this command:

cargo run --bin client -- 127.0.0.1:4433 127.0.0.1:8989 http

However, I received an error message that stated:

thread 'main' panicked at 'UDP socket send_to() failed: Os { code: 56, kind: Uncategorized, message: "Socket is already connected" }'

To resolve this issue, I made the following changes to the code:

At line 155 in client.rs:

        let (write, send_info) = conn.send(&mut out).expect("initial send failed"); 
        // while let Err(e) = socket.send_to(&out[..write], send_info.to).await {
        while let Err(e) = socket.send(&out[..write]).await {
            if e.kind() == std::io::ErrorKind::WouldBlock {
                debug!("send_to() would block");
                continue;
            }
            panic!("UDP socket send_to() failed: {:?}", e);
        }
        debug!("written {}", write);

At line 476 in client.rs:

                // match socket.send_to(&out[..write], send_info.to).await {
                match socket.send(&out[..write]).await {
                    Ok(written) => debug!("{} written {} bytes out of {}", conn.trace_id(), written, write),
                    Err(e) => panic!("UDP socket send_to() failed: {:?}", e),
                }

After making this change, the code executed without any errors. Is this approach correct?

Finally, I would like to ask if it's possible to use an existing TCP/SOCKS5 proxy hosted on a remote server as a way to establish a QUIC-encapsulated connection, or if it's only possible to do this using pre-existing interfaces on localhost?

Thank you for your help!

problem getting and end 2 end example with socks5 to work

Hi,

I was trying to run the example provided in the README, but I can not find a way to properly provide the :path header to establish the tunnel using a socks interface. This is what I have tried:

  • Client:
    RUST_LOG=debug cargo run --bin client -- 127.0.0.1:4433 127.0.0.1:8989 socks5

  • Server
    RUST_LOG=debug cargo run --bin server -- 127.0.0.1:4433

From the logs I find the http3 connection between client and server is established, then I try to open a socks5 connection to the client:
nc -X 5 -x 127.0.0.1:8989 127.0.0.1 7777

and wait for traffic to be received in 127.0.0.1:7777
nc -l -u 127.0.0.1 7777

but the connection is not established:
2023-04-17T11:01:53.127Z INFO masquerade_proxy::client] sending HTTP3 request [":method: CONNECT", ":path: 127.0.0.1:7777", ":protocol: connect-udp", ":scheme: dummy-scheme", ":authority: dummy-authority", ":authorization: dummy-[2023-

04-17T11:01:53.131Z INFO masquerade_proxy::server] e67f06407f71f425ed7a7cc3ab94af4d4a992126 got request [(":method", "CONNECT"), (":path", "127.0.0.1:7777"), (":protocol", "connect-udp"), (":scheme", "dummy-scheme"), (":authority", "dummy-authority"), (":authorization", "dummy-authorization")] on stream id 4authorization"]

Looks like the :path header is not compliant with the expected format:
// for now, let's assume path pattern is "/something.../target-host/target-port/"

but I don't see how can I do that using nc, or other socks5 client

Retrieving QUIC secrets

Hello,

I'm doing some experience on Masquerade and wanted to analyze the traffic using Wireshark
To do so, I need QUIC secrets to allow Wireshark to decipher the QUIC packet. I tried using the environment variable SSLKEYLOGFILE but it didn't get populated.
Would you happen to have any idea how to do it?

Thanks

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.