We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a7e0b9 commit 6226047Copy full SHA for 6226047
examples/forward.rs
@@ -40,6 +40,10 @@ struct Opt {
40
#[structopt(short = "i", long = "interface")]
41
interface: String,
42
43
+ /// name of the tun device, default to rtun8.
44
+ #[structopt(short = "n", long = "name", default_value = "utun8")]
45
+ name: String,
46
+
47
/// Tracing subscriber log level.
48
#[structopt(long = "log-level", default_value = "debug")]
49
log_level: tracing::Level,
@@ -92,7 +96,7 @@ async fn main_exec(opt: Opt) {
92
96
if fd >= 0 {
93
97
cfg.raw_fd(fd);
94
98
} else {
95
- cfg.tun_name(&opt.interface)
99
+ cfg.tun_name(&opt.name)
100
.address("10.10.10.2")
101
.destination("10.10.10.1")
102
.mtu(tun2::DEFAULT_MTU);
0 commit comments