anddea / revanced-patches

🧩 Patches for ReVanced
https://revanced.app
GNU General Public License v3.0
605 stars 43 forks source link

feat: Add option to enable proxy #852

Closed AykhanUV closed 2 weeks ago

AykhanUV commented 3 weeks ago

Application

YouTube

Feature description

Can you add a option to enable proxy by url?

Motivation

In russia youtube is struggling to work and there are proxies that you can use to watch

Acknowledgements

anddea commented 2 weeks ago

Incorporating the entire proxy or VPN service into this app doesn't seem like a good idea. It would be more practical to use other VPN or proxy services for this purpose. I've considered various solutions from time to time, but all of them have proven to be unstable. Perhaps one day we'll be able to implement such a feature. Myself and other contributors are still exploring possibilities in this area. If you know of any solutions or ideas on how to implement this, feel free to share and contribute.

coding-moding commented 2 weeks ago

Is it possible to add feature of specifiyng external proxy's andress in revanced, such as byedpi? It could be better than VPN mode, because it drains battery fast, and there is some problems for other applications to connect.

Ivan-Alone commented 2 weeks ago

Incorporating the entire proxy or VPN service into this app doesn't seem like a good idea. It would be more practical to use other VPN or proxy services for this purpose. I've considered various solutions from time to time, but all of them have proven to be unstable. Perhaps one day we'll be able to implement such a feature. Myself and other contributors are still exploring possibilities in this area. If you know of any solutions or ideas on how to implement this, feel free to share and contribute.

All I would like to get from you as a maintainer of the modification is an additional field for entering a proxy through which the application will connect. No need to embed any of your proxies, just give the opportunity to use your own. Add it, please =) Using any VPN-like solution on whole devise IS really bad idea :)

anddea commented 1 week ago

Is it possible to add feature of specifiyng external proxy's andress in revanced

additional field for entering a proxy through which the application will connect

I considered routing the app's connections but haven't figured out how to implement it yet. Routing the entire app's connections is typically better handled by third-party apps, i.e. VPN services or system proxies. Adding a proxy to the app would require intercepting and managing connections throughout the application. Simply adding a field won't suffice; it requires implementing a comprehensive logic, almost like building an additional service. This is much easier if the app is built from scratch, but for an existing app like YouTube, it would require reverse engineering and injecting new code.

ByeDPI

ByeDPI is an app that changes or fragments packets to evade Deep Packet Inspection (DPI) tools used by censors. By making packets unrecognizable, censors cannot determine origin and sometimes cannot understand their content, thus preventing them from blocking the traffic. However, this method is only effective against DPI censorship and not against DNS or IP blocking. DPI bypass is kinda unstable itself. I believe DPI censorship bypass can work mostly as a VPN only mode, does ByeDPI work for you as proxy?

Using DPI bypass involves a risk. Fragmenting packets can also mask malware, potentially allowing it to bypass detection. This means that while legitimate connections might be bypassed from censorship, malicious traffic could also slip through. Therefore, it's important to use such tools with caution. I don't think it's common but theoretically it can happen.

For now, you can use a system-wide proxy or a VPN.