-
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
feat: paid tunnels v1 #97
Conversation
ed70484
to
4c13e94
Compare
|
||
let parsed: GetTunnelApiResponse = send_request(&client, &query_url, headers, None, "GET")?; | ||
if parsed.result.is_empty() { | ||
Ok(None) | ||
} else { | ||
Ok(Some(parsed.result[0].id.clone())) | ||
// Check if there exists a tunnel with this name that hasn't been deleted |
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.
Deleted tunnels still show up in the response but has "deleted_at" set. Instead, it needs to find the tunnel name and where "deleted_at" is null
e407642
to
eb7a4bb
Compare
linkup-cli/src/services/tunnel.rs
Outdated
@@ -61,6 +54,13 @@ impl TunnelManager for RealTunnelManager { | |||
} | |||
} | |||
} | |||
fn is_tunnel_running(&self) -> Result<(), CheckErr> { | |||
if !linkup_file_path(LINKUP_CLOUDFLARED_PID).exists() { |
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.
Condition can be reversed
eb7a4bb
to
b746e60
Compare
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.
You can bump linkup-cli version in it's cargo.toml version too!
clear-unused-dns.ts
Outdated
console.error( | ||
"Please set CLOUDFLARE_API_KEY and CLOUDFLARE_EMAIL environment variables" | ||
"Run `menti localsecrets` to set the required environment variables" |
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 doesn't make sense in an open-source repo - but maybe we leave it / it's ok?
b746e60
to
8bf2be7
Compare
Tested going from paid to free tunnel, and vice versa. Works smoothly for me at least 🤞
Some extra logging added that shows up when running
RUST_LOG=info cargo run -- start
. There is more that can be done with logging but will leave that for the linear card DO-1495 "linkup: logger".Part of DO-1495
Resolves DO-1496