MCPcopy Create free account
hub / github.com/YtFlow/Maple

github.com/YtFlow/Maple @v0.9.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.9.1 ↗ · + Follow
204 symbols 407 edges 51 files 4 documented · 2% updated 16mo agov0.9.1 · 2023-12-02★ 1,3217 open issues

Browse by type

Functions 173 Types & classes 31
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Maple

A lightweight Universal Windows proxy app based on https://github.com/eycorsican/leaf

Features

  • Comes with Leaf core:
  • Domain name resolution with built-in DNS processor
  • tun/shadowsocks/socks/trojan/ws chainable inbounds
  • direct/drop/tls/ws/h2/shadowsocks/obfs/vmess/trojan/socks chainable outbounds
  • failover/tryall/static composed outbounds
  • amux multiplexing
  • Rule system based on IP, GeoIP and domain name
  • External rules from GeoIP database and V2Ray Domain List Community
  • Configuration management
  • Monaco-based conf editor with IntelliSence support
  • Outbound network adapter selection
  • UWP VPN Platform as TUN provider

Screenshots

Settings Page with IntelliSense demo

Getting Started

Maple as a UWP app is distributed for sideloading only. When installed, it acts as a VPN provider which you will find in the VPN Settings. Use Maple app for configuration management, as well as adding external databases.

Install

  1. Grab the latest package from Release page.
  2. Extract everything from the package.
  3. Right click the certificate (named Maple.App_x.y.z.0_x64.cer) and select Install Certificate.
  4. On the Certificate Import Wizard, select Local Machine. Administrator privileges may be required to proceed.
  5. Import the certificate to the Trusted Root Certification Authorities folder. Note: failure to import the certificate or choosing a wrong certificate store will prevent you from installing the app.
  6. Open the AppxBundle (named Maple.App_x.y.z.0_x64.appxbundle) and follow the instructions until Maple is successfully installed on your computer.

Set up

  1. Launch Maple from the Start menu.
  2. Edit configuration. Refer to https://github.com/eycorsican/leaf/blob/master/README.zh.md for further explanation.
  3. Save the configuration file.
  4. If any EXTERNAL or GEOIP directive is used, drag external database files into Config area. V2Ray Domain List Community database can be fetched at https://github.com/v2ray/domain-list-community/releases/latest/download/dlc.dat . For GeoIP database, please go to MaxMind Developer Portal and sign up for free download.
  5. Rename these databases accordingly (if applicable). By default, GeoIP database is geo.mmdb and V2Ray Domain List Community database is site.dat.
  6. Go to Setting page in Maple. Choose your network adapter such as Ethernet or WLAN.
  7. Launch Windows Settings app.
  8. Add a VPN connection.
  9. For VPN provider, choose Maple.
  10. In the Connection name box, enter Maple.
  11. In the Server name or address box, enter https://github.com/YtFlow/Maple .
  12. Select Save.
  13. If any Proxy Server has a loopback address (127.0.0.1 or ::1), make sure Loopback Exemption is enabled for Maple. See https://docs.microsoft.com/en-us/previous-versions/windows/apps/hh770532(v=win.10) .

Connect

  • Simply click the toggle button on the title bar, or
  • In Windows 11, select the battery, network, or volume icon to open the Quick Settings panel. Find Maple in VPN panel and connect, or
  • In Windows 10, select the Network icon on the taskbar, and click Maple. In Windows Settings app, select Maple, and then Connect.

Note: Modifying the current configuration file while VPN is connected will take effect immediately. Hot reloading may be removed in a future release.

TODO

  • [x] VPN lifecycle management on Maple UI
  • [x] Better editing experience
  • [x] external entries
  • [x] Custom configuration folder location
  • [ ] Log collection (currently logs are sent to Visual Studio Output window for debugging only)
  • [ ] Unsandboxed Leaf core (#29)
  • [ ] VPN On Demand
  • [ ] Configurable routing entries
  • [x] IPv6 support

Build

To build Leaf and Maple, you will need:

  • a Rust nightly-x86_64-pc-windows-msvc toolchain
  • Windows 10 SDK 10.0.22621
  • Visual Studio 2022 with C++ Development Workflow
  • C++/WinRT Visual Studio extension must be installed to generate Windows Metadata.
  • Node.js 19.x or higher

Build steps:

  1. Recursively clone this repository.
  2. Open a PowerShell Prompt.
  3. Change working directory to leaf.
  4. cargo build -p leaf-ffi -Z build-std=std,panic_abort --target x86_64-uwp-windows-msvc.
    For Release builds, use cargo build -p leaf-ffi -Z build-std=std,panic_abort --target x86_64-uwp-windows-msvc --release.
    See also https://github.com/eycorsican/leaf#build .
  5. Change working directory to Maple.App\MonacoEditor.
  6. Build Monaco editor and language support: npm install && npm run build.
  7. Open Maple.sln in Visual Studio.
  8. Build Solution.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 107
Function 66
Class 21
Interface 9
Enum 1

Languages

C++60%
TypeScript40%

Modules by API surface

Maple.App/MainPage.cpp37 symbols
Maple.App/MonacoEditor/src/validate.ts11 symbols
Maple.App/MonacoEditor/src/parse.ts10 symbols
Maple.App/MonacoEditor/src/mutex.ts10 symbols
Maple.Task/VpnPlugin.cpp9 symbols
Maple.App/MonacoEditor/src/hover.ts9 symbols
Maple.App/Model/ConfigViewModel.cpp9 symbols
Maple.App/MonacoEditor/src/completion.ts8 symbols
Maple.App/MonacoEditor/src/reference.ts7 symbols
Maple.App/MonacoEditor/src/init.ts7 symbols
Maple.App/MonacoEditPage.cpp7 symbols
Maple.App/Model/Netif.cpp7 symbols

For agents

$ claude mcp add Maple \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page