Browse Source

sync with latest UDPspeeder

wangyu 4 years ago
parent
commit
8556b26255
3 changed files with 5 additions and 2 deletions
  1. 1 1
      UDPspeeder
  2. 3 0
      main.cpp
  3. 1 1
      tun_dev_client.cpp

+ 1 - 1
UDPspeeder

@@ -1 +1 @@
-Subproject commit ecc90928d33741dbe726b547f2d8322540c26ea0
+Subproject commit 3375c6ac9d7de0540789483e964658746e245634

+ 3 - 0
main.cpp

@@ -73,6 +73,9 @@ static void print_help()
     printf("    --delay-capacity      <number>        max number of delayed packets, 0 means unlimited, default: 0\n");
 	printf("    --disable-fec         <number>        completely disable fec, turn the program into a normal udp tunnel\n");
 	printf("    --sock-buf            <number>        buf size for socket, >=10 and <=10240, unit: kbyte, default: 1024\n");
+	printf("    --out-addr            ip:port         force all output packets of '-r' end to go through this address, port 0 for random port.\n");
+	printf("    --out-interface       <string>        force all output packets of '-r' end to go through this interface.\n");
+
 	printf("log and help options:\n");
 	printf("    --log-level           <number>        0: never    1: fatal   2: error   3: warn \n");
 	printf("                                          4: info (default)      5: debug   6: trace\n");

+ 1 - 1
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,out_addr,out_interface)==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);