Open
Description
Currently, vpn-slice requires running as root because it has a subprocess call:
replace_route
which callsip route replace
Running scripts with root access (even open source) is a sytem risk. By performing a syscall, we give the option to the users to:
- escalate to root (via sudo or otherwise)
- set capability at a coarse/fine level, eg:
setcap cap_net_admin+ep $(which vpn-slice)
The need for writing in /etc/hosts
can be eliminated by assigning it a custom group and using sg
Proposal:
Use SIOCADDRT
and SIOCDELRT
for the ioctl
calls