├── .github ├── dependabot.yml └── workflows │ ├── auto-compile.yml │ └── tag-release.yml ├── .gitignore ├── .vscode └── settings.json ├── CHANGELOG.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── example-profiles ├── Group-of-bad-profiles │ ├── Bad-config │ │ ├── .ss_ignore │ │ └── profile.yaml │ ├── Bad-plugin │ │ ├── mock-plugin.sh │ │ ├── profile.yaml │ │ └── ss.json │ └── No-config │ │ ├── .ss_ignore │ │ └── foo └── Group-of-good-profiles │ ├── Config-file-mode │ ├── profile.yaml │ └── ss.json5 │ ├── Proxy-mode │ └── profile.yaml │ └── Tun-mode │ └── profile.yaml ├── res ├── QnA.md ├── config-guide.md ├── logo │ ├── bg1024.png │ ├── bg512.png │ ├── shadowsocks-gtk-rs.png │ ├── shadowsocks-gtk-rs.svg │ └── shadowsocks.svg ├── shadowsocks-gtk-rs.desktop └── stay-safe.md ├── run-local.sh ├── rustfmt.toml └── src ├── bin ├── ssgtk │ ├── clap_def.rs │ ├── event.rs │ ├── gui │ │ ├── app.rs │ │ ├── log_viewer.rs │ │ ├── mod.rs │ │ ├── notification.rs │ │ └── tray.rs │ ├── io │ │ ├── app_state.rs │ │ ├── mod.rs │ │ ├── profile_loader.rs │ │ └── runtime_api.rs │ ├── main.rs │ └── profile_manager.rs └── ssgtkctl │ ├── clap_def.rs │ └── main.rs └── lib ├── consts.rs ├── mod.rs ├── notify_method.rs ├── runtime_api_msg.rs └── util ├── hacks.rs ├── leaky_bucket.rs ├── mod.rs ├── output_kind.rs └── sync.rs /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: cargo 4 | directory: "/" 5 | schedule: 6 | interval: monthly 7 | target-branch: dev 8 | -------------------------------------------------------------------------------- /.github/workflows/auto-compile.yml: -------------------------------------------------------------------------------- 1 | name: Auto compile test 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | - dev # mainly for dependabot 8 | push: 9 | branches: 10 | - master 11 | - dev 12 | - cicd 13 | workflow_dispatch: 14 | 15 | env: 16 | CARGO_TERM_COLOR: always 17 | 18 | jobs: 19 | compile: 20 | name: Compile 21 | runs-on: ubuntu-latest 22 | 23 | steps: 24 | - name: Checkout code 25 | uses: actions/checkout@v2 26 | - name: Setup rust 27 | uses: actions-rs/toolchain@v1 28 | with: 29 | toolchain: stable 30 | - name: Rust cache 31 | uses: Swatinem/rust-cache@v1 32 | - name: Update system 33 | run: sudo apt update && sudo apt upgrade 34 | - name: Install dependencies 35 | run: sudo apt install libappindicator3-dev libgtk-3-dev 36 | - name: Build default (release) 37 | run: cargo build --release --verbose 38 | - name: Build without default features (release) 39 | run: cargo build --release --no-default-features --verbose 40 | # - name: Run tests 41 | # run: cargo test --release --verbose 42 | -------------------------------------------------------------------------------- /.github/workflows/tag-release.yml: -------------------------------------------------------------------------------- 1 | name: Release new version 2 | 3 | on: 4 | push: 5 | tags: 6 | - "v*.*" 7 | - "v*.*.*" 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | build: 14 | name: Test build the code 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - name: Checkout code 19 | uses: actions/checkout@v2 20 | - name: Setup rust 21 | uses: actions-rs/toolchain@v1 22 | with: 23 | toolchain: stable 24 | - name: Rust cache 25 | uses: Swatinem/rust-cache@v1 26 | - name: Install dependencies 27 | run: sudo apt install libappindicator3-dev libgtk-3-dev 28 | - name: Test build 29 | run: cargo build --release --verbose 30 | publish-crates-io: 31 | name: Publish code to crates.io 32 | runs-on: ubuntu-latest 33 | needs: [build] 34 | 35 | steps: 36 | - name: Checkout code 37 | uses: actions/checkout@v2 38 | - name: Setup rust 39 | uses: actions-rs/toolchain@v1 40 | with: 41 | toolchain: stable 42 | - name: Rust cache 43 | uses: Swatinem/rust-cache@v1 44 | - name: Install dependencies 45 | run: sudo apt install libappindicator3-dev libgtk-3-dev 46 | - name: Publish to crates.io 47 | uses: katyo/publish-crates@v1 48 | with: 49 | registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} 50 | # dry-run: true 51 | # TODO: Github release 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /local-run 3 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.language": "en-US", 3 | "cSpell.words": [ 4 | "devel", 5 | "libayatana", 6 | "libgtk", 7 | "netcat", 8 | "nonblocking", 9 | "SIGINT", 10 | "spyophobia", 11 | "ssgtk", 12 | "ssgtkctl", 13 | "sslocal", 14 | ], 15 | "todo-tree.general.tags": [ 16 | "BUG", 17 | "FIXME", 18 | "HACK", 19 | "IDEA", 20 | "IMPRV", 21 | "TEMP", 22 | "TODO" 23 | ], 24 | "todo-tree.regex.regex": "((//|#|