├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── 3.png ├── Banner.png ├── CREDITS ├── LICENSE ├── README.md ├── README.ru.md ├── app ├── .gitignore ├── build.gradle ├── libs │ ├── connlib-sources.jar │ └── connlib.aar ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── legacy │ │ └── android │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── config.ini │ │ └── connection.log │ ├── java │ │ └── com │ │ │ └── legacy │ │ │ └── android │ │ │ ├── CustomServerActivity.kt │ │ │ ├── LoginActivity.kt │ │ │ ├── MainActivity.kt │ │ │ ├── MyApplication.java │ │ │ ├── NotificationService.kt │ │ │ ├── ProxyServer.kt │ │ │ ├── ServerPreference.kt │ │ │ └── Utils.kt │ └── res │ │ ├── anim │ │ ├── bottom_anim.xml │ │ └── tob_anim.xml │ │ ├── drawable │ │ ├── bill.png │ │ ├── button_rectangle_pink.xml │ │ ├── ic_action_name.png │ │ ├── ic_baseline_close_24.xml │ │ ├── ic_baseline_miscellaneous_services_24.xml │ │ ├── ic_baseline_token_24.xml │ │ ├── icon_password.png │ │ ├── logo.png │ │ ├── port.png │ │ └── server.png │ │ ├── layout │ │ ├── activity_custom_server.xml │ │ ├── activity_log.xml │ │ ├── activity_login.xml │ │ ├── activity_main.xml │ │ └── log_layout.xml │ │ ├── mipmap-anydpi-v26 │ │ └── ic_launcher.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_adaptive_fore.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_adaptive_fore.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_adaptive_fore.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_adaptive_fore.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_adaptive_fore.png │ │ ├── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ ├── styles.xml │ │ └── themes.xml │ │ └── xml │ │ ├── backup_rules.xml │ │ └── data_extraction_rules.xml │ └── test │ └── java │ └── com │ └── legacy │ └── android │ └── ExampleUnitTest.kt ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── server ├── server └── server.ini └── settings.gradle /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ["https://proxidize.com/"] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxidize/proxidize-android/5327c97e953806e5029a1331209d690b54059ede/3.png -------------------------------------------------------------------------------- /Banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxidize/proxidize-android/5327c97e953806e5029a1331209d690b54059ede/Banner.png -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- 1 | Proxidize Android Legacy Credits 2 | 1. The Squid Foundation https://github.com/squid-cache/squid 3 | 2. Frp Tunneling Server https://github.com/fatedier/frp 4 | 3. Unni from the Proxidize team for creating the Android compatibility 5 | 4. Muhammad from the Proxidize team for the interface & battery optimization 6 | 5. Abed from the Proxidize team for creating the app archeticutre & logic 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2022 Proxidize 2 | 3 | Non-commercial use only for Proxidize components. Proxidize does not permit any commercial 4 | use or redistribution of Proxidize Android Legacy. Enthusiast, non-profit, research & academic use only. 5 | 6 | Unless required by applicable law or agreed to in writing, software 7 | distributed under the License is distributed on an "AS IS" BASIS, 8 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 9 | See the License for the specific language governing permissions and 10 | limitations under the License. 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Proxidize Android: Create 5G/4G Mobile Proxy Farms on Android Phones 2 | 3 | 4 | *** PLEASE NOTE: This app has been archived as we've released the all-new Proxidize Android available for free at https://proxidize.com/android -- This repo will be updated shortly. *** 5 | 6 | Proxidize Android Legacy is an Android application that enables anyone to make 4G or 5G mobile proxy farms using their Android phones without the need of anything else. Just download the app, hit connect, and your mobile proxy will be automatically generated. 7 | 8 | Proxidize created Proxidize Android as a proof of concept for Proxidize MPM (Mobile Proxy Maker). The app accomplished its purpose, but was eventually taken down from the Google Play Store for reasons mentioned below. 9 | 10 | Proxidize Android Legacy is the predecessor of the upcoming Proxidize Portable application which will be a drastic improvement on this app. 11 | 12 | 13 | ![Overview](https://i.imgur.com/gsRoRBt.png) 14 | 15 | 16 | 17 | 18 | 19 | ## What Is Proxidize: 20 | 21 | Proxidize is a multi-national effort started by a team of engineers to democratize access to web data & automation. Read the Proxidize manifesto: https://proxidize.com/manifesto/ 22 | 23 | 24 |
25 | 26 | 27 |
28 | 29 |
30 |

Proxidize

