diff --git a/.github/workflows/publish-exe.yml b/.github/workflows/publish-exe.yml index bb2c7b2..351db5b 100644 --- a/.github/workflows/publish-exe.yml +++ b/.github/workflows/publish-exe.yml @@ -68,6 +68,10 @@ jobs: powershell Compress-Archive -Path target/${{ matrix.target }}/release/socks-hub.exe, ./README.md, ./socks_hub_ffi.h, target/${{ matrix.target }}/release/socks_hub.dll -DestinationPath mypubdir4/socks-hub-${{ matrix.target }}.zip elif [[ "${{ matrix.host_os }}" == "macos-latest" ]]; then zip -j mypubdir4/socks-hub-${{ matrix.target }}.zip target/${{ matrix.target }}/release/socks-hub ./README.md ./socks_hub_ffi.h target/${{ matrix.target }}/release/libsocks_hub.dylib + if [[ "${{ matrix.target }}" == "x86_64-apple-darwin" ]]; then + ./build-apple.sh + zip -r mypubdir4/socks-hub-apple-xcframework.zip ./socks-hub.xcframework/ + fi elif [[ "${{ matrix.host_os }}" == "ubuntu-latest" ]]; then zip -j mypubdir4/socks-hub-${{ matrix.target }}.zip target/${{ matrix.target }}/release/socks-hub ./README.md ./socks_hub_ffi.h target/${{ matrix.target }}/release/libsocks_hub.so fi diff --git a/README.md b/README.md index fa149a4..96bdcd1 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![Documentation](https://img.shields.io/badge/docs-release-brightgreen.svg?style=flat)](https://docs.rs/socks-hub) [![Download](https://img.shields.io/crates/d/socks-hub.svg)](https://crates.io/crates/socks-hub) [![License](https://img.shields.io/crates/l/socks-hub.svg?style=flat)](https://github.com/ssrlive/socks-hub/blob/master/LICENSE) +[![Rust](https://img.shields.io/badge/rust-1.70%2B-blue.svg?maxAge=3600)](https://github.com/ssrlive/socks-hub) `SOCKS-HUB` is a [SOCKS5](https://en.wikipedia.org/wiki/SOCKS#SOCKS5) proxy `hub`. It can convert `HTTP`/`HTTPS` proxy to `SOCKS5` proxy, and can also forward `SOCKS5` proxy. @@ -38,12 +39,12 @@ Usage: socks-hub [OPTIONS] --listen-addr --server-addr Options: -t, --source-type Source proxy type [default: http] [possible values: http, socks5] -l, --listen-addr Local listening address - -s, --server-addr Remote SOCKS5 server address -u, --username Client authentication username, available both for HTTP and SOCKS5, optional -p, --password Client authentication password, available both for HTTP and SOCKS5, optional - --s5-username SOCKS5 server authentication username, optional - --s5-password SOCKS5 server authentication password, optional - -a, --acl-file ACL file path + -s, --server-addr Remote SOCKS5 server address + --s5-username Remote SOCKS5 server authentication username, optional + --s5-password Remote SOCKS5 server authentication password, optional + -a, --acl-file ACL (Access Control List) file path, optional -v, --verbosity Log verbosity level [default: info] [possible values: off, error, warn, info, debug, trace] -h, --help Print help -V, --version Print version diff --git a/build-apple-debug.sh b/build-apple-debug.sh new file mode 100755 index 0000000..e5b9453 --- /dev/null +++ b/build-apple-debug.sh @@ -0,0 +1,27 @@ +#! /bin/sh + +echo "Setting up the rust environment..." +rustup target add aarch64-apple-ios +cargo install cbindgen + +echo "Building target aarch64-apple-ios..." +cargo build --target aarch64-apple-ios + +echo "Generating includes..." +mkdir -p target/include/ +rm -rf target/include/* +cbindgen --config cbindgen.toml -l C -o target/include/socks-hub.h +cat > target/include/module.modulemap < target/include/module.modulemap <