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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build

permissions: read-all

on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize]

env:
COMPONENT_DIR: hsem

jobs:
build:
name: Prepare build asset
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '^1.24.2'

- name: Install rsrc to embed icon into application
run: |
go install github.com/akavel/rsrc@latest

- name: Generate Windows resource file with icon
run: |
$HOME/go/bin/rsrc -ico assets/icon_active.ico -o resource_windows.syso

- name: Build AutoExitNode for windows amd64
run: |
GOOS=windows GOARCH=amd64 go build -ldflags="-H windowsgui" -o AutoExitNode.exe
2 changes: 2 additions & 0 deletions .github/workflows/check-on-hold.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Check if PR is on hold

permissions: read-all

on:
pull_request:
types:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/defender-for-devops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

name: "Microsoft Defender For Devops"

permissions: read-all

on:
push:
branches: [ "main" ]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release Drafter

permissions: read-all

on:
schedule:
- cron: "0 0 * * *"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release

permissions: read-all

on:
workflow_dispatch:
release:
Expand All @@ -18,7 +20,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: 'stable'
go-version: '^1.24.2'

- name: Update version in main.go to ${{ github.event.release.tag_name }}
run: |
Expand All @@ -38,7 +40,7 @@ jobs:

- name: Generate Windows resource file with icon
run: |
$HOME/go/bin/rsrc -ico icon_active.ico -o resource_windows.syso
$HOME/go/bin/rsrc -ico assets/icon_active.ico -o resource_windows.syso

- name: Build AutoExitNode for windows amd64
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sync-labels.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Sync labels

permissions: read-all

# yamllint disable-line rule:truthy
on:
push:
Expand Down
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# artifacts
__pycache__
.pytest*
*.egg-info
*/build/*
*/dist/*
bin/

# misc
.coverage
coverage.xml
notes.txt
.venv
.DS_Store
scripts/sync.*

# Home Assistant configuration
config/*
!config/configuration.yaml
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![License][license-shield]][license]
[![BuyMeCoffee][buymecoffeebadge]][buymecoffee]

![Icon](icon_active.png)
![Icon](assets/icon_active.png)

**AutoExitNode** is a Windows system tray application that automatically manages your Tailscale exit node based on your network (WiFi SSID or cellular connection).

Expand All @@ -32,16 +32,15 @@
3. **Place the program and icons**
Make sure the following files are in the same folder:
- `AutoExitNode.exe`
- `icon_active.ico`
- `icon_inactive.ico`
- `config.json` (optional, see below)

4. **(Optional) Edit config.json**
Example `config.json`:
```json
{
"trustedSSIDs": ["Yoda-Fi", "R2D2-Fi"],
"exitNodes": ["homeassistant", "router", "vpn-node"]
"tailscalePath": "C:\\Program Files\\Tailscale\\tailscale.exe",
"trustedSSIDs": ["Yoda-Fi", "R2D2-Fi"],
"exitNodes": ["homeassistant", "router", "vpn-node"]
}
```

Expand All @@ -51,7 +50,7 @@
- **Trusted SSID:** Disables exit node
- **Untrusted SSID/Cellular:** Enables exit node (first in the config list)
- The tray menu shows status, version, and provides access to:
- Force Sync (trigger immediate update)
- Force Sync (trigger immediate check for network and tailscale status)
- Run at startup (autostart)
- Check for update (checks GitHub for new version)
- Quit (exit the app)
Expand All @@ -64,8 +63,8 @@

## Icons

- `icon_active.ico` (blue): Shown when exit node is active
- `icon_inactive.ico` (gray): Shown when exit node is inactive
- `assets/icon_active.ico` (blue): Shown when exit node is active
- `assets/icon_inactive.ico` (gray): Shown when exit node is inactive

## Updates

Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
1 change: 1 addition & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"tailscalePath": "C:\\Program Files\\Tailscale\\tailscale.exe",
"trustedSSIDs": [
"Yoda-Fi",
"R2D2-Fi"
Expand Down
Loading
Loading