Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

4,285 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Hako

Hako

English · 简体中文

Hako is a proxy kernel based on mihomo v1.19.30, with Go bindings and build tooling for Apple applications. It produces Hako.xcframework for iOS, macOS and tvOS.

Upstream history and modifications

Hako is an independent derivative of MetaCubeX/mihomo, based on v1.19.30, commit ac017cdd246ce8bd547653d927e7bf77d7ee73d5. It is not affiliated with MetaCubeX. The upstream project asks unaffiliated downstream projects not to use "mihomo" in their names.

On 2026年09月06日, this repository restored the complete upstream ancestry through that baseline, with original commits and contributor identities intact, and retained its existing public history. The reconciliation preserves the previously published source; it changes only these provenance notes. Hako's accumulated changes include Apple bindings, SDK build tooling and kernel adaptations. Compare the upstream baseline with a Hako revision to inspect the full delta; subsequent changes are recorded as incremental public commits.

The upstream GPL-3.0 license remains in LICENSE. See NOTICE and THIRD_PARTY_LICENSES.md for attribution and dependency licenses.

Official website and client

If you want to use the app, start with the download above. This repository is for developers building or integrating the kernel.

Project repositories

Repository Contents
Hako Proxy kernel, Go bindings and Apple SDK build tools
Hako-Adapter Swift packet-flow bridge and provider lifecycle components
Hako-Client Native iOS, iPadOS, macOS and tvOS applications and extensions

The upstream baseline version describes the proxy engine. It is separate from the App Store app version and the SDK release tag. This source distribution is pre-release; pin a specific revision when integrating it.

What is included

  • The mihomo-based proxy engine: protocol implementations, DNS, routing rules, proxy groups and providers.
  • bind/hako: the API exposed to Apple applications through gomobile.
  • cmd/build_libbox: SDK generation and platform packaging.
  • docs/config.yaml: configuration reference included with the source.

An application supplies configuration, storage, the Network Extension integration and signing. Platform capabilities differ; a configuration accepted by the parser does not establish end-to-end support for every protocol or rule on every platform.

Build the Apple SDK

Use macOS with the full Xcode installation and the iOS, macOS and tvOS SDKs. The current build was checked with Xcode 26.6. The binding module declares Go 1.25.0 and selects toolchain Go 1.26.6 in bind/hako/go.mod; allow Go to obtain that toolchain, or install it explicitly.

Clone the repository with its history and tags, then install the pinned gomobile tools:

git clone https://github.com/TokenPLS/Hako.git
cd Hako
go install github.com/sagernet/gomobile/cmd/gomobile@v0.1.13
go install github.com/sagernet/gomobile/cmd/gobind@v0.1.13
make lib_apple

The build reads version information from Git tags. Keep the tags available when checking out a pinned revision.

The output is Hako.xcframework, containing five platform slices:

Platform Architectures
iOS device arm64
iOS Simulator arm64, x86_64
macOS arm64, x86_64
tvOS device arm64
tvOS Simulator arm64, x86_64

Link the framework into each target that uses the API, including the Packet Tunnel extension. The framework is static: choose Do Not Embed and link libresolv. Use the generated headers for the API of your pinned revision. For a working application integration, see Hako-Client.

Development and feedback

For the root Go module:

go build ./...
go test ./...

The Apple binding has its own module and tests under bind/hako. An SDK build alone does not establish runtime behavior on a signed device.

Report kernel problems in this repository's Issues. Include the source revision, platform, reproduction steps, expected behavior and observed result. Use a minimal sample configuration with secrets removed. For app interface or installation problems, use Hako-Client Issues.

For security reports, follow SECURITY.md.

License and credits

Hako is based on MetaCubeX/mihomo and the work of its contributors. Hako is an independent project and is not affiliated with or endorsed by MetaCubeX.

The project is licensed under GPL-3.0. See NOTICE and THIRD_PARTY_LICENSES.md for attribution and dependency licenses.

About

High-performance Adaptive Kernel, Open-source.

Resources

Security policy

Stars

466 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /