-
Notifications
You must be signed in to change notification settings - Fork 12
/
IPtProxy.podspec
75 lines (60 loc) · 2.97 KB
/
IPtProxy.podspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
# Be sure to run `pod lib lint IPtProxy.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'IPtProxy'
s.version = '4.0.1'
s.summary = 'Lyrebird/Obfs4proxy and Snowflake Pluggable Transports for iOS and macOS'
s.description = <<-DESC
Both Lyrebird/Obfs4proxy and Snowflake Pluggable Transports are written in Go, which
is a little annoying to use on iOS and Android.
This project encapsulates all the machinations to make it work and provides an
easy to install binary including a wrapper around both.
Problems solved in particular are:
- One cannot compile `main` packages with `gomobile`. Both PTs are patched
to avoid this.
- Both PTs are gathered under one roof here, since you cannot have two
`gomobile` frameworks as dependencies, since there are some common Go
runtime functions exported, which will create a name clash.
- Environment variable changes during runtime will not be recognized by
`goptlib` when done from within Swift/Objective-C. Therefore, sensible
values are hardcoded in the Go wrapper.
- The ports where the PTs will listen on are hardcoded, since communicating
the used ports back to the app would be quite some work (e.g. trying to
read it from STDOUT) for very little benefit.
- Snowflake and Lyrebird/Obfs4proxy are patched to accept all configuration parameters
directly.
Contained transport versions:
| Transport | Version |
|-----------|--------:|
| Lyrebird | 0.5.0 |
| Snowflake | 2.10.1 |
DESC
s.homepage = 'https://github.com/tladesignz/IPtProxy'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Benjamin Erhart' => '[email protected]' }
s.source = { :git => 'https://github.com/tladesignz/IPtProxy.git', :tag => s.version.to_s }
s.social_media_url = 'https://chaos.social/@tla'
s.ios.deployment_target = '12.0'
s.osx.deployment_target = '11'
s.preserve_paths = 'build.sh', '*.patch', 'IPtProxy.go/*'
# This will only be executed once.
s.prepare_command = './build.sh'
# That's why this is also here, albeit it will be too late here.
# You will need to re-run `pod update` to make the last line work.
s.script_phase = {
:name => 'Go build of IPtProxy.xcframework',
:execution_position => :before_compile,
:script => 'sh "$PODS_TARGET_SRCROOT/build.sh"',
:output_files => ['$(DERIVED_FILE_DIR)/IPtProxy.xcframework'],
}
# This will only work, if `prepare_command` was successful, or if you
# called `pod update` a second time after a build which will have triggered
# the `script_phase`, or if you ran `build.sh` manually.
s.vendored_frameworks = 'IPtProxy.xcframework'
s.libraries = 'resolv'
end