Landscape is a tool with a web-based UI that allows you to configure your favorite Linux distribution
as a router
easily.
Built with Rust / eBPF / AF_PACKET.
- Supported Linux kernel version:
6.1
or higher. iptables (require for mss clamping)
,docker
-
Create the configuration folder:
mkdir -p ~/.landscape-router
-
Place the
geosite.dat
file into the above folder. -
Start the service: After compiling, run the following command to start the service (default port:
6300
):./landscape-webserver
Ensure the following dependencies are installed:
apt install pkg-config bpftool build-essential clang libelf1 libelf-dev zlib1g-dev
Make sure node
, yarn
, and rust
are installed, then run the following command to compile:
./build.sh
The compiled output will be located in the output
folder.
For cross-compilation on an x86 host to target aarch64
, refer to Cross Compilation for aarch64.
Feature Module | Status | Description |
---|---|---|
IP Configuration | ||
PPPoE | ✅ | Supports multiple connections using the PPPD client |
PPPoE | ❌ | eBPF-based data packet handling cannot solve GSO/GRO issues |
DHCP Client | ✅ | Supports IP requests and IP configuration |
DHCP Client | ❌ | Specify DHCP options |
DHCP Server | ✅ | Provides simple IP address allocation and renewal (default subnet: 192.168.5.1/24 ) |
DHCP Server | ❌ | Custom configuration |
Marking Module | ||
Traffic Forwarding | ✅ | Forwards DNS-marked traffic to specific Docker containers |
Traffic Statistics | ❌ | Logs and analyzes specific traffic |
DNS Configuration | ||
Upstream DNS | ✅ | Resolves specific URLs using designated upstream DNS |
GeoSite Support | ✅ | Uses geosite.dat to mark relevant traffic and avoid incorrect connections |
GeoSite Updates | ❌ | Periodic updates to geosite.dat file; downloads if absent |
NAT Features | ||
Basic NAT | ✅ | Implements basic NAT functionality using eBPF |
Symmetric NAT | ❌ | Restricts certain IPs or websites from NAT traversal with DNS and marking module |
Docker Support | ||
Container Management | ✅ | Supports simple Docker container management |
Traffic Redirection | ✅ | Redirects traffic to tproxy programs running in Docker |
Wi-Fi | ||
Create AP | ❌ | Creates a Wi-Fi hotspot |
Connect to AP | ❌ | Connects to a Wi-Fi hotspot |
Miscellaneous | ||
Login UI | ❌ | Adds login logic and interface |
Log Standardization | ❌ | Improves logging standardization |
English UI | ❌ | Adds English version of the frontend page |
NIC XPS/RSP Optimization | ❌ | Balances NIC load across CPU cores to improve throughput |
-
PPPoE MTU Issues
- Observed packets exceeding MTU size, likely caused by
GRO
orGSO
. Disabling the feature increases NIC load. Currently, usingpppd
avoids the issue. - Relevant code reference: PPPoE egress implementation
- Observed packets exceeding MTU size, likely caused by
-
Code Structure Issues
- The code structure is currently unorganized, requiring better modularization.
landscape-ebpf
: GNU General Public License v2.0- Other parts: GNU General Public License v3.0
For any suggestions or questions, feel free to submit feedback via issues.