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

feat(digitalocean): get user IP over v4/v6 #123

Closed

Conversation

nivasan1
Copy link
Contributor

No description provided.

if err != nil {
return ips, err
if len(ips) == 0 {
err = fmt.Errorf("failed to get user IP: %v", errs)
Copy link
Contributor

Choose a reason for hiding this comment

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

looks loike this never gets returned?

@@ -41,41 +43,71 @@ func makeSSHKeyPair() (string, string, string, error) {
}

func getUserIPs(ctx context.Context) (ips []string, err error) {
res, err := http.Get("https://ifconfig.io")
Copy link
Contributor

Choose a reason for hiding this comment

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

ideally here, we try both ifconfig.io and ifconfig.co (different ASNs, so they'll get routed through different paths) and try both IPv4 and IPv6. we should also add the option in the provider to append a custom IP

@Zygimantass
Copy link
Contributor

closing, we should just make the user provide an IP

@Zygimantass Zygimantass closed this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants