From 6d1145c85da03704f95cc0db497656ca61426821 Mon Sep 17 00:00:00 2001 From: llorx Date: Tue, 5 Nov 2019 00:13:38 +0100 Subject: [PATCH 1/3] Changed UDPSpeeder submodule --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 1f5eaef..120e9e9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "UDPspeeder"] path = UDPspeeder - url = https://github.com/wangyu-/UDPspeeder.git + url = https://github.com/Llorx/UDPspeeder.git From 0786b9fbcccb4c981f7d6ef1aca106c95ebb5792 Mon Sep 17 00:00:00 2001 From: llorx Date: Tue, 5 Nov 2019 11:05:06 +0100 Subject: [PATCH 2/3] Integrate UDPSpeeder bind/interface This will integrate UDPSpeeder PR: https://github.com/wangyu-/UDPspeeder/pull/227 --- main.cpp | 2 ++ tun_dev_client.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index cd1e9eb..4e979d6 100644 --- a/main.cpp +++ b/main.cpp @@ -39,6 +39,8 @@ static void print_help() printf("advanced options:\n"); + printf(" -b,--bind ip:port force all output packets to go through this address. Set port to 0 to use a random one.\n"); + printf(" --interface force all output packets to go through this interface.\n"); printf(" --mode fec-mode,available values: 0,1; mode 0(default) costs less bandwidth,no mtu problem.\n"); printf(" mode 1 usually introduces less latency, but you have to care about mtu.\n"); printf(" --mtu mtu for fec. for mode 0, the program will split packet to segment smaller than mtu.\n"); diff --git a/tun_dev_client.cpp b/tun_dev_client.cpp index 4f2ed3c..dc8f2c9 100644 --- a/tun_dev_client.cpp +++ b/tun_dev_client.cpp @@ -213,7 +213,7 @@ int tun_dev_client_event_loop() tun_fd=get_tun_fd(tun_dev); assert(tun_fd>0); - assert(new_connected_socket2(remote_fd,remote_addr)==0); + assert(new_connected_socket2(remote_fd,remote_addr,has_b,bind_addr,interface_string)==0); remote_fd64=fd_manager.create(remote_fd); assert(set_tun(tun_dev,htonl((ntohl(sub_net_uint32)&0xFFFFFF00)|2),htonl((ntohl(sub_net_uint32)&0xFFFFFF00 )|1),tun_mtu)==0); From 1143000d2325c73f586a10f9cd439462f4a10d44 Mon Sep 17 00:00:00 2001 From: llorx Date: Tue, 5 Nov 2019 11:05:47 +0100 Subject: [PATCH 3/3] Return to wangyu- submodule --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 120e9e9..1f5eaef 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "UDPspeeder"] path = UDPspeeder - url = https://github.com/Llorx/UDPspeeder.git + url = https://github.com/wangyu-/UDPspeeder.git