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

Fix localdns, add --no-tunnel #72

Merged
merged 2 commits into from
Mar 13, 2024
Merged

Fix localdns, add --no-tunnel #72

merged 2 commits into from
Mar 13, 2024

Conversation

ostenbom
Copy link
Contributor

@ostenbom ostenbom commented Mar 12, 2024

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 😅

@ostenbom ostenbom changed the title wip no tunnel localdns Fix localdns, add --no-tunnel Mar 13, 2024
@ostenbom ostenbom requested review from augustoccesar and a team March 13, 2024 08:40
@ostenbom ostenbom marked this pull request as ready for review March 13, 2024 08:40
state.linkup.tunnel = tunnel;
} else {
state.linkup.tunnel = Some(tunnel);
} else if state.should_use_tunnel() {
Copy link
Contributor

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.

Start,
Start {
#[clap(
long = "no-tunnel",
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

.stdout(Stdio::null())
.stderr(Stdio::null())
// .stdout(Stdio::null())
// .stderr(Stdio::null())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented out code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks missed that 😅

@ostenbom ostenbom merged commit a655f45 into main Mar 13, 2024
4 checks passed
@ostenbom ostenbom deleted the oliver/no-tunnel-local-dns branch March 13, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants