[PR #105] fix(libwg-go): set the UAPI socket directory under the /v3 module path #102

Open
opened 2026-10-13 21:06:08 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amneziawg-android/pull/105
Author: @Fast-and-Pythonic
Created: 9/26/2026
Status: 🔄 Open

Base: master ← Head: fix/uapi-socket-directory


📝 Commits (1)

  • 238a180 fix(libwg-go): set the UAPI socket directory under the /v3 module path

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 tunnel/tools/libwg-go/Makefile (+1 -1)

📄 Description

The -X flag in tunnel/tools/libwg-go/Makefile sets ipc.socketDirectory by its import path, and that path still reads github.com/amnezia-vpn/amneziawg-go/ipc. Since #86 the module is github.com/amnezia-vpn/amneziawg-go/v3, so the flag matches no symbol and sets nothing. The linker does not complain about that.

The variable then keeps its default, /var/run/amneziawg. On Android /var is read-only, so every tunnel start logs this and runs without a UAPI socket:

E/AmneziaWG/awg0: UAPIOpen: mkdir /var: read-only file system

This PR adds /v3 to the path. The socket goes back to /data/data/<package>/cache/amneziawg, where it was before the module rename.

Testing

Poco F7, Android 16. The line above appears on every connect in logcat from the current build.

To check the flag itself, I built a small program that calls ipc.UAPIOpen("t") from amneziawg-go v3.1.20260814, the version go.mod pins, twice for android/arm64: once with the old -X path, once with the /v3 path. The directory pointed into an app's data directory, and I ran both as that app (Termux):

old flag (no /v3):  false mkdir /var: read-only file system
fixed flag (/v3):   true <nil>        → uapi-test/t.sock created

One line, independent of anything else.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amneziawg-android/pull/105 **Author:** [@Fast-and-Pythonic](https://github.com/Fast-and-Pythonic) **Created:** 9/26/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix/uapi-socket-directory` --- ### 📝 Commits (1) - [`238a180`](https://github.com/amnezia-vpn/amneziawg-android/commit/238a18016ebf8617129ec338ca9b6e558294e009) fix(libwg-go): set the UAPI socket directory under the /v3 module path ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tunnel/tools/libwg-go/Makefile` (+1 -1) </details> ### 📄 Description The `-X` flag in `tunnel/tools/libwg-go/Makefile` sets `ipc.socketDirectory` by its import path, and that path still reads `github.com/amnezia-vpn/amneziawg-go/ipc`. Since #86 the module is `github.com/amnezia-vpn/amneziawg-go/v3`, so the flag matches no symbol and sets nothing. The linker does not complain about that. The variable then keeps its default, `/var/run/amneziawg`. On Android `/var` is read-only, so every tunnel start logs this and runs without a UAPI socket: ``` E/AmneziaWG/awg0: UAPIOpen: mkdir /var: read-only file system ``` This PR adds `/v3` to the path. The socket goes back to `/data/data/<package>/cache/amneziawg`, where it was before the module rename. ## Testing Poco F7, Android 16. The line above appears on every connect in logcat from the current build. To check the flag itself, I built a small program that calls `ipc.UAPIOpen("t")` from amneziawg-go `v3.1.20260814`, the version `go.mod` pins, twice for android/arm64: once with the old `-X` path, once with the `/v3` path. The directory pointed into an app's data directory, and I ran both as that app (Termux): ``` old flag (no /v3): false mkdir /var: read-only file system fixed flag (/v3): true <nil> → uapi-test/t.sock created ``` One line, independent of anything else. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-android#102
No description provided.