Link1 User Manual#


Slogan: One link. Every protocol.

Link1 is a proxy and network takeover app for general users. You can think of it as a “software router” running on your computer, phone, or router: it receives network connections from browsers, the system, mobile apps, routers, or LAN devices, identifies where each connection wants to go, and then, according to your configuration, chooses to connect directly, reject it, or send it through a proxy/VPN egress.

The Link1 App is responsible for importing configurations, displaying nodes, switching policy groups, viewing connections, viewing logs, and troubleshooting. The underlying core handles the actual DNS, routing, protocol dialing, and data forwarding. In some scenarios where the core is run directly, the command name may still appear as spark. This manual refers to it as the “Link1 core”.

This documentation is intended for users who have never used Clash or mihomo. It only assumes basic computer knowledge: what IP addresses, ports, domain names, HTTP, DNS, and configuration files are. After reading this manual, you should understand:

Reading Path#

If this is your first time using Link1, read the first 6 chapters in order. If you only need to look up fields, you can jump directly to the reference manual.

ChapterDocumentWhat you will learn
1Project and Proxy BasicsWhat problems Link1 solves, and what explicit proxy, transparent proxy, TUN, DNS, and outbound protocols are
2Core Concepts and Data FlowThe complete path of a connection from entering Link1 to going outbound
3Installation, Startup, and VerificationHow to import a configuration in the App, validate it, start the core, and connect clients
4Configuration File ModelYAML structure, relative paths, naming, references, default values, and common errors
5Inbound and Traffic Takeovermixed-port, port, socks-port, redir-port, tproxy-port, tun, app-proxy, listeners
6DNS and hostsDNS server syntax, Fake-IP, DNS routing, hosts, fallback, nameserver-policy
7Routing, Rules, and Policiesrules, rule-providers, logical rules, rule sets, policy groups, health checks
8Providers and Policy GroupsSubscriptions, files, inline providers, WARP providers, node filtering, overrides, group selection
9Outbound Protocol ConfigurationHow each outbound protocol works, how to write it, and how fields affect DNS/routing/transport/authentication
10HTTP EngineMITM, URL/Header/Body/JSON/JQ/QuickJS, Capture, Replay
11Link1 App ManagementApp operations for configuration profiles, connections, policy groups, Providers, logs, rule tests, and HTTP capture
12Observability and TroubleshootingCommon issues, troubleshooting order, and how to read errors and metrics
13GlossaryQuickly look up unfamiliar proxy core terminology
14Configuration Field ReferenceComplete fields for top-level options, DNS, TUN, Sniffer, Provider, HTTP Engine, and more
15Coverage IndexWhich feature modules, protocols, App management capabilities, and configuration structures are covered by the manual

Minimal Runnable Configuration#

The configuration below opens only one local mixed HTTP/SOCKS proxy port and sends all connections to a SOCKS5 upstream. It is suitable for confirming that the Link1 core can start and that clients can connect.

mixed-port: 7890
mode: rule
log-level: info
allow-lan: false

proxies:
  - name: example-socks
    type: socks5
    server: 127.0.0.1
    port: 1080
    udp: true

proxy-groups:
  - name: PROXY
    type: select
    proxies:
      - example-socks
      - DIRECT

rules:
  - MATCH,PROXY

When using it in the Link1 App, the usual flow is:

Create a configuration profile
  -> Paste or import YAML
  -> Validate configuration
  -> Apply configuration
  -> Confirm runtime status on the home page

Configure your browser or system proxy to use:

HTTP proxy:  127.0.0.1:7890
SOCKS proxy: 127.0.0.1:7890

Advanced: Run the Link1 Core Directly#

General desktop users do not need to use the command line. You only need to run the core directly for router deployments, troubleshooting, automated testing, or development debugging.

Validate the configuration:

spark -f config.yaml -t

Start:

spark -d /path/to/workdir -f config.yaml

Example Configurations#

The manual includes several copyable YAML examples:

ExamplePurpose
desktop-mixed-direct.yamlMinimal local explicit proxy, all traffic connects directly
desktop-mixed-proxy.yamlLocal explicit proxy + SOCKS5 upstream
router-tun-fakeip.yamlTUN + Fake-IP + Sniffer template
warp-provider.yamlWARP provider template
http-engine-capture.yamlHTTP Engine Capture template
all-in-one-tun-http-engine.yamlComprehensive DNS/Fake-IP + TUN + Sniffer + HTTP Engine skeleton

Where to Start Writing a Complete Configuration#

Recommended configuration order:

  1. Basic runtime parameters: mixed-port, allow-lan, mode, log-level.
  1. DNS: first decide whether Link1 should take over DNS, and whether to use Fake-IP.
  1. Outbounds: write proxies or proxy-providers.
  1. Policy groups: write proxy-groups to organize nodes into selectable egresses.
  1. Rules: write rules to direct traffic to policy groups or nodes.
  1. System takeover: only then enable tun, redir-port, tproxy-port, or protocol listeners.
  1. Advanced features: enable http-engine only when you need to debug HTTP content.

The benefit of this order is that each step can be verified independently. Do not enable TUN, complex DNS, subscriptions, dozens of rules, and HTTP Engine all at the same time from the start. Otherwise, it will be hard to tell which layer caused a problem.

Relationship with Clash/mihomo#

Link1 tries to follow common proxy core configuration conventions, such as mixed-port, dns, proxies, proxy-groups, rule-providers, and rules. However, Link1 is not a wrapper around another project: protocol implementations, the rule engine, TUN, HTTP Engine, and App management capabilities are all implemented by the Link1 core system.

This means:

Documentation Conventions#