mirror of
https://github.com/xweiba/location-spoofer.git
synced 2026-09-21 22:30:46 +08:00
feat: add GitHub community and bug workflows
This commit is contained in:
@@ -0,0 +1,59 @@
|
|||||||
|
title: "[第三方配置分享] "
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
感谢分享已验证的第三方客户端配置。请先移除账号、订阅、密码、设备标识、真实位置等敏感信息。
|
||||||
|
截图除敏感信息遮挡外不要添加箭头、编号或说明文字,维护者会统一裁剪和标注。
|
||||||
|
- type: dropdown
|
||||||
|
id: client
|
||||||
|
attributes:
|
||||||
|
label: 第三方客户端
|
||||||
|
options:
|
||||||
|
- Shadowrocket
|
||||||
|
- Surge
|
||||||
|
- Quantumult X
|
||||||
|
- Loon
|
||||||
|
- Stash
|
||||||
|
- Egern
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
id: client-version
|
||||||
|
attributes:
|
||||||
|
label: 第三方客户端版本
|
||||||
|
placeholder: 例如 2.2.70
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
id: ios-version
|
||||||
|
attributes:
|
||||||
|
label: iOS 版本
|
||||||
|
placeholder: 例如 iOS 26.5
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: setup-steps
|
||||||
|
attributes:
|
||||||
|
label: 配置步骤
|
||||||
|
description: 请描述模块导入、证书或解密设置、代理连接和最终验证过程。
|
||||||
|
placeholder: |
|
||||||
|
1. ...
|
||||||
|
2. ...
|
||||||
|
3. ...
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: 截图与补充说明
|
||||||
|
description: 可以直接拖入脱敏原图,并说明每张图片对应的步骤。
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: checkboxes
|
||||||
|
id: attribution
|
||||||
|
attributes:
|
||||||
|
label: README 收录署名
|
||||||
|
options:
|
||||||
|
- label: 匿名收录,不在 README 展示投稿账号
|
||||||
|
required: false
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
name: Bug 报告
|
||||||
|
description: 报告 App 功能异常和可复现问题
|
||||||
|
title: "[Bug] "
|
||||||
|
labels:
|
||||||
|
- bug
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
请优先在 App 的“设置 → 支持 → 报告 Bug”中生成诊断报告,再粘贴到下方字段。
|
||||||
|
提交前请移除真实位置、账号、订阅、密码、证书私钥和其他敏感信息。
|
||||||
|
- type: textarea
|
||||||
|
id: app-report
|
||||||
|
attributes:
|
||||||
|
label: App 生成的诊断报告
|
||||||
|
description: 粘贴 App 自动复制的完整报告;如果无法进入 App,请按占位格式手动填写。
|
||||||
|
placeholder: |
|
||||||
|
### 环境信息
|
||||||
|
App 版本:
|
||||||
|
系统版本:
|
||||||
|
运行模式:
|
||||||
|
第三方客户端:
|
||||||
|
可复现环境:
|
||||||
|
|
||||||
|
### 问题描述
|
||||||
|
|
||||||
|
### 诊断日志
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: 截图或录屏
|
||||||
|
description: 可选。请先遮挡账号、通知、真实位置和其他敏感信息。
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: checkboxes
|
||||||
|
id: confirmations
|
||||||
|
attributes:
|
||||||
|
label: 提交确认
|
||||||
|
options:
|
||||||
|
- label: 我已搜索现有 Issues,确认没有相同问题
|
||||||
|
required: true
|
||||||
|
- label: 我已移除真实位置、认证信息、订阅地址、证书私钥和其他敏感信息
|
||||||
|
required: true
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: 使用帮助
|
||||||
|
url: https://github.com/xweiba/location-spoofer/discussions/categories/%E4%BD%BF%E7%94%A8%E5%B8%AE%E5%8A%A9
|
||||||
|
about: 安装、证书、代理配置、环境检测和问题排查
|
||||||
|
- name: 功能建议
|
||||||
|
url: https://github.com/xweiba/location-spoofer/discussions/categories/%E5%8A%9F%E8%83%BD%E5%BB%BA%E8%AE%AE
|
||||||
|
about: 提交功能改进、交互优化和新场景建议
|
||||||
|
- name: 第三方配置分享
|
||||||
|
url: https://github.com/xweiba/location-spoofer/discussions/categories/%E7%AC%AC%E4%B8%89%E6%96%B9%E9%85%8D%E7%BD%AE%E5%88%86%E4%BA%AB
|
||||||
|
about: 分享已验证的第三方客户端模块、配置步骤和脱敏截图
|
||||||
@@ -23,5 +23,9 @@ Wloc.xcodeproj/
|
|||||||
.github/*
|
.github/*
|
||||||
!.github/workflows/
|
!.github/workflows/
|
||||||
!.github/workflows/**
|
!.github/workflows/**
|
||||||
|
!.github/DISCUSSION_TEMPLATE/
|
||||||
|
!.github/DISCUSSION_TEMPLATE/**
|
||||||
|
!.github/ISSUE_TEMPLATE/
|
||||||
|
!.github/ISSUE_TEMPLATE/**
|
||||||
Core/core
|
Core/core
|
||||||
docs/superpowers/
|
docs/superpowers/
|
||||||
|
|||||||
+13
-9
@@ -7,15 +7,17 @@ struct BugReportView: View {
|
|||||||
@State private var isReproducible = true
|
@State private var isReproducible = true
|
||||||
@State private var isRunning = false
|
@State private var isRunning = false
|
||||||
@State private var showCopiedAlert = false
|
@State private var showCopiedAlert = false
|
||||||
|
@State private var githubDestination: SafariDestination?
|
||||||
@ObservedObject private var runtimeMode = ProxyRuntimeModeStore.shared
|
@ObservedObject private var runtimeMode = ProxyRuntimeModeStore.shared
|
||||||
@ObservedObject private var thirdPartyProxy = ThirdPartyProxyManager.shared
|
@ObservedObject private var thirdPartyProxy = ThirdPartyProxyManager.shared
|
||||||
|
@ObservedObject private var thirdPartyClient = ThirdPartyProxyClientStore.shared
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
ScrollView {
|
ScrollView {
|
||||||
VStack(alignment: .leading, spacing: 16) {
|
VStack(alignment: .leading, spacing: 16) {
|
||||||
// 说明
|
// 说明
|
||||||
Text("遇到问题时,在这里生成 Issue 报告。系统会运行一次诊断测试,将测试结果和你的描述一起复制到剪切板,然后跳转到 GitHub 提交。")
|
Text("遇到问题时,在这里生成 Bug 报告。系统会运行一次诊断测试,并将完整报告复制到剪切板。跳转到 GitHub 后,请粘贴到“App 生成的诊断报告”字段。")
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
|
|
||||||
@@ -54,7 +56,7 @@ struct BugReportView: View {
|
|||||||
if isRunning {
|
if isRunning {
|
||||||
ProgressView().tint(.white)
|
ProgressView().tint(.white)
|
||||||
}
|
}
|
||||||
Text(isRunning ? "正在生成报告…" : "生成 Issue 报告")
|
Text(isRunning ? "正在生成报告…" : "生成 Bug 报告")
|
||||||
.font(.body.weight(.medium))
|
.font(.body.weight(.medium))
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
@@ -67,20 +69,21 @@ struct BugReportView: View {
|
|||||||
.padding(.horizontal, 16)
|
.padding(.horizontal, 16)
|
||||||
.padding(.bottom, 12)
|
.padding(.bottom, 12)
|
||||||
}
|
}
|
||||||
.navigationTitle("报告 Issue")
|
.navigationTitle("报告 Bug")
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
.alert("已生成", isPresented: $showCopiedAlert) {
|
.alert("已生成", isPresented: $showCopiedAlert) {
|
||||||
Button("跳转到 GitHub") {
|
Button("打开 GitHub 表单") {
|
||||||
dismiss()
|
githubDestination = SafariDestination(url: GitHubSubmission.bugReportURL)
|
||||||
if let url = URL(string: "https://github.com/xweiba/location-spoofer/issues/new") {
|
|
||||||
UIApplication.shared.open(url)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Button("稍后再说", role: .cancel) {
|
Button("稍后再说", role: .cancel) {
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
} message: {
|
} message: {
|
||||||
Text("Issue 报告已复制到剪切板。请在 GitHub Issues 页面粘贴并提交。")
|
Text("Bug 报告已复制到剪切板。请在 GitHub 表单的“App 生成的诊断报告”字段中粘贴并提交。")
|
||||||
|
}
|
||||||
|
.sheet(item: $githubDestination) { destination in
|
||||||
|
SafariView(url: destination.url)
|
||||||
|
.ignoresSafeArea()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,6 +118,7 @@ struct BugReportView: View {
|
|||||||
App 版本: \(appVersion)
|
App 版本: \(appVersion)
|
||||||
系统版本: iOS \(systemVersion)
|
系统版本: iOS \(systemVersion)
|
||||||
运行模式: \(runtimeMode.mode.displayName)
|
运行模式: \(runtimeMode.mode.displayName)
|
||||||
|
第三方客户端: \(runtimeMode.mode == .thirdParty ? thirdPartyClient.selectedClient.name : "不适用")
|
||||||
可复现环境: \(isReproducible ? "是" : "否")
|
可复现环境: \(isReproducible ? "是" : "否")
|
||||||
|
|
||||||
### 问题描述
|
### 问题描述
|
||||||
|
|||||||
+17
-41
@@ -75,6 +75,7 @@ struct MapHomeView: View {
|
|||||||
@State private var pendingCommunityContributionClient: ThirdPartyProxyClient?
|
@State private var pendingCommunityContributionClient: ThirdPartyProxyClient?
|
||||||
@State private var communityContributionClient: ThirdPartyProxyClient?
|
@State private var communityContributionClient: ThirdPartyProxyClient?
|
||||||
@State private var showCommunityTemplateCopied = false
|
@State private var showCommunityTemplateCopied = false
|
||||||
|
@State private var githubDestination: SafariDestination?
|
||||||
@State private var editingFavorite: FavoriteLocation?
|
@State private var editingFavorite: FavoriteLocation?
|
||||||
@State private var editName = ""
|
@State private var editName = ""
|
||||||
@State private var reverseGeocodeTask: Task<Void, Never>?
|
@State private var reverseGeocodeTask: Task<Void, Never>?
|
||||||
@@ -267,17 +268,28 @@ struct MapHomeView: View {
|
|||||||
.sheet(item: $activeTip) { kind in
|
.sheet(item: $activeTip) { kind in
|
||||||
TipSheetView(kind: kind, runtimeMode: runtimeMode.mode)
|
TipSheetView(kind: kind, runtimeMode: runtimeMode.mode)
|
||||||
}
|
}
|
||||||
|
.sheet(item: $githubDestination) { destination in
|
||||||
|
SafariView(url: destination.url)
|
||||||
|
.ignoresSafeArea()
|
||||||
|
}
|
||||||
.alert("社区分享成功配置?", isPresented: Binding(
|
.alert("社区分享成功配置?", isPresented: Binding(
|
||||||
get: { communityContributionClient != nil },
|
get: { communityContributionClient != nil },
|
||||||
set: { if !$0 { communityContributionClient = nil } }
|
set: { if !$0 { communityContributionClient = nil } }
|
||||||
)) {
|
)) {
|
||||||
Button("去提交") {
|
Button("去提交") {
|
||||||
guard let client = communityContributionClient else { return }
|
guard let client = communityContributionClient else { return }
|
||||||
openCommunityContributionIssue(for: client)
|
UIPasteboard.general.string = GitHubSubmission.communityContributionTemplate(
|
||||||
|
for: client,
|
||||||
|
systemVersion: UIDevice.current.systemVersion
|
||||||
|
)
|
||||||
|
openCommunityContributionPage()
|
||||||
}
|
}
|
||||||
Button("复制模板") {
|
Button("复制模板") {
|
||||||
guard let client = communityContributionClient else { return }
|
guard let client = communityContributionClient else { return }
|
||||||
UIPasteboard.general.string = communityContributionIssueBody(for: client)
|
UIPasteboard.general.string = GitHubSubmission.communityContributionTemplate(
|
||||||
|
for: client,
|
||||||
|
systemVersion: UIDevice.current.systemVersion
|
||||||
|
)
|
||||||
showCommunityTemplateCopied = true
|
showCommunityTemplateCopied = true
|
||||||
}
|
}
|
||||||
if communityPromptPreferences.canSuppress() {
|
if communityPromptPreferences.canSuppress() {
|
||||||
@@ -289,7 +301,7 @@ struct MapHomeView: View {
|
|||||||
}
|
}
|
||||||
} message: {
|
} message: {
|
||||||
Text(
|
Text(
|
||||||
"你正在使用 \(communityContributionClient?.name ?? "第三方客户端")。欢迎分享成功配置,采纳后将收录到 README,可选择是否匿名署名。提交前请移除账号、订阅和其他敏感信息。"
|
"你正在使用 \(communityContributionClient?.name ?? "第三方客户端")。点击“去提交”会先复制投稿模板,并在 App 内打开社区页面。采纳后将收录到 README,可选择是否匿名署名。"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.alert("已复制投稿模板", isPresented: $showCommunityTemplateCopied) {
|
.alert("已复制投稿模板", isPresented: $showCommunityTemplateCopied) {
|
||||||
@@ -781,44 +793,8 @@ struct MapHomeView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func openCommunityContributionIssue(for client: ThirdPartyProxyClient) {
|
private func openCommunityContributionPage() {
|
||||||
let issueBody = communityContributionIssueBody(for: client)
|
githubDestination = SafariDestination(url: GitHubSubmission.communityContributionURL)
|
||||||
var components = URLComponents(
|
|
||||||
string: "https://github.com/xweiba/location-spoofer/issues/new"
|
|
||||||
)
|
|
||||||
components?.queryItems = [
|
|
||||||
URLQueryItem(
|
|
||||||
name: "title",
|
|
||||||
value: "[第三方配置分享] \(client.name) 成功配置"
|
|
||||||
),
|
|
||||||
URLQueryItem(
|
|
||||||
name: "body",
|
|
||||||
value: issueBody
|
|
||||||
),
|
|
||||||
URLQueryItem(
|
|
||||||
name: "labels",
|
|
||||||
value: "community-config,client-\(client.rawValue)"
|
|
||||||
)
|
|
||||||
]
|
|
||||||
guard let url = components?.url else { return }
|
|
||||||
UIApplication.shared.open(url)
|
|
||||||
}
|
|
||||||
|
|
||||||
private func communityContributionIssueBody(for client: ThirdPartyProxyClient) -> String {
|
|
||||||
"""
|
|
||||||
## 客户端
|
|
||||||
\(client.name)
|
|
||||||
|
|
||||||
## 配置说明
|
|
||||||
请描述模块导入、MITM、证书和代理连接步骤,并附上必要截图。
|
|
||||||
|
|
||||||
## README 收录署名
|
|
||||||
- [ ] 匿名收录,不在 README 展示投稿账号
|
|
||||||
|
|
||||||
## 隐私确认
|
|
||||||
- [ ] 已移除账号、订阅地址、密码、设备标识、真实位置等敏感信息
|
|
||||||
- [ ] 原始截图除敏感信息遮挡外未添加其他标注
|
|
||||||
"""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import SafariServices
|
import SafariServices
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
|
struct SafariDestination: Identifiable {
|
||||||
|
let id = UUID()
|
||||||
|
let url: URL
|
||||||
|
}
|
||||||
|
|
||||||
struct SafariView: UIViewControllerRepresentable {
|
struct SafariView: UIViewControllerRepresentable {
|
||||||
let url: URL
|
let url: URL
|
||||||
|
|
||||||
|
|||||||
+32
-1
@@ -14,6 +14,7 @@ struct SettingsView: View {
|
|||||||
@State private var modeOperationRunning = false
|
@State private var modeOperationRunning = false
|
||||||
@State private var copiedClient: ThirdPartyProxyClient?
|
@State private var copiedClient: ThirdPartyProxyClient?
|
||||||
@State private var showCertificateResetConfirmation = false
|
@State private var showCertificateResetConfirmation = false
|
||||||
|
@State private var githubDestination: SafariDestination?
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
@@ -120,7 +121,33 @@ struct SettingsView: View {
|
|||||||
NavigationLink {
|
NavigationLink {
|
||||||
BugReportView(setup: setup)
|
BugReportView(setup: setup)
|
||||||
} label: {
|
} label: {
|
||||||
Label("报告 Issue", systemImage: "ladybug")
|
Label("报告 Bug", systemImage: "ladybug")
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
githubDestination = SafariDestination(url: GitHubSubmission.usageHelpURL)
|
||||||
|
} label: {
|
||||||
|
Label("使用帮助", systemImage: "questionmark.circle")
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
githubDestination = SafariDestination(url: GitHubSubmission.featureRequestURL)
|
||||||
|
} label: {
|
||||||
|
Label("功能建议", systemImage: "lightbulb")
|
||||||
|
}
|
||||||
|
|
||||||
|
if runtimeMode.mode == .thirdParty {
|
||||||
|
Button {
|
||||||
|
UIPasteboard.general.string = GitHubSubmission.communityContributionTemplate(
|
||||||
|
for: thirdPartyClient.selectedClient,
|
||||||
|
systemVersion: UIDevice.current.systemVersion
|
||||||
|
)
|
||||||
|
githubDestination = SafariDestination(
|
||||||
|
url: GitHubSubmission.communityContributionURL
|
||||||
|
)
|
||||||
|
} label: {
|
||||||
|
Label("分享第三方配置", systemImage: "square.and.arrow.up")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,6 +183,10 @@ struct SettingsView: View {
|
|||||||
.sheet(item: $activeTip) { kind in
|
.sheet(item: $activeTip) { kind in
|
||||||
TipSheetView(kind: kind)
|
TipSheetView(kind: kind)
|
||||||
}
|
}
|
||||||
|
.sheet(item: $githubDestination) { destination in
|
||||||
|
SafariView(url: destination.url)
|
||||||
|
.ignoresSafeArea()
|
||||||
|
}
|
||||||
.alert(proxyOperationAlertTitle, isPresented: Binding(
|
.alert(proxyOperationAlertTitle, isPresented: Binding(
|
||||||
get: { !proxyOperationError.isEmpty },
|
get: { !proxyOperationError.isEmpty },
|
||||||
set: { if !$0 { proxyOperationError = "" } }
|
set: { if !$0 { proxyOperationError = "" } }
|
||||||
|
|||||||
+11
-7
@@ -330,21 +330,25 @@ Do not post real locations, authentication information, CA private keys, or comp
|
|||||||
|
|
||||||
Contributions are welcome for:
|
Contributions are welcome for:
|
||||||
|
|
||||||
- Bug reports;
|
- [Bug reports](https://github.com/xweiba/location-spoofer/issues/new?template=bug-report.yml);
|
||||||
- Feature requests;
|
- [Feature requests](https://github.com/xweiba/location-spoofer/discussions/categories/%E5%8A%9F%E8%83%BD%E5%BB%BA%E8%AE%AE);
|
||||||
- Compatibility results;
|
- [Usage help and compatibility results](https://github.com/xweiba/location-spoofer/discussions/categories/%E4%BD%BF%E7%94%A8%E5%B8%AE%E5%8A%A9);
|
||||||
|
- [Third-party client configurations and sanitized screenshots](https://github.com/xweiba/location-spoofer/discussions/categories/%E7%AC%AC%E4%B8%89%E6%96%B9%E9%85%8D%E7%BD%AE%E5%88%86%E4%BA%AB);
|
||||||
- Performance improvements;
|
- Performance improvements;
|
||||||
- Documentation improvements;
|
- Documentation improvements;
|
||||||
- Additional tests.
|
- Additional tests.
|
||||||
|
|
||||||
When filing an issue, include:
|
For bugs, generate a report from **Settings → Support → Report Bug** in the App whenever possible. The report includes:
|
||||||
|
|
||||||
- iOS version;
|
- iOS version;
|
||||||
- Device model;
|
- App version;
|
||||||
- Runtime mode;
|
- Runtime mode;
|
||||||
- Reproduction steps;
|
- Selected third-party client;
|
||||||
|
- Whether the issue is reproducible;
|
||||||
|
- Problem description;
|
||||||
- Sanitized runtime logs;
|
- Sanitized runtime logs;
|
||||||
- Whether a third-party proxy client was used.
|
|
||||||
|
Paste it into the **App-generated diagnostic report** field in the GitHub Issue Form.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
|||||||
@@ -322,22 +322,25 @@ dist/PaopaoLocationSpoofer-unsigned.ipa
|
|||||||
|
|
||||||
欢迎提交:
|
欢迎提交:
|
||||||
|
|
||||||
- Bug Report;
|
- [Bug Report](https://github.com/xweiba/location-spoofer/issues/new?template=bug-report.yml);
|
||||||
- Feature Request;
|
- [功能建议](https://github.com/xweiba/location-spoofer/discussions/categories/%E5%8A%9F%E8%83%BD%E5%BB%BA%E8%AE%AE);
|
||||||
- 兼容性测试结果;
|
- [使用帮助与兼容性测试](https://github.com/xweiba/location-spoofer/discussions/categories/%E4%BD%BF%E7%94%A8%E5%B8%AE%E5%8A%A9);
|
||||||
- [第三方客户端教程和脱敏原始截图](docs/COMMUNITY_TUTORIALS.md);
|
- [第三方客户端配置和脱敏原始截图](https://github.com/xweiba/location-spoofer/discussions/categories/%E7%AC%AC%E4%B8%89%E6%96%B9%E9%85%8D%E7%BD%AE%E5%88%86%E4%BA%AB);
|
||||||
- 性能改进;
|
- 性能改进;
|
||||||
- 文档改进;
|
- 文档改进;
|
||||||
- 测试补充。
|
- 测试补充。
|
||||||
|
|
||||||
提交 Issue 时建议包含:
|
提交 Bug 时建议优先通过 App 的“设置 → 支持 → 报告 Bug”生成报告。报告包含:
|
||||||
|
|
||||||
- iOS 版本;
|
- iOS 版本;
|
||||||
- 设备型号;
|
- App 版本;
|
||||||
- 使用的运行模式;
|
- 使用的运行模式;
|
||||||
- 复现步骤;
|
- 当前第三方客户端;
|
||||||
|
- 是否可以稳定复现;
|
||||||
|
- 问题描述;
|
||||||
- 脱敏后的运行日志;
|
- 脱敏后的运行日志;
|
||||||
- 是否使用第三方代理客户端。
|
|
||||||
|
GitHub Issue Form 中的“App 生成的诊断报告”字段与 App 复制内容一一对应。
|
||||||
|
|
||||||
## 文档
|
## 文档
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import Foundation
|
||||||
|
|
||||||
|
enum GitHubSubmission {
|
||||||
|
static let communityContributionURL = URL(
|
||||||
|
string: "https://github.com/xweiba/location-spoofer/discussions/new?category=%E7%AC%AC%E4%B8%89%E6%96%B9%E9%85%8D%E7%BD%AE%E5%88%86%E4%BA%AB"
|
||||||
|
)!
|
||||||
|
static let usageHelpURL = URL(
|
||||||
|
string: "https://github.com/xweiba/location-spoofer/discussions/categories/%E4%BD%BF%E7%94%A8%E5%B8%AE%E5%8A%A9"
|
||||||
|
)!
|
||||||
|
static let featureRequestURL = URL(
|
||||||
|
string: "https://github.com/xweiba/location-spoofer/discussions/categories/%E5%8A%9F%E8%83%BD%E5%BB%BA%E8%AE%AE"
|
||||||
|
)!
|
||||||
|
static let bugReportURL = URL(
|
||||||
|
string: "https://github.com/xweiba/location-spoofer/issues/new?template=bug-report.yml"
|
||||||
|
)!
|
||||||
|
|
||||||
|
static func communityContributionTemplate(
|
||||||
|
for client: ThirdPartyProxyClient,
|
||||||
|
systemVersion: String
|
||||||
|
) -> String {
|
||||||
|
"""
|
||||||
|
## 第三方客户端
|
||||||
|
\(client.name)
|
||||||
|
|
||||||
|
## 第三方客户端版本
|
||||||
|
请填写当前使用的第三方客户端版本。
|
||||||
|
|
||||||
|
## iOS 版本
|
||||||
|
iOS \(systemVersion)
|
||||||
|
|
||||||
|
## 配置步骤
|
||||||
|
请描述模块导入、证书或解密设置、代理连接和最终验证过程。
|
||||||
|
|
||||||
|
## 截图与补充说明
|
||||||
|
请附上脱敏原图,并说明每张图片对应的步骤。
|
||||||
|
|
||||||
|
## README 收录署名
|
||||||
|
- [ ] 匿名收录,不在 README 展示投稿账号
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,6 +7,11 @@ CONTENT="$ROOT/App/ContentView.swift"
|
|||||||
MAP="$ROOT/App/MapHomeView.swift"
|
MAP="$ROOT/App/MapHomeView.swift"
|
||||||
SETUP="$ROOT/App/FirstSetupView.swift"
|
SETUP="$ROOT/App/FirstSetupView.swift"
|
||||||
SETTINGS="$ROOT/App/SettingsView.swift"
|
SETTINGS="$ROOT/App/SettingsView.swift"
|
||||||
|
BUG_REPORT="$ROOT/App/BugReportView.swift"
|
||||||
|
GITHUB_SUBMISSION="$ROOT/Shared/GitHubSubmission.swift"
|
||||||
|
DISCUSSION_FORM="$ROOT/.github/DISCUSSION_TEMPLATE/第三方配置分享.yml"
|
||||||
|
ISSUE_FORM="$ROOT/.github/ISSUE_TEMPLATE/bug-report.yml"
|
||||||
|
ISSUE_CONFIG="$ROOT/.github/ISSUE_TEMPLATE/config.yml"
|
||||||
|
|
||||||
fail() {
|
fail() {
|
||||||
echo "FAIL: $1" >&2
|
echo "FAIL: $1" >&2
|
||||||
@@ -55,14 +60,85 @@ grep -q 'Button("取消", role: .cancel)' "$MAP" \
|
|||||||
|| fail "the first community prompts must expose cancel"
|
|| fail "the first community prompts must expose cancel"
|
||||||
grep -q 'Button("不再提示", role: .cancel)' "$MAP" \
|
grep -q 'Button("不再提示", role: .cancel)' "$MAP" \
|
||||||
|| fail "the third community prompt must allow permanent suppression"
|
|| fail "the third community prompt must allow permanent suppression"
|
||||||
grep -q '匿名收录,不在 README 展示投稿账号' "$MAP" \
|
grep -q '匿名收录,不在 README 展示投稿账号' "$GITHUB_SUBMISSION" \
|
||||||
|| fail "the contribution template must offer anonymous README attribution"
|
|| fail "the contribution template must offer anonymous README attribution"
|
||||||
grep -q 'community-config,client-\\(client.rawValue)' "$MAP" \
|
grep -Fq 'https://github.com/xweiba/location-spoofer/discussions/new?category=%E7%AC%AC%E4%B8%89%E6%96%B9%E9%85%8D%E7%BD%AE%E5%88%86%E4%BA%AB' "$GITHUB_SUBMISSION" \
|
||||||
|| fail "community submissions must be categorized by client labels"
|
|| fail "community submission must use one fixed Discussions address"
|
||||||
grep -q 'UIPasteboard.general.string = communityContributionIssueBody' "$MAP" \
|
grep -q 'UIPasteboard.general.string = GitHubSubmission.communityContributionTemplate' "$MAP" \
|
||||||
|| fail "the explicit copy action must copy the issue template"
|
|| fail "the explicit copy action must copy the contribution template"
|
||||||
! grep -A25 'private func openCommunityContributionIssue' "$MAP" | grep -q 'UIPasteboard.general.string' \
|
grep -A8 'Button("去提交")' "$MAP" | grep -q 'UIPasteboard.general.string = GitHubSubmission.communityContributionTemplate' \
|
||||||
|| fail "opening GitHub must not copy the template automatically"
|
|| fail "the submit action must copy the template before opening GitHub"
|
||||||
|
grep -A8 'Button("去提交")' "$MAP" | grep -q 'openCommunityContributionPage()' \
|
||||||
|
|| fail "the submit action must open the fixed Discussions page after copying"
|
||||||
|
! grep -A12 'private func openCommunityContributionPage' "$MAP" | grep -q 'URLComponents' \
|
||||||
|
|| fail "the fixed community address must not be rebuilt from dynamic query items"
|
||||||
|
grep -A4 'private func openCommunityContributionPage' "$MAP" | grep -q 'SafariDestination' \
|
||||||
|
|| fail "community submission must open with the shared in-App Safari destination"
|
||||||
|
! grep -A4 'private func openCommunityContributionPage' "$MAP" | grep -q 'UIApplication.shared.open' \
|
||||||
|
|| fail "community submission must not be intercepted by an external GitHub client"
|
||||||
|
test -s "$DISCUSSION_FORM" \
|
||||||
|
|| fail "the fixed Discussions category must provide a maintained submission form"
|
||||||
|
grep -q 'label: 第三方客户端' "$DISCUSSION_FORM" \
|
||||||
|
|| fail "the Discussions form must classify submissions by client"
|
||||||
|
grep -q '匿名收录,不在 README 展示投稿账号' "$DISCUSSION_FORM" \
|
||||||
|
|| fail "the Discussions form must retain anonymous README attribution"
|
||||||
|
grep -q '请先移除账号、订阅、密码、设备标识、真实位置等敏感信息' "$DISCUSSION_FORM" \
|
||||||
|
|| fail "the Discussions form must remind users to remove sensitive information"
|
||||||
|
grep -q '截图除敏感信息遮挡外不要添加箭头、编号或说明文字' "$DISCUSSION_FORM" \
|
||||||
|
|| fail "the Discussions form must explain the screenshot annotation rule"
|
||||||
|
! grep -q 'label: 隐私确认' "$DISCUSSION_FORM" \
|
||||||
|
|| fail "the Discussions form must not require a separate privacy confirmation"
|
||||||
|
for field in \
|
||||||
|
'## 第三方客户端' \
|
||||||
|
'## 第三方客户端版本' \
|
||||||
|
'## iOS 版本' \
|
||||||
|
'## 配置步骤' \
|
||||||
|
'## 截图与补充说明' \
|
||||||
|
'## README 收录署名'; do
|
||||||
|
grep -Fq "$field" "$GITHUB_SUBMISSION" \
|
||||||
|
|| fail "the App contribution template must match Discussions field: $field"
|
||||||
|
done
|
||||||
|
grep -Fq 'label: 第三方客户端版本' "$DISCUSSION_FORM" \
|
||||||
|
|| fail "the Discussions form must clearly request the third-party client version"
|
||||||
|
|
||||||
|
grep -Fq 'https://github.com/xweiba/location-spoofer/issues/new?template=bug-report.yml' "$GITHUB_SUBMISSION" \
|
||||||
|
|| fail "the App bug report must open the dedicated Issue form"
|
||||||
|
grep -Fq 'GitHubSubmission.bugReportURL' "$BUG_REPORT" \
|
||||||
|
|| fail "the App bug report must use the shared GitHub destination"
|
||||||
|
grep -Fq 'SafariView(url: destination.url)' "$BUG_REPORT" \
|
||||||
|
|| fail "the App bug report must open in the shared in-App Safari view"
|
||||||
|
! grep -q 'UIApplication.shared.open' "$BUG_REPORT" \
|
||||||
|
|| fail "the App bug report must not be handed to an external GitHub client"
|
||||||
|
grep -Fq 'App 生成的诊断报告' "$BUG_REPORT" \
|
||||||
|
|| fail "the App must tell users where to paste the generated report"
|
||||||
|
grep -Fq '第三方客户端:' "$BUG_REPORT" \
|
||||||
|
|| fail "the generated report must identify the selected third-party client"
|
||||||
|
grep -Fq 'Label("报告 Bug"' "$SETTINGS" \
|
||||||
|
|| fail "Settings must identify the support action as a bug report"
|
||||||
|
for action in '使用帮助' '功能建议' '分享第三方配置'; do
|
||||||
|
grep -Fq "Label(\"$action\"" "$SETTINGS" \
|
||||||
|
|| fail "Settings support must expose: $action"
|
||||||
|
done
|
||||||
|
grep -A8 'Label("分享第三方配置"' "$SETTINGS" >/dev/null \
|
||||||
|
|| fail "Settings must retain the manual third-party sharing action"
|
||||||
|
grep -q 'GitHubSubmission.communityContributionTemplate' "$SETTINGS" \
|
||||||
|
|| fail "Settings manual sharing must copy the shared contribution template"
|
||||||
|
grep -q 'SafariView(url: destination.url)' "$SETTINGS" \
|
||||||
|
|| fail "Settings GitHub support actions must use the in-App Safari view"
|
||||||
|
test -s "$ISSUE_FORM" \
|
||||||
|
|| fail "the repository must provide a bug report Issue form"
|
||||||
|
grep -Fq 'label: App 生成的诊断报告' "$ISSUE_FORM" \
|
||||||
|
|| fail "the Issue form must expose the field named by the App"
|
||||||
|
grep -Fq '设置 → 支持 → 报告 Bug' "$ISSUE_FORM" \
|
||||||
|
|| fail "the Issue form must point users to the matching App workflow"
|
||||||
|
grep -Fq 'label: 我已移除真实位置、认证信息、订阅地址、证书私钥和其他敏感信息' "$ISSUE_FORM" \
|
||||||
|
|| fail "the Issue form must require privacy confirmation"
|
||||||
|
grep -Fq 'blank_issues_enabled: false' "$ISSUE_CONFIG" \
|
||||||
|
|| fail "blank Issues must be disabled so reports use the maintained form"
|
||||||
|
for destination in '使用帮助' '功能建议' '第三方配置分享'; do
|
||||||
|
grep -Fq "name: $destination" "$ISSUE_CONFIG" \
|
||||||
|
|| fail "Issue chooser must route non-bug request to $destination"
|
||||||
|
done
|
||||||
|
|
||||||
for obsolete in \
|
for obsolete in \
|
||||||
'我已配置,开始检测' \
|
'我已配置,开始检测' \
|
||||||
|
|||||||
+13
-10
@@ -5,19 +5,22 @@
|
|||||||
|
|
||||||
## 客户端分区
|
## 客户端分区
|
||||||
|
|
||||||
投稿 Issue 使用 `community-config` 总标签,并按客户端增加以下分区标签:
|
投稿统一进入 GitHub Discussions 的“第三方配置分享”固定入口。表单通过“第三方客户端”下拉框分类:
|
||||||
|
|
||||||
| 客户端 | 分区标签 |
|
| 客户端 | 表单选项 |
|
||||||
|---|---|
|
|---|---|
|
||||||
| Shadowrocket | `client-shadowrocket` |
|
| Shadowrocket | `Shadowrocket` |
|
||||||
| Surge | `client-surge` |
|
| Surge | `Surge` |
|
||||||
| Quantumult X | `client-quantumultX` |
|
| Quantumult X | `Quantumult X` |
|
||||||
| Loon | `client-loon` |
|
| Loon | `Loon` |
|
||||||
| Stash | `client-stash` |
|
| Stash | `Stash` |
|
||||||
| Egern | `client-egern` |
|
| Egern | `Egern` |
|
||||||
|
|
||||||
App 打开的投稿链接会预填对应标签、客户端名称和模板。采纳后的配置在 README 客户端状态表中按客户端收录,
|
App 始终打开同一个投稿地址,仓库中的 Discussion 表单负责维护客户端、版本、步骤、截图和署名字段。
|
||||||
并链接到教程或原始投稿。投稿者可以选择匿名收录;未选择匿名时可在 README 中显示 GitHub 账号。
|
“去提交”会先复制带当前客户端名称的投稿模板,再通过 App 内 Safari 打开固定页面,避免被不支持
|
||||||
|
Discussions 的 GitHub 客户端拦截。用户也可以从 Safari 视图的分享菜单改用其他浏览器。“复制模板”按钮仍可
|
||||||
|
单独使用,设置页的“支持 → 分享第三方配置”也提供相同入口。采纳后的配置在 README 客户端状态表中按客户端
|
||||||
|
收录,并链接到教程或原始投稿。投稿者可以选择匿名收录;未选择匿名时可在 README 中显示 GitHub 账号。
|
||||||
|
|
||||||
## 提交内容
|
## 提交内容
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user