Skip to content

Commit df4d380

Browse files
committed
Initial commit
0 parents  commit df4d380

File tree

295 files changed

+33443
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

295 files changed

+33443
-0
lines changed

.github/workflows/build.yml

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: build
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
include:
14+
- platform: android
15+
os: ubuntu-latest
16+
- platform: windows
17+
os: windows-latest
18+
- platform: linux
19+
os: ubuntu-latest
20+
- platform: macos
21+
os: macos-13
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
submodules: recursive
28+
29+
- name: Setup JAVA
30+
if: startsWith(matrix.platform,'android')
31+
uses: actions/setup-java@v4
32+
with:
33+
distribution: 'zulu'
34+
java-version: 17
35+
36+
- name: Setup NDK
37+
if: startsWith(matrix.platform,'android')
38+
uses: nttld/setup-ndk@v1
39+
id: setup-ndk
40+
with:
41+
ndk-version: r26b
42+
add-to-path: true
43+
link-to-sdk: true
44+
45+
- name: Setup Android Signing
46+
if: startsWith(matrix.platform,'android')
47+
run: |
48+
echo "${{ secrets.KEYSTORE }}" | base64 --decode > android/app/keystore.jks
49+
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/local.properties
50+
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/local.properties
51+
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/local.properties
52+
53+
54+
- name: Setup Go
55+
uses: actions/setup-go@v5
56+
with:
57+
go-version-file: 'core/go.mod'
58+
cache-dependency-path: |
59+
core/go.sum
60+
61+
- name: Setup Flutter
62+
uses: subosito/flutter-action@v2
63+
with:
64+
flutter-version: '3.x'
65+
channel: 'stable'
66+
cache: true
67+
68+
- name: Get Flutter Dependency
69+
run: flutter pub get
70+
71+
- name: Setup
72+
run: |
73+
dart setup.dart ${{ matrix.platform }}
74+
75+
- name: Upload
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: artifact-${{ matrix.platform }}
79+
path: ./dist
80+
retention-days: 1
81+
overwrite: true
82+
83+
84+
upload-release:
85+
permissions: write-all
86+
needs: [ build ]
87+
runs-on: ubuntu-latest
88+
steps:
89+
- name: Checkout
90+
uses: actions/checkout@v4
91+
with:
92+
submodules: recursive
93+
94+
- name: Download
95+
uses: actions/download-artifact@v4
96+
with:
97+
path: ./dist/
98+
pattern: artifact-*
99+
merge-multiple: true
100+
101+
- name: Pre Release
102+
run: |
103+
pip install gitchangelog pystache mustache markdown
104+
prelease=$(curl --silent "https://api.github.com/repos/chen08209/FlClash/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' || echo "")
105+
if [ -z "$prelease" ]; then
106+
echo "init" > release.md
107+
else
108+
current="${{ github.ref_name }}"
109+
echo -e "\n\n<details markdown=1><summary>All changes from $current to the latest commit:</summary>\n\n" >> release.md
110+
gitchangelog "${prelease}.." >> release.md 2>&1 || echo "Error in gitchangelog"
111+
echo -e "\n\n</details>" >> release.md
112+
fi
113+
- name: Release
114+
uses: softprops/action-gh-release@v2
115+
with:
116+
files: ./dist/*
117+
body_path: './release.md'

.gitignore

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.packages
31+
.pub-cache/
32+
.pub/
33+
/build/
34+
35+
# Symbolication related
36+
app.*.symbols
37+
38+
# Obfuscation related
39+
app.*.map.json
40+
41+
# Android Studio will place build artifacts here
42+
/android/app/debug
43+
/android/app/profile
44+
/android/app/release
45+
46+
47+
#libclash
48+
/libclash/
49+
50+
#jniLibs
51+
/android/app/src/main/jniLibs/

.gitmodules

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[submodule "core/Clash.Meta"]
2+
path = core/Clash.Meta
3+
url = [email protected]:chen08209/Clash.Meta.git
4+
branch = FlClash
5+
[submodule "plugins/flutter_distributor"]
6+
path = plugins/flutter_distributor
7+
url = [email protected]:chen08209/flutter_distributor.git
8+
branch = main

.metadata

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled.
5+
6+
version:
7+
revision: 796c8ef79279f9c774545b3771238c3098dbefab
8+
channel: stable
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
17+
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
18+
- platform: android
19+
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
20+
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
21+
- platform: ios
22+
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
23+
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
24+
- platform: linux
25+
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
26+
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
27+
- platform: macos
28+
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
29+
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
30+
- platform: web
31+
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
32+
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
33+
- platform: windows
34+
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
35+
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

README.md

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<div>
2+
3+
[**简体中文**](README_zh_CN.md)
4+
5+
</div>
6+
7+
## FlClash
8+
9+
A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.
10+
11+
on Desktop:
12+
<p style="text-align: center;">
13+
<img src="snapshots/desktop.gif">
14+
</p>
15+
16+
on Mobile:
17+
<p style="text-align: center;">
18+
<img src="snapshots/mobile.gif">
19+
</p>
20+
21+
## Features
22+
23+
✈️ Multi-platform: Android, Windows, macOS and Linux
24+
25+
💻 Adaptive multiple screen sizes, Multiple color themes available
26+
27+
💡 Based on Material You Design, [Surfboard](https://github.com/getsurfboard/surfboard)-like UI
28+
29+
✨ Support subscription link, Dark mode
30+
31+
## Build
32+
33+
1. Update submodules
34+
```bash
35+
git submodule update --init --recursive
36+
```
37+
38+
2. Install `Flutter` and `Golang` environment
39+
40+
3. Build Application
41+
42+
- android
43+
44+
1. Install `Android SDK` , `Android NDK`
45+
46+
2. Set `ANDROID_NDK` environment variables
47+
48+
3. Run Build script
49+
50+
```bash
51+
dart .\setup.dart android
52+
```
53+
54+
- windows
55+
56+
1. You need a windows client
57+
58+
2. Install `Gcc``Inno Setup`
59+
60+
3. Run build script
61+
62+
```bash
63+
dart .\setup.dart
64+
```
65+
66+
- linux
67+
68+
1. You need a linux client
69+
70+
2. Run build script
71+
72+
```bash
73+
dart .\setup.dart
74+
```
75+
76+
- macOS
77+
78+
1. You need a macOS client
79+
80+
2. Run build script
81+
82+
```bash
83+
dart .\setup.dart
84+
```

README_zh_CN.md

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<div>
2+
3+
[**English**](README.md)
4+
5+
</div>
6+
7+
## FlClash
8+
9+
基于ClashMeta的多平台代理客户端,简单易用,开源无广告。
10+
11+
on Desktop:
12+
<p style="text-align: center;">
13+
<img src="snapshots/desktop.gif">
14+
</p>
15+
16+
on Mobile:
17+
<p style="text-align: center;">
18+
<img src="snapshots/mobile.gif">
19+
</p>
20+
21+
## Features
22+
23+
✈️ 多平台: Android, Windows, macOS and Linux
24+
25+
💻 自适应多个屏幕尺寸,多种颜色主题可供选择
26+
27+
💡 基本 Material You 设计, 类[Surfboard](https://github.com/getsurfboard/surfboard)用户界面
28+
29+
✨ 支持一键导入订阅, 深色模式
30+
31+
## Build
32+
33+
1. 更新 submodules
34+
```bash
35+
git submodule update --init --recursive
36+
```
37+
38+
2. 安装 `Flutter` 以及 `Golang` 环境
39+
40+
3. 构建应用
41+
42+
- android
43+
44+
1. 安装 `Android SDK` , `Android NDK`
45+
46+
2. 设置 `ANDROID_NDK` 环境变量
47+
48+
3. 运行构建脚本
49+
50+
```bash
51+
dart .\setup.dart android
52+
```
53+
54+
- windows
55+
56+
1. 你需要一个windows客户端
57+
58+
2. 安装 `Gcc``Inno Setup`
59+
60+
3. 运行构建脚本
61+
62+
```bash
63+
dart .\setup.dart
64+
```
65+
66+
- linux
67+
68+
1. 你需要一个linux客户端
69+
70+
2. 运行构建脚本
71+
72+
```bash
73+
dart .\setup.dart
74+
```
75+
76+
- macOS
77+
78+
1. 你需要一个macOS客户端
79+
80+
2. 运行构建脚本
81+
82+
```bash
83+
dart .\setup.dart
84+
```

0 commit comments

Comments
 (0)