wiresock / proxifyre

ProxiFyre: SOCKS5 Proxifier for Windows
https://www.ntkernel.com
GNU Affero General Public License v3.0
316 stars 23 forks source link

Incompatiblity with mitmproxy #17

Closed physicallyjblocked closed 1 year ago

physicallyjblocked commented 1 year ago

there is this application called 'proxifier' which worked for my goal, but i wanted it runnable with .bat (and no subscription)

ive been trying to find a proxy app where i can force traffic from an application to a proxy server this project seemed perfect to the fact it can support my target application called 'roblox' and filter excusively to that

i have started up a proxy server, specifically mitmproxy, that listens on localhost:8080 and started proxifyre that redirects traffic to said destination

as a test, i configured the proxifyre to redirect chrome traffic

immediately, there was a problem: the results did not follow my expectations the following is the console of mitmproxy reality (by the way i should be able to see 'client disconnect' without closing proxifyre)

and this was what i was expecting expectation

for this second image, i set my system proxy to localhost:8080

but some applications like roblox seem to ignore the system proxy which is why i need something like this project to force the traffic

if you could either tell me how to fix this, fix this problem, or recommend me another open source that will work for my goal, please do thanks in advance

wiresock commented 1 year ago

The distinction here is that mitmproxy operates as an HTTPS proxy, while ProxiFyre is limited to supporting SOCKS4/5 proxies. It's also worth noting that Roblox utilizes both TCP and UDP transports. Given that HTTPS proxies don't support UDP, they aren't an appropriate solution. I'm not entirely sure how it functioned with Proxifier, but I suspect that only TCP traffic was channeled through your mitmproxy, while UDP traffic proceeded directly.

physicallyjblocked commented 1 year ago

i see i was looking to capture http, not udp do you know any other open source proxifier but http? i assumed that this proxifyre worked with http because it supported tcp which i believe is built on top of http

wiresock commented 1 year ago

I apologize, but I'm not aware of any open-source alternatives. While I do have some code for HTTPS proxy support, it's important to note that the HTTP/HTTPS proxy uses a different protocol than the SOCKS5 implemented in ProxiFyre. I could consider integrating it, but I can't guarantee when, or even if, I'll have the free time to do so.

physicallyjblocked commented 1 year ago

ah so if i were to look through your source code, will i be able to create an http proxifier? or it would be great if you can tell me how to create one in the first place

but i know it cant be a simple redirection, and there might be something extra in the process that will make my goal like how the app 'proxifier' does

ive tried different proxifier open source/apps (with no subscription) other than 'proxifier' that does support https, but they all either break applications or simply wont work the expected way

wiresock commented 1 year ago

If you delve into the code, you'll come across the proxy classes and the redirector responsible for routing traffic to these proxies. Currently, ProxiFyre only integrates SOCKS5 proxy classes. While I do have C++ classes for HTTP proxy, integrating them also requires considerable time and effort.

physicallyjblocked commented 1 year ago

i code in python, but i could try making an understanding of it

where would i look?

wiresock commented 1 year ago

You might begin with netlib/proxy/socks_local_router.h. This class is tasked with creating proxy instances and directing traffic to them.

physicallyjblocked commented 1 year ago

alright thanks if i struggle with it, will it be fine if i ask you?

wiresock commented 1 year ago

Of course, I'm always willing to help, though I must note that my availability can be quite constrained. Nonetheless, after reviewing the C++ class I mentioned above, you should be able to gauge whether your C++ expertise is adequate for the task at hand.

physicallyjblocked commented 1 year ago

i just realized that the answer is hidden in mitmproxy itself all i had to do was activate transparent mode thanks for trying though