31 | Start Making Mobile Proxies 32 |   •   33 | IP Rotation 34 |   •   35 | Website 36 |   •   37 | Docs 38 |   •   39 | Blog 40 |   •   41 | Twitter 42 |   •   43 | Proxidize Portable 44 |
45 |
46 |
47 | 48 | --- 49 | 50 | ## Features of Proxidize Android Legacy 51 | 52 | ![image](https://user-images.githubusercontent.com/107770894/190168239-2084da54-9b5a-4ed6-9ab8-3bd21671adf5.png) 53 | 54 | 55 | - Create A Mobile or Residential HTTP(S) or SOCKS5 proxy on Android, MacOS or Windows devices. 56 | - Rotate/Change IP manually using a button, automatically using a specific rotation interval. 57 | - API for rotating/changing the IP which can be used as a link/URL. 58 | - Connect to mobile data while using the app to generate a mobile proxy. 59 | - Connect to Wi-Fi while using the app to generate a residential proxy. 60 | - Super quick load balancing managed by global servers. 61 | - Add your own custom tunneling server for higher security and speeds. 62 | - Experimental: Change OS fingerprint for improved opsec. 63 | - Experimental: Split connection to WIFI backend to get better speeds. 64 | 65 | 66 | 67 | --- 68 | 69 | ## How It Works and Architecture 70 | 71 | Proxidize Android Legacy works by establishing a connection to a tunneling server via reverse proxies and then launching a local HTTP proxy server. This makes the proxy accessible from anywhere on the web, as the tunneling server handles the port forwarding and routing. 72 | 73 |
74 | 75 |
76 | 77 | 78 | The application will select a random port between ```10000``` and ```60000```, use it connect to the client and then create a proxy server based on the random port along with a randomly generated username and password. 79 | 80 | 81 | --- 82 | 83 | ## Table of Contents 84 | 85 | - [Proxidize Android - Create 5G/4G Mobile Proxies on Android Phones](#proxidize-android-create-5g4g-mobile-proxy-farms-on-android-phones) 86 | * [What Is Proxidize?](#what-is-proxidize) 87 | * [Features of Proxidize Android Legacy](#features-of-proxidize-android-legacy) 88 | * [How It Works & Architecture](#how-it-works-and-architecture) 89 | * [Proxidize Android Legacy vs Proxidize Mobile Proxy Maker](#proxidize-android-legacy-vs-proxidize-mobile-proxy-maker) 90 | * [How to create a 5G/4G mobile proxy on android phones: (Turn your phone into a mobile proxy)](#how-to-create-a-5g-or-4g-mobile-proxy-on-android-phones-turn-your-phone-into-a-mobile-proxy) 91 | + [How to Use on Windows MacOS (Create 5G or 4G Mobile Proxies on WindowsMacOS)](#rotationchanging-the-ip-how-to-change-mobile-proxy-android-ip-address-using-airplane-mode) 92 | * [Using the Proxy](#using-the-proxy) 93 | * [Rotation/Changing the IP (How to Change Mobile Proxy Android IP Address Using Airplane Mode)](#rotation-changing-the-ip--how-to-change-mobile-proxy-android-ip-address-using-airplane-mode) 94 | + [Automatically Changing the IP Address](#automatically-changing-the-ip-address) 95 | + [Changing the IP Manually](#changing-the-ip-manually) 96 | + [Changing the IP via URL/API](#changing-the-ip-via-url-api) 97 | * [Supported Android Versions & Devices](#supported-android-versions--devices) 98 | * [Deploying Your Own Server](#deploying-your-own-server) 99 | + [Example](#example) 100 | * [Using the App Without Connecting to the Tunneling Server First](#using-the-app-without-connecting-to-the-tunneling-server-first) 101 | * [Reporting Issues](#reporting-issues) 102 | + [Types of Issues That You Should Report](#types-of-issues-that-you-should-report) 103 | + [How to Report the Issue](#how-to-report-the-issue) 104 | + [Any Issues Unrelated to the App Will Be Closed, Such As](#any-issues-unrelated-to-the-app-will-be-closed--such-as) 105 | * [Updates](#updates) 106 | * [FAQ:](#faq) 107 | + [Why is the app marked as harmful app/malware by Google?](#why-is-the-app-marked-as-harmful-appmalware-by-google) 108 | + [My proxy isn't working with ```Proxy Refusing Connection``` error?](#my-proxy-isnt-working-with-proxy-refusing-connection-error) 109 | + [My proxy stopped working after it used to work, can you help?](#my-proxy-stopped-working-after-it-used-to-work-can-you-help) 110 | + [Why is my proxy slow?](#why-is-my-proxy-slow) 111 | + [Where will this app work?](#where-will-this-app-work) 112 | + [I keep getting a ```407 Error``` or the proxy keeps asking for authentication?](#i-keep-getting-a-407-error-or-the-proxy-keeps-asking-for-authentication) 113 | * [Proxidize Portable](#proxidize-portable) 114 | 115 | 116 | --- 117 | 118 | ## Proxidize Android Legacy vs Proxidize Mobile Proxy Maker 119 | 120 | This app is not a replacement for Proxidize Mobile Proxy Maker, but a proof of concept. You can use this app at a small scale for personal projects, but once you need a commercial-grade solution, you'll need Proxidize MPM for the following reasons: 121 | 122 | - Such apps will always be naturally unreliable due to underlying infrastructure being designed mainly for IoT devices and not proxies. 123 | - Low speeds. Since both incoming and outgoing connections are passing through the same network interface, the speed you get will be a fifth of the mobile speed. 124 | - Difficult to manage at scale. It takes a 10 minutes to set up a 20-modem kit from Proxidize, but setting up 20 phones will take a full day if not more. 125 | 126 | --- 127 | 128 | ## How to Create a 5G or 4G Mobile Proxy on Android Phones: (Turn Your Phone Into a Mobile Proxy) 129 | 130 |
131 | 132 |
133 | 134 | 135 | - Download Proxidize Android Legacy APK File 136 | - Install the APK on your device 137 | - Open the app and press "Connect". 138 | - Copy the proxy and you can use it anywhere. 139 | 140 | And now you have created your very own 5G/4G mobile proxy! 141 | 142 | ### How to Use on Windows MacOS (Create 5G or 4G Mobile Proxies on WindowsMacOS) 143 | 144 | - Download any Android emulator such as BlueStacks 145 | - Download Proxidize Android Legacy APK file inside the emulator (Open this page from the emulator and download the APK) 146 | - Install the APK on your device 147 | - Open the app and press "Connect". 148 | - Copy the proxy and you can use it anywhere. 149 | 150 | --- 151 | 152 | ## Using the Proxy 153 | 154 | Format: 155 | ``` 156 | IP:Port:Username:Password 157 | ``` 158 | 159 | Example: 160 | ``` 161 | 1.1.1.1:1565:abc:xyz 162 | ``` 163 | 164 | Explained: 165 | ``` 166 | IP or Hostanme: 1.1.1.1 167 | Port: 1565 168 | Userrname: abc 169 | Password: xyz 170 | ``` 171 | --- 172 | ## Rotation/Changing the IP (How to Change Mobile Proxy Android IP Address Using Airplane Mode) 173 | 174 | Proxidize Android Legacy has built-in rotation. To set it up, you need to set the app as the default assistant in your settings. 175 | 176 | 177 | ### Automatically Changing the IP Address: 178 | 179 |
180 | 181 |
182 | 183 | Proxidize Android Legacy allows you to set a rotation/IP change interval. To use it, you need to: 184 | - Press "AUTO CHANGE IP" button on the home page. 185 | - Select the rotation interval you wish to use. 186 | - Select a time in minutes. Anything less than 30 minutes will harm your phone. 187 | - Press "SET" and your settings will be applied. 188 | 189 | 190 | 191 | ### Changing the IP Manually: 192 | 193 |
194 | 195 |
196 | 197 | 198 | To change the IP address manually, you simple need to press the change IP button. 199 | 200 | 201 | 202 | ### Changing the IP via URL/API: 203 | 204 |
205 | 206 |
207 | 208 | Proxidize Android Legacy generates an IP change link/URL/API that you can use anywhere to change the IP. 209 | 210 | To change the IP using the rotation link, you need to: 211 | - Copy the change IP URL under "IP Change Link/API" by pressing the "COPY" button. 212 | - Use the link anywhere or send a GET request to it. 213 | 214 | A success response is: 215 | 216 | ```{"response":"success"}``` 217 | 218 | 219 | --- 220 | ## Supported Android Versions & Devices 221 | 222 | Proxidize Android Legacy supports all ```armeabi-v7a``` running ```Android 6.0``` to ```Android 12``` 223 | 224 | Supported Android API from ```API 23``` to ```API 31```. 225 | 226 | Tested devices: 227 | 228 | ``` 229 | All Android 6.0+ phones 230 | Samsung A Series 231 | Samsung S Series 232 | Samsung M Series 233 | Samsung Note Series 234 | Google Pixel 235 | OnePlus 236 | ``` 237 | --- 238 | 239 | ## Deploying Your Own Server 240 | 241 |
242 | 243 |
244 | 245 | Proxidize Android Legacy allows you to deploy your own tunneling server to avoid using shared/congested servers. To do that, you need to: 246 | - Create a new server on any host. Make sure you're on a public network with all the ports publicly accessible. 247 | - Edit configuration file to add your server information. 248 | - Edit ```CUSTOM SERVER``` fields to add your new server. 249 | 250 | ### Example: 251 | 252 | - Server IP = ```5.5.5.5``` 253 | 254 | - Make sure the server is ```x86-64``` or ```AMD64``` running ```Ubuntu 20.04``` 255 | 256 | - SSH into your server 257 | 258 | ``` ssh username@5.5.5.5``` 259 | 260 | - Clone this repo 261 | 262 | ``` git clone https://github.com/proxidize/proxidize-android.git ``` 263 | 264 | - Enter the repo directory 265 | 266 | ``` cd ./proxidize-android ``` 267 | 268 | - Edit the server.ini file to add an authentication token 269 | 270 | ``` vi``` or ```nano ./server/server.ini ``` 271 | 272 | - Add the following info, replacing ```PORT``` and ```TOKEN``` with your own values. Keep the port value as ```2000``` unless you have a reason to change it. 273 | 274 | ``` 275 | [common] 276 | bind_port = PORT 277 | authentication_method=token 278 | token = TOKEN 279 | ``` 280 | 281 | ```TOKEN``` is used to authenticate which clients are allowed to connect to this server. It can be any random set of characters such as ```12345678```. 282 | 283 | - Start the server 284 | 285 | ``` setsid ./server/server -c ./server/server.ini &``` 286 | 287 | ```setsid``` is used to keep the process alive after you close the terminal. 288 | 289 | - Add the new server information to your application by going to menu > Change Server > Custom. 290 | 291 | ```HOST``` = The new server public IP address. In this example it's ```5.5.5.5```. 292 | 293 | ```Binding Port``` = The port your selected. 294 | 295 | ```Token``` = The token you selected. 296 | 297 | - Save the details, exit the app and open it again and hit connect. You will now connect to your new tunneling server. 298 | 299 | 300 | --- 301 | ## Using the App Without Connecting to the Tunneling Server First 302 | 303 | In some cases, you might be able to connect directly to the phone without needing to connect to the tunneling server. The advantage of this is that you won't have to connect to the tunneling server first, which will offer 5-10% higher speeds. 304 | 305 | - Make sure your carrier can give you a dedicated v4 IP. This is very rare and you will need to confirm with the carrier. 306 | - Call your carrier and request they forward the ports for you. 307 | - Get your public IP address by searching for what's my IP address. 308 | - The app is listening on 0.0.0.0 so once you forward the proxy port, just connect to it using your public IP. 309 | - You can also do that if you're connected to WiFi, but you'll need to forward the ports on your router. 310 | 311 | 312 | --- 313 | 314 | ## Reporting Issues 315 | 316 | ### Types of Issues That You Should Report: 317 | 318 | - App keeps crashing on a specific device/Android version. 319 | - Bypass battery optimization not working on a specific device/Android version. 320 | - App stops working after a while on any 321 | - Proxy Refusing Connection web error, even though the port and host are correct. 322 | - If you see any of the following errors: 12020, 12033, or 12165. 323 | 324 | ### How to Report the Issue: 325 | 326 | - Full description of the issue including screenshots and any error codes 327 | - Full device manufacturer & model name. E.g. Samsung SM-A105L 328 | - Include a screenshot of the "Software information" page 329 | - Full instructions to replicate the issue. 330 | 331 | 332 | ### Any Issues Unrelated to the App Will Be Closed, Such As:: 333 | 334 | - I sent 1,000 threads to scrape Amazon and now the IP is banned. 335 | - I'm using vanilla puppeteer or Chrome and I keep getting blocked or my proxy is detected. 336 | - Any form of 407/authentication error. This means you're not using the right credentials. Refer to format section. 337 | - 502 or 504 if you're using rotation. This happens when you're connecting in the middle of a rotation. 338 | - Any situation where you're using your own server. (Unless you can replicate the issue when using the default servers as well.) 339 | 340 | 341 | --- 342 | ## Updates: 343 | 344 | This app is no longer maintained by Proxidize, but I (Abed) will be working on it in my free time. 345 | 346 | Edit: I ended up finishing most of the planned features before schedule. So chances are I won't be making any updates to this app for a while. 347 | 348 | Things I'll be adding: 349 | 350 | - [x] Supporting Android 12 351 | - [x] Add Android wake lock to keep the proxy alive. 352 | - [x] Custom server from application. 353 | - [x] Save ports between sessions. 354 | - [x] In-app IP rotation button. 355 | - [x] Automated IP rotation. 356 | - [x] IP rotation API 357 | - [x] Supporting more devices such as Asus, Alcatel, etc. 358 | - [x] Auto-detect nearest tunneling server. 359 | - [x] SOCKS proxies. 360 | - [x] Prevent duplicate ports on server. 361 | - [ ] Showing the public IP on the app interface. 362 | - [ ] Change proxy format. 363 | 364 | If you're updating to v2.0.0 from v1.0.0 make sure to delete v1.0.0 first. 365 | 366 | --- 367 | 368 | 369 | ## FAQ: 370 | 371 | ### Why is the app marked as harmful app/malware by Google? 372 | 373 | A few months after publishing the app, Google marked it as harmful/PUP/malware app. I suspect it's because there's some Google watchdog that sniffed the traffic and found something harmful that was being transmitted by some of the users. Or it's possible that the behavior of the traffic being unencrypted and routed to a single server was similar to typical harmful app behavior that come across Google in the Play Store. 374 | 375 | There are also a few AVs that have marked the tunneling client fast revers proxy, as a PUP, and it's possible Google Play Store did the same. 376 | 377 | I've made some mitigations against this by changing the binaries to change the hash, but I suspect Google will still mark it as harmful by reading the strings, so you will need to disable Play Protect, otherwise, the app will likely get automatically deleted. 378 | 379 | ### My proxy isn't working with ```Proxy Refusing Connection``` error? 380 | 381 | Make sure you're using the correct port value, then exit the app and start it again. There's a very small chance you used an already used port. 382 | 383 | ### My proxy stopped working after it used to work, can you help? 384 | 385 | Exit the app and start it again. If it still doesn't work, make sure the app is still running on your device. Then please tweet [@Proxidizehq](https://twitter.com/proxidizehq) and we'll take a look. 386 | 387 | ### Why is my proxy slow? 388 | 389 | The app uses reverse proxies created via websockets route to forwarding facing proxies. This technology is slow, unreliable and there's nothing I can do about it with the limited time that I have to work on this project. Apps based on this specific tunneling technology were created for simple IoT use cases, and not for pushing full bandwidth or proxies. 390 | 391 | The Proxidize team is working on an entirely new app called **Proxidize Portable**, which will address all the short comings of this app using proprietary technology. 392 | 393 | Another thing is such apps send both incoming and outgoing traffic from the same device, which means you will always get half the speed that you would normally get when testing the speed directly on your phone. If speed is important, you should use the full Proxidize MPM-OP: https://proxidize.com/ 394 | 395 | ### Where will this app work? 396 | 397 | This app will work everywhere, unless: 398 | - You are in countries that have ISP-level firewalls that block any proxied connections via DPI. 399 | - You are behind a corporate firewall that blocks unknown ports. 400 | 401 | ### I keep getting a ```407 Error``` or the proxy keeps asking for authentication? 402 | 403 | Make sure you're not mixing the small ```l``` with a capital ```I```. 404 | 405 | 406 | --- 407 | 408 | ## Proxidize Portable 409 | 410 | We are currently working on a new application called "Proxidize MPM-Cloud Portable" or Proxidize Portable for short. The new app will address all the deficiencies of this one and will have the following features: 411 | 412 | 1. 5-10x higher speeds than Proxidize Android Legacy 413 | 2. Custom OS Fingerprint 414 | 3. Send & Receive SMS via interface/API 415 | 4. Manage all devices from web interface 416 | 5. Manage unlimited phones via grouping, categories and more. 417 | 6. Use any server from dozens of countries. 418 | 7. Custom DNS 419 | 8. Get 99.99% uptime 420 | 9. Dual-stacking IPV4/IPV6 support 421 | 10. Load-balancing between multiple phones. 422 | 11. Setting multi-phone IP rotation/load balancing pools. 423 | 12. And much more! 424 | 425 | -------------------------------------------------------------------------------- /README.ru.md: -------------------------------------------------------------------------------- 1 | # Proxidize Android: Создать 5G/4G Mobile Proxy Farms для Андроида 2 | 3 | Proxidize Android Legacy - это приложение для Android, которое позволяет любому создать мобильный прокси-сервер 5G или 4G с помощью своего телефона без необходимости дополнительного оборудования. Просто скачате приложение, нажмите "Подключиться" и Ваш мобильный прокси будет создан автоматически. 4 | 5 | Proxidize создало Proxidize Android как доказательство концепции Proxidize MPM (Mobile Proxy Maker). Приложение достигло своей цели, но, в конечном итоге, было удалено из магазина Google Play по причинам, указанным ниже. 6 | 7 | Proxidize Android Legacy - это преддшественник грядущего приложения Proxidize Portable, которое будет радикально улучшено в сравнение с текущим. 8 | 9 | ![Overview](https://i.imgur.com/gsRoRBt.png) 10 | 11 |

