Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use probe-cli v3.19.0 #534

Merged
merged 17 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ use_frameworks!
inhibit_all_warnings!

target 'ooniprobe' do
pod "oonimkall", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.18.1/oonimkall.podspec"
pod "libcrypto", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libcrypto.podspec"
pod "libevent", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libevent.podspec"
pod "libssl", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libssl.podspec"
pod "libtor", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libtor.podspec"
pod "libz", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libz.podspec"
pod "oonimkall", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/oonimkall.podspec"
pod 'Toast', '~> 4.0.0'
pod 'MBProgressHUD'
pod 'DZNEmptyDataSet'
Expand All @@ -19,7 +24,12 @@ target 'ooniprobe' do
end

target 'OONIProbeUnitTests' do
pod "oonimkall", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.18.1/oonimkall.podspec"
pod "libcrypto", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libcrypto.podspec"
pod "libevent", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libevent.podspec"
pod "libssl", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libssl.podspec"
pod "libtor", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libtor.podspec"
pod "libz", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libz.podspec"
pod "oonimkall", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/oonimkall.podspec"
pod 'SharkORM', :git => 'https://github.com/sharksync/sharkorm', :tag => 'v2.3.67'
pod 'OCMapper', '2.0'
end
Expand All @@ -28,7 +38,7 @@ post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
Expand Down
35 changes: 30 additions & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ PODS:
- DateTools (2.0.0)
- DZNEmptyDataSet (1.8.1)
- Harpy (4.1.14)
- libcrypto (2023.10.16-230758)
- libevent (2023.10.16-230758)
- libssl (2023.10.16-230758)
- libtor (2023.10.16-230758)
- libz (2023.10.16-230758)
- lottie-ios (2.5.3)
- MBProgressHUD (1.2.0)
- MKDropdownMenu (1.4)
- OCMapper (2.0)
- oonimkall (2023.07.18-162800)
- oonimkall (2023.10.16-230758)
- RHMarkdownLabel (0.0.1):
- TTTAttributedLabel
- XNGMarkdownParser
Expand All @@ -26,11 +31,16 @@ DEPENDENCIES:
- DateTools
- DZNEmptyDataSet
- Harpy
- libcrypto (from `https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libcrypto.podspec`)
- libevent (from `https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libevent.podspec`)
- libssl (from `https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libssl.podspec`)
- libtor (from `https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libtor.podspec`)
- libz (from `https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libz.podspec`)
- lottie-ios (= 2.5.3)
- MBProgressHUD
- MKDropdownMenu
- OCMapper (= 2.0)
- oonimkall (from `https://github.com/ooni/probe-cli/releases/download/v3.18.1/oonimkall.podspec`)
- oonimkall (from `https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/oonimkall.podspec`)
- RHMarkdownLabel
- Sentry (from `https://github.com/getsentry/sentry-cocoa.git`, tag `6.1.4`)
- SharkORM (from `https://github.com/sharksync/sharkorm`, tag `v2.3.67`)
Expand All @@ -52,8 +62,18 @@ SPEC REPOS:
- XNGMarkdownParser

EXTERNAL SOURCES:
libcrypto:
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libcrypto.podspec
libevent:
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libevent.podspec
libssl:
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libssl.podspec
libtor:
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libtor.podspec
libz:
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/libz.podspec
oonimkall:
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.18.1/oonimkall.podspec
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.19.0-alpha.4/oonimkall.podspec
Sentry:
:git: https://github.com/getsentry/sentry-cocoa.git
:tag: 6.1.4
Expand All @@ -74,18 +94,23 @@ SPEC CHECKSUMS:
DateTools: 933ac9c490f21f92127cf690ccd8c397e0126caf
DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7
Harpy: b2fbe6819f6a8932df32d7cd2fb20f442df86bbc
libcrypto: 31c72ba1c3163dc883401737905112116f20a503
libevent: ed39b4c48ded7557fc25d4fa6c00742a19377824
libssl: 26f3dd9546d4894a9a948fad8b5390345e74f774
libtor: 5bf7771e91058a5e3d367b666bd20fa90a4c8725
libz: 7e8bf58f5b129c7d9e534ef911a997b4e679e884
lottie-ios: a50d5c0160425cd4b01b852bb9578963e6d92d31
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
MKDropdownMenu: 269df4a41d21a1db684ce8bc709befe419fc5bae
OCMapper: 9b4d542543794c42adc01f1493d894f53e193cb0
oonimkall: 7765766adbf7284e866fee5590acf55b1b76995e
oonimkall: 3f3ad58bd13b2f7d83a8a6da38a28dd244b2d1b5
RHMarkdownLabel: 81d6772768e621be57302b7fd5212ad4f78fb0bd
Sentry: 9d055e2de30a77685e86b219acf02e59b82091fc
SharkORM: 252e4411923110ac1b524a993ee2b3fa13eed7c4
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
TTTAttributedLabel: 8cffe8e127e4e82ff3af1e5386d4cd0ad000b656
XNGMarkdownParser: aed98c14f0c0eb20064184ddf9bac26c482722b2

