Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bdbai/autogfw

Switch route automatically by realtime active detection.
https://github.com/bdbai/autogfw

Last synced: about 1 month ago
JSON representation

Switch route automatically by realtime active detection.

Awesome Lists containing this project

README

        

# Autogfw

Swith route automatically by realtime active detection.

*Linux only*

## Usage
1. Run with the following command
```sh
# Turn on debug logging
export RUST_LOG=debug
# Add privileges for raw packet processing
sudo setcap cap_net_raw,cap_net_admin=eip ./autogfw
# Start autogfw
./autogfw -m enp4s0 -s enp4s1 -c via 10.10.1.1 dev enp4s1
```
where:
- `enp4s0` is the main network interface (ether datalink)
- `enp4s1` is the backup network interface (through VPN)
- `10.10.1.1` is the gateway address to use for the backup network interface

See `./autogfw --help` for more information.

## Build
1. Ensure `rustup` is installed on your system. See https://rustup.rs
2. Install nightly (2020-01-08) toolchain with `rustup install nightly-2020-01-08`
3. `cargo build --release`