12 | 13 | 14 |


15 | 16 | 17 | 18 | 19 | ## Что такое Proxidize: 20 | 21 | Proxidize - это многонациональная инициатива, начатая командой инженеров, для декмократизации доступа данных, а также автоматизации. Прочтите манифест Proxidize: https://proxidize.com/manifesto/ 22 | 23 | 24 |
25 | 26 | 27 |
28 | 29 |
30 |

Proxidize

31 | Начните создание мобильного прокси-сервера Proxies 32 |   •   33 | ротация IP-адресов 34 |   •   35 | Вебсайт 36 |   •   37 | Документация 38 |   •   39 | Блог 40 |   •   41 | Твиттер 42 |   •   43 | Proxidize Portable 44 |
45 |
46 |
47 | 48 | --- 49 | 50 | ## Особенности Proxidize Android Legacy 51 | 52 | ![image](https://user-images.githubusercontent.com/107770894/190168239-2084da54-9b5a-4ed6-9ab8-3bd21671adf5.png) 53 | 54 | 55 | - Создание мобильного или резидентного прокси-сервера HTTP(S) или SOCKS5 на устройствах Android, MacOS или Windows 56 | - Ротация/Изменение IP-адресов двумя способами: вручную с помощью кнопки и автоматически с ипользованием определенного интервала в ротации 57 | - API Ротация/Изменение IP-адресов, которые можно использовать как ссылку/URL. 58 | - Подключение к мобильным данным в момент использования приложения для создания мобильного прокси-сервера. 59 | - Поключение к Wi-Fi в момент использования приложения для создания резидентного прокси-сервера 60 | - Супер быстрая балансировка нагрузки, управляемая глобальными серверами. 61 | - Добавление собственно настроенного туннельного сервера для больше безопасности и скорости. 62 | - Экспериментально: Изменение ОС с помощию биометрики (отпечатка пальца) для улучшения безопасности. 63 | - Экспериментально: Раздельное соединение к бэкэнду Wi-Fi для повышения скорости. 64 | 65 | 66 | --- 67 | 68 | ## Как это работает и Архитектура 69 | 70 | Proxidize Android Legacy работает, устанавливая соединение с туннельным сервером через обратные прокси-серверы, а затем запуская локальный прокси-сервер HTTP. Это делает прокси-сервер доступным из любой точки Интернета, поскольку туннельный сервер обрабатывает переадресацию и маршрутизацию портов. 71 | 72 |
73 | 74 |
75 | 76 | 77 | Приложение выберет случайный порт между ```10000``` и ```60000```, использует его для подключения к клиенту, а затем создаст прокси-сервер на основе случайного порта вместе со случайно сгенерированным именем пользователя и пароля. 78 | 79 | 80 | --- 81 | 82 | ## Содержание 83 | 84 | - [Proxidize Android - Создать 5G/4G мобильные прокси-серверы на устройствах Android](#proxidize-android-create-5g4g-mobile-proxy-farms-on-android-phones) 85 | * [Что такое Proxidize?](#what-is-proxidize) 86 | * [Особенности of Proxidize Android Legacy](#features-of-proxidize-android-legacy) 87 | * [Как это работает и Архитектура](#how-it-works-and-architecture) 88 | * [Proxidize Android Legacy против Proxidize Mobile Proxy Maker](#proxidize-android-legacy-vs-proxidize-mobile-proxy-maker) 89 | * [Как создать 5G/4G мобильный прокси-сервер на устройствах Android: (Превратите свой телефон в мобильный прокси-сервер)](#how-to-create-a-5g-or-4g-mobile-proxy-on-android-phones-turn-your-phone-into-a-mobile-proxy) 90 | + [Как использовать на Windows MacOS (Создать 5G или 4G мобильный прокси-сервер на WindowsMacOS)](#rotationchanging-the-ip-how-to-change-mobile-proxy-android-ip-address-using-airplane-mode) 91 | * [Использование прокси-сервера](#using-the-proxy) 92 | * [Ротация/Изменение IP-адреса (Как изменить Android IP-адрес мобильного прокси-сервера, используя Режим Самолета)](#rotation-changing-the-ip--how-to-change-mobile-proxy-android-ip-address-using-airplane-mode) 93 | + [Автоматическое изменение IP-адреса](#automatically-changing-the-ip-address) 94 | + [Изменение IP-адреса вручную](#changing-the-ip-manually) 95 | + [Изменение IP-адреса с помощью URL/API](#changing-the-ip-via-url-api) 96 | * [Поддерживаемые версии и устройства Android](#supported-android-versions--devices) 97 | * [Размещение Вашего собственного сервера Your Own Server](#deploying-your-own-server) 98 | + [Пример](#example) 99 | * [Использование приложения без первичного подключения к туннельному серверу](#using-the-app-without-connecting-to-the-tunneling-server-first) 100 | * [Сообщение о проблемах](#reporting-issues) 101 | + [Виды проблем, о которых следует сообщать](#types-of-issues-that-you-should-report) 102 | + [Как сообщить о проблеме](#how-to-report-the-issue) 103 | + [Любая проблема, несвязанная с приложением будет закрыта](#any-issues-unrelated-to-the-app-will-be-closed--such-as) 104 | * [Оновления](#updates) 105 | * [FAQ:](#faq) 106 | + [Почему данное приложение помечено как вредоносное ПО Google-ом?](#why-is-the-app-marked-as-harmful-appmalware-by-google) 107 | + [Мой прокси-сервер не работает с ```Прокси-сервер отказывается принимать соединения``` ошибка?](#my-proxy-isnt-working-with-proxy-refusing-connection-error) 108 | + [Мой прокси-сервер перстал работать, хотя до этого работал, можете мне помочь?](#my-proxy-stopped-working-after-it-used-to-work-can-you-help) 109 | + [Почему мой прокси-сервер такой медленный?](#why-is-my-proxy-slow) 110 | + [Где данное приложение будет работать?](#where-will-this-app-work) 111 | + [Я продолжаю получать ```407 Ошибка``` или прокси-сервер продолжает требовать авторизацию?](#i-keep-getting-a-407-error-or-the-proxy-keeps-asking-for-authentication) 112 | * [Proxidize Portable](#proxidize-portable) 113 | 114 | 115 | --- 116 | 117 | ## Proxidize Android Legacy против Proxidize Mobile Proxy Maker 118 | 119 | Данное приложение не является заменой Proxidize Mobile Proxy Maker, но является доказательством концепции. Вы можете использовать это приложение в небольших масштабах для личных проектов, но как только Вам понадобится решение коммерческого характера, Вам поднадобится Proxidize MPM по следующим причинам: 120 | 121 | - Такие приложения всегда будут ненадежными по объективным причинам из-за того, что базовая инфраструктура предназначена в большей мере для IoT устройста, а не для прокси-серверов. 122 | - Низкая скорость.Поскольку и входящие, и исходящие соединения проходят через один и тот же сетевой интерфейс, скорость, которую Вы получите, будет составлять 1/5 часть скорости мобильного телефона. 123 | - Трудно управлять в масштабе. Настройка комплекта из 20 модемов от Proxidize занимает 10 минут, но настройка 20 телефонов займёт целый день, если не больше. 124 | 125 | --- 126 | 127 | ## Как создать мобильный прокси-сервер 5G или 4G мобильный прокси-сервер на телефонах Android: (Превратите свой телефон в мобильный прокси-сервер) 128 | 129 |
130 | 131 |
132 | 133 | 134 | - Скачайте Proxidize Android Legacy APK файл. 135 | - Установите APK на Ваше устройство. 136 | - Откройте приложение и нажмите "Подключиться". 137 | - Скопируйте прокси-сервер и можете его использовать где угодно. 138 | 139 | Итак, Вы создали свой собственный мобильный 5G/4G прокси-сервер! 140 | 141 | ### Как ипользовать на Windows MacOS (Создайте 5G или 4G мобильный прокси-сервер на WindowsMacOS) 142 | 143 | - Скачайте любой Android эмулятор поо типу BlueStacks. 144 | - Скачайте Proxidize Android Legacy APK файл внутри эмулятора (Откройте эту страницу из эмулятора и скачайте APK). 145 | - Установите APK на Ваше устройство. 146 | - Откройте приложение и нажмите "Подключиться". 147 | - Скопируйте прокси-сервер и можете его использовать где угодно. 148 | 149 | --- 150 | 151 | ## Использование прокси-сервера 152 | 153 | Формат; 154 | ``` 155 | IP:Порт:Пользователь:Пароль 156 | ``` 157 | 158 | Пример: 159 | ``` 160 | 1.1.1.1:1565:abc:xyz 161 | ``` 162 | 163 | Результат: 164 | ``` 165 | IP or Hostanme: 1.1.1.1 166 | Порт: 1565 167 | Пльзователь: abc 168 | Пароль: xyz 169 | ``` 170 | --- 171 | ## Ротация.Изменение IP-адреса (Как изменить IP-адрес мобильного прокси-сервера на Android используя Режим Самолёта) 172 | 173 | Proxidize Android Legacy имеет встроенную ротацию. Чтобы настроить её, Вам необходимо установить приложение в качестве помощника по умолчанию в настройках. 174 | 175 | 176 | ### Автоматическое изменение IP-адреса: 177 | 178 |
179 | 180 |
181 | 182 | Proxidize Android Legacy позволяет Вам устанавливать интервал для ротации/изменения IP-адреса. Для использования Вам необходимо: 183 | - Нажмите "АВТОМАТИЧЕСКОЕ ИЗМЕНЕНИЕ IP" кнопку на домашней странице. 184 | - Выберите интервал ротации, который Вы хотите использовать. 185 | - Выберите время в минутах. Все что меньше 30 минут навредит Вашему телефону. 186 | - Нажмите "УСТАНОВИТЬ" и Ваши настройки будут применены. 187 | 188 | 189 | 190 | ### Изменение IP-адреса вручную: 191 | 192 |
193 | 194 |
195 | 196 | 197 | Чтобы изменить IP-адрес вручную, Вам лишь нужно нажать на "Изменить IP-адрес" кнопку. 198 | 199 | 200 | 201 | ### Изменение IP-адреса с помощью URL/API: 202 | 203 |
204 | 205 |
206 | 207 | Proxidize Android Legacy генерирует IP-адрес ссылку/URL/API изменения, которую Вы можете использовать где угодно, чтобы изменить IP-адрес. 208 | 209 | Чтобы изменить IP-адрес с помощью ссылки ротации, Вам нужно: 210 | - Скопируйте IP-адрес ссылку/URL/API изменения под "IP-адрес Изменения ссылка/API" нажав кнопку "Копировать". 211 | - Use the link anywhere or send a GET request to it. 212 | 213 | Успешный ответ должен быть таким: 214 | 215 | ```{"ответ":"успешно"}``` 216 | 217 | --- 218 | ## Поддерживаемые версии и устройства Android 219 | 220 | Proxidize Android Legacy поддерживает все ```armeabi-v7a``` работающие от```Android 6.0``` до ```Android 12``` 221 | 222 | Поддерживаемые Android API от ```API 23``` до ```API 31```. 223 | 224 | Протестированные устройства: 225 | 226 | ``` 227 | Все Android 6.0+ телефоны 228 | Samsung A Series 229 | Samsung S Series 230 | Samsung M Series 231 | Samsung Note Series 232 | Google Pixel 233 | OnePlus 234 | ``` 235 | --- 236 | 237 | ## Размещение Вашего собственного сервера 238 | 239 |
240 | 241 |
242 | 243 | Proxidize Android Legacy позволяет Вам развернуть собственный туннельный сервер чтоб избежать использования общих/перегруженных серверов. Для этого Вам необходимо: 244 | - Создайте новый сервер на любов хосте. Убедитесь, что Вы находитесь в общедоступной сети со всеми общедоступными портами. 245 | - Отредактируйте файл конфигурации, чтобы добавить информацию о Вашем сервере. 246 | - Отредактируйте ```ПОЛЬЗОВАТЕЛЬСКИЙ СЕРВЕР``` поля чтобы добавить новый сервер. 247 | 248 | ### Пример: 249 | 250 | - IP-адрес сервера = ```5.5.5.5``` 251 | 252 | - Убедитесь, что сервер ```x86-64``` или ```AMD64``` работает ```Ubuntu 20.04``` 253 | 254 | - SSH на Ваш сервер 255 | 256 | ``` ssh username@5.5.5.5``` 257 | 258 | - Клонировать это репо 259 | 260 | ``` git clone https://github.com/proxidize/proxidize-android.git ``` 261 | 262 | - Отредактируете server.ini file чтобы добавить токен аутентификации 263 | 264 | ``` vi``` or ```nano ./server.ini ``` 265 | 266 | - Добавить следующую информацию, заменяя ```ПОРТ``` и ```ТОКЕН``` Вашими значениями. Оставить по умолчанию значение порта ```2000``` если нет причин менять его. 267 | 268 | ``` 269 | [common] 270 | bind_port = PORT 271 | authentication_method=token 272 | token = TOKEN 273 | ``` 274 | 275 | ```TOKEN``` используется для аутентификации клиента, который может подключаться к этому серверу. Это может быть случный набор символов, таких как ```12345678```. 276 | 277 | - Запустите сервер 278 | 279 | ``` setsid ./server -c ./server.ini &``` 280 | 281 | ```setsid``` используется для поддержания процесса после закрытия терминала. 282 | 283 | - Добавьте информацию о новом сервере в Ваше приложение с помощью Меню > Изменить сервер > Пользовательский. 284 | 285 | ```HOST``` = Общедоступный IP-адрес нового сервера.В данном примере это ```5.5.5.5```. 286 | 287 | ```Binding Port``` = Выбранный порт. 288 | 289 | ```Token``` = Выбранный токен. 290 | 291 | - Сохраните данные, выйдите из приложения, откройте его снова и нажмите "Подключиться". Теперь Вы подключитесь к своему новому туннельному серверу. 292 | 293 | 294 | --- 295 | ## Используя приложение без первичного подключения к туннельному серверу 296 | 297 | В некоторых случаях, Вы можете подключиться напрямую к телефону без необходимости подключения к туннельному серверу. Преимущество этого в том, что Вам не нужно будет сначала подключаться к туннельному серверу, который предлагает на 5-10% более высокую скорость. 298 | 299 | - Убедитесь, что Ваш провайдер может предоставить Вам выделенный v4 IP. Такое случается очень редко и Вам необходимо будет уточнить такую возможность у провайдера. 300 | - Позвоните Вашему провайдеру и попросите выслать Вам порты. 301 | - Получите Ваш общедоступный IP-адрес, выполнив "поиск моего IP-адреса". 302 | - Приложение прослушивает 0.0.0.0 поэтому после перееадресации порта прокси просто подключитесь к нему, используя общедоступный IP-адрес. 303 | - Вы также можете сделать это, если Вы поключены к Wi-Fi, но Вам нужно будет перенаправить порты на Вашем маршрутизаторе. 304 | 305 | 306 | --- 307 | 308 | ## Сообщить о проблеме 309 | 310 | ### Виды проблем, о которых нужно сообщить: 311 | 312 | - Приложение постоянно зависает/вылетает на определенном устройстве/Android версии. 313 | - Оптимизация обхода батареи не работаетна определенном устройстве/Android версии. 314 | - Приложение через некоторое время перестало работать на любов устройстве/версии 315 | - Прокси-сервер выдает ошибку соединения даже если порт и хост указан правильно. 316 | - Если Вы видите следующие ошибка: 12020, 12033 или 12165. 317 | 318 | ### Как сообщать об ошибке: 319 | 320 | - Полное описание ошибки, включая скриншоты и коды ошибки. 321 | - Полное имя устройства, производитель, модель. Пример Samsung SM-A105L 322 | - Добавьте скриншот о Версии ПО телефона 323 | - Полная инструкции по вопроизведению ошибки. 324 | 325 | 326 | ### Любая ошибка, несвязанная с приложением будет закрыта, такая как: 327 | 328 | - Я отправил 1,000 сообщении Amazon и теперь мой IP-адрес забанен. 329 | - Я использую vanilla puppeteer или Chrome и меня блокируют или идентифицируют мой прокси. 330 | - Дюбой тип ошибки 407/ошибка аутентификации. Это значит Вы вводите неправильные данные. Обратитесь в раздел форматирования. 331 | - 502 or 504 if you're using rotation. This happens when you're connecting in the middle of a rotation. 332 | - Любая ситуация, где Вы используете Ваш собственный сервер. (Кроме случая, если в сумели полность воспроизвести ошибку на обучных серверах.) 333 | 334 | 335 | --- 336 | ## Обновления: 337 | 338 | Данное приложение больше не поддерживается Proxidize, но я (Абед) буду над этим работать в свое свободное время. 339 | 340 | Редактирование: Я закончил почти все запланированные пункту раньше срока.Так что есть шанс что я не буду делать како-то времы обновления. 341 | 342 | Вещи которые я добавлю: 343 | 344 | - [x] Поддержка Android 12 345 | - [x] Добавить блокировку пробуждения Android чтобы прокси оставался активным. 346 | - [x] Пользовательский сервер из приложения. 347 | - [x] Сохранять порты между сессиями. 348 | - [x] Кнопка ротации IP-адресов в приложении. 349 | - [x] Автоматическая ротация IP-адресов. 350 | - [x] Ротация IP-адресов через API 351 | - [x] Подержка большего числа устройств Asus, Alcatel, итд. 352 | - [x] Автоматическое определение ближайшего сервера. 353 | - [x] SOCKS прокси. 354 | - [x] Предотвращать дублирования портов на сервере. 355 | - [ ] Отображение общедоступного IP-адреса в интерфейсе приложения. 356 | - [ ] Поменять рокси формат. 357 | 358 | Если Вы обновляетесь на версию v2.0.0 с v1.0.0 убедитесь, что перед этим удалили v1.0.0. 359 | 360 | --- 361 | 362 | 363 | ## FAQ: 364 | 365 | ### Почему данное приложение помечено как вредоносное в Google маркете? 366 | 367 | Через несколько месяцев после публикации приложения Google пометил его как вредоносное/PUP/вредоносное ПО. Я подозреваю, что это потому, что какой-то сторожевой таймер Google пронюхал трафик и обнаружил что-то вредоносное, что передавалось некоторыми пользователями. Или возможно, что поведение незашифрованного и перенаправленного на один сервер трафика было похоже на типичное поведение вредоносного приложения, которое встречается в Google в Play Store. 368 | 369 | Есть также несколько AV, которые пометили прокси-сервер быстрого реверса туннелирующего клиента как ПНП, и, возможно, Google Play Store сделал то же самое. 370 | 371 | Я предпринял некоторые меры против этого, изменив двоичные файлы для изменения хэша, но я подозреваю, что Google все равно пометит его как вредоносное, прочитав строки, поэтому вам нужно будет отключить Play Protect, иначе приложение, скорее всего, будет автоматически удалено. . 372 | 373 | ### Мой прокси не работает с ```Прокси не подключается``` ошибка? 374 | 375 | Убедитесь, что вы используете правильное значение порта, затем выйдите из приложения и запустите его снова. Вероятность того, что вы использовали уже используемый порт, очень мала. 376 | 377 | ### Мой прокси перестал работать через какое-то время, можете мне помочь? 378 | 379 | Закройте приложение и затем войдите вновь. Если все еще не работает, убедитесь что приложение запущено.Затем, пожалуйста, твитните [@Proxidizehq](https://twitter.com/proxidizehq) и я посмотрю в чем проблема. 380 | 381 | ### Почему мой прокси такой медленный? 382 | 383 | Приложение использует обратные прокси-серверы, созданные через маршрут веб-сокетов, для пересылки прокси-серверов. Эта технология медленная, ненадежная, и я ничего не могу с этим поделать, учитывая то ограниченное время, которое у меня есть на работу над этим проектом. Приложения, основанные на этой конкретной технологии туннелирования, были созданы для простых случаев использования IoT, а не для использования полной полосы пропускания или прокси-серверов. 384 | 385 | Команда Proxidize работает над совершенно новым приложением под названием **Proxidize Portable**, в котором будут устранены все недостатки этого приложения с использованием запатентованной технологии. 386 | 387 | Другое дело, что такие приложения отправляют как входящий, так и исходящий трафик с одного и того же устройства, а это значит, что вы всегда будете получать половину скорости, которую обычно получаете при тестировании скорости прямо на телефоне. Если важна скорость, вам следует использовать полную версию Proxidize MPM-OP: https://proxidize.com/ 388 | 389 | ### Где это приложение будет работать? 390 | 391 | Приложение будет работать везде, кроме: 392 | - Вы находитесь в стране, в которых ISP-уровень firewall который блокирует любые прокси подключения через DPI. 393 | - У Вас включен корпоративный firewall который блокирует неизвестные порты. 394 | 395 | ### Я получаю ошибку ```407 Ошибка``` или прокси постоянно просит аутентификацию? 396 | 397 | Убедитесь Вы не путаете маленькую ```l``` с большой ```I```. 398 | 399 | 400 | --- 401 | 402 | ## Proxidize Portable 403 | 404 | На данный момент мы работаем на новым приложением, которое называется "Proxidize MPM-Cloud Portable" или сокращенное название "Proxidize Portable". Новое приложениеnew app will address all the deficiencies of this one and will have the following features: 405 | 406 | 1. В 5-10 раз выше скоростьчем Proxidize Android Legacy 407 | 2. Отпечаток пальца OS 408 | 3. Отправка/получение SMS через интерфейс/API 409 | 4. Управление всеми устройствами через вебинтерфейс 410 | 5. Управление неограниченным количеством телефонов путем группировки по категориям итд. 411 | 6. Использование любого сервера из десятков стран. 412 | 7. Пользовательский DNS 413 | 8. До 99.99% безотказной работы 414 | 9. IPV4/IPV6 поддержка двойного стека 415 | 10. Сбалансированная нагрузка между большим количеством телефонов 416 | 11. Настройка пулов ротации IP/балансировки нагрузки для нескольких телефонов. 417 | 12. И многое другое! 418 | 419 | 420 | 421 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | id 'org.jetbrains.kotlin.android' 4 | } 5 | 6 | android { 7 | compileSdk 32 8 | 9 | defaultConfig { 10 | applicationId "com.legacy.android" 11 | minSdk 23 12 | targetSdk 32 13 | versionCode 1 14 | versionName "1.0" 15 | 16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 17 | } 18 | 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | buildFeatures { 26 | viewBinding true 27 | } 28 | compileOptions { 29 | sourceCompatibility JavaVersion.VERSION_1_8 30 | targetCompatibility JavaVersion.VERSION_1_8 31 | } 32 | kotlinOptions { 33 | jvmTarget = '1.8' 34 | } 35 | } 36 | 37 | dependencies { 38 | implementation fileTree(include: ['*.jar'], dir: 'libs') 39 | implementation files('libs/connlib.aar') 40 | implementation 'androidx.core:core-ktx:1.8.0' 41 | implementation 'androidx.appcompat:appcompat:1.4.2' 42 | implementation 'com.google.android.material:material:1.6.1' 43 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4' 44 | testImplementation 'junit:junit:4.13.2' 45 | androidTestImplementation 'androidx.test.ext:junit:1.1.3' 46 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' 47 | 48 | 49 | //data store for liecence 50 | implementation "androidx.datastore:datastore-preferences:1.0.0" 51 | 52 | implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.0' 53 | implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.0-alpha01" 54 | 55 | implementation "androidx.fragment:fragment-ktx:1.5.0" 56 | implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.6.0-alpha01" 57 | 58 | implementation 'com.google.android.material:material:1.6.1' 59 | } -------------------------------------------------------------------------------- /app/libs/connlib-sources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxidize/proxidize-android/5327c97e953806e5029a1331209d690b54059ede/app/libs/connlib-sources.jar -------------------------------------------------------------------------------- /app/libs/connlib.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxidize/proxidize-android/5327c97e953806e5029a1331209d690b54059ede/app/libs/connlib.aar -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/androidTest/java/com/legacy/android/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.legacy.android 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.legacy.android", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 28 | 29 | 32 | 33 | 37 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /app/src/main/assets/config.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxidize/proxidize-android/5327c97e953806e5029a1331209d690b54059ede/app/src/main/assets/config.ini -------------------------------------------------------------------------------- /app/src/main/assets/connection.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxidize/proxidize-android/5327c97e953806e5029a1331209d690b54059ede/app/src/main/assets/connection.log -------------------------------------------------------------------------------- /app/src/main/java/com/legacy/android/CustomServerActivity.kt: -------------------------------------------------------------------------------- 1 | package com.legacy.android 2 | 3 | import android.os.Bundle 4 | import android.widget.Toast 5 | import androidx.appcompat.app.AppCompatActivity 6 | import androidx.lifecycle.lifecycleScope 7 | import com.legacy.android.databinding.ActivityCustomServerBinding 8 | import kotlinx.coroutines.delay 9 | import kotlinx.coroutines.launch 10 | 11 | class CustomServerActivity : AppCompatActivity() { 12 | 13 | private lateinit var binding: ActivityCustomServerBinding 14 | private val preference by lazy { ServerPreference.getInstance(this) } 15 | override fun onCreate(savedInstanceState: Bundle?) { 16 | binding = ActivityCustomServerBinding.inflate(layoutInflater) 17 | super.onCreate(savedInstanceState) 18 | setContentView(binding.root) 19 | binding.saveButton.setOnClickListener { 20 | if (isClear()) { 21 | Toast.makeText(this, "Saving server info", Toast.LENGTH_SHORT).show() 22 | lifecycleScope.launch { 23 | preference.saveProxyServer( 24 | ProxyServer( 25 | binding.etHost.text.toString(), 26 | binding.etPort.text.toString(), 27 | binding.etToken.text.toString() 28 | ) 29 | ) 30 | finish() 31 | } 32 | } 33 | } 34 | binding.resetButton.setOnClickListener { 35 | Toast.makeText(this, "Proxy server set to default", Toast.LENGTH_SHORT).show() 36 | lifecycleScope.launch { 37 | delay(100) 38 | preference.clear() 39 | finish() 40 | } 41 | } 42 | } 43 | 44 | 45 | private fun isClear(): Boolean { 46 | var clear = true 47 | if (binding.etHost.text.isNullOrEmpty()) { 48 | binding.etHost.error = "Enter a valid Host" 49 | clear = false 50 | } else binding.etHost.error = null 51 | if (binding.etPort.text.isNullOrEmpty()) { 52 | binding.etPort.error = "Enter a valid Port" 53 | clear = false 54 | } else binding.etPort.error = null 55 | if (binding.etToken.text.isNullOrEmpty()) { 56 | binding.etToken.error = "Enter a valid token" 57 | clear = false 58 | } else binding.etToken.error = null 59 | return clear 60 | } 61 | } -------------------------------------------------------------------------------- /app/src/main/java/com/legacy/android/LoginActivity.kt: -------------------------------------------------------------------------------- 1 | package com.legacy.android 2 | 3 | import android.annotation.SuppressLint 4 | import android.app.AlertDialog 5 | import android.app.Notification 6 | import android.app.NotificationManager 7 | import android.app.PendingIntent 8 | import android.app.PendingIntent.FLAG_MUTABLE 9 | import android.content.ClipData 10 | import android.content.ClipboardManager 11 | import android.content.Context 12 | import android.content.Intent 13 | import android.graphics.BitmapFactory 14 | import android.graphics.Color 15 | import android.net.Uri 16 | import android.os.* 17 | import android.provider.Settings 18 | import android.text.Html 19 | import android.widget.Toast 20 | import androidx.appcompat.app.AppCompatActivity 21 | import androidx.core.app.NotificationCompat 22 | import androidx.core.app.NotificationManagerCompat 23 | import androidx.lifecycle.Lifecycle 24 | import androidx.lifecycle.lifecycleScope 25 | import androidx.lifecycle.repeatOnLifecycle 26 | import com.legacy.android.databinding.ActivityLoginBinding 27 | import kotlinx.coroutines.CoroutineScope 28 | import kotlinx.coroutines.Dispatchers 29 | import kotlinx.coroutines.flow.collect 30 | import kotlinx.coroutines.launch 31 | import java.io.* 32 | import java.text.SimpleDateFormat 33 | import java.util.* 34 | import kotlin.system.exitProcess 35 | import frpclib.Frpclib as Conn 36 | 37 | 38 | class LoginActivity : AppCompatActivity() { 39 | private var user: String? = null 40 | private var pwd: String? = null 41 | private var notificationManager: NotificationManagerCompat? = null 42 | private val mLabel = "copy" 43 | private var mText: String = "" 44 | private var mRandomPort = 0 45 | 46 | private var server: ProxyServer = ProxyServer.default() 47 | 48 | private lateinit var binding: ActivityLoginBinding 49 | private val preference by lazy { ServerPreference.getInstance(this) } 50 | 51 | @SuppressLint("BatteryLife") 52 | override fun onCreate(savedInstanceState: Bundle?) { 53 | super.onCreate(savedInstanceState) 54 | binding = ActivityLoginBinding.inflate(layoutInflater) 55 | setContentView(binding.root) 56 | 57 | lifecycleScope.launch { 58 | repeatOnLifecycle(Lifecycle.State.STARTED){ 59 | preference.SERVER.collect{ 60 | server = it 61 | } 62 | } 63 | } 64 | notificationManager = NotificationManagerCompat.from(this) 65 | val pm = getSystemService(PowerManager::class.java) 66 | if (!pm.isIgnoringBatteryOptimizations(packageName)) { 67 | val i = Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS) 68 | .setData(Uri.parse("package:$packageName")) 69 | startActivity(i) 70 | } 71 | binding.copyButton.setOnClickListener { 72 | val clipboard = getSystemService(CLIPBOARD_SERVICE) as ClipboardManager 73 | val clip = ClipData.newPlainText(mLabel, mText) 74 | clipboard.setPrimaryClip(clip) 75 | Toast.makeText(this@LoginActivity, "Copied", Toast.LENGTH_SHORT).show() 76 | } 77 | 78 | 79 | binding.stop.setOnClickListener { 80 | AlertDialog.Builder(this@LoginActivity) 81 | .setCancelable(false) 82 | .setTitle("Confirm Exit") 83 | .setMessage("Are you sure, You want to exit") 84 | .setPositiveButton("sure") { d, _ -> 85 | stopService(Intent(applicationContext, NotificationService::class.java)) 86 | d.dismiss() 87 | Handler(Looper.getMainLooper()).postDelayed({ 88 | exitProcess(0) 89 | }, 100) 90 | }.setNegativeButton("NO", null) 91 | .create() 92 | .show() 93 | } 94 | binding.connect.setOnClickListener { 95 | writeToConfigFile(server) 96 | Toast.makeText(this@LoginActivity, "Connecting to proxy server", Toast.LENGTH_LONG) 97 | .show() 98 | startConnection() 99 | Handler(Looper.getMainLooper()).postDelayed({ checkIfPortUsed() }, 3000) 100 | } 101 | 102 | binding.customServer.setOnClickListener{ 103 | startActivity(Intent(this, CustomServerActivity::class.java)) 104 | } 105 | 106 | 107 | } 108 | 109 | private fun checkIfPortUsed(): Boolean { 110 | var connectionStatus = true 111 | val logfile = File(filesDir, MyApplication.LOGFILE) 112 | if (logfile.exists()) { 113 | try { 114 | val inputStream: InputStream = assets.open(MyApplication.LOGFILE) 115 | var line: String? = null 116 | val br = BufferedReader(FileReader(logfile)) 117 | var isFileEmpty = true 118 | while ((br.readLine()?.also { line = it }) != null) { 119 | isFileEmpty = false 120 | if (line?.contains("port already used") == true) { 121 | connectionStatus = false 122 | break 123 | } 124 | } 125 | if (!connectionStatus) { 126 | Toast.makeText( 127 | this@LoginActivity, 128 | "Port is already used. Try again", 129 | Toast.LENGTH_LONG 130 | ).show() 131 | } else if (isFileEmpty) { 132 | Toast.makeText( 133 | this@LoginActivity, 134 | "Not connected. Restart app and connect again", 135 | Toast.LENGTH_LONG 136 | ).show() 137 | } else { 138 | showConnectionDetails() 139 | val bundle = Bundle().also { 140 | it.putInt(PORT, mRandomPort) 141 | it.putString(USER, user) 142 | it.putString(PASS, pwd) 143 | } 144 | Toast.makeText(this@LoginActivity, "connection success", Toast.LENGTH_LONG) 145 | .show() 146 | Handler(Looper.getMainLooper()).postDelayed({ 147 | val sdf = SimpleDateFormat("HH:mm:ss z") 148 | val currentTime = sdf.format(Date()) 149 | val largeIcon = BitmapFactory.decodeResource(resources, R.drawable.logo) 150 | val intent1 = Intent(this, NotificationService::class.java) 151 | intent1.action = "close_service" 152 | var pIntent: PendingIntent? = null 153 | pIntent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { 154 | PendingIntent.getService(this, 0, intent1, FLAG_MUTABLE) 155 | } else PendingIntent.getService(this, 0, intent1, 0) 156 | 157 | val p2Inten = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { 158 | PendingIntent.getActivity( 159 | this, 160 | 2, 161 | Intent(this, LoginActivity::class.java), 162 | FLAG_MUTABLE 163 | ) 164 | } else { 165 | PendingIntent.getActivity( 166 | this, 167 | 2, 168 | Intent(this, LoginActivity::class.java), 169 | 0 170 | ) 171 | } 172 | val notification = NotificationCompat.Builder( 173 | applicationContext, 174 | MyApplication.channel_1_id 175 | ) 176 | .setSmallIcon(R.drawable.bill) 177 | .setLargeIcon(largeIcon) 178 | .setStyle(NotificationCompat.BigPictureStyle()) 179 | .setStyle(NotificationCompat.BigTextStyle()) 180 | .setContentIntent(p2Inten) 181 | .setContentTitle("Connected") 182 | .setExtras(bundle) 183 | .addAction( 184 | NotificationCompat.Action( 185 | R.drawable.ic_baseline_close_24, 186 | "Close", 187 | pIntent 188 | ) 189 | ) 190 | .setContentText( 191 | "You are Connected to (${server.host}:$mRandomPort:$user:$pwd)On time$currentTime" 192 | ) 193 | .setPriority(NotificationCompat.PRIORITY_HIGH) 194 | .setCategory(NotificationCompat.CATEGORY_ALARM) 195 | .setColor(Color.YELLOW).build() 196 | notificationManager?.notify(NOTIFICATION_ID, notification) 197 | }, 2000) 198 | val servicesIntent = Intent(applicationContext, NotificationService::class.java) 199 | servicesIntent.putExtra("stat", "Proxidize Android is running!!") 200 | startService(servicesIntent) 201 | } 202 | br.close() 203 | inputStream.close() 204 | } catch (e: IOException) { 205 | e.printStackTrace() 206 | } 207 | } 208 | return connectionStatus 209 | 210 | } 211 | 212 | override fun onStart() { 213 | super.onStart() 214 | val notification = getActiveNotification() ?: return 215 | val extras = notification.extras 216 | pwd = extras.getString(PASS) 217 | user = extras.getString(USER) 218 | mRandomPort = extras.getInt(PORT) 219 | showConnectionDetails() 220 | 221 | } 222 | 223 | private fun showConnectionDetails() { 224 | mText = "${server.host}:$mRandomPort:$user:$pwd" 225 | val details = 226 | "IP : ${server.host}
Port : $mRandomPort
Username : $user
Password : $pwd" 227 | binding.connection.text = mText 228 | binding.connectionTextView.text = Html.fromHtml(details) 229 | binding.connect.text = getString(R.string.connected) 230 | } 231 | 232 | private fun startConnection() { 233 | CoroutineScope(Dispatchers.IO).launch { 234 | Conn.touch() 235 | Conn.run("$filesDir/config.ini") 236 | } 237 | } 238 | 239 | private fun getActiveNotification(): Notification? { 240 | val notificationManager = 241 | getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager 242 | val barNotifications = notificationManager.activeNotifications 243 | for (notification in barNotifications) { 244 | if (notification.id == NOTIFICATION_ID) { 245 | return notification.notification 246 | } 247 | } 248 | return null 249 | } 250 | 251 | private fun writeToConfigFile(server: ProxyServer) { 252 | // re-create connection.log file 253 | val logFile = File(filesDir, MyApplication.LOGFILE) 254 | if (logFile.exists()) { 255 | logFile.delete() 256 | } 257 | if (!logFile.exists()) { 258 | try { 259 | logFile.createNewFile() 260 | } catch (e: IOException) { 261 | e.printStackTrace() 262 | } 263 | } 264 | var out: FileOutputStream? = null 265 | val file = File(filesDir, MyApplication.FILENAME) 266 | if (file.exists()) { 267 | file.delete() 268 | } 269 | if (!file.exists()) { 270 | try { 271 | file.createNewFile() 272 | } catch (e: IOException) { 273 | e.printStackTrace() 274 | } 275 | } 276 | try { 277 | out = FileOutputStream(file, true) 278 | mRandomPort = getRandomPort() 279 | user = getAlphaNumericString() 280 | pwd = getAlphaNumericString() 281 | out.write("[common]\r\n".toByteArray()) 282 | out.write("server_addr = ${server.host}\r\n".toByteArray()) 283 | out.write("server_port = ${server.port}\r\n".toByteArray()) 284 | out.write("token = ${server.token}\r\n".toByteArray()) 285 | out.write("admin_addr = 0.0.0.0\r\n".toByteArray()) 286 | out.write("admin_port = 7400\r\n".toByteArray()) 287 | out.write("admin_user = admin\r\n".toByteArray()) 288 | out.write("admin_passwd = admin\r\n".toByteArray()) 289 | out.write("log_file = ${logFile.absolutePath}\r\n".toByteArray()) 290 | out.write("log_level = info\r\n".toByteArray()) 291 | out.write("log_max_days = 3\r\n".toByteArray()) 292 | out.write("pool_count = 5\r\n".toByteArray()) 293 | out.write("tcp_mux = true\r\n".toByteArray()) 294 | out.write("login_fail_exit = true\r\n".toByteArray()) 295 | out.write("protocol = tcp\r\n".toByteArray()) 296 | out.write("[android_proxy_$mRandomPort]\r\n".toByteArray()) 297 | out.write("type=tcp\r\n".toByteArray()) 298 | out.write("remote_port=$mRandomPort\r\n".toByteArray()) 299 | out.write("plugin=http_proxy\r\n".toByteArray()) 300 | out.write("plugin_http_user=$user\r\n".toByteArray()) 301 | out.write("plugin_http_passwd=$pwd\r\n".toByteArray()) 302 | } catch (e: IOException) { 303 | e.printStackTrace() 304 | } finally { 305 | try { 306 | out?.close() 307 | } catch (e: IOException) { 308 | e.printStackTrace() 309 | } 310 | } 311 | } 312 | 313 | 314 | companion object { 315 | const val NOTIFICATION_ID = 20340 316 | const val IP = "IP" 317 | const val PORT = "PORT" 318 | const val USER = "USER" 319 | const val PASS = "PASS" 320 | } 321 | } -------------------------------------------------------------------------------- /app/src/main/java/com/legacy/android/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.legacy.android 2 | 3 | import android.app.Activity 4 | import android.content.Intent 5 | import android.os.Bundle 6 | import android.os.Handler 7 | import android.os.Looper 8 | import android.view.animation.Animation 9 | import android.view.animation.AnimationUtils 10 | import android.widget.ImageView 11 | import android.widget.TextView 12 | import androidx.appcompat.app.AppCompatActivity 13 | 14 | class MainActivity : Activity() { 15 | 16 | //VARIABLES 17 | var tobAnim: Animation? = null 18 | var bottomAnim: Animation? = null 19 | var image: ImageView? = null 20 | var slogan: TextView? = null 21 | 22 | var mHandler = Handler(Looper.getMainLooper()) 23 | override fun onCreate(savedInstanceState: Bundle?) { 24 | super.onCreate(savedInstanceState) 25 | setContentView(R.layout.activity_main) 26 | 27 | 28 | tobAnim = AnimationUtils.loadAnimation(this, R.anim.tob_anim) 29 | bottomAnim = AnimationUtils.loadAnimation(this, R.anim.bottom_anim) 30 | 31 | image = findViewById(R.id.logo) 32 | slogan = findViewById(R.id.slogan1) 33 | 34 | image?.animation = tobAnim 35 | slogan?.animation = bottomAnim 36 | 37 | mHandler.postDelayed({ 38 | val intent = Intent(this@MainActivity, LoginActivity::class.java) 39 | startActivity(intent) 40 | finish() 41 | }, 3000) 42 | } 43 | } -------------------------------------------------------------------------------- /app/src/main/java/com/legacy/android/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.legacy.android; 2 | 3 | import android.app.Application; 4 | import android.app.NotificationChannel; 5 | import android.app.NotificationManager; 6 | import android.content.Context; 7 | import android.content.res.AssetManager; 8 | import android.os.Build; 9 | 10 | import java.io.File; 11 | import java.io.FileOutputStream; 12 | import java.io.IOException; 13 | import java.io.InputStream; 14 | 15 | public class MyApplication extends Application { 16 | 17 | public static Context mContext; 18 | public static String FILENAME = "config.ini"; 19 | public static String LOGFILE = "connection.log"; 20 | public static final String channel_1_id = "channel1"; 21 | public static final String channel_2_id = "servicechannel"; 22 | 23 | @Override 24 | public void onCreate() { 25 | super.onCreate(); 26 | mContext = getApplicationContext(); 27 | createnotficationchannel(); 28 | copyToSD("config.ini"); 29 | } 30 | 31 | private void createnotficationchannel() { 32 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { 33 | NotificationChannel channel1 = new NotificationChannel(channel_1_id, "channel 1" 34 | , NotificationManager.IMPORTANCE_HIGH); 35 | channel1.setDescription("give the user some important information about the connection"); 36 | channel1.enableLights(true); 37 | channel1.enableVibration(true); 38 | NotificationChannel servicechannel = new NotificationChannel(channel_2_id, "channel 1" 39 | , NotificationManager.IMPORTANCE_DEFAULT); 40 | servicechannel.setDescription("this channel is for a foreground service to let the user aware " + 41 | "when he is connected to the proxy and that the application in working background"); 42 | 43 | 44 | NotificationManager manager = getSystemService(NotificationManager.class); 45 | manager.createNotificationChannel(channel1); 46 | manager.createNotificationChannel(servicechannel); 47 | } 48 | 49 | 50 | } 51 | 52 | 53 | private void copyToSD(String dbName) { 54 | InputStream in = null; 55 | FileOutputStream out = null; 56 | File file = new File(this.getFilesDir(), dbName); 57 | if (file.exists()) { 58 | file.delete(); 59 | } 60 | //create a new file 61 | try { 62 | file.createNewFile(); 63 | } catch (IOException e) { 64 | e.printStackTrace(); 65 | } 66 | //the assest manager is for reading the file in raw form 67 | AssetManager assets = getAssets(); 68 | 69 | try { 70 | in = assets.open(dbName); 71 | out = new FileOutputStream(file); 72 | byte[] b = new byte[1024]; 73 | int len = -1; 74 | while ((len = in.read(b)) != -1) { 75 | out.write(b, 0, len); 76 | } 77 | } catch (IOException e) { 78 | 79 | e.printStackTrace(); 80 | } finally {///close the input and output stream 81 | 82 | if (in != null) { 83 | try { 84 | in.close(); 85 | } catch (IOException e) { 86 | e.printStackTrace(); 87 | } 88 | } 89 | if (out != null) { 90 | try { 91 | out.close(); 92 | } catch (IOException e) { 93 | e.printStackTrace(); 94 | } 95 | } 96 | } 97 | } 98 | 99 | } 100 | -------------------------------------------------------------------------------- /app/src/main/java/com/legacy/android/NotificationService.kt: -------------------------------------------------------------------------------- 1 | package com.legacy.android 2 | 3 | import android.annotation.SuppressLint 4 | import android.app.PendingIntent 5 | import android.app.Service 6 | import android.content.Context 7 | import android.content.Intent 8 | import android.os.Build 9 | import android.os.IBinder 10 | import android.os.PowerManager 11 | import androidx.core.app.NotificationCompat 12 | 13 | class NotificationService : Service() { 14 | 15 | private val wakeLock: PowerManager.WakeLock by lazy { 16 | (getSystemService(Context.POWER_SERVICE) as PowerManager).run { 17 | newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MyApp::MyWakelockTag") 18 | } 19 | } 20 | 21 | @SuppressLint("WakelockTimeout") 22 | override fun onCreate() { 23 | super.onCreate() 24 | wakeLock.acquire() 25 | } 26 | 27 | override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int { 28 | if ("close_service" == intent.action) { 29 | stopSelf() 30 | System.exit(0) 31 | return START_NOT_STICKY 32 | } 33 | val intent1 = Intent(this, NotificationService::class.java) 34 | intent1.action = "close_service" 35 | var pIntent: PendingIntent? = null 36 | pIntent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { 37 | PendingIntent.getService(this, 0, intent1, PendingIntent.FLAG_MUTABLE) 38 | } else PendingIntent.getService(this, 0, intent1, 0) 39 | val stat = intent.getStringExtra("stat") 40 | val notification = 41 | NotificationCompat.Builder(applicationContext, MyApplication.channel_2_id) 42 | .setContentTitle("Service working") 43 | .setContentText(stat) 44 | .addAction( 45 | NotificationCompat.Action( 46 | R.drawable.ic_baseline_close_24, 47 | "Close", 48 | pIntent 49 | ) 50 | ) 51 | .setSmallIcon(R.drawable.ic_baseline_miscellaneous_services_24) 52 | .build() 53 | startForeground(LoginActivity.NOTIFICATION_ID, notification) 54 | return START_NOT_STICKY 55 | } 56 | 57 | override fun onDestroy() { 58 | super.onDestroy() 59 | if (wakeLock.isHeld) { 60 | wakeLock.release() 61 | } 62 | } 63 | 64 | override fun onBind(intent: Intent): IBinder? { 65 | return null 66 | } 67 | } -------------------------------------------------------------------------------- /app/src/main/java/com/legacy/android/ProxyServer.kt: -------------------------------------------------------------------------------- 1 | package com.legacy.android 2 | 3 | data class ProxyServer(val host: String, val port: String, val token: String) { 4 | 5 | companion object { 6 | const val HOST = "138.201.246.49" 7 | const val SERVER_PORT = "2000" 8 | const val TOKEN = "12345678" 9 | 10 | fun default() = ProxyServer(HOST, SERVER_PORT, TOKEN) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/legacy/android/ServerPreference.kt: -------------------------------------------------------------------------------- 1 | package com.legacy.android 2 | 3 | 4 | import android.annotation.SuppressLint 5 | import android.content.Context 6 | import androidx.datastore.preferences.core.Preferences 7 | import androidx.datastore.preferences.core.edit 8 | import androidx.datastore.preferences.core.stringPreferencesKey 9 | import androidx.datastore.preferences.preferencesDataStore 10 | import kotlinx.coroutines.flow.Flow 11 | import kotlinx.coroutines.flow.map 12 | 13 | class ServerPreference private constructor(private val context: Context) { 14 | 15 | private val Context.dataStore by preferencesDataStore(name = "settings") 16 | 17 | 18 | val SERVER: Flow = context.dataStore.data.map(::retrieveServer) 19 | 20 | 21 | private fun retrieveServer(pref: Preferences): ProxyServer { 22 | if (pref[stringPreferencesKey("host")].isNullOrBlank()) return ProxyServer.default() 23 | return ProxyServer( 24 | pref[stringPreferencesKey("host")] ?: "", 25 | pref[stringPreferencesKey("port")] ?: "", pref[stringPreferencesKey("token")] ?: "" 26 | ) 27 | } 28 | 29 | 30 | suspend fun clear() { 31 | context.dataStore.edit { it.clear() } 32 | } 33 | 34 | suspend fun saveProxyServer(device: ProxyServer) { 35 | context.dataStore.edit { pref -> 36 | pref[stringPreferencesKey("host")] = device.host 37 | pref[stringPreferencesKey("port")] = device.port 38 | pref[stringPreferencesKey("token")] = device.token 39 | } 40 | } 41 | 42 | companion object { 43 | 44 | @SuppressLint("StaticFieldLeak") 45 | var INSTANCE: ServerPreference? = null 46 | fun getInstance(context: Context): ServerPreference { 47 | return INSTANCE ?: ServerPreference(context).also { INSTANCE = it } 48 | } 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/legacy/android/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.legacy.android 2 | 3 | 4 | fun getRandomPort(from: Int = 4000, to: Int = 60000): Int { 5 | return ((Math.random() * (to - from)).toInt()) + from 6 | } 7 | 8 | fun getAlphaNumericString(length: Int = 4): String { 9 | val allowedChars = ('A'..'Z') + ('a'..'z') + ('0'..'9') 10 | return (1..length) 11 | .map { allowedChars.random() } 12 | .joinToString("") 13 | } -------------------------------------------------------------------------------- /app/src/main/res/anim/bottom_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/anim/tob_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxidize/proxidize-android/5327c97e953806e5029a1331209d690b54059ede/app/src/main/res/drawable/bill.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_rectangle_pink.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_action_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxidize/proxidize-android/5327c97e953806e5029a1331209d690b54059ede/app/src/main/res/drawable/ic_action_name.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_close_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_miscellaneous_services_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_token_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icon_password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxidize/proxidize-android/5327c97e953806e5029a1331209d690b54059ede/app/src/main/res/drawable/icon_password.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxidize/proxidize-android/5327c97e953806e5029a1331209d690b54059ede/app/src/main/res/drawable/logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/port.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxidize/proxidize-android/5327c97e953806e5029a1331209d690b54059ede/app/src/main/res/drawable/port.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxidize/proxidize-android/5327c97e953806e5029a1331209d690b54059ede/app/src/main/res/drawable/server.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_custom_server.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 23 | 24 | 37 | 38 | 43 | 44 | 45 | 46 | 59 | 60 | 65 | 66 | 67 | 68 | 81 | 82 | 86 | 87 | 88 | 89 | 109 | 110 | 130 | 131 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_log.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_login.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 23 | 24 | 25 | 46 | 47 | 48 | 68 | 69 | 89 | 90 | 91 | 106 | 107 | 122 | 123 | 137 | 138 | 139 | 155 | 156 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 22 | 23 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /app/src/main/res/layout/log_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 16 | 17 | 29 | 30 | 44 | 45 |