Skip to content

update#1

Open
wjc272008 wants to merge 63 commits intowjc272008:masterfrom
madeye:master
Open

update#1
wjc272008 wants to merge 63 commits intowjc272008:masterfrom
madeye:master

Conversation

@wjc272008
Copy link
Copy Markdown
Owner

No description provided.

V-E-O and others added 30 commits January 14, 2015 17:14
if client requests with absolute uri:
GET http://www.github.com HTTP/1.1
Host: www.github.com

tcp-relay will redirect it as:
GET http://http://www.github.com HTTP/1.1
Host: www.github.com
fix handle proxy request in http relay
原文3处if (key.equals("proxyType")判断proxytype,后两处是else if 连接,最后一处不会被执行,现将后2处合并。
修正onSharedPreferenceChanged对proxytype的判断
This reverts commit eb545e4.
In some android 5,redsock will say about  "too many open files",and does not work,
because redsocks open socket connect too many than $(ulimit -n)
so I add "ulimit -HSn 4096"
let it be enough.
poor English.Let me describe in Chinese.
我用了很多安卓手机,发现在许多安卓5上,会出现成功转发了数据包却没有成功代理,
于是把redsocks改成调试模式,发现"too many open files"
虽然不明白默认的上限$(ulimit -n)1024为什么会不够,
但是我把上限设置成4倍ulimit -HSn 4096,问题就不再出现了,
fix bug: "too many open files"
China routes are gotten from https://github.com/17mon/china_ip_list
Shrinked for better performance by remove subnets which have netmasks >= 20.
Update CHN route with shrinked china_ip_list
E/ProxyDroidService(20295): Error setting up port forward during connect
E/ProxyDroidService(20295): java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
E/ProxyDroidService(20295):     at org.proxydroid.ProxyDroidService.enableProxy(ProxyDroidService.java:263)
E/ProxyDroidService(20295):     at org.proxydroid.ProxyDroidService.handleCommand(ProxyDroidService.java:394)
E/ProxyDroidService(20295):     at org.proxydroid.ProxyDroidService$3.run(ProxyDroidService.java:715)
E/ProxyDroidService(20295):     at java.lang.Thread.run(Thread.java:818)
avoid NullPointerException
* disable adds

* change DNS proxy server

* change app version

* commented logging
Added a translation to the Portuguese language.
Never connect to the specified profile when current ssid is in the
list.
SuperSU 2.76 (maybe and some previous beta versions) moves su binary to
/su/bin/su. It also makes an empty directory /su/xbin/. Both of them
could be the path to get root shell. So now supports su in the following
paths:
- /system/bin/su
- /system/xbin/su
- /su/bin/su
- /su/xbin/su
It is an open source root solution.
madeye and others added 30 commits December 5, 2016 09:52
Enable basic authentication by default
Improve magisk compatibility on AOSP Userdebug build
…orward the traffic because the interface's name has changed.
fix the issue that the hotspot on newer versions of Android doesn't f…
* Add VPN mode support without requiring root permissions

This implements PR #32 features:
- Add ProxyDroidVpnService extending Android's VpnService API
- Add native tun2socks library for TUN to SOCKS5 conversion
- Add LocalProxyServer for HTTP-to-SOCKS protocol conversion
- Add Tun2SocksHelper JNI wrapper for native library
- Update build.gradle to SDK 33, Gradle 8.x, NDK 25.1
- Add VPN mode toggle in preferences (enabled by default)
- Update AndroidManifest with VPN service declaration and permissions

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Add GitHub Actions CI workflow and unit tests

- Add android-build.yml workflow for CI/CD with:
  - JDK 17 and Android SDK setup
  - Gradle build, unit tests, and lint
  - APK and test results artifact upload
- Add LocalHttpProxyTest with comprehensive unit tests for:
  - SOCKS5 handshake (auth and no-auth)
  - SOCKS5 connect requests (IPv4, domain, IPv6)
  - HTTP CONNECT proxy requests
  - Protocol parsing and encoding

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Add local HTTP proxy tests with Android emulator integration

- Add emulator-test job to GitHub Actions workflow that:
  - Starts an HTTP CONNECT proxy server on the host
  - Installs the app on Android emulator
  - Configures proxy settings via adb
  - Verifies VPN service declaration and native libraries
  - Tests app startup and configuration handling

- Add test_http_proxy.py: Python HTTP CONNECT proxy for testing
  - Supports authentication
  - Logs all CONNECT requests
  - Relays data between client and target

- Add run_integration_tests.sh: Integration test script
  - Automates emulator testing workflow
  - Configures preferences via adb
  - Runs connectivity verification tests

- Update app/build.gradle with additional androidTest dependencies

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Remove unused imports and constants from unit tests

Clean up test file to remove unused imports (ServerSocket, Socket,
InputStream, OutputStream, etc.) and unused port constants that
were left over from the previous socket-based test implementation.

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Fix CI lint job by adding NDK/CMake installation

The lint job was failing because it couldn't compile native code
without NDK and CMake installed. Also removed unnecessary dummy
google-services.json from lint job since Firebase is not used.

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Fix build error: remove API 34+ foregroundServiceType

The 'specialUse' foregroundServiceType and FOREGROUND_SERVICE_SPECIAL_USE
permission were added in Android 14 (API 34), but the app targets API 33.
VPN services don't need a specific foregroundServiceType since VpnService
has special handling built-in.

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Make gradlew executable

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Fix JUnit exclusion to not affect test configurations

The previous configuration excluded JUnit from all configurations which
broke unit tests. Now JUnit is only excluded from implementation scope
to prevent json-simple's transitive JUnit dependency from being included
in the APK, while still allowing testImplementation to use JUnit.

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Remove Firebase/AdMob dependencies and fix R.id switch statements

- Remove Firebase Analytics from ProxyDroidApplication
- Remove AdMob (AdView, AdSize, AdRequest) from ProxyDroid
- Convert switch statement with R.id.* to if-else in BypassListActivity
  (R.id fields are not constant expressions with Android Gradle Plugin)
- Remove unused getLayout method, ViewParent and LinearLayout imports

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Remove remaining Firebase Analytics references

Remove firebaseAnalytics calls from:
- AppManager.java
- FileChooser.java
- ProxyDroidService.java (onDestroy and onStart)

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Fix configurations syntax in build.gradle

Use configurations.implementation instead of configurations { implementation { } }
to properly exclude JUnit from implementation configuration.

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Fix JUnit exclusion: exclude only from json-simple dependency

The previous configuration excluded JUnit from all implementation
configurations which was also blocking it from test configurations.
Now JUnit is only excluded from the json-simple dependency which
incorrectly pulls it in as a compile dependency.

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Fix shell quoting in emulator test script

Use heredoc (cat << 'PREFS_EOF') instead of variable assignment
to avoid shell parsing issues with XML special characters.

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Fix emulator test: create prefs.xml in separate step

The android-emulator-runner action executes script lines individually,
so heredocs don't work within the script block. Move the prefs.xml
creation to a separate step that runs before the emulator.

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Add Python cache to .gitignore

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Move emulator test script to separate file

Extract inline emulator test script from workflow YAML into
scripts/run_emulator_tests.sh for easier maintenance and testing.

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Enable emulator snapshots in CI

Remove -no-snapshot-save flag to allow emulator snapshots,
which can speed up boot times on subsequent runs.

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Fix emulator test script execution

Use 'bash scripts/run_emulator_tests.sh' instead of './scripts/...'
to ensure the script is found and executed correctly.

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

* Fix line endings in emulator test script

Convert CRLF to LF line endings to fix bash syntax error.

https://claude.ai/code/session_01XDv7Fhpou2mSbpsV56cWxL

---------

Co-authored-by: Claude <noreply@anthropic.com>
* WIP: Rewrite project in Kotlin - core classes and utilities

- Add Kotlin plugin to build.gradle files
- Convert core app classes: ProxyDroidApplication, Profile, ProxyedApp
- Convert services: ProxyDroidService, ProxyDroidVpnService
- Convert receivers: ProxyDroidReceiver, ConnectivityBroadcastReceiver
- Convert widget: ProxyDroidWidgetProvider
- Convert JNI interfaces: Exec, Tun2SocksHelper
- Convert utility classes: Utils, Constraints, Option, ImageLoader,
  ImageLoaderFactory, RegexValidator, LocalProxyServer
- Convert helper: InnerSocketBuilder

This is work in progress - remaining files to convert:
- UI activities (ProxyDroid, AppManager, BypassListActivity, FileChooser)
- PAC selector classes
- Adapters and validators
- Test files

https://claude.ai/code/session_01A8JRXuv4RL3LWQCZq4QDr9

* Complete Kotlin rewrite of ProxyDroid project

This commit completes the full conversion of the ProxyDroid Android
project from Java to Kotlin.

Changes include:
- Updated build.gradle files with Kotlin plugin and dependencies
- Converted all 36 Java source files to Kotlin
- Converted all test files to Kotlin
- Removed all original Java files

Converted files by package:

org.proxydroid:
- ProxyDroid, ProxyDroidApplication, Profile, ProxyedApp
- ProxyDroidService, ProxyDroidVpnService
- AppManager, BypassListActivity, FileChooser, FileArrayAdapter
- ConnectivityBroadcastReceiver, ProxyDroidReceiver
- ProxyDroidWidgetProvider
- Exec, InnerSocketBuilder, DomainValidator

org.proxydroid.utils:
- Utils, Constraints, Option, Base64
- ImageLoader, ImageLoaderFactory
- LocalProxyServer, Tun2SocksHelper, RegexValidator

com.btr.proxy.selector.pac:
- PacProxySelector, PacScriptParser, PacScriptSource
- RhinoPacScriptParser, UrlPacScriptSource
- PacScriptMethods, ScriptMethods
- Proxy, ProxyException, ProxyEvaluationException

com.ksmaze.android.preference:
- ListPreferenceMultiSelect

Test files:
- ExampleUnitTest, ExampleInstrumentedTest
- LocalHttpProxyTest

https://claude.ai/code/session_01A8JRXuv4RL3LWQCZq4QDr9

* Fix Kotlin compilation errors

- Add missing Base64.kt utility class that wraps android.util.Base64
- Fix duplicate companion object in AppManager.kt (merged into one)
- Add missing vpn_running string resource

https://claude.ai/code/session_01A8JRXuv4RL3LWQCZq4QDr9

* Add missing init() method to Profile class

The ProxyDroid activity calls mProfile.init() to reset profile values,
but this method was missing after the Kotlin conversion.

https://claude.ai/code/session_01A8JRXuv4RL3LWQCZq4QDr9

* Fix Kotlin compilation errors

- Change androidx.preference.PreferenceManager to android.preference.PreferenceManager
  (androidx.preference requires additional dependency)
- Add explicit type parameter to emptyList<String>() in ConnectivityBroadcastReceiver

https://claude.ai/code/session_01A8JRXuv4RL3LWQCZq4QDr9

* Fix ProxyedApp and AppManager compilation errors

- Add missing isProxyed and isEnabled properties to ProxyedApp
- Make username, procname, name nullable in ProxyedApp
- Fix OnScrollListener reference to use AbsListView.OnScrollListener
- Add null check before Arrays.binarySearch for nullable username

https://claude.ai/code/session_01A8JRXuv4RL3LWQCZq4QDr9

* Fix Kotlin compilation error in ImageLoader.kt

Cast lock object to Object before calling notifyAll() since Kotlin's Any
type doesn't have the notifyAll() method. This is consistent with the
existing wait() call pattern on line 121.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Max Lv <mlv@MaxdeMac-mini.local>
- Update build system from Maven to Gradle
- Update prerequisites (JDK 11+, Gradle 8.1+, NDK 25.1, CMake 3.22.1)
- Remove outdated Travis CI badge and nightly builds link
- Update dependency list (remove unused cntlm, transproxy, stunnel; add tun2socks)
- Add project structure documentation
- Add supported architectures section
- Add SDK version requirements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.