Skip to content

Commit

Permalink
sync with latest UDPspeeder
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyu- committed Jan 16, 2021
1 parent e8364ba commit 8556b26
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion UDPspeeder
3 changes: 3 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion tun_dev_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8556b26

Please sign in to comment.