Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/bdbai/autogfw
- Owner: bdbai
- Created: 2019-09-30T07:28:20.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-17T01:31:07.000Z (over 2 years ago)
- Last Synced: 2023-08-04T06:27:13.813Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 32.2 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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 interfaceSee `./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`