Skip to content

Commit

Permalink
chore: use probe-cli v3.19.0 (#534)
Browse files Browse the repository at this point in the history
Part of ooni/probe#2524

## Proposed Changes

  - Enable `echcheck` ooni/probe#2567.
  - Enable. `riseupvpn`.
  - Add support for appending errors

---------

Co-authored-by: Simone Basso <bassosimone@gmail.com>
  • Loading branch information
aanorbel and bassosimone committed Oct 20, 2023
1 parent 9602f41 commit beeac1f
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 22 deletions.
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/libcrypto.podspec"
pod "libevent", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0/libevent.podspec"
pod "libssl", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0/libssl.podspec"
pod "libtor", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0/libtor.podspec"
pod "libz", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0/libz.podspec"
pod "oonimkall", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0/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/libcrypto.podspec"
pod "libevent", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0/libevent.podspec"
pod "libssl", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0/libssl.podspec"
pod "libtor", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0/libtor.podspec"
pod "libz", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0/libz.podspec"
pod "oonimkall", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.19.0/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.20-093053)
- libevent (2023.10.20-093053)
- libssl (2023.10.20-093053)
- libtor (2023.10.20-093053)
- libz (2023.10.20-093053)
- lottie-ios (2.5.3)
- MBProgressHUD (1.2.0)
- MKDropdownMenu (1.4)
- OCMapper (2.0)
- oonimkall (2023.07.18-162800)
- oonimkall (2023.10.20-093053)
- 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/libcrypto.podspec`)
- libevent (from `https://github.com/ooni/probe-cli/releases/download/v3.19.0/libevent.podspec`)
- libssl (from `https://github.com/ooni/probe-cli/releases/download/v3.19.0/libssl.podspec`)
- libtor (from `https://github.com/ooni/probe-cli/releases/download/v3.19.0/libtor.podspec`)
- libz (from `https://github.com/ooni/probe-cli/releases/download/v3.19.0/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/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/libcrypto.podspec
libevent:
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.19.0/libevent.podspec
libssl:
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.19.0/libssl.podspec
libtor:
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.19.0/libtor.podspec
libz:
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.19.0/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/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: 7ca9f969d54aac0eebf5263b2b8c3fd97908bc64
libevent: e4bab8744d4d57090e69ac6235fdf4714909d2ad
libssl: eaba80b0e1eea4250828e71655b99ede4ac4368b
libtor: ae56e6fcc080a2c030c8b583cf06037872edd62f
libz: 057607e787b238fee3a922d3bf52ab3fd7b7c443
lottie-ios: a50d5c0160425cd4b01b852bb9578963e6d92d31
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
MKDropdownMenu: 269df4a41d21a1db684ce8bc709befe419fc5bae
OCMapper: 9b4d542543794c42adc01f1493d894f53e193cb0
oonimkall: 7765766adbf7284e866fee5590acf55b1b76995e
oonimkall: 63533c51420ad15121fd18800ed82639b6e813fa
RHMarkdownLabel: 81d6772768e621be57302b7fd5212ad4f78fb0bd
Sentry: 9d055e2de30a77685e86b219acf02e59b82091fc
SharkORM: 252e4411923110ac1b524a993ee2b3fa13eed7c4
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
TTTAttributedLabel: 8cffe8e127e4e82ff3af1e5386d4cd0ad000b656
XNGMarkdownParser: aed98c14f0c0eb20064184ddf9bac26c482722b2

PODFILE CHECKSUM: e82378591e42a948797afaec35b1efccdb5765ac
PODFILE CHECKSUM: cee8da05f005fec950d2db112132f04f0ba3adc9

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
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
31 changes: 28 additions & 3 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 @@ -46,7 +50,22 @@ - (NSString*)getProxyString{
if ([ProxySettings isIPv6:self.hostname]) {
urlStr = [NSString stringWithFormat:@"socks5://[%@]:%@/", self.hostname, self.port]; // IPv6 must be quoted in URLs
}
//URI url = new URI(urlStr);
return urlStr;
}
if (self.protocol == HTTP) {
// Alright, we now need to construct a new HTTP URL.
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
}
return urlStr;
}
if (self.protocol == HTTPS) {
// Alright, we now need to construct a new HTTPS URL.
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
}
return urlStr;
}
return @"";
Expand All @@ -69,7 +88,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

0 comments on commit beeac1f

Please sign in to comment.