Skip to content

vdchuyen/openwrt-traffic-emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openwrt-traffic-emulator

OpenWRT traffic emulator with bootstrap frontend

Demo

These little scripts will provide a frontend to emulate network condition for mobile app testing. The backend cgi use tc qdisc netem to setup Traffic sharping condition for limit bandwidth, loss and latency. Inspired by this package: https://github.com/shuhaowu/trafficcop

But the trafficcop package does not work on TP-link MR3020 device and provide no custom input for loss, latency and bandwidth so this script provide more simple method.

###Features:

  • Frontend to emulate network condition via web frontend, for mobiles app testing, esp live streaming apps.
  • Latency (delay)
  • Packet loss
  • Bandwidth limitation

After connect wireless, go to http://<router ip>/cgi-bin/traffic to control traffic condition Same as trafficcop, this should work on any device that uses br-lan as its LAN interface.

Working devices: (to be updated)

  • TP-link MR3020

How to setup

  • On openwrt shell: install uhttpd, tc and kernel module: kmod-sched-core
  • opkg update, opkg install tc uhttpd kmod-sched-core
  • Clone repo and move traffic, reset to /www/cgi-bin

Todo

  • ipkg package
  • reimplement per IP qos as trafficcop
  • Add more netem features: duplicate, corrupt, reorder

Refer: https://calomel.org/network_loss_emulation.html

About

OpenWRT traffic emulator frontend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages