-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix localdns, add --no-tunnel #72
Conversation
3c45999
to
224c8e7
Compare
224c8e7
to
90fbe61
Compare
90fbe61
to
d58b434
Compare
linkup-cli/src/background_booting.rs
Outdated
state.linkup.tunnel = tunnel; | ||
} else { | ||
state.linkup.tunnel = Some(tunnel); | ||
} else if state.should_use_tunnel() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition is repeated twice; I think you could check for it once and move the other condition inside that If-statement as it's a little hard to follow the logic.
linkup-cli/src/main.rs
Outdated
Start, | ||
Start { | ||
#[clap( | ||
long = "no-tunnel", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a short option alias?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any suggestions for what it would be? I didn't have a spontaneous idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost all options are free, so -n
would do the job.
linkup-cli/src/services/dnsmasq.rs
Outdated
.stdout(Stdio::null()) | ||
.stderr(Stdio::null()) | ||
// .stdout(Stdio::null()) | ||
// .stderr(Stdio::null()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented out code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks missed that 😅
Local-dns was broke because asking dnsmasq to reload did not get it to reload the config file from start.
Here, we create the config file correctly from the beginning instead. Much nicer.
I have also added a
--no-tunnel
argument, this both helps when cloudflare is down, but also to check if local-dns works 😅