Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate UDPSpeeder bind/interface #87

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <string> force all output packets to go through this interface.\n");
printf(" --mode <number> 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 <number> mtu for fec. for mode 0, the program will split packet to segment smaller than mtu.\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,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);
Expand Down