Code Monkey home page Code Monkey logo

chaqos's Introduction

QoSify is simple daemon for setting up and managing CAKE along with a custom
eBPF based classifier that sets DSCP fields of packets.

It supports the following features:
- simple TCP/UDP port based mapping
- IP address based mapping
- priority boosting based on average packet size
- bulk flow detection based on number of packets per second
- dynamically add IP entries with timeout
- dns regex entries and ubus api for providing dns lookup results

It can be configured via ubus call qosify config.

This call supports the following parameters:
- "reset": BOOL
	Reset the config to defaults instead of only updating supplied values

- "files": ARRAY of STRING
	List of files with port/IP/host mappings

- "timeout": INT32
	Default timeout for dynamically added entries

- "dscp_default_udp": STRING
	Default DSCP value for UDP packets

- "dscp_default_tcp": STRING
	Default DSCP value for TCP packets

- "dscp_prio": STRING
	DSCP value for priority-marked packets

- "dscp_bulk": STRING
	DSCP value for bulk-marked packets

- "dscp_icmp": STRING
	DSCP value for ICMP packets

- "bulk_trigger_pps": INT32
	Number of packets per second to trigger bulk flow detection

- "bulk_trigger_timeout": INT32
	Time below bulk_trigger_pps threshold until a bulk flow mark is removed

- "prio_max_avg_pkt_len": INT32
	Maximum average packet length for marking a flow as priority

- "interfaces": TABLE of TABLE
	netifd interfaces to enable QoS on

- "devices": TABLE of TABLE
	netdevs to enable QoS on


interface/device properties:
- "bandwidth_up": STRING
	Uplink bandwidth (same format as tc)

- "bandwidth_down": STRING
	Downlink bandwidth (same format as tc)

- "ingress": BOOL
	Enable ingress shaping

- "egress": BOOL
	Enable egress shaping

- "mode": STRING
	CAKE diffserv mode

- "nat": BOOL
	Enable CAKE NAT host detection via conntrack

- "host_isolate": BOOL
	Enable CAKE host isolation

- "autorate_ingress": BOOL
	Enable CAKE automatic rate estimation for ingress

- "ingress_options": STRING
	CAKE ingress options

- "egress_options": STRING
	CAKE egress options

- "options": STRING
	CAKE options for ingress + egress


Mapping file syntax:

Each line has two whitespace separated fields, match and dscp
match is one of:
- tcp:<port>[-<endport>]
	TCP single port, or range from <port> to <endport>
- udp:<port>[-<endport>]
	UDP single port, or range from <port> to <endport>
- <ipaddr>
	IPv4 address, e.g. 1.1.1.1
- <ipv6addr>
	IPv6 address, e.g. ff01::1
- dns:<pattern>
	fnmatch() pattern supporting * and ? as wildcard characters
- dns:/<regex>
	POSIX.2 extended regular expression for matching hostnames
	Only works, if dns lookups are passed to qosify via the add_dns_host ubus call.
- dns_c:...
	Like dns:... but only matches cname entries

dscp can be a raw value, or a codepoint like CS0
Adding a + in front of the value tells qosify to only override the DSCP value if it is zero
DNS entries are compared in the order in which they are specified in the config, using the
first matching entry.


Planned features:
- Support for LAN host based priority

chaqos's People

Contributors

nbd168 avatar liudf0716 avatar stintel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.