bol-van / zapret

DPI bypass multi platform
5.84k stars 512 forks source link

option to bind to specified address for outbound connection #315

Closed cleverfox closed 3 weeks ago

cleverfox commented 3 weeks ago

This patch adds option to specify source address for outbound connections. In case of your router has more than one IP (IPv6) address you migh be required to choose which one use for your user's connections instead of default one.

This patch adds --connect-bind-addr option and supports IPv4 and IPv6 address, if you need to set both address just specify it twice: --connect-bind-addr=10.0.254.48 --connect-bind-addr=fec0::1234:56ff

In case of no --connect-bind-addr specified the appication will be working as before.

bol-van commented 3 weeks ago

Добавил так же %ifname для v6 link locals и определение ifindex по ifname в процессе коннекта (если успех - в следующий раз не определяем). Чтобы не было проблем при раннем запуске tpws, когда ifname еще не поднят