angt / glorytun

Multipath UDP tunnel
BSD 2-Clause "Simplified" License
683 stars 105 forks source link

Client how to set route to server ip? #101

Open KudoWu opened 1 year ago

KudoWu commented 1 year ago

Hi! When I was testing, I found a problem with how to set route to the server IP on the client side.

Example: client have two interface, usb1 usb2

setup two paths glorytun path up <LOCAL_IP1> rate tx 1mbit rx 20mbit glorytun path up <LOCAL_IP2> rate tx 1mbit rx 20mbit

At this point, the client's routing table has not changed. However, I should set default route is tun0. route add default dev tun0

Now, I have to make sure that I can connect to the server IP via usb1 usb2.So, I should set, route del -net <SERVER_IP> netmask 255.255.255.255 dev usb1 route del -net <SERVER_IP> netmask 255.255.255.255 dev usb2 But, apparently only connecting to the server via usb2.

And, I use ping 10.0.1.1/tcpdump -i usb1/tcpdump -i usb1 It is true that only data can be found on the usb2 interface.

Hope to get some help from you, thanks!