httptoolkit / httptoolkit-android

Automatic Android interception & debugging with HTTP Toolkit, for Android
https://httptoolkit.com
GNU Affero General Public License v3.0
476 stars 72 forks source link

可以做到完全本地一个应用运行吗?即APP拿到流量直接本地转发到原始地址去,不经过任何服务器 #7

Closed yuanyuanjing closed 2 years ago

pimterry commented 2 years ago

Hi @yuanyuanjing! I'm sorry but I don't speak chinese. From Google Translate, I think your message means:

Is it possible to run an application entirely locally? That is, the APP receives the traffic and forwards it to the original address directly, without passing through any server

The HTTP Toolkit app does run locally on your computer. Internet connectivity is used for application installation & updates, error reporting, and paid account management, but it's not used for traffic interception at all or other application features.

Your HTTP traffic is never sent to HTTP Toolkit's servers.

What happens instead is that all HTTP traffic goes from the client application (on your computer or phone) to the HTTP Toolkit app (on your computer), and then on to the original destination (the target server, wherever that is).

Does that answer your question?

yuanyuanjing commented 2 years ago

你好。感谢回复。我的意思是,能否实现只用一台Android设备,一个应用程序就能实现流量转发功能,如当前应用程序的VpnService截取到流量之后,我们是能解析到该IP数据的IP头数据,然后直接通过Socket或者其他手段转发到真实服务器。你们这边的方案是还是有一个服务端。

pimterry commented 2 years ago

You mean, you want to intercept the traffic just on the device, without using HTTP Toolkit on your computer?

That is possible in theory, but it would require a lot of work. To do so the Android app would need to be able to decrypt HTTPS all by itself to inspect or edit that (right now it cannot), the app would need to understand HTTP (right now it just works with TCP, and all the HTTP logic happens on your computer), and you would need a whole UI to manage inspecting and modifying the traffic on the device.

That's not something I'm going to be adding any time soon since it's a lot of work and for most users it's not very valuable, but you could build it for yourself by extending the code in this repository if that's worthwhile for you.

yuanyuanjing commented 2 years ago

是的。我的意思是只想在设备上完成这些工作。你的意思是如果只想通过一台Android设备完成流量的转发是需要大量的工作的事情,个人想完成它不是很现实吗?

pimterry commented 2 years ago

No, that's not something HTTP Toolkit can do. It is technically possible, but it's a very different approach, and it would require rebuilding most of HTTP Toolkit's features from scratch. Right now, the mobile app doesn't understand anything about HTTP or TLS at all.

I'm going to close this issue - this isn't something that HTTP Toolkit can help with, but of course you're welcome to use the open source components to build this for yourself if you'd like, or you can look at other Android apps that might work this way already, I don't know.