Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"math"
"math/big"
"net"
"net/http"
"os"
"os/exec"
"path/filepath"
Expand Down Expand Up @@ -134,25 +135,23 @@ func IsContextErr(err error) bool {

// GetExternalIPAddress returns external IP address
func GetExternalIPAddress() (externalIP string, err error) {
return "localhost", nil
/*
resp, err := http.Get("https://api.ipify.org")
if err != nil {
return "", err
}
resp, err := http.Get("https://api.ipify.org")
if err != nil {
return "", err
}

defer resp.Body.Close()
defer resp.Body.Close()

body, err := io.ReadAll(resp.Body)
if err != nil {
return "", err
}
body, err := io.ReadAll(resp.Body)
if err != nil {
return "", err
}

if net.ParseIP(string(body)) == nil {
return "", errors.Errorf("invalid IP response from %s", "ipconf.ip")
}
if net.ParseIP(string(body)) == nil {
return "", errors.Errorf("invalid IP response from %s", "api.ipify.org")
}

return string(body), nil */
return string(body), nil
}

// B64Encode base64 encodes
Expand Down
2 changes: 1 addition & 1 deletion tests/system/config.test-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
supernode:
key_name: "testkey1"
identity: "lumera1em87kgrvgttrkvuamtetyaagjrhnu3vjy44at4"
host: "localhost"
host: "0.0.0.0"
port: 4444
gateway_port: 8002

Expand Down
2 changes: 1 addition & 1 deletion tests/system/config.test-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
supernode:
key_name: "testkey2"
identity: "lumera1cf0ms9ttgdvz6zwlqfty4tjcawhuaq69p40w0c"
host: "localhost"
host: "0.0.0.0"
port: 4446
gateway_port: 8003

Expand Down
2 changes: 1 addition & 1 deletion tests/system/config.test-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
supernode:
key_name: "testkey3"
identity: "lumera1cjyc4ruq739e2lakuhargejjkr0q5vg6x3d7kp"
host: "localhost"
host: "0.0.0.0"
port: 4448
gateway_port: 8004

Expand Down