Skip to content

Commit 2c2b17d

Browse files
authored
refactor: remove version field from config and update repo reference (#5)
Remove the version field from the configuration to simplify the structure and update the repository reference for consistency.
1 parent a50c97d commit 2c2b17d

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"version": "v1.0.2",
32
"trustedSSIDs": [
43
"Yoda-Fi",
54
"R2D2-Fi"

main.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ var iconInactive []byte
2929
type Config struct {
3030
TrustedSSIDs []string `json:"trustedSSIDs"`
3131
ExitNodes []string `json:"exitNodes"`
32-
Version string `json:"version"` // Add version field to config
3332
}
3433

3534
var config Config
@@ -53,17 +52,12 @@ func loadConfig() {
5352
config = Config{
5453
TrustedSSIDs: []string{"Yoda-Fi", "R2D2-Fi"},
5554
ExitNodes: []string{"homeassistant", "router", "vpn-node"},
56-
Version: currentVersion, // Set default version
5755
}
5856
f, err := os.Open("config.json")
5957
if err == nil {
6058
defer f.Close()
6159
_ = json.NewDecoder(f).Decode(&config)
6260
}
63-
// Use version from config if present, else fallback to default
64-
if config.Version != "" {
65-
currentVersion = config.Version
66-
}
6761
}
6862

6963
func checkTailscaleExists() bool {
@@ -324,7 +318,7 @@ func removeStartupShortcut() {
324318
}
325319

326320
func checkForUpdate() {
327-
const repo = "andreas-kruger/AutoExitNode" // Set to your repo
321+
const repo = "woopstar/AutoExitNode" // Set to your repo
328322
url := fmt.Sprintf("https://api.github.com/repos/%s/releases/latest", repo)
329323

330324
req, err := http.NewRequest("GET", url, nil)

0 commit comments

Comments
 (0)