Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sir-go/vyos-balancer
cli tool for balance traffic between two uplinks
https://github.com/sir-go/vyos-balancer
balancer cli go golang network vyos
Last synced: 21 days ago
JSON representation
cli tool for balance traffic between two uplinks
- Host: GitHub
- URL: https://github.com/sir-go/vyos-balancer
- Owner: sir-go
- License: mit
- Created: 2022-10-22T12:46:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-24T12:33:48.000Z (about 2 years ago)
- Last Synced: 2024-11-06T22:08:34.294Z (2 months ago)
- Topics: balancer, cli, go, golang, network, vyos
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Traffic balancing daemon for [VyOS Router](https://vyos.io/vyos-router)
[![Go](https://github.com/sir-go/vyos-balancer/actions/workflows/go.yml/badge.svg)](https://github.com/sir-go/vyos-balancer/actions/workflows/go.yml)We have two uplink providers with different NAT subnets for each.
The daemon regularly checks the usage of each uplink interface and moves firewall NAT rules
from the more loaded to the less.## Test
```bash
go test -v ./cmd/vyosctl
gosec -exclude=G402 ./...
```## Build
```bash
go mod download && go build -o vyosctl ./cmd/vyosctl
```## Flags
`-c ` - path to `*.toml` config file## Config
```
overflow_count = 6 # uplink overflow count
check_period = "5s" # how often check uplinks[vyos]
addr = "https://---" # url to VyOS API
key = "//" # VyOS API token[beeline] # 1st uplink name
alias = "enp3s0.304" # interface
lz = 10 # Mbps - zero level for traffic
l0 = 850 # Mbps - lower edge
l1 = 2900 # Mbps - upper edge
nat = "185.46.0.0/24" # NAT external subnet[TTK] # 2nd uplink name
...
```