Skip to content

ThisSeanZhang/landscape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Landscape - Linux Router Configuration Tool

License: GPL v3 DeepWiki

Landscape is a web-based tool that helps you easily configure your favorite Linux distribution as a router.

Built with Rust / eBPF / AF_PACKET.

简体中文 | English


Screenshot


CORE Features

  • Traffic diversion control (SIP-CIDR, QoS (dscp), DIP, domain, Geo matching rules)
  • eBPF routing
  • Independent DNS configuration and caching for each flow (to prevent DNS pollution and leaks)
  • Traffic import into Docker containers
  • Geo management

Features

✅ Implemented and tested ⚠ Functional but untested ❌ Not implemented

  • IP Configuration

    • Static IP

      • ✅ Set IP address
      • ✅ Configure default route via gateway
    • DHCP Client

      • ✅ Specify hostname
      • ❌ Custom DHCP options
    • PPPoE (PPPD version)

      • ✅ Set as default route
      • ⚠ Multi-interface dialing
      • ✅ Specify interface name
    • PPPoE (eBPF version)

      • ✅ Protocol core implemented
      • ❌ GRO/GSO causing oversized packets (unsolved)
    • DHCP Server

      • ✅ Provide basic IP assignment and renewal
      • ✅ Custom gateway/subnet/access rules
      • ✅ IP-MAC binding
      • ✅ IP lease display
    • IPv6 Support

      • ✅ Use DHCPv6-PD to request prefix from upstream
      • ✅ Use RA to advertise prefix to downstream
  • Flow Control Module

    • ✅ Tag flows using IP + QoS
    • ✅ Each flow can have its own DNS settings and cache
    • ✅ Route marked traffic based on rules (direct/drop/reuse port/redirect to Docker or NIC)
    • ❌ Assign tracking marks to specified packets
    • ✅ External IP behavior control via tagging and geoip.dat support
    • ✅ When IP rules and DNS rules conflict, the priority of the rules is used for verdict (the smaller the value, the higher the priority)
  • Geo Management

    • ✅ Manage multiple Geo sources
    • ✅ Auto-update Geo IP/Site data
  • DNS

    • ✅ Support DNS over HTTPS, DNS over TLS and DNS over Quic for upstream
    • ✅ Assign specific upstream DNS by domain
    • ✅ DNS Hijacking (return A / AAAA records)
    • ❌ Hijack to return multiple records (example: TXT / CNAME and other)
    • ✅ Tag resolved IPs and handle with traffic control
    • ✅ Support GeoSite files
    • ❌ Parse Docker container domain labels into DNS records
    • ✅ Test domain resolution
  • NAT (eBPF)

    • ✅ Basic NAT support
    • ✅ Static mapping / Port forwarding
    • ✅ NAT disables port reuse by default; reuse allowed via tagging rules
  • Metrics

    • ✅ Report connection stats (bytes/packets) every 5 seconds
    • ✅ Display active connections (not yet combined with NAT)
    • ❌ Open export API for metrics
  • Docker

    • ✅ Basic Docker container management and runtime
    • ⚠ Pull images
    • ✅ Route traffic into TProxy-enabled containers
  • Wi-Fi

    • ✅ Enable/disable Wi-Fi using iw
    • ✅ Create AP with hostapd
    • ❌ Connect to existing Wi-Fi hotspot
  • Storage

    • ✅ Use database instead of file-based config
    • ✅ Export all current configs as landscape_init.toml
    • ❌ UI component to upload/restore config
    • ❌ Config editor via UI
    • ❌ Separate DB path for metrics
  • Miscellaneous

    • ✅ Login screen
    • ❌ English UI frontend
    • ✅ NIC XPS/RPS optimization to distribute load across CPU cores

How to Start & Limitations

System Requirements

  • Supported Linux Kernel: 6.9 or later
  • (Optional) docker

Manual Startup

  1. Create config directory:

    mkdir -p ~/.landscape-router
  2. Download static.zip from release and extract to ~/.landscape-router/static

  3. If you have a desktop environment and browser, you can skip this step. Otherwise, refer to Config to create landscape_init.toml

  4. Start the service by downloading a release binary from Releases Then run (as root):

    ./landscape-webserver

    Default port: 6300 Default username: root Default password: root Use ./landscape-webserver --help for other options.

  5. Once everything is confirmed to work, you can set it up as a systemd service. Create /etc/systemd/system/landscape-router.service with the following content:

    [Unit]
    Description=Landscape Router
    
    [Service]
    ExecStart=/root/landscape-webserver  # remember to modify this path accordingly
    Restart=always
    User=root
    LimitMEMLOCK=infinity
    
    [Install]
    WantedBy=multi-user.target
    

Armbian Integration

See Armbian Integration Guide


Build Instructions

See Build Documentation or Cross-compilation Guide


LICENSE


If you have any suggestions or issues, feel free to submit them via issues.

Star History

Star History Chart