I have a plan that I've been trying to achieve. It consists of creating an interface for shadowsocks and using pbr to select which devices will go through it. Here are my steps to achieve this.
Installing dependencies for the ip extension for tun port.
opkg install ipset ip-full dnsmasq-full kmod-tun
Like in Shadowsocks rust documentation (https://github.com/shadowsocks/shadowsocks-rust#linux) creating device and interface:
ip tuntap add mode tun tun0
ifconfig tun0 inet 10.255.0.1 netmask 255.255.255.0 up
I'm funded there (https://github.com/shadowsocks/shadowsocks-rust/issues/744#issuecomment-1009520008) this config and also added to network file:
config interface 'tun1'
option proto 'static'
option ipaddr '10.255.0.1'
option netmask '255.255.255.0'
option device 'tun1'
After downloading Shadowsocks rust (https://github.com/shadowsocks/shadowsocks-rust) 17.0.0 for my arch and run it as
./ss-local -U \
--server-addr "x.x.x.x:6969" \
--password "my password \
--encrypt-method "chacha20-ietf-poly1305" \
--protocol tun \
--outbound-bind-interface lo \
--tun-interface-name tun1 \
--tun-interface-address 10.255.0.1/24 \
--timeout 600
Next I create such a rule in pbr
But there's (on tun1 interface) no traffic and nothing loading but local network working well
upload://e1EesSX02oQkeTJb1un1e9ZtcMa.png
What am I doing wrong? Can you please help, I will be very grateful to you