CUCyber / ja3transport

Impersonating JA3 signatures
MIT License
366 stars 61 forks source link

How can we use proxies with this? #4

Closed GameHackerPM closed 3 years ago

GameHackerPM commented 3 years ago

Hello I was wondering, how can we use proxies with this? I can see in cclient there is a use of proxies, but can't parse ja3str to create a custom transport! so how can we be able to use proxies with this?

t94j0 commented 3 years ago

Since ja3transport returns a Transport object, and proxies are handled by the Transport object, you can always add the Proxy field to the http.Transport object.

Here's a general overview of how you'd accomplish that:

tr, _ := NewTransport("771-61-60-53,0-23-15,29,23,24,0")
tr.Proxy = MyProxy()
client := &http.Client{Transport: tr}
client.Get("https://ja3er.com/json")

You can also check out how we create the Transport object and fork the project to your own liking: https://github.com/CUCyber/ja3transport/blob/master/transport.go#L108

seankovacs commented 3 years ago

It appears that once you use a proxy, the JA3 will now get generated based on the proxy server's TLS setup and not the client. This is based on observations I'm seeing and not via deep knowledge in this space.

t94j0 commented 3 years ago

Sorry for taking to long to respond. Yep, that's the expected behavior. When the client sends a TLS ClientHello, the proxy server will intercept that and use it's own ClientHello to respond to the server since the proxy is making the final TLS request at the end of the day.