diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2023-06-29 11:11:49 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2023-06-29 11:14:40 +0200 |
| commit | 32a867d72da16b3634f84843d0ca1762df3922e5 (patch) | |
| tree | b8d40a91ddf4f05f08c4b26447dad873fa15eef0 | |
| parent | cd217afd40b7c76a7b304564c2ba63fbc2f04faf (diff) | |
| download | mullvadvpn-32a867d72da16b3634f84843d0ca1762df3922e5.tar.xz mullvadvpn-32a867d72da16b3634f84843d0ca1762df3922e5.zip | |
Move rust library build script to ios/ to make it reusable by other targets
Drop left overs of shadowsocks.h, which is unused.
| -rw-r--r-- | ios/MullvadTransport/shadowsocks.h | 33 | ||||
| -rw-r--r-- | ios/MullvadVPN.xcodeproj/project.pbxproj | 2 | ||||
| -rw-r--r-- | ios/build-rust-library.sh (renamed from ios/MullvadTransport/shadowsocks-proxy/build.sh) | 2 |
3 files changed, 2 insertions, 35 deletions
diff --git a/ios/MullvadTransport/shadowsocks.h b/ios/MullvadTransport/shadowsocks.h deleted file mode 100644 index 487199ecc5..0000000000 --- a/ios/MullvadTransport/shadowsocks.h +++ /dev/null @@ -1,33 +0,0 @@ -#include <stdarg.h> -#include <stdbool.h> -#include <stdint.h> -#include <stdlib.h> - -typedef struct ProxyHandle { - void *context; - uint16_t port; -} ProxyHandle; - -/** - * # Safety - * `addr`, `password`, `cipher` must be valid for the lifetime of this function call and they must - * be backed by the amount of bytes as stored in the respective `*_len` parameters. - * - * `proxy_config` must be pointing to a valid memory region for the size of a `ProxyHandle` - * instance. - */ -int32_t start_shadowsocks_proxy(const uint8_t *addr, - uintptr_t addr_len, - uint16_t port, - const uint8_t *password, - uintptr_t password_len, - const uint8_t *cipher, - uintptr_t cipher_len, - struct ProxyHandle *proxy_config); - -/** - * # Safety - * `proxy_config` must be pointing to a valid instance of a `ProxyInstance`, as instantiated by - * `start_shadowsocks_proxy`. - */ -int32_t stop_shadowsocks_proxy(struct ProxyHandle *proxy_config); diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj index f7717d3d2c..e7dea2516a 100644 --- a/ios/MullvadVPN.xcodeproj/project.pbxproj +++ b/ios/MullvadVPN.xcodeproj/project.pbxproj @@ -2809,7 +2809,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nCARGO_TARGET_DIR=${PROJECT_DIR}/../target bash ${PROJECT_DIR}/MullvadTransport/shadowsocks-proxy/build.sh shadowsocks-proxy\n"; + shellScript = "CARGO_TARGET_DIR=${PROJECT_DIR}/../target bash ${PROJECT_DIR}/build-rust-library.sh shadowsocks-proxy\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/ios/MullvadTransport/shadowsocks-proxy/build.sh b/ios/build-rust-library.sh index 2a39185a14..9ead5ed673 100644 --- a/ios/MullvadTransport/shadowsocks-proxy/build.sh +++ b/ios/build-rust-library.sh @@ -5,7 +5,7 @@ set -euvx if [ "$#" -ne 1 ] then echo "Usage (note: only call inside xcode!):" - echo "compile-library.sh <FFI_TARGET> <buildvariant>" + echo "build-rust-library.sh <FFI_TARGET>" exit 1 fi |