PODFILE CHECKSUM: e82378591e42a948797afaec35b1efccdb5765ac
PODFILE CHECKSUM: a3524c14cf982a44d1e5d8e55e5313d4cf8b41bd

COCOAPODS: 1.13.0
14 changes: 12 additions & 2 deletions ooniprobe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@
7940AA8F28117E9000C0EB5D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7940AA972811840900C0EB5D /* share.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = share.entitlements; sourceTree = "<group>"; };
79780FCE27E9F18E002A38B1 /* Languages.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Languages.plist; sourceTree = "<group>"; };
7A8CB0932ADDDAC1005AB2BC /* libcrypto.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libcrypto.xcframework; path = Pods/libcrypto/libcrypto.xcframework; sourceTree = "<group>"; };
7A8CB0942ADDDAC1005AB2BC /* libevent.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libevent.xcframework; path = Pods/libevent/libevent.xcframework; sourceTree = "<group>"; };
7A8CB0952ADDDAC1005AB2BC /* libssl.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libssl.xcframework; path = Pods/libssl/libssl.xcframework; sourceTree = "<group>"; };
7A8CB0962ADDDAC1005AB2BC /* libtor.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libtor.xcframework; path = Pods/libtor/libtor.xcframework; sourceTree = "<group>"; };
7A8CB0972ADDDAC1005AB2BC /* libz.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libz.xcframework; path = Pods/libz/libz.xcframework; sourceTree = "<group>"; };
79AA093C2A86E44400C23E27 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/Localizable.strings; sourceTree = "<group>"; };
79AA093D2A86E47600C23E27 /* my */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = my; path = my.lproj/Localizable.strings; sourceTree = "<group>"; };
7AED19802A6EC9A2003B265A /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -1151,6 +1156,11 @@
F4F15431D4412F561191270F /* Frameworks */ = {
isa = PBXGroup;
children = (
7A8CB0932ADDDAC1005AB2BC /* libcrypto.xcframework */,
7A8CB0942ADDDAC1005AB2BC /* libevent.xcframework */,
7A8CB0952ADDDAC1005AB2BC /* libssl.xcframework */,
7A8CB0962ADDDAC1005AB2BC /* libtor.xcframework */,
7A8CB0972ADDDAC1005AB2BC /* libz.xcframework */,
7AED19802A6EC9A2003B265A /* libresolv.tbd */,
7AED19822A6EC9C7003B265A /* libresolv.tbd */,
ED3582311FE948580078CCEE /* libsqlite3.tbd */,
Expand Down Expand Up @@ -2022,7 +2032,7 @@
IBC_WARNINGS = NO;
IBSC_WARNINGS = NO;
INFOPLIST_FILE = ooniprobe/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited)";
LIBRARY_SEARCH_PATHS = "$(inherited)";
MARKETING_VERSION = 3.8.3;
Expand Down Expand Up @@ -2072,7 +2082,7 @@
IBC_WARNINGS = NO;
IBSC_WARNINGS = NO;
INFOPLIST_FILE = ooniprobe/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited)";
LIBRARY_SEARCH_PATHS = "$(inherited)";
MARKETING_VERSION = 3.8.3;
Expand Down
2 changes: 2 additions & 0 deletions ooniprobe/Test/Suite/CircumventionSuite.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ - (NSArray*)getTestList {
[self.testList addObject:[[Psiphon alloc] init]];
if ([SettingsUtility getSettingWithName:@"test_tor"])
[self.testList addObject:[[Tor alloc] init]];
if ([SettingsUtility getSettingWithName:@"test_riseupvpn"])
[self.testList addObject:[[RiseupVPN alloc] init]];
}
return super.getTestList;
}
Expand Down
5 changes: 3 additions & 2 deletions ooniprobe/Test/Suite/ExperimentalSuite.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ - (id)init {
- (NSArray *)getTestList {
if ([self.testList count] == 0) {
if ([SettingsUtility isExperimentalTestEnabled]) {
[self.testList addObject:[[Experimental alloc] initWithName:@"stunreachability"]];
[self.testList addObject:[[Experimental alloc] initWithName:@"dnscheck"]];
[self.testList addObject:[[Experimental alloc] initWithName:@"echcheck"]];
if ([SettingsUtility isLongRunningTestsInForegroundEnabled] || self.autoRun) {
[self.testList addObject:[[Experimental alloc] initWithName:@"torsf"]];
[self.testList addObject:[[Experimental alloc] initWithName:@"vanilla_tor"]];
}
[self.testList addObject:[[Experimental alloc] initWithName:@"stunreachability"]];
[self.testList addObject:[[Experimental alloc] initWithName:@"dnscheck"]];
}
}
return super.getTestList;
Expand Down
6 changes: 5 additions & 1 deletion ooniprobe/Test/Test/AbstractTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ -(void)runTest{
}
else if ([event.key isEqualToString:@"failure.startup"] ||
[event.key isEqualToString:@"failure.resolver_lookup"]) {
[self.result setFailure_msg:event.value.failure];
if([self.result failure_msg] == nil){
[self.result setFailure_msg:event.value.failure];
} else {
[self.result setFailure_msg:[NSString stringWithFormat:@"%@\n\n%@", [self.result failure_msg], event.value.failure]];
}
[self.result save];
[ThirdPartyServices recordError:@"failure"
reason:event.key
Expand Down
3 changes: 2 additions & 1 deletion ooniprobe/Utility/LocalizationUtility.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ + (NSString*)getLongDescriptionForTest:(NSString*)testName{
return NSLocalizedFormatString(@"Dashboard.Experimental.Overview.Paragraph",
[NSString stringWithFormat:@"%@ %@ %@",
@"\n\n- [STUN Reachability](https://github.com/ooni/spec/blob/master/nettests/ts-025-stun-reachability.md) "
"\n\n- [DNS Check](https://github.com/ooni/spec/blob/master/nettests/ts-028-dnscheck.md) ",
"\n\n- [DNS Check](https://github.com/ooni/spec/blob/master/nettests/ts-028-dnscheck.md) "
"\n\n- [ECH Check](https://github.com/ooni/spec/blob/master/nettests/ts-039-echcheck.md)",
[NSString stringWithFormat:@"%@ ( %@ )", @"\n\n- [Tor Snowflake](https://ooni.org/nettest/tor-snowflake/) ",NSLocalizedFormatString(@"Settings.TestOptions.LongRunningTest",nil)],
[NSString stringWithFormat:@"%@ ( %@ )", @"\n\n- [Vanilla Tor](https://github.com/ooni/spec/blob/master/nettests/ts-016-vanilla-tor.md) ",NSLocalizedFormatString(@"Settings.TestOptions.LongRunningTest",nil)]
]);
Expand Down
4 changes: 3 additions & 1 deletion ooniprobe/Utility/ProxySettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
typedef NS_ENUM(NSInteger, ProxyProtocol) {
NONE,
PSIPHON,
SOCKS5
SOCKS5,
HTTP,
HTTPS
};

@interface ProxySettings : NSObject
Expand Down
32 changes: 30 additions & 2 deletions ooniprobe/Utility/ProxySettings.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ - (id) init {
self.protocol = PSIPHON;
} else if ([protocol isEqualToString:[ProxySettings getProtocol:SOCKS5]]) {
self.protocol = SOCKS5;
} else if ([protocol isEqualToString:[ProxySettings getProtocol:HTTP]]) {
self.protocol = HTTP;
} else if ([protocol isEqualToString:[ProxySettings getProtocol:HTTPS]]) {
self.protocol = HTTPS;
} else {
// This is where we will extend the code to add support for
// more proxies, e.g., HTTP proxies.
Expand All @@ -30,7 +34,7 @@ - (void)saveProxy{
}

- (BOOL)isCustom{
if (self.protocol == SOCKS5)
if (self.protocol == SOCKS5 || self.protocol == HTTP || self.protocol == HTTPS)
return true;
return false;
}
Expand All @@ -49,6 +53,24 @@ - (NSString*)getProxyString{
//URI url = new URI(urlStr);
aanorbel marked this conversation as resolved.
Show resolved Hide resolved
return urlStr;
}
if (self.protocol == HTTP) {
// Alright, we now need to construct a new SOCKS5 URL.
aanorbel marked this conversation as resolved.
Show resolved Hide resolved
NSString *urlStr = [NSString stringWithFormat:@"http://%@:%@/", self.hostname, self.port];
if ([ProxySettings isIPv6:self.hostname]) {
urlStr = [NSString stringWithFormat:@"http://[%@]:%@/", self.hostname, self.port]; // IPv6 must be quoted in URLs
}
//URI url = new URI(urlStr);
aanorbel marked this conversation as resolved.
Show resolved Hide resolved
return urlStr;
}
if (self.protocol == HTTPS) {
// Alright, we now need to construct a new SOCKS5 URL.
aanorbel marked this conversation as resolved.
Show resolved Hide resolved
NSString *urlStr = [NSString stringWithFormat:@"https://%@:%@/", self.hostname, self.port];
if ([ProxySettings isIPv6:self.hostname]) {
urlStr = [NSString stringWithFormat:@"https://[%@]:%@/", self.hostname, self.port]; // IPv6 must be quoted in URLs
}
//URI url = new URI(urlStr);
aanorbel marked this conversation as resolved.
Show resolved Hide resolved
return urlStr;
}
return @"";

}
Expand All @@ -69,7 +91,13 @@ + (NSString*)getProtocol:(ProxyProtocol) protocol {
result = @"proxy_psiphon";
break;
case SOCKS5:
result = @"SOCKS5";
result = @"socks5";
break;
case HTTP:
result = @"http";
break;
case HTTPS:
result = @"https";
break;
default:
result = @"unknown";
Expand Down
20 changes: 16 additions & 4 deletions ooniprobe/View/Settings/ProxyViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ - (void)reloadRows{
@[[ProxySettings getProtocol:NONE],
[ProxySettings getProtocol:PSIPHON],
@"proxy_custom"],
@[[ProxySettings getProtocol:SOCKS5]],
@[
[ProxySettings getProtocol:SOCKS5],
[ProxySettings getProtocol:HTTP],
[ProxySettings getProtocol:HTTPS]
],
@[@"proxy_hostname", @"proxy_port"]];
else
items = @[@[[ProxySettings getProtocol:NONE],
Expand Down Expand Up @@ -124,15 +128,23 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
else if (indexPath.row == 1)
currentProxy.protocol = PSIPHON;
if (indexPath.row == 2)
[self setCustom];
[self setCustom:SOCKS5];
[self reloadRows];
} else if (indexPath.section == 1){
if (indexPath.row == 0)
[self setCustom:SOCKS5];
else if (indexPath.row == 1)
[self setCustom:HTTP];
else if (indexPath.row == 2)
[self setCustom:HTTPS];
[self reloadRows];
}
//[self.view endEditing:YES];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}

-(void)setCustom {
currentProxy.protocol = SOCKS5;
- (void)setCustom:(enum ProxyProtocol)protocol {
currentProxy.protocol = protocol;
}

-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
Expand Down