socks5-impl 0.8.2

Fundamental abstractions and async read / write functions for SOCKS5 protocol and Relatively low-level asynchronized SOCKS5 server implementation based on tokio
Documentation
name: Deploy Releases
on:
  push:
    tags:
      - "v*.*.*"
env:
  CARGO_TERM_COLOR: always

jobs:
  deploy:
    strategy:
      matrix:
        target:
          - x86_64-unknown-linux-gnu
          - x86_64-unknown-linux-musl
          - aarch64-unknown-linux-gnu
          - armv7-unknown-linux-gnueabihf
          - x86_64-apple-darwin
          - aarch64-apple-darwin
          - x86_64-pc-windows-msvc
          - i686-pc-windows-msvc

        include:
          - target: x86_64-unknown-linux-gnu
            host_os: ubuntu-latest
          - target: x86_64-unknown-linux-musl
            host_os: ubuntu-latest
          - target: aarch64-unknown-linux-gnu
            host_os: ubuntu-latest
          - target: armv7-unknown-linux-gnueabihf
            host_os: ubuntu-latest
          - target: x86_64-apple-darwin
            host_os: macos-latest
          - target: aarch64-apple-darwin
            host_os: macos-latest
          - target: x86_64-pc-windows-msvc
            host_os: windows-latest
          - target: i686-pc-windows-msvc
            host_os: windows-latest

    runs-on: ${{ matrix.host_os }}
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable

      - name: Prepare
        shell: bash
        run: |

          mkdir release
          rustup target add ${{ matrix.target }}
          if [[ "${{ matrix.host_os }}" == "ubuntu-latest" ]]; then
            sudo .github/workflows/install-cross.sh
          fi

      - name: Build
        shell: bash
        run: |

          if [[ "${{ matrix.host_os }}" == "ubuntu-latest" ]]; then
            cross build --all-features --release --examples --target ${{ matrix.target }}
          else
            cargo build --all-features --release --examples --target ${{ matrix.target }}
          fi
          if [[ "${{ matrix.host_os }}" == "windows-latest" ]]; then
            powershell Compress-Archive -Path target/${{ matrix.target }}/release/examples/s5-server.exe, target/${{ matrix.target }}/release/examples/udp-client.exe, target/${{ matrix.target }}/release/examples/dns-query.exe, target/${{ matrix.target }}/release/examples/echo-server.exe -DestinationPath release/socks5-utilities-${{ matrix.target }}.zip
          elif [[ "${{ matrix.host_os }}" == "macos-latest" ]]; then
            zip -j release/socks5-utilities-${{ matrix.target }}.zip target/${{ matrix.target }}/release/examples/s5-server target/${{ matrix.target }}/release/examples/udp-client target/${{ matrix.target }}/release/examples/dns-query target/${{ matrix.target }}/release/examples/echo-server
          elif [[ "${{ matrix.host_os }}" == "ubuntu-latest" ]]; then
            zip -j release/socks5-utilities-${{ matrix.target }}.zip target/${{ matrix.target }}/release/examples/s5-server target/${{ matrix.target }}/release/examples/udp-client target/${{ matrix.target }}/release/examples/dns-query target/${{ matrix.target }}/release/examples/echo-server
          fi

      - name: Upload
        uses: softprops/action-gh-release@v3
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          files: release/*