diff --git a/.vscode/settings.json b/.vscode/settings.json index 91db117f..41aeee58 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,5 +10,6 @@ ] }, "git.ignoreLimitWarning": true, - "cmake.sourceDirectory": "internal/native/cgo" + "cmake.sourceDirectory": "/workspaces/kvm-static-ip/internal/native/cgo", + "cmake.ignoreCMakeListsMissing": true } \ No newline at end of file diff --git a/config.go b/config.go index 7dc3db30..471c7665 100644 --- a/config.go +++ b/config.go @@ -16,6 +16,10 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" ) +const ( + DefaultAPIURL = "https://api.jetkvm.com" +) + type WakeOnLanDevice struct { Name string `json:"name"` MacAddress string `json:"macAddress"` @@ -114,7 +118,7 @@ type Config struct { // GetUpdateAPIURL returns the update API URL func (c *Config) GetUpdateAPIURL() string { if c.UpdateAPIURL == "" { - return "https://api.jetkvm.com" + return DefaultAPIURL } return strings.TrimSuffix(c.UpdateAPIURL, "/") + "/releases" } @@ -168,8 +172,8 @@ var ( func getDefaultConfig() Config { return Config{ - CloudURL: "https://api.jetkvm.com", - UpdateAPIURL: "https://api.jetkvm.com", + CloudURL: DefaultAPIURL, + UpdateAPIURL: DefaultAPIURL, CloudAppURL: "https://app.jetkvm.com", AutoUpdateEnabled: true, // Set a default value ActiveExtension: "", diff --git a/main.go b/main.go index 7ae5fca7..da38d638 100644 --- a/main.go +++ b/main.go @@ -50,8 +50,8 @@ func Main() { initOta() - initDisplay() initNative(systemVersionLocal, appVersionLocal) + initDisplay() http.DefaultClient.Timeout = 1 * time.Minute diff --git a/scripts/dev_deploy.sh b/scripts/dev_deploy.sh index c2afb5cf..6c8b204c 100755 --- a/scripts/dev_deploy.sh +++ b/scripts/dev_deploy.sh @@ -280,4 +280,4 @@ PION_LOG_TRACE=${LOG_TRACE_SCOPES} ./jetkvm_app_debug | tee -a /tmp/jetkvm_app_d EOF fi -echo "Deployment complete." \ No newline at end of file +echo "Deployment complete."