Run release sync through local WSL mihomo

This commit is contained in:
gitea committed 2026-09-23 10:28:05 +08:00
1 parent 8b538c628e
commit 74ad1967fa
4 files changed
+30 -6

No files matched your search

+8 -2
View File
@@ -15,8 +15,13 @@ The Homebrew tap is updated immediately after the first two assets are present
in Gitea and the macOS arm64 checksum is available. The remaining assets are
idempotent retries and do not make a valid Homebrew installation unavailable.
The worker uses mac13's `http://192.168.3.62:7897` proxy only for GitHub. Local
Gitea traffic stays direct through `127.0.0.1:3001`.
The WSL worker uses its local mihomo listener at `http://127.0.0.1:7897` only
for GitHub. It does not enable TUN or expose a LAN listener. Local Gitea
traffic stays direct through `127.0.0.1:3001`.
The WSL mihomo service is defined by `systemd/mihomo.service`. Its runtime
config is a private copy of the selected mac15 Clash profile at
`/home/dev/.config/mihomo/config.yaml`; the profile is not committed.
Useful WSL commands:
@@ -24,6 +29,7 @@ Useful WSL commands:
systemctl status seal-use-release-sync.timer
systemctl start seal-use-release-sync.service
journalctl -u seal-use-release-sync.service -n 100 --no-pager
systemctl status mihomo.service
```
Credentials are stored as `0600` files under
+2 -1
View File
@@ -38,10 +38,11 @@ results=(
"$(check_local_proxy)"
"$(check_ssh wsl_tailscale wsl-dev 'tailscale ip -4')"
"$(check_ssh wsl_frp wsl-dev 'docker inspect -f "{{.State.Status}}" frpc-wsl-gateway')"
"$(check_ssh wsl_mihomo wsl-dev 'systemctl is-active --quiet mihomo.service && ss -ltn | grep -q "127.0.0.1:7897" && printf "service=active,listener=127.0.0.1:7897"')"
"$(check_ssh wsl_release_sync_timer wsl-dev 'test "$(systemctl is-enabled seal-use-release-sync.timer 2>/dev/null)" = enabled && test "$(systemctl is-active seal-use-release-sync.timer 2>/dev/null)" = active && printf "timer=enabled,active"')"
"$(check_ssh wsl_release_sync_last_success wsl-dev 'journalctl -q -u seal-use-release-sync.service -n 200 --no-pager | grep -E "fully synchronized to Gitea and Homebrew" | tail -1')"
"$(check_ssh wsl_gitea wsl-dev 'curl -sS -o /dev/null -w "gitea_http=%{http_code}" http://127.0.0.1:3001/api/v1/version')"
"$(check_ssh wsl_github_proxy wsl-dev 'HTTPS_PROXY=http://192.168.3.62:7897 HTTP_PROXY=http://192.168.3.62:7897 NO_PROXY=127.0.0.1,localhost curl -sS -o /dev/null --connect-timeout 8 --max-time 15 -w "github_http=%{http_code}" https://github.com')"
"$(check_ssh wsl_github_proxy wsl-dev 'NO_PROXY= no_proxy= curl -sS -o /dev/null --proxy http://127.0.0.1:7897 --connect-timeout 8 --max-time 15 -w "github_http=%{http_code}" https://github.com')"
"$(check_ssh windows_tailscale windows '"C:\Program Files\Tailscale\tailscale.exe" ip -4')"
"$(check_ssh windows_wifi windows 'netsh wlan show interfaces | findstr /C:"SSID"')"
"$(check_ssh mac13_proxy mac13 'curl -sS -o /dev/null --proxy http://127.0.0.1:7897 --connect-timeout 5 --max-time 15 -w "github_http=%{http_code}" https://github.com')"
+16
View File
@@ -0,0 +1,16 @@
[Unit]
Description=Local mihomo proxy for WSL services
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=dev
ExecStart=/usr/local/bin/mihomo -d /home/dev/.config/mihomo
Restart=on-failure
RestartSec=15
LimitNOFILE=1048576
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target
+4 -3
View File
@@ -1,14 +1,15 @@
[Unit]
Description=Promote GitHub releases to Gitea and Homebrew
After=network-online.target docker.service
After=network-online.target docker.service mihomo.service
Wants=network-online.target
Requires=mihomo.service
[Service]
Type=oneshot
User=dev
WorkingDirectory=/home/dev/apps/seal-use-release-sync
Environment=HOME=/home/dev
Environment=HTTP_PROXY=http://192.168.3.62:7897
Environment=HTTPS_PROXY=http://192.168.3.62:7897
Environment=HTTP_PROXY=http://127.0.0.1:7897
Environment=HTTPS_PROXY=http://127.0.0.1:7897
Environment=NO_PROXY=127.0.0.1,localhost,100.82.151.105,git.ying-qing.cn
ExecStart=/home/dev/apps/seal-use-release-sync/release-sync.sh