-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix permissions of file in clash_cfg_dir. Add updating provider with api. And fix some bug. * fixup! Fix permissions of file in clash_cfg_dir. Add updating provider with api. And fix some bug. * fixup! Fix permissions of file in clash_cfg_dir. Add updating provider with api. And fix some bug. * fixup! Fix permissions of file in clash_cfg_dir. Add updating provider with api. And fix some bug. * Remove the code in Windows platform * Comment the `update_profiles_with_api` and remove `build-windows` from workflow. * fixup! Comment the `update_profiles_with_api` and remove `build-windows` from workflow. * Do not delete the original message of popup_msg beforehand. Delete some unnecessary files. * Restart clashtui after fixing files permissinos. Profile created by template, use different proxy-provider path. * Update workflow file. * Update templates * fixup! Update templates * Update README.md * Update PKGBUILD * Add profile_update_interval_fg * Fix the order of proxy-providers generated by crt_yaml_with_template * Update basic_clash_config.yaml * Add ToDo of updating profile. * fixup! Add ToDo of updating profile. * fixup! Add ToDo of updating profile. * Update README * fixup! Update README * fixup! Update README fixup! Update README * fixup! Update README * Replace with 127.0.0.1 if ip of external-controller is `0.0.0.0`. * fixup! Replace with 127.0.0.1 if ip of external-controller is `0.0.0.0`. * Don't save the clash config each exit. Perfect the execution of system cmd. * Update README.md * Update clashtui_demo * Save clashtui data to `data.yaml` not `config.yaml`. `edit_cmd` and `open_dir_cmd` are optional. * Update cargo include and exclude * Update PKGBUILD * Restore `is_user` of config. And change it to `clash_srv_is_user`. * Restore `edit_cmd` and `open_dir_cmd`. * Change cargo.toml version to v0.2.1 * Add Ideas.md * Update Ideas.md * Update example templates * github workflow add building clashtui-linux-arm64 * fixup! github workflow add building clashtui-linux-arm64 * fixup! github workflow add building clashtui-linux-arm64 * Update clashtui dependence versions * Update Cargo.lock * Fix bug: alway download files with proxy. * refresh state real-time, auto-enable proxy * refresh state after service options * fix user mode service's status check * do some rename and replace unwarp with expect * ci: fix target dir * fix import on windows * try add more log * fix PortableMode * Add building debug version * Update README * Use new foramt of version * Fix the refresh about StartClashSrvService * fixup! Add building debug version * Update build_release.yml * Update template * Add `timeout` config item and default config values. * Update build_release.yml * Extend the timeout of request. * Update build_release.yml * Update cargo pkg version * Update profile templates * fixup! Update template * fixup! Update template * check https://www.gstatic.com/generate_204 for connectivity * Only display domain of url in update window * fixup! Only display domain of url in update window * Add Profile Info * fixup! check https://www.gstatic.com/generate_204 for connectivity * Add my config * fixup! Add my config * Add geodata and clashconfig to Profile Info * fixup! Add geodata and clashconfig to Profile Info * fixup! Add geodata and clashconfig to Profile Info * fixup! Add geodata and clashconfig to Profile Info * fixup! Add my config * fixup! Add geodata and clashconfig to Profile Info * Remove Ideas.md * Add `no proxy provider` option * Update version of build.rs * fixup! Add `no proxy provider` option * fixup! Add `no proxy provider` option * modify backend * read env var (stored in PROXY_ENVAR) to enable proxy * Only display domain of url in update window thanks to JohanChane * do not overwrite profile if update failed * load timeout from cfg DO NOT REMOVE DEFAULT * fix tui function * init fix and revert * rm unused --------- Co-authored-by: JohanChane <[email protected]>
- Loading branch information
1 parent
a04e6e6
commit 25dccf2
Showing
61 changed files
with
2,258 additions
and
1,309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: Build Release | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'clashtui/**' | ||
- '.github/workflows/build_release.yml' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: goto-bus-stop/setup-zig@v2 | ||
|
||
- name: Set up Mihomo | ||
run: | | ||
wget --output-document mihomo.gz https://github.com/MetaCubeX/mihomo/releases/download/v1.18.0/mihomo-linux-amd64-v1.18.0.gz | ||
gunzip mihomo.gz | ||
chmod +x mihomo | ||
nohup ./mihomo -d Example -f Example/basic_clash_config.yaml & | ||
- name: Cache Target | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
./clashtui/target | ||
~/.cargo | ||
key: ci-${{ runner.os }}-${{ hashFiles('./clashtui/Cargo.lock') }} | ||
restore-keys: | | ||
ci-${{ runner.os }}-${{ hashFiles('./clashtui/Cargo.lock') }} | ||
ci-${{ runner.os }}- | ||
- name: Download Dependencies | ||
run: cd clashtui && cargo fetch | ||
|
||
- name: Run tests | ||
run: cd clashtui && cargo test --all | ||
|
||
- name: Build | ||
run: | | ||
cd clashtui | ||
cargo build --locked | ||
cargo build --release --locked | ||
- name: Build linux arm64 | ||
run: | | ||
rustup target add aarch64-unknown-linux-gnu | ||
cd clashtui | ||
cargo install cargo-zigbuild | ||
cargo zigbuild --target aarch64-unknown-linux-gnu.2.17 --locked | ||
cargo zigbuild --target aarch64-unknown-linux-gnu.2.17 --release --locked | ||
- name: Build Version | ||
run: | | ||
cd clashtui && cargo run --release -- -v >> version.txt | ||
- name: Pre Upload | ||
run: | | ||
mkdir artifacts | ||
mv ./clashtui/target/debug/clashtui ./artifacts/clashtui-amd64-debug | ||
mv ./clashtui/target/release/clashtui ./artifacts/clashtui-amd64 | ||
mv ./clashtui/target/aarch64-unknown-linux-gnu/debug/clashtui ./artifacts/clashtui-arm64-debug | ||
mv ./clashtui/target/aarch64-unknown-linux-gnu/release/clashtui ./artifacts/clashtui-arm64 | ||
mv ./clashtui/version.txt ./artifacts/version.txt | ||
- name: upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Linux_Build | ||
path: artifacts | ||
retention-days: 5 | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
|
||
needs: [build-linux] | ||
|
||
if: startsWith(github.ref, 'refs/tags/') | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
merge-multiple: true | ||
path: ./artifacts | ||
|
||
- name: Get version | ||
run: | | ||
cd ./artifacts | ||
echo CLASHTUI_VERSION="$(cat version.txt)" >> $GITHUB_ENV | ||
- name: Archive Release | ||
run: | | ||
gzip -c ./artifacts/clashtui-amd64 > clashtui-linux-amd64-${{ env.CLASHTUI_VERSION }}.gz | ||
gzip -c ./artifacts/clashtui-arm64 > clashtui-linux-arm64-${{ env.CLASHTUI_VERSION }}.gz | ||
- name: Upload Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
prerelease: true | ||
files: | | ||
clashtui-linux-amd64-${{ env.CLASHTUI_VERSION }}.gz | ||
clashtui-linux-arm64-${{ env.CLASHTUI_VERSION }}.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.