Skip to content

Commit

Permalink
Fixed TorStatic.podspec. Updated README about experimental Arti/Oni…
Browse files Browse the repository at this point in the history
…onmasq.
  • Loading branch information
tladesignz committed Aug 2, 2024
1 parent 2193b7f commit f41a711
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
43 changes: 41 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ or
pod 'Tor/GeoIP', :podspec => 'https://raw.githubusercontent.com/iCepa/Tor.framework/pure_pod/TorStatic.podspec'
```

The subspec will create a "GeoIP" bundle and install a run script phase which
will download the appropriate GeoIP files.
The subspec will create a "GeoIP" bundle with the appropriate GeoIP files.

To use it with Tor, add this to your configuration:

Expand All @@ -193,6 +192,46 @@ configuration.geoipFile = NSBundle.geoIpBundle.geoipFile;
configuration.geoip6File = NSBundle.geoIpBundle.geoip6File;
```

### Experimental Arti and Onionmasq podspec

Since I while, this project also contains a podspec, which uses Arti (A Rust Tor Implementation)
or Onionmasq (Arti with a wrapper taking in IP packets, useful for VPN-style apps.)

```ruby
pod 'Tor/Arti', :podspec => 'https://raw.githubusercontent.com/iCepa/Tor.framework/pure_pod/Arti.podspec'
```

or

```ruby
pod 'Tor/Onionmasq', :podspec => 'https://raw.githubusercontent.com/iCepa/Tor.framework/pure_pod/Arti.podspec'
```

There's currently a known issue: Onionmasq won't compile if you build for iOS or an iOS simulator right away,
since some Rust dependencies use custom build scripts which need to get compiled for MacOS, but will try
to use the wrong platform (iOS) in this case.
This can be fixed, if you compile for your machine first:

```sh
cd Pods/Tor/Tor/onionmasq
make macos-debug-aarch64-apple-darwin # If you run on Apple Silicon
make macos-debug-x86_64-apple-darwin # If you're still on Intel
```

Then, the Rust dependency build scripts will be compiled correctly and the
Xcode build will run correctly.

You can also precompile your debug and release targets on the command line, if you like:

```sh
make macos-release-universal-macos # Release build for MacOS as universal binary
make ios-release-aarch64-apple-ios # Release build for iOS
make ios-debug-aarch64-apple-ios # Debug build for iOS device
make ios-debug-aarch64-apple-ios-sim # Debug build for iOS simulator running on Apple Silicon
make ios-debug-x86_64-apple-ios # Debug build for iOS simulator running on Intel
```


## Further reading

https://tordev.guardianproject.info
Expand Down
1 change: 0 additions & 1 deletion TorStatic.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ ENDSCRIPT

s.user_target_xcconfig = {
'HEADER_SEARCH_PATHS' => '$(inherited) "${PODS_ROOT}/Headers/Public"',
'OTHER_LDFLAGS' => '$(inherited) -l"z" -l"lzma" -l"crypto" -l"ssl" -l"event_core" -l"event_extra" -l"event_pthreads" -l"event" -l"tor"'
}

s.script_phases = [
Expand Down

0 comments on commit f41a711

Please sign in to comment.