/split-the-tunnel

Primary LanguageGoApache License 2.0Apache-2.0

split-the-tunnel

CI Go Report Card Quality Gate Status Maintainability Rating Reliability Rating Security Rating Coverage Release Go version pre-commit License

Overview

split-the-tunnel is a daemon that runs on Linux hosts. It is designed to add domains that bypass VPN, effectively creating a split tunnel. This allows for more efficient use of network resources and can improve network performance.

Features

  • Runs as a daemon on Linux hosts
  • Capable of adding domains to bypass VPN
  • Creates a split tunnel for efficient network usage

Installation

To install split-the-tunnel, you can download the latest binary from the releases page and add it to your PATH.

Usage

After installing split-the-tunnel, you can start the daemon with the following command:

$ split-the-tunnel start
$ split-the-tunnel add --domain example.com

Testing

Run below command in a separate terminal after you launch daemon:

$ echo "add google.com" | socat - UNIX-CONNECT:/tmp/mydaemon.sock
$ echo "remove google.com" | socat - UNIX-CONNECT:/tmp/mydaemon.sock
$ echo "list" | socat - UNIX-CONNECT:/tmp/mydaemon.sock

Development

This project requires below tools while developing:

After you installed pre-commit and the rest, simply run below command to prepare your development environment:

$ make pre-commit-setup