# sagernet/sagernet

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/sagernet-sagernet).**

5,770 stars · 1,011 forks · Kotlin · other · archived

## Links

- GitHub: https://github.com/SagerNet/SagerNet
- Homepage: https://sagernet.org
- awesome-repositories: https://awesome-repositories.com/repository/sagernet-sagernet.md

## Topics

`android` `anti-censorship`

## Description

SagerNet is an Android VPN client that routes device traffic through proxy protocols to bypass internet censorship and access restricted content. It functions as a censorship circumvention tool, distributing anti-censorship platforms and helping users evade network restrictions, while also serving as a platform for studying internet censorship patterns through scientific research.

The application routes network traffic through proxy protocols by hooking into the Android VpnService API to create a local VPN tunnel, running persistently as a foreground service with a notification to prevent the OS from killing it. It stores and exchanges proxy profiles and routing rules as structured JSON documents, and intercepts DNS queries to resolve them through proxy tunnels, preventing DNS poisoning and leaks. Traffic is directed through different proxy chains or direct connections based on configurable domain, IP, and geo-IP rules, with per-connection byte counts and session metadata collected for real-time bandwidth monitoring and logging.

The proxy core is plugin-based, loading protocol implementations at runtime, and integrates multiple proxy transports including VMess, Shadowsocks, and Trojan through a unified V2Ray-core abstraction layer.

## Tags

### Security & Cryptography

- [VPN and Proxy Clients](https://awesome-repositories.com/f/security-cryptography/vpn-and-proxy-clients.md) — An Android VPN client that routes traffic through proxy protocols to bypass internet censorship.
- [Censorship Circumvention Tools](https://awesome-repositories.com/f/security-cryptography/censorship-circumvention-tools.md) — Distributes proxy platforms and tools that help users circumvent internet censorship. ([source](https://sagernet.org))

### Mobile Development

- [Foreground Service Implementations](https://awesome-repositories.com/f/mobile-development/mobile-capabilities/background-services/foreground-service-implementations.md) — Runs proxy connections as a foreground Android service with notification to prevent OS termination.

### Networking & Communication

- [DNS Override Resolvers](https://awesome-repositories.com/f/networking-communication/dns-resolution/dns-override-resolvers.md) — Intercepts and resolves DNS queries through proxy tunnels to prevent DNS poisoning and leaks.
- [Traffic Routing Proxies](https://awesome-repositories.com/f/networking-communication/network-infrastructure-routing/network-infrastructure-configuration/network-infrastructure/traffic-routing-proxies.md) — Routes network traffic through proxy protocols to bypass censorship and access restricted content. ([source](https://sagernet.org))
- [Proxy Protocols](https://awesome-repositories.com/f/networking-communication/proxy-protocols.md) — Routes network traffic through proxy protocols to bypass censorship and access restricted content.
- [Unified Transport Abstraction Layers](https://awesome-repositories.com/f/networking-communication/proxy-servers/v2ray-configuration-managers/unified-transport-abstraction-layers.md) — Integrates multiple proxy transports like VMess, Shadowsocks, and Trojan through a unified V2Ray-core abstraction layer.
- [Rule-Based Proxies](https://awesome-repositories.com/f/networking-communication/rule-based-proxies.md) — Directs traffic through different proxy chains based on configurable domain, IP, and geo-IP rules.
- [VPN Services](https://awesome-repositories.com/f/networking-communication/vpn-services.md) — Creates a local VPN tunnel via Android VpnService API to intercept and route all device traffic.

### Software Engineering & Architecture

- [Runtime Plugin Loaders](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/proxy-plugins/runtime-plugin-loaders.md) — Loads proxy protocol implementations as plugins at runtime through a modular engine.
