Skip to content

Commit

Permalink
ios issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Jan 16, 2024
1 parent b306eff commit 15da22e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ futures-util = { version = "0.3", default-features = false, features = [
http = "1.0"
httparse = "1.8"
lazy_static = "1.4"
log = "0.4"
log = { version = "0.4", features = ["std"] }
moka = { version = "0.12", features = ["future"] }
reqwest = { version = "0.11", default-features = false, features = [
"rustls-tls",
Expand Down
19 changes: 19 additions & 0 deletions apple/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Building iOS framework

### Install **Rust** build tools
- Install Xcode Command Line Tools: `xcode-select --install`
- Install Rust programming language: `curl https://sh.rustup.rs -sSf | sh`
- Install iOS target support: `rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios`
- Install `cbindgen` tool: `cargo install cbindgen`

### Building iOS framework
Due to an unknown reason at present, compiling Rust code from Xcode fails, so you have to manually compile it.
Please run the following command in zsh (or bash):
```bash
cd overtls

cargo build --release --target aarch64-apple-ios
cargo build --release --target x86_64-apple-ios
lipo -create target/aarch64-apple-ios/release/libovertls.a target/x86_64-apple-ios/release/libovertls.a -output target/libovertls.a
cbindgen --config cbindgen.toml -l C -o target/overtls-ios.h
```
21 changes: 0 additions & 21 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,24 +109,3 @@ Note the `tunnel_path` configuration, please make sure to change it to your own
> For testing purposes, the `disable_tls` option is provided to have the ability to disable `TLS`; that is, if this option exists and is true, the software will transmit traffic in `plain text`; for security reasons, please do not use it on official occasions.
This example shows the configuration file of the least entry, the complete configuration file can refer to [config.json](config.json).
## Building iOS framework
### Install **Rust** build tools
- Install Xcode Command Line Tools: `xcode-select --install`
- Install Rust programming language: `curl https://sh.rustup.rs -sSf | sh`
- Install iOS target support: `rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios`
- Install `cbindgen` tool: `cargo install cbindgen`
### Building iOS framework
Due to an unknown reason at present, compiling Rust code from Xcode fails, so you have to manually compile it.
Please run the following command in zsh (or bash):
```
cd overtls
cargo build --release --target aarch64-apple-ios
cargo build --release --target x86_64-apple-ios
lipo -create target/aarch64-apple-ios/release/libovertls.a target/x86_64-apple-ios/release/libovertls.a -output target/libovertls.a
cbindgen --config cbindgen.toml -l C -o target/overtls-ios.h
```

0 comments on commit 15da22e

Please sign in to comment.