Skip to content

AndrewWangDev/Exclave

 
 

Repository files navigation

Exclave

Enhanced fork with improved support for self-hosted proxies. (This is a fork of dyhkwong/Exclave with additional features for better remote server configuration management.)

Exclave is a feature-rich Android proxy client designed for privacy-conscious users and self-hosted proxy server administrators.

Details

Features

  • Multiple proxy protocols and sub-protocols support
  • Group management and subscription handling
  • Advanced routing capabilities
  • Proxy chaining
  • ECH (Encrypted Client Hello) configuration support
  • Reality protocol with customizable fingerprints
  • TLS certificate pinning (public key and chain SHA-256)
  • Hysteria 2 advanced settings

Supported Protocols

  • Shadowsocks (with SIP003 plugin support)
  • Shadowsocks 2022 (with SIP003 plugin support)
  • Trojan
  • Hysteria 2
  • AnyTLS
  • mieru
  • NaïveProxy (as a standalone plugin)
  • TUIC
  • Juicity
  • VMess (with various optional sub-protocols)
  • VLESS (with various optional sub-protocols)
  • WireGuard (TCP and UDP only)
  • TrustTunnel (no ICMP echo support)
  • SSH proxy ("dynamic port forwarding")
  • HTTP CONNECT tunnel (HTTP/1.1, HTTP/1.1 with TLS, HTTP/2 and HTTP/3)
  • SOCKS4, SOCKS4A and SOCKS5

Exclave is a fork of the archived Android proxy client SagerNet and uses a custom overhauled fork of V2Ray core with enhanced protocol support.

Recent Improvements

Advanced Configuration Handling for Self-Hosted Proxies

This version addresses critical issues with remote server configuration updates to better support self-hosted proxy administrators:

1. ECH Configuration Preservation

Problem: ECH (Encrypted Client Hello) configurations from remote servers were lost during subscription updates because local customizations were applied before comparison, preventing change detection.

Solution: ECH, Reality fingerprints, and other advanced settings are now properly merged with remote configurations using conditional logic. Local settings are only applied when remote values are absent or empty:

  • Only apply local ECH config if remote value is null or empty
  • Only apply Reality fingerprint if remote value is null or empty
  • Preserve Hysteria 2 bandwidth settings (hy2DownMbps, hy2UpMbps) from remote servers
  • Maintain gRPC service name compatibility
  • Support MUX settings from remote servers with proper concurrency handling

2. Configuration Sharing Enhancement

Problem: QR code generation and clipboard export in v2RayFmt.kt ignored ECH config, MUX settings, packet encoding, certificate pinning (SHA-256), and other advanced configurations.

Solution: Enhanced sharing mechanisms to include all advanced parameters:

  • pub parameter for pinned peer certificate public key SHA-256
  • chain parameter for pinned peer certificate chain SHA-256
  • ech parameter for ECH configuration
  • fp parameter for TLS fingerprints
  • mux parameter for MUX protocol enablement
  • concurrency parameter for MUX concurrency limits
  • packetEncoding parameter for packet encoding mode

3. Configuration Import Support

Problem: Importing configurations deliberately ignored TLS fingerprints, certificate pinning (SHA-256), ECH config, MUX settings, and concurrency parameters, making it impractical to update self-hosted proxy settings remotely.

Solution: Import functionality now parses and applies all advanced configuration parameters from subscription URLs, fully supporting remote configuration management for self-hosted deployments.

Compatibility Note

These improvements maintain backward compatibility with existing "airport" subscriptions while significantly enhancing usability for self-hosted proxy administrators. Tools like ECH Auto Patcher can now function properly with Exclave.

Download

Starting in September 2026, Google will block apps from "sideloading" on certified Android devices. If you are a user who values digital freedom, we need your voice to express opposition. Your support will not only help save this app, but also help defend software freedom and open distribution.

License

This fork maintains the same GPL v3 license as the original project.

Copyright (C) 2023 dyhkwong
Copyright (C) 2021 by nekohasekai <contact-sagernet@sekai.icu>
Modifications Copyright (C) 2024-2025 AndrewWangDev

This program (except for all files in directory "library/core/clash") is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

All files in directory "library/core/clash" are free software: you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Translation

Is Exclave not in your language, or the translation is incorrect or incomplete? Get involved in the translations on Hosted Weblate.

Report Issues

Please report issues related to the enhancements in this fork here.

For issues related to the core Exclave functionality, you can report them to the original project, though note that this fork uses heavily modified core.

Reporting Guidelines

  • For crashes, log file using "debug" log level is required. Log files may contain secret keys used to connect to servers. Please remove potential sensitive information or encrypt with GPG before posting them publicly.
  • For memory leak and high system resource usage, pprof profile is required. Long press "About" - "Version" to enable pprof HTTP server settings and kill and restart the app to take effect.
  • Encrypt with this GPG public key if the issue contains sensitive information or you are reporting a vulnerability.

Explanation of terms

Exclave wiki. It contains some subjective comments. Viewer discretion is advised.

Build from source

The following procedures are only applicable to for typical AMD64 Linux distros. It is possible to build on other platforms but the arguments may need some modifications.

  • Install Git, Go 1.25 and JDK 21.
  • Install this Go Mobile fork (go install github.com/sagernet/gomobile/cmd/gomobile@latest and go install github.com/sagernet/gomobile/cmd/gobind@latest).
    • This fork version of Go Mobile is for reproducible build only. To use the official Go Mobile, remove -buildvcs=false in library/core/build.sh and replace all usage of module github.com/sagernet/gomobile with golang.org/x/mobile in library/core).
  • Use Android Studio or Android SDK Command-line tools to install Android SDK Platform 36, Android SDK Build-Tools 36.1 and Android SDK Platform-Tools.
  • Install Android NDK r29.
  • Use Git to clone this project.
  • Replace release.keystore with your own. It can be generated by Java keytool.
  • Create a new local.properties file if it does not exist. Append the following lines to your local.properties.
    KEYSTORE_PASS=your_keystore_pass
    ALIAS_NAME=your_alias_name
    ALIAS_PASS=your_alias_pass
  • Build libcore: ./run lib core or ./library/core/build.sh
  • Download assets: ./gradlew :app:downloadAssets, or update assets to the latest version: ./gradlew :app:updateAssets
  • Build the app: ./gradlew :app:assembleOssRelease
  • APK files are located in ./app/build/outputs/apk/oss/release

Acknowledgments

This project is built upon:

Special thanks to the original authors for creating and maintaining the base project.

About

An enhanced fork of Exclave that enables remote synchronization of advanced Xray configurations (ECH, Mux, ...) via subscription updates, and supports full-feature link sharing/importing.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Kotlin 78.0%
  • Java 10.9%
  • Go 10.4%
  • AIDL 0.3%
  • Shell 0.3%
  • Python 0.1%