mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-10-14 09:55:33 +08:00
add option --dev to bind to a specific interface
This commit is contained in:
6
misc.cpp
6
misc.cpp
@@ -264,6 +264,7 @@ void process_arg(int argc, char *argv[]) //process all options
|
||||
{"gen-rule", no_argument, 0, 'g'},
|
||||
{"gen-add", no_argument, 0, 1},
|
||||
{"debug", no_argument, 0, 1},
|
||||
{"dev", required_argument, 0, 1},
|
||||
{"retry-on-error", no_argument, 0, 1},
|
||||
{"clear", no_argument, 0, 1},
|
||||
{"simple-rule", no_argument, 0, 1},
|
||||
@@ -567,6 +568,11 @@ void process_arg(int argc, char *argv[]) //process all options
|
||||
debug_flag=1;
|
||||
//enable_log_color=0;
|
||||
}
|
||||
else if(strcmp(long_options[option_index].name,"dev")==0)
|
||||
{
|
||||
sscanf(optarg,"%s",dev);
|
||||
//enable_log_color=0;
|
||||
}
|
||||
else if(strcmp(long_options[option_index].name,"debug-resend")==0)
|
||||
{
|
||||
//debug_resend=1;
|
||||
|
Reference in New Issue
Block a user