blockads-dev

GitHub

为BlockAds Android项目提供专家指导,涵盖Go与Kotlin互操作、VPN架构及隧道构建。协助修改Go隧道、集成Android功能及DNS/Root模式调试,解决gomobile约束问题。

.agent/skills/blockads-dev/SKILL.md pass-with-high-score/blockads-android

触发场景

添加或修改Go隧道功能 使用gomobile进行跨语言绑定 修改VPN服务或集成Go方法到Kotlin 调试DNS追踪或Root代理模式

安装

npx skills add pass-with-high-score/blockads-android --skill blockads-dev -g -y
更多选项

非标准路径

npx skills add https://github.com/pass-with-high-score/blockads-android/tree/main/.agent/skills/blockads-dev -g -y

不安装直接使用

npx skills use pass-with-high-score/blockads-android@blockads-dev

指定 Agent (Claude Code)

npx skills add pass-with-high-score/blockads-android --skill blockads-dev -a claude-code -g -y

安装 repo 全部 skill

npx skills add pass-with-high-score/blockads-android --all -g -y

预览 repo 内 skill

npx skills add pass-with-high-score/blockads-android --list

SKILL.md

Frontmatter
{
    "name": "blockads-dev",
    "description": "Assistance with Go and Kotlin interop, VPN architecture, and tunnel building in the BlockAds Android app. Use when adding features to the Go tunnel, working with gomobile, or modifying the VPN service."
}

BlockAds Dev Skill

Overview

This skill provides expert guidance on the blockads-android project, which combines a Go-based VPN tunnel (tunnel/) with an Android Kotlin application (app/src/main/java/...). It helps handle gomobile interop constraints, architectural patterns for the VPN service, and building/debugging the tunnel.

Development Workflows

1. Modifying the Go Tunnel (gomobile)

When adding a new feature or modifying existing logic in the Go tunnel:

  • Edit the relevant .go files in the tunnel/ directory (e.g., tunnel/engine.go).
  • Ensure all exported functions, methods, and interfaces in Go use strictly gomobile-compatible types (primitives, []byte, basic interfaces).
  • Rebuild the tunnel using ./scripts/build_tunnel.sh or the Gradle task ./gradlew buildGoTunnel.
  • For detailed constraints on gomobile bindings, read references/gomobile-interop.md.

2. Updating the Android Kotlin App

When integrating new Go tunnel features into Android:

  • Update GoTunnelAdapter.kt or VpnService.kt to call the newly bound Go methods.
  • Ensure Kotlin interfaces passed to Go (e.g., LogCallback, DomainChecker) match the updated Go interfaces.
  • For a deeper understanding of the VPN architecture and data flow, read references/architecture.md.

3. Debugging

  • DNS Tracing: The Go engine logs queries via the LogCallback interface to Kotlin. To debug DNS, check DnsLogDao or add prints in the Kotlin callback.
  • Root Mode (iptables): The app uses libsu for a root-based transparent proxy mode as an alternative to VpnService. Check RootProxyService and IptablesManager for related logic. See references/root-proxy.md for architecture details.

References

  • Architecture: Deep dive into the Go Tunnel Engine and Kotlin VPN Service architecture.
  • Root Proxy Mode: Deep dive into the RootProxyService and iptables transparent proxy architecture.
  • Gomobile Interop: Rules, constraints, and patterns for passing data between Go and Kotlin via gomobile bind.

版本历史

  • 2e9ab0d 当前 2026-07-05 11:05

同 Skill 集合

.agent/skills/cook/SKILL.md
.agent/skills/csv-translator/SKILL.md
.agent/skills/github-issue-manager/SKILL.md
.agent/skills/upgrade-app/SKILL.md

元信息

文件数
0
版本
2e9ab0d
Hash
17925b7e
收录时间
2026-07-05 11:05

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-13 21:11
浙ICP备14020137号-1 $访客地图$